Mark exception and assert global variables as DLLIMPORT, so that plpgsql
authorTom Lane <[email protected]>
Fri, 23 Mar 2001 18:26:01 +0000 (18:26 +0000)
committerTom Lane <[email protected]>
Fri, 23 Mar 2001 18:26:01 +0000 (18:26 +0000)
can be compiled with asserts enabled on Windoze.

src/backend/tcop/postgres.c
src/include/postgres.h
src/include/utils/excid.h

index 19e475177369384b2b5b14b843d19d672e79761b..79d372b6410fa64a45225316cd82b4b9c6ba9d74 100644 (file)
@@ -87,7 +87,7 @@ CommandDest whereToSendOutput = Debug;
 static bool dontExecute = false;
 
 /* note: these declarations had better match tcopprot.h */
-DLLIMPORT sigjmp_buf Warn_restart;
+sigjmp_buf     Warn_restart;
 
 bool           Warn_restart_ready = false;
 bool           InError = false;
@@ -1703,7 +1703,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
        if (!IsUnderPostmaster)
        {
                puts("\nPOSTGRES backend interactive interface ");
-               puts("$Revision: 1.214 $ $Date: 2001/03/22 06:16:17 $\n");
+               puts("$Revision: 1.215 $ $Date: 2001/03/23 18:26:01 $\n");
        }
 
        /*
index ac8d0b234635742f8262b9970607eab2d3e500d0..d0dd50778c378d6e5ed7e798c2f5c1cf43736a88 100644 (file)
@@ -453,11 +453,11 @@ typedef struct Exception
        ExcMessage      message;
 } Exception;
 
-extern Exception FailedAssertion;
-extern Exception BadArg;
-extern Exception BadState;
+extern DLLIMPORT Exception FailedAssertion;
+extern DLLIMPORT Exception BadArg;
+extern DLLIMPORT Exception BadState;
 
-extern bool assert_enabled;
+extern DLLIMPORT bool assert_enabled;
 
 /*
  * USE_ASSERT_CHECKING, if defined, turns on all the assertions.
index fd726c74b11d72aaba31f063c6ca08dabfa823a0..1841dbdebc69f35884cea719c9d5d742fec09712 100644 (file)
 #ifndef EXCID_H
 #define EXCID_H
 
+/* note: these first three are also declared in postgres.h */
+extern DLLIMPORT Exception FailedAssertion;
+extern DLLIMPORT Exception BadState;
+extern DLLIMPORT Exception BadArg;
+extern DLLIMPORT Exception Unimplemented;
 
-extern Exception FailedAssertion;
-extern Exception BadState;
-extern Exception BadArg;
-extern Exception Unimplemented;
-
-extern Exception CatalogFailure;/* XXX inconsistent naming style */
-extern Exception InternalError; /* XXX inconsistent naming style */
-extern Exception SemanticError; /* XXX inconsistent naming style */
-extern Exception SystemError;  /* XXX inconsistent naming style */
+extern DLLIMPORT Exception CatalogFailure;/* XXX inconsistent naming style */
+extern DLLIMPORT Exception InternalError; /* XXX inconsistent naming style */
+extern DLLIMPORT Exception SemanticError; /* XXX inconsistent naming style */
+extern DLLIMPORT Exception SystemError;        /* XXX inconsistent naming style */
 
 #endif  /* EXCID_H */