Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 906b2e1

Browse files
committed
Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with
third party includes (like tcl) that define DLLIMPORT.
1 parent 5cbb119 commit 906b2e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+163
-163
lines changed

src/backend/utils/mmgr/mcxt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.60 2007/03/13 00:33:42 tgl Exp $
17+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/mcxt.c,v 1.61 2007/07/25 12:22:52 mha Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -662,8 +662,8 @@ MemoryContextStrdup(MemoryContext context, const char *string)
662662
/*
663663
* Memory support routines for libpgport on Win32
664664
*
665-
* Win32 can't load a library that DLLIMPORTs a variable
666-
* if the link object files also DLLIMPORT the same variable.
665+
* Win32 can't load a library that PGDLLIMPORTs a variable
666+
* if the link object files also PGDLLIMPORT the same variable.
667667
* For this reason, libpgport can't reference CurrentMemoryContext
668668
* in the palloc macro calls.
669669
*
@@ -684,7 +684,7 @@ pgport_pstrdup(const char *str)
684684
}
685685

686686

687-
/* Doesn't reference a DLLIMPORT variable, but here for completeness. */
687+
/* Doesn't reference a PGDLLIMPORT variable, but here for completeness. */
688688
void
689689
pgport_pfree(void *pointer)
690690
{

src/include/access/gin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* header file for postgres inverted index access method implementation.
44
*
55
* Copyright (c) 2006, PostgreSQL Global Development Group
6-
* $PostgreSQL: pgsql/src/include/access/gin.h,v 1.11 2007/04/09 22:04:04 tgl Exp $
6+
* $PostgreSQL: pgsql/src/include/access/gin.h,v 1.12 2007/07/25 12:22:53 mha Exp $
77
*--------------------------------------------------------------------------
88
*/
99

@@ -414,7 +414,7 @@ extern Datum ginrestrpos(PG_FUNCTION_ARGS);
414414
extern void newScanKey(IndexScanDesc scan);
415415

416416
/* ginget.c */
417-
extern DLLIMPORT int GinFuzzySearchLimit;
417+
extern PGDLLIMPORT int GinFuzzySearchLimit;
418418

419419
#define ItemPointerSetMax(p) ItemPointerSet( (p), (BlockNumber)0xffffffff, (OffsetNumber)0xffff )
420420
#define ItemPointerIsMax(p) ( ItemPointerGetBlockNumber(p) == (BlockNumber)0xffffffff && ItemPointerGetOffsetNumber(p) == (OffsetNumber)0xffff )

src/include/c.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.219 2007/02/27 23:48:09 tgl Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.220 2007/07/25 12:22:52 mha Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -784,8 +784,8 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
784784
#define memmove(d, s, c) bcopy(s, d, c)
785785
#endif
786786

787-
#ifndef DLLIMPORT
788-
#define DLLIMPORT /* no special DLL markers on most ports */
787+
#ifndef PGDLLIMPORT
788+
#define PGDLLIMPORT /* no special DLL markers on most ports */
789789
#endif
790790

791791
/*

src/include/commands/explain.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994-5, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.31 2007/05/25 17:54:25 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.32 2007/07/25 12:22:53 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -21,11 +21,11 @@ typedef void (*ExplainOneQuery_hook_type) (Query *query,
2121
const char *queryString,
2222
ParamListInfo params,
2323
TupOutputState *tstate);
24-
extern DLLIMPORT ExplainOneQuery_hook_type ExplainOneQuery_hook;
24+
extern PGDLLIMPORT ExplainOneQuery_hook_type ExplainOneQuery_hook;
2525

2626
/* Hook for plugins to get control in explain_get_index_name() */
2727
typedef const char * (*explain_get_index_name_hook_type) (Oid indexId);
28-
extern DLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;
28+
extern PGDLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;
2929

3030

3131
extern void ExplainQuery(ExplainStmt *stmt, const char *queryString,

src/include/commands/vacuum.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.72 2007/05/30 20:12:03 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/commands/vacuum.h,v 1.73 2007/07/25 12:22:53 mha Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -107,7 +107,7 @@ typedef struct VacAttrStats
107107

108108

109109
/* GUC parameters */
110-
extern DLLIMPORT int default_statistics_target; /* DLLIMPORT for PostGIS */
110+
extern PGDLLIMPORT int default_statistics_target; /* PGDLLIMPORT for PostGIS */
111111
extern int vacuum_freeze_min_age;
112112

113113

src/include/executor/spi.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.61 2007/04/16 01:14:57 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.62 2007/07/25 12:22:53 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -84,10 +84,10 @@ typedef struct _SPI_plan *SPIPlanPtr;
8484
#define SPI_OK_DELETE_RETURNING 12
8585
#define SPI_OK_UPDATE_RETURNING 13
8686

87-
extern DLLIMPORT uint32 SPI_processed;
88-
extern DLLIMPORT Oid SPI_lastoid;
89-
extern DLLIMPORT SPITupleTable *SPI_tuptable;
90-
extern DLLIMPORT int SPI_result;
87+
extern PGDLLIMPORT uint32 SPI_processed;
88+
extern PGDLLIMPORT Oid SPI_lastoid;
89+
extern PGDLLIMPORT SPITupleTable *SPI_tuptable;
90+
extern PGDLLIMPORT int SPI_result;
9191

9292
extern int SPI_connect(void);
9393
extern int SPI_finish(void);

src/include/fmgr.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/include/fmgr.h,v 1.51 2007/05/15 17:39:54 momjian Exp $
14+
* $PostgreSQL: pgsql/src/include/fmgr.h,v 1.52 2007/07/25 12:22:52 mha Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -322,10 +322,10 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
322322
/*
323323
* Macro to build an info function associated with the given function name.
324324
* Win32 loadable functions usually link with 'dlltool --export-all', but it
325-
* doesn't hurt to add DLLIMPORT in case they don't.
325+
* doesn't hurt to add PGDLLIMPORT in case they don't.
326326
*/
327327
#define PG_FUNCTION_INFO_V1(funcname) \
328-
extern DLLIMPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
328+
extern PGDLLIMPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
329329
const Pg_finfo_record * \
330330
CppConcat(pg_finfo_,funcname) (void) \
331331
{ \
@@ -384,7 +384,7 @@ typedef const Pg_magic_struct *(*PGModuleMagicFunction) (void);
384384
#define PG_MAGIC_FUNCTION_NAME_STRING "Pg_magic_func"
385385

386386
#define PG_MODULE_MAGIC \
387-
extern DLLIMPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \
387+
extern PGDLLIMPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \
388388
const Pg_magic_struct * \
389389
PG_MAGIC_FUNCTION_NAME(void) \
390390
{ \

src/include/miscadmin.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
16-
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.194 2007/04/16 18:29:56 alvherre Exp $
16+
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.195 2007/07/25 12:22:53 mha Exp $
1717
*
1818
* NOTES
1919
* some of the information in this file should be moved to other files.
@@ -64,14 +64,14 @@
6464

6565
/* in globals.c */
6666
/* these are marked volatile because they are set by signal handlers: */
67-
extern DLLIMPORT volatile bool InterruptPending;
67+
extern PGDLLIMPORT volatile bool InterruptPending;
6868
extern volatile bool QueryCancelPending;
6969
extern volatile bool ProcDiePending;
7070

7171
/* these are marked volatile because they are examined by signal handlers: */
7272
extern volatile bool ImmediateInterruptOK;
73-
extern DLLIMPORT volatile uint32 InterruptHoldoffCount;
74-
extern DLLIMPORT volatile uint32 CritSectionCount;
73+
extern PGDLLIMPORT volatile uint32 InterruptHoldoffCount;
74+
extern PGDLLIMPORT volatile uint32 CritSectionCount;
7575

7676
/* in tcop/postgres.c */
7777
extern void ProcessInterrupts(void);
@@ -125,18 +125,18 @@ extern bool IsUnderPostmaster;
125125

126126
extern bool ExitOnAnyError;
127127

128-
extern DLLIMPORT char *DataDir;
128+
extern PGDLLIMPORT char *DataDir;
129129

130-
extern DLLIMPORT int NBuffers;
130+
extern PGDLLIMPORT int NBuffers;
131131
extern int MaxBackends;
132132
extern int MaxConnections;
133133

134-
extern DLLIMPORT int MyProcPid;
135-
extern DLLIMPORT struct Port *MyProcPort;
134+
extern PGDLLIMPORT int MyProcPid;
135+
extern PGDLLIMPORT struct Port *MyProcPort;
136136
extern long MyCancelKey;
137137

138138
extern char OutputFileName[];
139-
extern DLLIMPORT char my_exec_path[];
139+
extern PGDLLIMPORT char my_exec_path[];
140140
extern char pkglib_path[];
141141

142142
#ifdef EXEC_BACKEND
@@ -148,9 +148,9 @@ extern char postgres_exec_path[];
148148
*
149149
* extern BackendId MyBackendId;
150150
*/
151-
extern DLLIMPORT Oid MyDatabaseId;
151+
extern PGDLLIMPORT Oid MyDatabaseId;
152152

153-
extern DLLIMPORT Oid MyDatabaseTableSpace;
153+
extern PGDLLIMPORT Oid MyDatabaseTableSpace;
154154

155155
/*
156156
* Date/Time Configuration
@@ -202,8 +202,8 @@ extern int CTimeZone;
202202

203203
extern bool enableFsync;
204204
extern bool allowSystemTableMods;
205-
extern DLLIMPORT int work_mem;
206-
extern DLLIMPORT int maintenance_work_mem;
205+
extern PGDLLIMPORT int work_mem;
206+
extern PGDLLIMPORT int maintenance_work_mem;
207207

208208
extern int VacuumCostPageHit;
209209
extern int VacuumCostPageMiss;

src/include/nodes/nodes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.201 2007/06/11 01:16:30 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.202 2007/07/25 12:22:53 mha Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -386,7 +386,7 @@ typedef struct Node
386386
* Fortunately, this macro isn't recursive so we just define
387387
* a global variable for this purpose.
388388
*/
389-
extern DLLIMPORT Node *newNodeMacroHolder;
389+
extern PGDLLIMPORT Node *newNodeMacroHolder;
390390

391391
#define newNode(size, tag) \
392392
( \

src/include/optimizer/cost.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.87 2007/05/21 17:57:34 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.88 2007/07/25 12:22:53 mha Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -36,12 +36,12 @@
3636
*/
3737

3838
/* parameter variables and flags */
39-
extern DLLIMPORT double seq_page_cost;
40-
extern DLLIMPORT double random_page_cost;
41-
extern DLLIMPORT double cpu_tuple_cost;
42-
extern DLLIMPORT double cpu_index_tuple_cost;
43-
extern DLLIMPORT double cpu_operator_cost;
44-
extern DLLIMPORT int effective_cache_size;
39+
extern PGDLLIMPORT double seq_page_cost;
40+
extern PGDLLIMPORT double random_page_cost;
41+
extern PGDLLIMPORT double cpu_tuple_cost;
42+
extern PGDLLIMPORT double cpu_index_tuple_cost;
43+
extern PGDLLIMPORT double cpu_operator_cost;
44+
extern PGDLLIMPORT int effective_cache_size;
4545
extern Cost disable_cost;
4646
extern bool enable_seqscan;
4747
extern bool enable_indexscan;

0 commit comments

Comments
 (0)