Cygwin with the possible exception of mSQL-interface. Since I don't
have mSQL installed, I skipped this tool.
Except for dealing with a missing getopt.h (oid2name) and HUGE (seg),
the bulk of the patch uses the standard PostgreSQL approach to deal with
Windows DLL issues.
I tested the build aspect of this patch under Cygwin and Linux without
any ill affects. Note that I did not actually attempt to test the code
for functionality.
The procedure to apply the patch is as follows:
$ # save the attachment as /tmp/contrib.patch
$ # change directory to the top of the PostgreSQL source tree
$ patch -p0 </tmp/contrib.patch
Jason
index 260b56e60fda9874a7445b252c86ce9294450444..c247f74fbf84770432d7c3f8c2d5509b02972712 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.14 2001年02月20日 19:20:26 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/array/Attic/Makefile,v 1.15 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/array
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index 014fafa1fe2cb81798c74b503ff105c052206c51..dd851355c402f264d83a28773b698e2e713ea2b6 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.3 2001年02月20日 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/cube/Makefile,v 1.4 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/cube
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS= cube.o cubeparse.o cubescan.o buffer.o
index 6bb4bfe113eda8d6a69b13928abd5660124d53f5..71e34b8c33744a8a93c1a7d45125f033b091a378 100644 (file)
override CFLAGS += -I$(include_srcdir)
override CFLAGS += -I$(libpq_srcdir)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS = $(NAME).o
index 729a42cbb71dce0a6eec16735397a92a19a03bdb..40eb136b0306e186d15b22cf092ba92fbd803081 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.9 2001年05月30日 12:58:45 momjian Exp $
+# $Header: /cvsroot/pgsql/contrib/earthdistance/Makefile,v 1.10 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/earthdistance
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index 3a60a6cf0959aa2a63968a1dc53b787367da97c7..cd89e0388ff75ad59ab393879256463a4f3a53da 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.9 2001年02月20日 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/fulltextindex/Attic/Makefile,v 1.10 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/fulltextindex
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index df0a01bce7083dc983a46fa9647bb9f269dee1ee..fe36156756502b68c18ac8a40d8b5afafc058de6 100644 (file)
-# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.6 2001年05月31日 19:25:27 tgl Exp $
+# $Header: /cvsroot/pgsql/contrib/intarray/Makefile,v 1.7 2001年06月18日 21:38:01 momjian Exp $
subdir = contrib/intarray
top_builddir = ../..
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS= _int.o
index 9f73cc0085e5a8af01641b1ceb7a2bd10b9e8087..a884ad483f3cab6ce12398e187e3f9ce1c9e2216 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.9 2001年02月20日 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/isbn_issn/Attic/Makefile,v 1.10 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/isbn_issn
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index 913ad507ff4d48daef2afc157c7f2fe9f21184b2..78ccb25f7c84b3cb4c8ae117e7d42fd1811d3b3e 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.9 2001年02月20日 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/lo/Makefile,v 1.10 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/lo
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
ifdef REFINT_VERBOSE
override CPPFLAGS+= -DREFINT_VERBOSE
index a745d7f610dc3640bfc46bf5eea152b45a250c5b..4207a83eb9ff94c88ca2ab7ce134cf0e1ccda058 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.14 2001年02月20日 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/miscutil/Attic/Makefile,v 1.15 2001年06月18日 21:38:01 momjian Exp $
#
subdir = contrib/miscutil
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index fbfe66fde33f810ba0800323dad474581132100d..f31c3c06084402b8cda16bf42085c2a5bc2d088c 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.7 2001年02月20日 19:20:27 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/noupdate/Attic/Makefile,v 1.8 2001年06月18日 21:38:02 momjian Exp $
#
subdir = contrib/noupdate
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index a823c5f50b3992b9d3c40f0046b8c9b24d050c14..2bfb0a2a52038ae603c9dfba0f43c54d170bb5e7 100644 (file)
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#include <getopt.h>
#include "libpq-fe.h"
index 85a11c029a6ed3881b0659c59e0bfa0141baad15..408e1c85f60c28e1534794415dc0182fa60323a2 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/pgcrypto/Makefile,v 1.3 2001年02月20日 15:34:14 momjian Exp $
+# $Header: /cvsroot/pgsql/contrib/pgcrypto/Makefile,v 1.4 2001年06月18日 21:38:02 momjian Exp $
#
subdir = contrib/pgcrypto
SO_MINOR_VERSION = 1
override CPPFLAGS += $(CRYPTO_CFLAGS) -I$(srcdir)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: all-lib $(NAME).sql
index bd2b4f15571a132af71d4b241b6e4aa3d337dd65..25dfeeacb174808a155f894f23406227ea6f797b 100644 (file)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)
index 0df4644cf5a164b7600f319fd8363fb76682c7df..4efff4f408365d3bf204a5b4323ae86bf86f17db 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.3 2001年02月20日 19:20:28 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/seg/Makefile,v 1.4 2001年06月18日 21:38:02 momjian Exp $
#
subdir = contrib/seg
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS= seg.o segparse.o segscan.o buffer.o
index adce19c517874b61de0d9dc5b3922d91ca99462b..3c2d6c28c0b9d9b42b1f94db61ededdd4478223b 100644 (file)
#include "postgres.h"
#include "utils/elog.h"
+#ifdef __CYGWIN__
+#define HUGE HUGE_VAL
+#endif /* __CYGWIN__ */
+
#undef yylex /* falure to redefine yylex will result in calling the */
#define yylex seg_yylex /* wrong scanner when running inside postgres backend */
index 54b4fa0b4461a254c0c48aff38313a8d0fbfa10d..76538e052b08fd920c4ac448acb2ffa60e21be2b 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/soundex/Attic/Makefile,v 1.9 2000年10月20日 21:03:28 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/soundex/Attic/Makefile,v 1.10 2001年06月18日 21:38:02 momjian Exp $
#
subdir = contrib/soundex
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index 086b03a6a03a5e6f61693eb5a0310d085bbc471b..b8eaa85acfdc7a03bfdd7483bb68022c4d4bfdc4 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.14 2001年02月20日 19:20:28 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/string/Attic/Makefile,v 1.15 2001年06月18日 21:38:02 momjian Exp $
#
subdir = contrib/string
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index ca13469bd6a2585079cf775e98631195eabc63ad..9ad5170b8963860963e57fc4a58cd9d33e99988c 100644 (file)
#
-# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.14 2001年02月20日 19:20:28 petere Exp $
+# $Header: /cvsroot/pgsql/contrib/userlock/Attic/Makefile,v 1.15 2001年06月18日 21:38:02 momjian Exp $
#
subdir = contrib/userlock
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
index 588c2f99dea2990d690a7a3f6024feff183ef6cc..ce4255cb7d5dc941b04f1b10b78979690a65bea3 100644 (file)
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.86 2001年06月13日 21:44:41 tgl Exp $
+ * $Id: miscadmin.h,v 1.87 2001年06月18日 21:38:02 momjian Exp $
*
* NOTES
* some of the information in this file should be moved to
@@ -115,7 +115,7 @@ extern int PostmasterMain(int argc, char *argv[]);
extern bool Noversion;
extern char *DataDir;
-extern int MyProcPid;
+extern DLLIMPORT int MyProcPid;
extern struct Port *MyProcPort;
extern long MyCancelKey;
*
* extern BackendId MyBackendId;
*/
-extern Oid MyDatabaseId;
+extern DLLIMPORT Oid MyDatabaseId;
extern bool IsUnderPostmaster;
index 04c8bbaf418a521ec541dcf9d950a798a6b6c5aa..2768a772d663cc97e907efab461c09952633fcf3 100644 (file)
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: shmem.h,v 1.28 2001年03月22日 04:01:09 momjian Exp $
+ * $Id: shmem.h,v 1.29 2001年06月18日 21:38:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@ typedef unsigned long SHMEM_OFFSET;
* The macros in this header file can only cope with offsets into this
* shared memory region!
*/
-extern SHMEM_OFFSET ShmemBase;
+extern DLLIMPORT SHMEM_OFFSET ShmemBase;
/* coerce an offset into a pointer in this process's address space */
index a2bcddf862f1c56d5b79b0d8fea829f34c568a0b..7c3dece02fe47268544fc3427f2b230abf563c16 100644 (file)
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: tqual.h,v 1.30 2001年01月24日 19:43:29 momjian Exp $
+ * $Id: tqual.h,v 1.31 2001年06月18日 21:38:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern Snapshot SnapshotDirty;
extern Snapshot QuerySnapshot;
-extern Snapshot SerializableSnapshot;
+extern DLLIMPORT Snapshot SerializableSnapshot;
extern bool ReferentialIntegritySnapshotOverride;