Index: include/port/cygwin.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/include/port/cygwin.h,v retrieving revision 1.2 diff -u -p -u -p -r1.2 cygwin.h --- include/port/cygwin.h 2003/04/18 01:03:42 1.2 +++ include/port/cygwin.h 2003/05/07 20:14:17 @@ -1,7 +1,5 @@ /* $Header: /projects/cvsroot/pgsql-server/src/include/port/cygwin.h,v 1.2 2003/04/18 01:03:42 momjian Exp $ */ -#include - #define HAS_TEST_AND_SET typedef unsigned char slock_t; Index: include/utils/elog.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/include/utils/elog.h,v retrieving revision 1.41 diff -u -p -u -p -r1.41 elog.h --- include/utils/elog.h 2003/04/24 21:16:44 1.41 +++ include/utils/elog.h 2003/05/07 20:14:17 @@ -255,7 +255,7 @@ typedef struct ErrorContextCallback void *arg; } ErrorContextCallback; -extern ErrorContextCallback *error_context_stack; +extern DLLIMPORT ErrorContextCallback *error_context_stack; /* GUC-configurable parameters */ Index: interfaces/ecpg/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/Makefile,v retrieving revision 1.16 diff -u -p -u -p -r1.16 Makefile --- interfaces/ecpg/Makefile 2003/03/30 11:48:18 1.16 +++ interfaces/ecpg/Makefile 2003/05/07 20:14:17 @@ -4,15 +4,15 @@ include $(top_builddir)/src/Makefile.glo all install installdirs uninstall dep depend distprep: $(MAKE) -C include $@ - $(MAKE) -C ecpglib $@ $(MAKE) -C pgtypeslib $@ + $(MAKE) -C ecpglib $@ $(MAKE) -C compatlib $@ $(MAKE) -C preproc $@ clean distclean maintainer-clean: -$(MAKE) -C include $@ - -$(MAKE) -C ecpglib $@ -$(MAKE) -C pgtypeslib $@ + -$(MAKE) -C ecpglib $@ -$(MAKE) -C compatlib $@ -$(MAKE) -C preproc $@ -$(MAKE) -C test clean Index: interfaces/ecpg/compatlib/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/compatlib/Makefile,v retrieving revision 1.3 diff -u -p -u -p -r1.3 Makefile --- interfaces/ecpg/compatlib/Makefile 2003/04/16 05:23:55 1.3 +++ interfaces/ecpg/compatlib/Makefile 2003/05/07 20:14:17 @@ -20,6 +20,10 @@ override CPPFLAGS := -I$(top_srcdir)/src OBJS= informix.o +ifeq ($(PORTNAME), cygwin) +SHLIB_LINK= -L../pgtypeslib -lpgtypes +endif + all: all-lib # Shared library stuff Index: interfaces/ecpg/compatlib/informix.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/compatlib/informix.c,v retrieving revision 1.6 diff -u -p -u -p -r1.6 informix.c --- interfaces/ecpg/compatlib/informix.c 2003/05/06 09:48:25 1.6 +++ interfaces/ecpg/compatlib/informix.c 2003/05/07 20:14:17 @@ -55,7 +55,7 @@ deccopy(Numeric *src, Numeric *target) } static char * -strndup(char *str, int len) +strndup(const char *str, size_t len) { int real_len = strlen(str); int use_len = (real_len > len) ? len : real_len; Index: interfaces/ecpg/ecpglib/Makefile =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/ecpglib/Makefile,v retrieving revision 1.2 diff -u -p -u -p -r1.2 Makefile --- interfaces/ecpg/ecpglib/Makefile 2003/04/08 17:09:01 1.2 +++ interfaces/ecpg/ecpglib/Makefile 2003/05/07 20:14:17 @@ -22,6 +22,9 @@ OBJS= execute.o typename.o descriptor.o connect.o misc.o SHLIB_LINK= $(libpq) +ifeq ($(PORTNAME), cygwin) +SHLIB_LINK+= -L../pgtypeslib -lpgtypes +endif all: all-lib Index: interfaces/ecpg/include/sqlca.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/ecpg/include/sqlca.h,v retrieving revision 1.23 diff -u -p -u -p -r1.23 sqlca.h --- interfaces/ecpg/include/sqlca.h 2003/04/18 01:03:42 1.23 +++ interfaces/ecpg/include/sqlca.h 2003/05/07 20:14:17 @@ -3,7 +3,11 @@ #ifndef DLLIMPORT #if defined(__CYGWIN__) || defined(WIN32) +#ifdef BUILDING_DLL +#define DLLIMPORT __declspec (dllexport) +#else #define DLLIMPORT __declspec (dllimport) +#endif /* BUILDING_DLL */ #else #define DLLIMPORT #endif /* __CYGWIN__ */ Index: makefiles/Makefile.cygwin =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/makefiles/Makefile.cygwin,v retrieving revision 1.1 diff -u -p -u -p -r1.1 Makefile.cygwin --- makefiles/Makefile.cygwin 2003/03/21 17:18:34 1.1 +++ makefiles/Makefile.cygwin 2003/05/07 20:14:17 @@ -23,7 +23,7 @@ override CPPFLAGS+= -DBUILDING_DLL endif endif -ifneq (,$(findstring ecpg/lib,$(subdir))) +ifneq (,$(findstring ecpg/ecpglib,$(subdir))) override CPPFLAGS+= -DBUILDING_DLL endif