From 32924c1c9048a4dbd99f2cfedbd3128b50968c14 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 | 6 +++--- src/include/postgres.h | 10 +++++----- src/include/utils/excid.h | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index b62b41356b..a98bbc9324 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.214 2001/03/22 06:16:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.215 2001/03/23 18:26:01 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -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 471b6af503..7af72a791e 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1995, Regents of the University of California * - * $Id: postgres.h,v 1.47 2001/03/22 04:00:25 momjian Exp $ + * $Id: postgres.h,v 1.48 2001/03/23 18:26:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -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 d1bbcbb21b..eebab2e4f1 100644 --- a/src/include/utils/excid.h +++ b/src/include/utils/excid.h @@ -7,22 +7,22 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: excid.h,v 1.9 2001/02/06 01:53:52 tgl Exp $ + * $Id: excid.h,v 1.10 2001/03/23 18:26:01 tgl Exp $ * *------------------------------------------------------------------------- */ #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 */