summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2001-06-18 21:38:02 +0000
committerBruce Momjian2001-06-18 21:38:02 +0000
commit558fae16e3d09afeb75a8a048ab750d559ff5848 (patch)
treef7b871c051f605e6137e240ccdd5eb3eda5d6d01
parent22dc12b8c3480261d643d0087e98e0cc69feb693 (diff)
The attached patch enables the contrib subtree to build cleanly under
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
-rw-r--r--contrib/array/Makefile3
-rw-r--r--contrib/cube/Makefile3
-rw-r--r--contrib/dblink/Makefile1
-rw-r--r--contrib/earthdistance/Makefile3
-rw-r--r--contrib/fulltextindex/Makefile3
-rw-r--r--contrib/intarray/Makefile3
-rw-r--r--contrib/isbn_issn/Makefile3
-rw-r--r--contrib/lo/Makefile3
-rw-r--r--contrib/miscutil/Makefile3
-rw-r--r--contrib/noupdate/Makefile3
-rw-r--r--contrib/oid2name/oid2name.c1
-rw-r--r--contrib/pgcrypto/Makefile3
-rw-r--r--contrib/rserv/Makefile1
-rw-r--r--contrib/seg/Makefile3
-rw-r--r--contrib/seg/segparse.y4
-rw-r--r--contrib/soundex/Makefile3
-rw-r--r--contrib/string/Makefile3
-rw-r--r--contrib/userlock/Makefile3
-rw-r--r--src/include/miscadmin.h6
-rw-r--r--src/include/storage/shmem.h4
-rw-r--r--src/include/utils/tqual.h4
21 files changed, 42 insertions, 21 deletions
diff --git a/contrib/array/Makefile b/contrib/array/Makefile
index 260b56e60fd..c247f74fbf8 100644
--- a/contrib/array/Makefile
+++ b/contrib/array/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/cube/Makefile b/contrib/cube/Makefile
index 014fafa1fe2..dd851355c40 100644
--- a/contrib/cube/Makefile
+++ b/contrib/cube/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -15,6 +15,7 @@ SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS= cube.o cubeparse.o cubescan.o buffer.o
diff --git a/contrib/dblink/Makefile b/contrib/dblink/Makefile
index 6bb4bfe113e..71e34b8c337 100644
--- a/contrib/dblink/Makefile
+++ b/contrib/dblink/Makefile
@@ -12,6 +12,7 @@ override CFLAGS += -I$(srcdir)
override CFLAGS += -I$(include_srcdir)
override CFLAGS += -I$(libpq_srcdir)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS = $(NAME).o
diff --git a/contrib/earthdistance/Makefile b/contrib/earthdistance/Makefile
index 729a42cbb71..40eb136b030 100644
--- a/contrib/earthdistance/Makefile
+++ b/contrib/earthdistance/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/fulltextindex/Makefile b/contrib/fulltextindex/Makefile
index 3a60a6cf095..cd89e0388ff 100644
--- a/contrib/fulltextindex/Makefile
+++ b/contrib/fulltextindex/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/intarray/Makefile b/contrib/intarray/Makefile
index df0a01bce70..fe361567565 100644
--- a/contrib/intarray/Makefile
+++ b/contrib/intarray/Makefile
@@ -1,4 +1,4 @@
-# $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 = ../..
@@ -13,6 +13,7 @@ SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS= _int.o
diff --git a/contrib/isbn_issn/Makefile b/contrib/isbn_issn/Makefile
index 9f73cc0085e..a884ad483f3 100644
--- a/contrib/isbn_issn/Makefile
+++ b/contrib/isbn_issn/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/lo/Makefile b/contrib/lo/Makefile
index 913ad507ff4..78ccb25f7c8 100644
--- a/contrib/lo/Makefile
+++ b/contrib/lo/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -14,6 +14,7 @@ MODS = $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
ifdef REFINT_VERBOSE
override CPPFLAGS+= -DREFINT_VERBOSE
diff --git a/contrib/miscutil/Makefile b/contrib/miscutil/Makefile
index a745d7f610d..4207a83eb9f 100644
--- a/contrib/miscutil/Makefile
+++ b/contrib/miscutil/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/noupdate/Makefile b/contrib/noupdate/Makefile
index fbfe66fde33..f31c3c06084 100644
--- a/contrib/noupdate/Makefile
+++ b/contrib/noupdate/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c
index a823c5f50b3..2bfb0a2a520 100644
--- a/contrib/oid2name/oid2name.c
+++ b/contrib/oid2name/oid2name.c
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#include <getopt.h>
#include "libpq-fe.h"
diff --git a/contrib/pgcrypto/Makefile b/contrib/pgcrypto/Makefile
index 85a11c029a6..408e1c85f60 100644
--- a/contrib/pgcrypto/Makefile
+++ b/contrib/pgcrypto/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -43,6 +43,7 @@ SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 1
override CPPFLAGS += $(CRYPTO_CFLAGS) -I$(srcdir)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: all-lib $(NAME).sql
diff --git a/contrib/rserv/Makefile b/contrib/rserv/Makefile
index bd2b4f15571..25dfeeacb17 100644
--- a/contrib/rserv/Makefile
+++ b/contrib/rserv/Makefile
@@ -16,6 +16,7 @@ SCRIPTS = InitRservTest
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)
diff --git a/contrib/seg/Makefile b/contrib/seg/Makefile
index 0df4644cf5a..4efff4f4083 100644
--- a/contrib/seg/Makefile
+++ b/contrib/seg/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -15,6 +15,7 @@ SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
OBJS= seg.o segparse.o segscan.o buffer.o
diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y
index adce19c5178..3c2d6c28c0b 100644
--- a/contrib/seg/segparse.y
+++ b/contrib/seg/segparse.y
@@ -11,6 +11,10 @@
#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 */
diff --git a/contrib/soundex/Makefile b/contrib/soundex/Makefile
index 54b4fa0b446..76538e052b0 100644
--- a/contrib/soundex/Makefile
+++ b/contrib/soundex/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS += -I$(srcdir)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/string/Makefile b/contrib/string/Makefile
index 086b03a6a03..b8eaa85acfd 100644
--- a/contrib/string/Makefile
+++ b/contrib/string/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/contrib/userlock/Makefile b/contrib/userlock/Makefile
index ca13469bd6a..9ad5170b896 100644
--- a/contrib/userlock/Makefile
+++ b/contrib/userlock/Makefile
@@ -1,5 +1,5 @@
#
-# $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
@@ -11,6 +11,7 @@ SONAME := $(NAME)$(DLSUFFIX)
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
+override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
all: $(SONAME) $(NAME).sql
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 588c2f99dea..ce4255cb7d5 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -12,7 +12,7 @@
* 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;
@@ -126,7 +126,7 @@ extern char OutputFileName[];
*
* extern BackendId MyBackendId;
*/
-extern Oid MyDatabaseId;
+extern DLLIMPORT Oid MyDatabaseId;
extern bool IsUnderPostmaster;
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index 04c8bbaf418..2768a772d66 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -7,7 +7,7 @@
* 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 */
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h
index a2bcddf862f..7c3dece02fe 100644
--- a/src/include/utils/tqual.h
+++ b/src/include/utils/tqual.h
@@ -8,7 +8,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@ typedef SnapshotData *Snapshot;
extern Snapshot SnapshotDirty;
extern Snapshot QuerySnapshot;
-extern Snapshot SerializableSnapshot;
+extern DLLIMPORT Snapshot SerializableSnapshot;
extern bool ReferentialIntegritySnapshotOverride;