diff --git a/ChangeLog b/ChangeLog index eebf47d6e1..205df3b760 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,26 @@ * app/plug_in.c: Use _spawnv, not spawnv, on Win32 and OS/2. + * libgimp/gimp.c: No need for 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 . + + * libgimp/gimpfeatures.h.in: Remove lots of extraneous trailing blanks. + + * libgimp/gimpfileselection.c: Include 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) * app/channel.c: applied fix for the channel_bounds bug from diff --git a/libgimp/gimp.c b/libgimp/gimp.c index 3939bccca3..975b95276c 100644 --- a/libgimp/gimp.c +++ b/libgimp/gimp.c @@ -53,9 +53,6 @@ #ifdef WIN32 # define STRICT # include -# ifdef _MSC_VER -# include -# endif #endif #ifdef __EMX__ # include diff --git a/libgimp/gimp.def b/libgimp/gimp.def index ef32687884..d39b15b982 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -97,6 +97,7 @@ EXPORTS gimp_image_get_layers gimp_image_get_selection gimp_image_get_resolution + gimp_image_get_unit gimp_image_height gimp_image_lower_channel gimp_image_lower_layer @@ -116,6 +117,7 @@ EXPORTS gimp_image_set_component_visible gimp_image_set_filename gimp_image_set_resolution + gimp_image_set_unit gimp_image_width gimp_install_cmap gimp_install_procedure diff --git a/libgimp/gimp.h b/libgimp/gimp.h index 16151aa6ca..31dde44157 100644 --- a/libgimp/gimp.h +++ b/libgimp/gimp.h @@ -89,8 +89,12 @@ struct _GPlugInInfo * In gimp.c, we don't declare it at all, but fetch the address * of it with GetProcAddress. */ +#ifdef __GNUC__ +GPlugInInfo PLUG_IN_INFO; +#else __declspec(dllexport) GPlugInInfo PLUG_IN_INFO; #endif +#endif struct _GTile { @@ -190,6 +194,13 @@ struct _GParam * define a main() in case some plug-in still is built as a console * application. */ +# ifdef __GNUC__ + /* With gcc these must be handled differently */ +# define __argc _argc +# define __argv _argv +# define _stdcall __attribute__((stdcall)) +# endif + # define MAIN() \ int _stdcall \ WinMain (int hInstance, \ diff --git a/libgimp/gimpenv.c b/libgimp/gimpenv.c index dad725493f..d5e115b027 100644 --- a/libgimp/gimpenv.c +++ b/libgimp/gimpenv.c @@ -21,6 +21,7 @@ #include "config.h" #include +#include #include "gimpenv.h" #include "gimpintl.h" diff --git a/libgimp/gimpfeatures.h.in b/libgimp/gimpfeatures.h.in index ca452c287f..09ab77b5ca 100644 --- a/libgimp/gimpfeatures.h.in +++ b/libgimp/gimpfeatures.h.in @@ -1,21 +1,21 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. - */ + */ #ifndef __GIMP_FEATURES_H__ #define __GIMP_FEATURES_H__ diff --git a/libgimp/gimpfileselection.c b/libgimp/gimpfileselection.c index 6e5cd66384..234ffbd109 100644 --- a/libgimp/gimpfileselection.c +++ b/libgimp/gimpfileselection.c @@ -21,6 +21,9 @@ */ #include "config.h" + +#include /* Needed here by Win32 gcc compilation */ + #include #include #ifdef HAVE_UNISTD_H diff --git a/libgimp/gimpparasite.c b/libgimp/gimpparasite.c index b66db47d55..570c61d25b 100644 --- a/libgimp/gimpparasite.c +++ b/libgimp/gimpparasite.c @@ -28,7 +28,7 @@ #include #include -#ifdef _MSC_VER +#ifdef NATIVE_WIN32 #include /* For _getpid() */ #endif diff --git a/libgimp/gimpui.def b/libgimp/gimpui.def index ab7e0211fc..116e55b7a2 100644 --- a/libgimp/gimpui.def +++ b/libgimp/gimpui.def @@ -4,6 +4,10 @@ EXPORTS gimp_brush_select_widget_set_popup gimp_channel_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_close_popup gimp_gradient_select_widget_set_popup diff --git a/libgimp/gimpwire.c b/libgimp/gimpwire.c index b540d36b12..70a75dd8a4 100644 --- a/libgimp/gimpwire.c +++ b/libgimp/gimpwire.c @@ -31,7 +31,7 @@ #include #endif -#ifdef _MSC_VER +#ifdef NATIVE_WIN32 #include #include #endif diff --git a/libgimp/makefile.msc b/libgimp/makefile.msc index 924a893798..56c031325c 100644 --- a/libgimp/makefile.msc +++ b/libgimp/makefile.msc @@ -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 # 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 # 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 @@ -47,7 +47,6 @@ gimpfeatures.h : gimpfeatures.h.win32 copy gimpfeatures.h.win32 gimpfeatures.h install : all - $(INSTALL) gimpi-$(GIMP_VER).dll $(BIN) $(INSTALL) gimp-$(GIMP_VER).dll $(BIN) $(INSTALL) gimpui-$(GIMP_VER).dll $(BIN) $(TOUCH) install @@ -91,6 +90,8 @@ gimp_OBJECTS = \ 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 +# Pass -DLIBGIMP_COMPILATION when compiling these + gimp.obj : gimp.c $(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimp.c gimpchannel.obj : gimpchannel.c @@ -131,6 +132,7 @@ parasite.obj : parasite.c gimpui_OBJECTS = \ gimpmenu.obj \ gimpbrushmenu.obj\ + gimpfileselection.obj\ gimpgradientmenu.obj\ gimppatternmenu.obj diff --git a/libgimp/parasite.c b/libgimp/parasite.c index b66db47d55..570c61d25b 100644 --- a/libgimp/parasite.c +++ b/libgimp/parasite.c @@ -28,7 +28,7 @@ #include #include -#ifdef _MSC_VER +#ifdef NATIVE_WIN32 #include /* For _getpid() */ #endif diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c index dad725493f..d5e115b027 100644 --- a/libgimpbase/gimpenv.c +++ b/libgimpbase/gimpenv.c @@ -21,6 +21,7 @@ #include "config.h" #include +#include #include "gimpenv.h" #include "gimpintl.h" diff --git a/libgimpbase/gimpparasite.c b/libgimpbase/gimpparasite.c index b66db47d55..570c61d25b 100644 --- a/libgimpbase/gimpparasite.c +++ b/libgimpbase/gimpparasite.c @@ -28,7 +28,7 @@ #include #include -#ifdef _MSC_VER +#ifdef NATIVE_WIN32 #include /* For _getpid() */ #endif diff --git a/libgimpbase/gimpversion.h.in b/libgimpbase/gimpversion.h.in index ca452c287f..09ab77b5ca 100644 --- a/libgimpbase/gimpversion.h.in +++ b/libgimpbase/gimpversion.h.in @@ -1,21 +1,21 @@ -/* LIBGIMP - The GIMP Library - * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. - */ + */ #ifndef __GIMP_FEATURES_H__ #define __GIMP_FEATURES_H__ diff --git a/libgimpbase/gimpwire.c b/libgimpbase/gimpwire.c index b540d36b12..70a75dd8a4 100644 --- a/libgimpbase/gimpwire.c +++ b/libgimpbase/gimpwire.c @@ -31,7 +31,7 @@ #include #endif -#ifdef _MSC_VER +#ifdef NATIVE_WIN32 #include #include #endif diff --git a/libgimpwidgets/gimpfileentry.c b/libgimpwidgets/gimpfileentry.c index 6e5cd66384..234ffbd109 100644 --- a/libgimpwidgets/gimpfileentry.c +++ b/libgimpwidgets/gimpfileentry.c @@ -21,6 +21,9 @@ */ #include "config.h" + +#include /* Needed here by Win32 gcc compilation */ + #include #include #ifdef HAVE_UNISTD_H diff --git a/libgimpwidgets/gimpfileselection.c b/libgimpwidgets/gimpfileselection.c index 6e5cd66384..234ffbd109 100644 --- a/libgimpwidgets/gimpfileselection.c +++ b/libgimpwidgets/gimpfileselection.c @@ -21,6 +21,9 @@ */ #include "config.h" + +#include /* Needed here by Win32 gcc compilation */ + #include #include #ifdef HAVE_UNISTD_H