From 9237a4914f491221fdbb6c24bc2abc2e96886df6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 23 Mar 2001 18:26:01 +0000 Subject: [PATCH] Mark exception and assert global variables as DLLIMPORT, so that plpgsql can be compiled with asserts enabled on Windoze. --- src/backend/tcop/postgres.c | 4 ++-- src/include/postgres.h | 8 ++++---- src/include/utils/excid.h | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 19e4751773..79d372b641 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -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"); } /* diff --git a/src/include/postgres.h b/src/include/postgres.h index ac8d0b2346..d0dd50778c 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -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. diff --git a/src/include/utils/excid.h b/src/include/utils/excid.h index fd726c74b1..1841dbdebc 100644 --- a/src/include/utils/excid.h +++ b/src/include/utils/excid.h @@ -14,15 +14,15 @@ #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 */ -- 2.39.5