aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/c.h20
-rw-r--r--src/include/commands/trigger.h2
-rw-r--r--src/include/executor/spi.h6
3 files changed, 23 insertions, 5 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 9c7d823ea88..b73396f92fc 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.51 1999/02/13 23:20:44 momjian Exp $
+ * $Id: c.h,v 1.52 1999/03/09 13:39:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,6 +57,10 @@
#include <errno.h>
#endif
+#ifdef __CYGWIN32__
+#include <errno.h>
+#endif
+
/* ----------------------------------------------------------------
* Section 1: bool, true, false, TRUE, FALSE
* ----------------------------------------------------------------
@@ -829,6 +833,20 @@ extern char *form(const char *fmt,...);
#define COPY_CMD "cp"
#define SEP_CHAR '/'
+/* defines for dynamic linking on Win32 platform */
+#ifdef __CYGWIN32__
+#if __GNUC__ && ! defined (__declspec)
+#error You need egcs 1.1 or newer for compiling!
+#endif
+#ifdef BUILDING_DLL
+#define DLLIMPORT __declspec (dllexport)
+#else /* not BUILDING_DLL */
+#define DLLIMPORT __declspec (dllimport)
+#endif
+#else /* not CYGWIN */
+#define DLLIMPORT
+#endif
+
/* Provide prototypes for routines not present in a particular machine's
* standard C library. It'd be better to put these in config.h, but
* in config.h we haven't yet included anything that defines size_t...
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index f96221f6e6a..89e13188ea9 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -26,7 +26,7 @@ typedef struct TriggerData
Trigger *tg_trigger;
} TriggerData;
-extern TriggerData *CurrentTriggerData;
+extern DLLIMPORT TriggerData *CurrentTriggerData;
#define TRIGGER_EVENT_INSERT 0x00000000
#define TRIGGER_EVENT_DELETE 0x00000001
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index cc72cddc903..104bf24aac4 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -66,9 +66,9 @@ typedef struct
#define SPI_OK_UPDATE 9
#define SPI_OK_CURSOR 10
-extern uint32 SPI_processed;
-extern SPITupleTable *SPI_tuptable;
-extern int SPI_result;
+extern DLLIMPORT uint32 SPI_processed;
+extern DLLIMPORT SPITupleTable *SPI_tuptable;
+extern DLLIMPORT int SPI_result;
extern int SPI_connect(void);
extern int SPI_finish(void);