Commit 4e886ad4 authored by Tor Lillqvist's avatar Tor Lillqvist

Check for mmap.

	* configure.in: Check for mmap.

	* app/makefile.msc: Depend on gimpi.lib.

	* app/app_procs.c (app_init): Fix gccism: Allocate filenames (an
 	array with non-constant size) dynamically.

	* app/{datafiles,fileops,general,install,module_db,temp_buf}.c:
 	Include glib.h before standard headers, because of certain obscure
 	details related to compiling with gcc on Win32.

	(If you really want to know: glib.h defines he names of POSIXish
	(but non-ANSI) functions as prefixed with underscore, because
 	that's how they are named in the msvcrt runtime C library we want
 	to use. However, defining stat as _stat causes some problems if
 	done after including the mingw32 <sys/stat.h>. So, it's easiest to
 	include <glib.h> early.)

	* app/main.c: Use _stdcall and __argc, __argv with MSC, but
 	__attribute__((stdcall)) and _argc, _argv with gcc. Don't print
 	the "Passed serialization test" message on Win32. (It would open
 	up an otherwise unnecessary console window.)

	* app/paint_funcs.c (gaussian_blur_region): Don't use variable sum
 	until initialized.

	* app/{bezier_select,paths_dialog}.c: Include config.h and define
 	rint() if necessary.

	* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
parent 3893b295
1999-05-28 Tor Lillqvist <tml@iki.fi>
* configure.in: Check for mmap.
* app/makefile.msc: Depend on gimpi.lib.
* app/app_procs.c (app_init): Fix gccism: Allocate filenames (an
array with non-constant size) dynamically.
* app/{datafiles,fileops,general,install,module_db,temp_buf}.c:
Include glib.h before standard headers, because of certain obscure
details related to compiling with gcc on Win32.
(If you really want to know: glib.h defines he names of POSIXish
(but non-ANSI) functions as prefixed with underscore, because
that's how they are named in the msvcrt runtime C library we want
to use. However, defining stat as _stat causes some problems if
done after including the mingw32 <sys/stat.h>. So, it's easiest to
include <glib.h> early.)
* app/main.c: Use _stdcall and __argc, __argv with MSC, but
__attribute__((stdcall)) and _argc, _argv with gcc. Don't print
the "Passed serialization test" message on Win32. (It would open
up an otherwise unnecessary console window.)
* app/paint_funcs.c (gaussian_blur_region): Don't use variable sum
until initialized.
* app/{bezier_select,paths_dialog}.c: Include config.h and define
rint() if necessary.
* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
Thu May 27 22:04:49 1999 Jay Cox (jaycox@earthlink.net)
* app/channel.c: applied fix for the channel_bounds bug from
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -562,7 +562,7 @@ app_init (void)
*/
{
FILE *fp;
gchar *filenames[last_opened_size];
gchar **filenames = g_malloc (sizeof (gchar *) * last_opened_size);
int dummy, i;
if ((fp = idea_manager_parse_init (&dummy, &dummy, &dummy, &dummy)))
......@@ -581,6 +581,7 @@ app_init (void)
fclose (fp);
}
g_free (filenames);
}
gximage_init ();
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
......
......@@ -15,6 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -36,6 +39,10 @@
#include "libgimp/gimpintl.h"
#ifndef HAVE_RINT
#define rint(x) floor (x + 0.5)
#endif
/* Bezier extensions made by Raphael FRANCOIS (fraph@ibm.net)
BEZIER_EXTENDS VER 1.0
......
......@@ -20,6 +20,8 @@
*/
#include "config.h"
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -42,7 +44,6 @@
#endif
#endif
#include <glib.h>
#include "datafiles.h"
#include "errors.h"
#include "general.h"
......
......@@ -20,6 +20,8 @@
*/
#include "config.h"
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -42,7 +44,6 @@
#endif
#endif
#include <glib.h>
#include "datafiles.h"
#include "errors.h"
#include "general.h"
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......
......@@ -19,6 +19,8 @@
#include "config.h"
#include <glib.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
......
......@@ -15,6 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <glib.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
......@@ -22,7 +24,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <glib.h>
#ifdef NATIVE_WIN32
#ifndef S_ISREG
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
......
......@@ -17,6 +17,8 @@
* Some of this code is based on the layers_dialog box code.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -66,6 +68,10 @@
#include "pixmaps/path.xbm"
#include "pixmaps/locked.xpm"
#ifndef HAVE_RINT
#define rint(x) floor (x + 0.5)
#endif
#define PREVIEW_EVENT_MASK GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK
#define PATHS_LIST_WIDTH 200
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......
......@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -363,6 +364,12 @@ main (int argc, char **argv)
/* In case we build this as a windowed application */
#ifdef __GNUC__
#define _stdcall __attribute__((stdcall))
#define __argc _argc
#define __argv _argv
#endif
int _stdcall
WinMain (int hInstance, int hPrevInstance, char *lpszCmdLine, int nCmdShow)
{
......@@ -531,6 +538,8 @@ static void test_gserialize()
if (to->test_array[1] != ts->test_array[1])
g_message("int16array value 1 test failed(please email your system configuration to jaycox@earthlink.net): %d\n", to->test_array[1]);
/* really should free the memory... */
#ifndef NATIVE_WIN32
g_message("Passed serialization test\n");
#endif
}/*
67108864 */
......@@ -2,15 +2,19 @@
## Use: nmake -f makefile.msc
# Change this to wherever you want to install gimp.exe.
BIN = D:\gimp\bin
BIN = C:\gimp\bin
# Full optimization:
#OPTIMIZE = -Ox
# Debugging:
OPTIMIZE = -Zi
################################################################
# Nothing much configurable below
# cl -? describes the options
#CC = cl -GA -G5 -GF -Ox -W3 -MD -nologo
CC = cl -GA -G5 -GF -Zi -W3 -MD -nologo
CC = cl -GA -G5 -GF $(OPTIMIZE) -W3 -MD -nologo
# Change to /subsystem:console when debugging
LDFLAGS = /link /subsystem:windows /machine:ix86 /debug
......@@ -236,7 +240,7 @@ gimp_OBJECTS = \
gimp.res : gimp.rc wilber.ico
rc -r -fo gimp.res gimp.rc
gimp.exe : ../config.h $(gimp_OBJECTS) gimpim.lib gimp.def gimp.res
gimp.exe : ..\config.h $(gimp_OBJECTS) gimpim.lib gimp.def gimp.res ..\libgimp\gimpi.lib
$(CC) $(CFLAGS) -Fegimp.exe $(gimp_OBJECTS) gimpim.lib ..\libgimp\gimpi.lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\win32\gdk-$(GTK_VER).lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib $(LDFLAGS) gimp.res gdi32.lib user32.lib /def:gimp.def
# General rule for building $(gimp_OBJECTS)
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -20,6 +20,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
......
......@@ -3557,8 +3557,6 @@ gaussian_blur_region (PixelRegion *srcR,
buf = g_malloc (sizeof (int) * MAXIMUM (width, height) * 2);
total = sum[length] - sum[-length];
if (radius_y != 0.0)
{
std_dev = sqrt (-(radius_y * radius_y) / (2 * log (1.0 / 255.0)));
......
......@@ -3557,8 +3557,6 @@ gaussian_blur_region (PixelRegion *srcR,
buf = g_malloc (sizeof (int) * MAXIMUM (width, height) * 2);
total = sum[length] - sum[-length];
if (radius_y != 0.0)
{
std_dev = sqrt (-(radius_y * radius_y) / (2 * log (1.0 / 255.0)));
......
......@@ -17,6 +17,8 @@
* Some of this code is based on the layers_dialog box code.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -66,6 +68,10 @@
#include "pixmaps/path.xbm"
#include "pixmaps/locked.xpm"
#ifndef HAVE_RINT
#define rint(x) floor (x + 0.5)
#endif
#define PREVIEW_EVENT_MASK GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK
#define PATHS_LIST_WIDTH 200
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -887,7 +887,7 @@ plug_in_open (PlugIn *plug_in)
fcntl(my_write[1], F_SETFD, 1);
#endif
#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__)
plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
......
......@@ -15,6 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -36,6 +39,10 @@
#include "libgimp/gimpintl.h"
#ifndef HAVE_RINT
#define rint(x) floor (x + 0.5)
#endif
/* Bezier extensions made by Raphael FRANCOIS (fraph@ibm.net)
BEZIER_EXTENDS VER 1.0
......
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......
......@@ -398,6 +398,8 @@ AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), [
AC_CHECK_LIB(m, rint, [
AC_DEFINE(HAVE_RINT)])])
AC_CHECK_FUNCS(mmap)
dnl check for inline
AC_MSG_CHECKING([for inline definition in glibconfig.h])
AC_EGREP_CPP(glib_defines_inline,
......
......@@ -20,6 +20,8 @@
*/
#include "config.h"
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......@@ -42,7 +44,6 @@
#endif
#endif
#include <glib.h>
#include "datafiles.h"
#include "errors.h"
#include "general.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment