No need for <io.h> on Win32.

* libgimp/gimp.c: No need for <io.h> on Win32.

	* libgimp/{gimp,gimpui}.def: Add two entry points.

	* libgimp/gimp.h: Can't use __declspec(dllexport) for PLUG_IN_INFO
	when compiling with gcc on Win32. Also handle __argc, __argv and
	_stdcall differently with gcc on Win32

	* libgimp/gimpenv.c: Include <string.h>.

	* libgimp/gimpfeatures.h.in: Remove lots of extraneous trailing blanks.

	* libgimp/gimpfileselection.c: Include <glib.h> early, see above.

	* libgimp/{gimpwire,parasite}.c: Test for NATIVE_WIN32, not
	_MSC_VER.

	* libgimp/makefile.msc: Miscellaneous updates. The gimpi library
 	is now built as a static library.
This commit is contained in:
Tor Lillqvist
1999-05-28 21:56:04 +00:00
parent 4e886ad428
commit b6021023ee
18 changed files with 74 additions and 27 deletions

View File

@ -31,6 +31,26 @@
* app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2. * app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2.
* libgimp/gimp.c: No need for <io.h> on Win32.
* libgimp/{gimp,gimpui}.def: Add two entry points.
* libgimp/gimp.h: Can't use __declspec(dllexport) for PLUG_IN_INFO
when compiling with gcc on Win32. Also handle __argc, __argv and
_stdcall differently with gcc on Win32
* libgimp/gimpenv.c: Include <string.h>.
* libgimp/gimpfeatures.h.in: Remove lots of extraneous trailing blanks.
* libgimp/gimpfileselection.c: Include <glib.h> early, see above.
* libgimp/{gimpwire,parasite}.c: Test for NATIVE_WIN32, not
_MSC_VER.
* libgimp/makefile.msc: Miscellaneous updates. The gimpi library
is now built as a static library.
Thu May 27 22:04:49 1999 Jay Cox (jaycox@earthlink.net) Thu May 27 22:04:49 1999 Jay Cox (jaycox@earthlink.net)
* app/channel.c: applied fix for the channel_bounds bug from * app/channel.c: applied fix for the channel_bounds bug from

View File

@ -53,9 +53,6 @@
#ifdef WIN32 #ifdef WIN32
# define STRICT # define STRICT
# include <windows.h> # include <windows.h>
# ifdef _MSC_VER
# include <io.h>
# endif
#endif #endif
#ifdef __EMX__ #ifdef __EMX__
# include <fcntl.h> # include <fcntl.h>

View File

@ -97,6 +97,7 @@ EXPORTS
gimp_image_get_layers gimp_image_get_layers
gimp_image_get_selection gimp_image_get_selection
gimp_image_get_resolution gimp_image_get_resolution
gimp_image_get_unit
gimp_image_height gimp_image_height
gimp_image_lower_channel gimp_image_lower_channel
gimp_image_lower_layer gimp_image_lower_layer
@ -116,6 +117,7 @@ EXPORTS
gimp_image_set_component_visible gimp_image_set_component_visible
gimp_image_set_filename gimp_image_set_filename
gimp_image_set_resolution gimp_image_set_resolution
gimp_image_set_unit
gimp_image_width gimp_image_width
gimp_install_cmap gimp_install_cmap
gimp_install_procedure gimp_install_procedure

View File

@ -89,8 +89,12 @@ struct _GPlugInInfo
* In gimp.c, we don't declare it at all, but fetch the address * In gimp.c, we don't declare it at all, but fetch the address
* of it with GetProcAddress. * of it with GetProcAddress.
*/ */
#ifdef __GNUC__
GPlugInInfo PLUG_IN_INFO;
#else
__declspec(dllexport) GPlugInInfo PLUG_IN_INFO; __declspec(dllexport) GPlugInInfo PLUG_IN_INFO;
#endif #endif
#endif
struct _GTile struct _GTile
{ {
@ -190,6 +194,13 @@ struct _GParam
* define a main() in case some plug-in still is built as a console * define a main() in case some plug-in still is built as a console
* application. * application.
*/ */
# ifdef __GNUC__
/* With gcc these must be handled differently */
# define __argc _argc
# define __argv _argv
# define _stdcall __attribute__((stdcall))
# endif
# define MAIN() \ # define MAIN() \
int _stdcall \ int _stdcall \
WinMain (int hInstance, \ WinMain (int hInstance, \

View File

@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
#include <glib.h> #include <glib.h>
#include <string.h>
#include "gimpenv.h" #include "gimpenv.h"
#include "gimpintl.h" #include "gimpintl.h"

View File

@ -21,6 +21,9 @@
*/ */
#include "config.h" #include "config.h"
#include <glib.h> /* Needed here by Win32 gcc compilation */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H

View File

@ -28,7 +28,7 @@
#include <string.h> #include <string.h>
#include <glib.h> #include <glib.h>
#ifdef _MSC_VER #ifdef NATIVE_WIN32
#include <process.h> /* For _getpid() */ #include <process.h> /* For _getpid() */
#endif #endif

View File

@ -4,6 +4,10 @@ EXPORTS
gimp_brush_select_widget_set_popup gimp_brush_select_widget_set_popup
gimp_channel_menu_new gimp_channel_menu_new
gimp_drawable_menu_new gimp_drawable_menu_new
gimp_file_selection_get_filename
gimp_file_selection_get_type
gimp_file_selection_new
gimp_file_selection_set_filename
gimp_gradient_select_widget gimp_gradient_select_widget
gimp_gradient_select_widget_close_popup gimp_gradient_select_widget_close_popup
gimp_gradient_select_widget_set_popup gimp_gradient_select_widget_set_popup

View File

@ -31,7 +31,7 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef _MSC_VER #ifdef NATIVE_WIN32
#include <process.h> #include <process.h>
#include <io.h> #include <io.h>
#endif #endif

View File

@ -1,10 +1,10 @@
## Makefile for building the GIMP DLLs with Microsoft C. ## Makefile for building the GIMP DLLs and LIBs with Microsoft C.
## Use: nmake -f makefile.msc ## Use: nmake -f makefile.msc
# Change this to wherever you want to install the DLLs. This directory # Change this to wherever you want to install the DLLs. This directory
# should be in your PATH. As these DLLs are for the GIMP and its plug-ins # should be in your PATH. As these DLLs are for the GIMP and its plug-ins
# only, it probably is best to keep them in the GIMP's bin directory. # only, it probably is best to keep them in the GIMP's bin directory.
BIN = D:\gimp\bin BIN = C:\gimp\bin
GIMP_VER = 1.1 GIMP_VER = 1.1
@ -47,7 +47,6 @@ gimpfeatures.h : gimpfeatures.h.win32
copy gimpfeatures.h.win32 gimpfeatures.h copy gimpfeatures.h.win32 gimpfeatures.h
install : all install : all
$(INSTALL) gimpi-$(GIMP_VER).dll $(BIN)
$(INSTALL) gimp-$(GIMP_VER).dll $(BIN) $(INSTALL) gimp-$(GIMP_VER).dll $(BIN)
$(INSTALL) gimpui-$(GIMP_VER).dll $(BIN) $(INSTALL) gimpui-$(GIMP_VER).dll $(BIN)
$(TOUCH) install $(TOUCH) install
@ -91,6 +90,8 @@ gimp_OBJECTS = \
gimp-$(GIMP_VER).dll : $(gimp_OBJECTS) gimp.def gimp-$(GIMP_VER).dll : $(gimp_OBJECTS) gimp.def
$(CC) $(CFLAGS) -LD -Fegimp-$(GIMP_VER).dll $(gimp_OBJECTS) $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS) user32.lib /def:gimp.def $(CC) $(CFLAGS) -LD -Fegimp-$(GIMP_VER).dll $(gimp_OBJECTS) $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS) user32.lib /def:gimp.def
# Pass -DLIBGIMP_COMPILATION when compiling these
gimp.obj : gimp.c gimp.obj : gimp.c
$(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimp.c $(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimp.c
gimpchannel.obj : gimpchannel.c gimpchannel.obj : gimpchannel.c
@ -131,6 +132,7 @@ parasite.obj : parasite.c
gimpui_OBJECTS = \ gimpui_OBJECTS = \
gimpmenu.obj \ gimpmenu.obj \
gimpbrushmenu.obj\ gimpbrushmenu.obj\
gimpfileselection.obj\
gimpgradientmenu.obj\ gimpgradientmenu.obj\
gimppatternmenu.obj gimppatternmenu.obj

View File

@ -28,7 +28,7 @@
#include <string.h> #include <string.h>
#include <glib.h> #include <glib.h>
#ifdef _MSC_VER #ifdef NATIVE_WIN32
#include <process.h> /* For _getpid() */ #include <process.h> /* For _getpid() */
#endif #endif

View File

@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
#include <glib.h> #include <glib.h>
#include <string.h>
#include "gimpenv.h" #include "gimpenv.h"
#include "gimpintl.h" #include "gimpintl.h"

View File

@ -28,7 +28,7 @@
#include <string.h> #include <string.h>
#include <glib.h> #include <glib.h>
#ifdef _MSC_VER #ifdef NATIVE_WIN32
#include <process.h> /* For _getpid() */ #include <process.h> /* For _getpid() */
#endif #endif

View File

@ -31,7 +31,7 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef _MSC_VER #ifdef NATIVE_WIN32
#include <process.h> #include <process.h>
#include <io.h> #include <io.h>
#endif #endif

View File

@ -21,6 +21,9 @@
*/ */
#include "config.h" #include "config.h"
#include <glib.h> /* Needed here by Win32 gcc compilation */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H

View File

@ -21,6 +21,9 @@
*/ */
#include "config.h" #include "config.h"
#include <glib.h> /* Needed here by Win32 gcc compilation */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H