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.
* 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)
* app/channel.c: applied fix for the channel_bounds bug from

View File

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

View File

@ -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

View File

@ -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, \

View File

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

View File

@ -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__

View File

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

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

@ -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__

View File

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

View File

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

View File

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