diff -upr postgresql-20001229.orig/src/backend/utils/error/elog.c postgresql-20001229/src/backend/utils/error/elog.c --- postgresql-20001229.orig/src/backend/utils/error/elog.c Mon Dec 18 04:00:26 2000 +++ postgresql-20001229/src/backend/utils/error/elog.c Fri Dec 29 16:41:00 2000 @@ -46,8 +46,9 @@ extern int errno; #ifdef __CYGWIN__ # define sys_nerr _sys_nerr -#endif +#else extern int sys_nerr; +#endif extern CommandDest whereToSendOutput; diff -upr postgresql-20001229.orig/src/backend/utils/error/exc.c postgresql-20001229/src/backend/utils/error/exc.c --- postgresql-20001229.orig/src/backend/utils/error/exc.c Sun Oct 29 04:00:28 2000 +++ postgresql-20001229/src/backend/utils/error/exc.c Fri Dec 29 16:41:36 2000 @@ -98,8 +98,9 @@ EnableExceptionHandling(bool on) extern int errno; #ifdef __CYGWIN__ # define sys_nerr _sys_nerr -#endif +#else extern int sys_nerr; +#endif static void ExcPrint(Exception *excP, diff -upr postgresql-20001229.orig/src/backend/utils/mmgr/mcxt.c postgresql-20001229/src/backend/utils/mmgr/mcxt.c --- postgresql-20001229.orig/src/backend/utils/mmgr/mcxt.c Tue Aug 22 03:00:13 2000 +++ postgresql-20001229/src/backend/utils/mmgr/mcxt.c Fri Dec 29 23:46:31 2000 @@ -45,7 +45,7 @@ MemoryContext PostmasterContext = NULL; MemoryContext CacheMemoryContext = NULL; MemoryContext QueryContext = NULL; MemoryContext TopTransactionContext = NULL; -MemoryContext TransactionCommandContext = NULL; +DLLIMPORT MemoryContext TransactionCommandContext = NULL; /***************************************************************************** diff -upr postgresql-20001229.orig/src/include/utils/memutils.h postgresql-20001229/src/include/utils/memutils.h --- postgresql-20001229.orig/src/include/utils/memutils.h Fri Dec 1 04:00:14 2000 +++ postgresql-20001229/src/include/utils/memutils.h Fri Dec 29 23:41:59 2000 @@ -69,7 +69,7 @@ extern MemoryContext PostmasterContext; extern MemoryContext CacheMemoryContext; extern MemoryContext QueryContext; extern MemoryContext TopTransactionContext; -extern MemoryContext TransactionCommandContext; +extern DLLIMPORT MemoryContext TransactionCommandContext; /* diff -upr postgresql-20001229.orig/src/makefiles/Makefile.win postgresql-20001229/src/makefiles/Makefile.win --- postgresql-20001229.orig/src/makefiles/Makefile.win Sun Oct 22 04:00:23 2000 +++ postgresql-20001229/src/makefiles/Makefile.win Sat Dec 30 20:57:13 2000 @@ -2,7 +2,7 @@ LDFLAGS+= -g DLLTOOL= dlltool DLLWRAP= dllwrap -DLLLIBS=-L/usr/local/lib -L$(libdir) -L$(top_builddir)/src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32 +DLLLIBS=-L/usr/local/lib -L$(top_builddir)/src/backend -lpostgres -lcygipc -lcygwin -lcrypt -lkernel32 MK_NO_LORDER=true MAKE_DLL=true #MAKE_DLL=false diff -upr postgresql-20001229.orig/src/utils/dllinit.c postgresql-20001229/src/utils/dllinit.c --- postgresql-20001229.orig/src/utils/dllinit.c Sat Sep 30 03:00:19 2000 +++ postgresql-20001229/src/utils/dllinit.c Fri Dec 29 16:50:05 2000 @@ -54,7 +54,7 @@ HINSTANCE __hDllInstance_base; struct _reent *_impure_ptr; -extern struct _reent *__imp_reent_data; +extern __declspec(dllimport) struct _reent reent_data; /* *---------------------------------------------------------------------- @@ -84,7 +84,7 @@ DllMain( __hDllInstance_base = hInst; #endif /* __CYGWIN__ */ - _impure_ptr = __imp_reent_data; + _impure_ptr = &reent_data; switch (reason) {