Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit def651f

Browse filesBrowse files
committed
Clean up local redeclarations of variables with DLLIMPORT, per report
from Magnus that MSVC complains about this.
1 parent fd38d72 commit def651f
Copy full SHA for def651f

File tree

Expand file treeCollapse file tree

12 files changed

+27
-50
lines changed
Filter options
Expand file treeCollapse file tree

12 files changed

+27
-50
lines changed

‎contrib/adminpack/adminpack.c

Copy file name to clipboardExpand all lines: contrib/adminpack/adminpack.c
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Author: Andreas Pflug <pgadmin@pse-consulting.de>
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/contrib/adminpack/adminpack.c,v 1.5 2006/10/19 17:48:04 neilc Exp $
11+
* $PostgreSQL: pgsql/contrib/adminpack/adminpack.c,v 1.6 2006/10/19 18:32:45 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -22,6 +22,7 @@
2222
#include "miscadmin.h"
2323
#include "catalog/pg_type.h"
2424
#include "funcapi.h"
25+
#include "postmaster/syslogger.h"
2526
#include "storage/fd.h"
2627
#include "utils/datetime.h"
2728

@@ -37,10 +38,6 @@
3738
#endif
3839
#endif
3940

40-
extern DLLIMPORT char *DataDir;
41-
extern DLLIMPORT char *Log_directory;
42-
extern DLLIMPORT char *Log_filename;
43-
4441
PG_MODULE_MAGIC;
4542

4643
Datum pg_file_write(PG_FUNCTION_ARGS);

‎contrib/pg_buffercache/pg_buffercache_pages.c

Copy file name to clipboardExpand all lines: contrib/pg_buffercache/pg_buffercache_pages.c
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* pg_buffercache_pages.c
44
* display some contents of the buffer cache
55
*
6-
* $PostgreSQL: pgsql/contrib/pg_buffercache/pg_buffercache_pages.c,v 1.9 2006/10/04 00:29:45 momjian Exp $
6+
* $PostgreSQL: pgsql/contrib/pg_buffercache/pg_buffercache_pages.c,v 1.10 2006/10/19 18:32:46 tgl Exp $
77
*-------------------------------------------------------------------------
88
*/
99
#include "postgres.h"
@@ -16,11 +16,6 @@
1616

1717
#define NUM_BUFFERCACHE_PAGES_ELEM 6
1818

19-
#if defined(WIN32) || defined(__CYGWIN__)
20-
extern DLLIMPORT BufferDesc *BufferDescriptors;
21-
extern DLLIMPORT volatile uint32 InterruptHoldoffCount;
22-
#endif
23-
2419
PG_MODULE_MAGIC;
2520

2621
Datum pg_buffercache_pages(PG_FUNCTION_ARGS);

‎contrib/pg_freespacemap/pg_freespacemap.c

Copy file name to clipboardExpand all lines: contrib/pg_freespacemap/pg_freespacemap.c
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* pg_freespacemap.c
44
* display some contents of the free space relation and page maps.
55
*
6-
* $PostgreSQL: pgsql/contrib/pg_freespacemap/pg_freespacemap.c,v 1.8 2006/10/04 00:29:45 momjian Exp $
6+
* $PostgreSQL: pgsql/contrib/pg_freespacemap/pg_freespacemap.c,v 1.9 2006/10/19 18:32:46 tgl Exp $
77
*-------------------------------------------------------------------------
88
*/
99
#include "postgres.h"
@@ -17,13 +17,6 @@
1717
#define NUM_FREESPACE_PAGES_ELEM 5
1818
#define NUM_FREESPACE_RELATIONS_ELEM 7
1919

20-
#if defined(WIN32) || defined(__CYGWIN__)
21-
/* Need DLLIMPORT for some things that are not so marked in main headers */
22-
extern DLLIMPORT int MaxFSMPages;
23-
extern DLLIMPORT int MaxFSMRelations;
24-
extern DLLIMPORT volatile uint32 InterruptHoldoffCount;
25-
#endif
26-
2720
PG_MODULE_MAGIC;
2821

2922
Datum pg_freespacemap_pages(PG_FUNCTION_ARGS);

‎src/backend/catalog/pg_proc.c

Copy file name to clipboardExpand all lines: src/backend/catalog/pg_proc.c
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.140 2006/07/13 16:49:13 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.141 2006/10/19 18:32:46 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -35,10 +35,6 @@
3535
#include "utils/syscache.h"
3636

3737

38-
/* GUC parameter */
39-
bool check_function_bodies = true;
40-
41-
4238
Datum fmgr_internal_validator(PG_FUNCTION_ARGS);
4339
Datum fmgr_c_validator(PG_FUNCTION_ARGS);
4440
Datum fmgr_sql_validator(PG_FUNCTION_ARGS);

‎src/backend/utils/misc/guc.c

Copy file name to clipboardExpand all lines: src/backend/utils/misc/guc.c
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.356 2006/10/07 19:25:28 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.357 2006/10/19 18:32:47 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -93,7 +93,6 @@
9393

9494
/* XXX these should appear in other modules' header files */
9595
extern bool Log_disconnections;
96-
extern bool check_function_bodies;
9796
extern int CommitDelay;
9897
extern int CommitSiblings;
9998
extern char *default_tablespace;
@@ -171,12 +170,12 @@ bool log_statement_stats = false; /* this is sort of all three
171170
* above together */
172171
bool log_btree_build_stats = false;
173172

173+
bool check_function_bodies = true;
174+
bool default_with_oids = false;
174175
bool SQL_inheritance = true;
175176

176177
bool Password_encryption = true;
177178

178-
bool default_with_oids = false;
179-
180179
int log_min_error_statement = PANIC;
181180
int log_min_messages = NOTICE;
182181
int client_min_messages = NOTICE;

‎src/include/miscadmin.h

Copy file name to clipboardExpand all lines: src/include/miscadmin.h
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2006, 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.189 2006/09/04 15:07:46 petere Exp $
16+
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.190 2006/10/19 18:32:47 tgl Exp $
1717
*
1818
* NOTES
1919
* some of the information in this file should be moved to other files.
@@ -70,8 +70,8 @@ extern volatile bool ProcDiePending;
7070

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

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

126126
extern bool ExitOnAnyError;
127127

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

130130
extern DLLIMPORT int NBuffers;
131131
extern int MaxBackends;

‎src/include/postmaster/syslogger.h

Copy file name to clipboardExpand all lines: src/include/postmaster/syslogger.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 2004-2006, PostgreSQL Global Development Group
77
*
8-
* $PostgreSQL: pgsql/src/include/postmaster/syslogger.h,v 1.6 2006/03/05 15:58:58 momjian Exp $
8+
* $PostgreSQL: pgsql/src/include/postmaster/syslogger.h,v 1.7 2006/10/19 18:32:47 tgl Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -16,8 +16,8 @@
1616
extern bool Redirect_stderr;
1717
extern int Log_RotationAge;
1818
extern int Log_RotationSize;
19-
extern char *Log_directory;
20-
extern char *Log_filename;
19+
extern DLLIMPORT char *Log_directory;
20+
extern DLLIMPORT char *Log_filename;
2121
extern bool Log_truncate_on_rotation;
2222

2323
extern bool am_syslogger;

‎src/include/storage/buf_internals.h

Copy file name to clipboardExpand all lines: src/include/storage/buf_internals.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.87 2006/07/23 03:07:58 tgl Exp $
11+
* $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.88 2006/10/19 18:32:47 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -162,7 +162,7 @@ typedef struct sbufdesc
162162

163163

164164
/* in buf_init.c */
165-
extern BufferDesc *BufferDescriptors;
165+
extern DLLIMPORT BufferDesc *BufferDescriptors;
166166

167167
/* in localbuf.c */
168168
extern BufferDesc *LocalBufferDescriptors;

‎src/include/storage/freespace.h

Copy file name to clipboardExpand all lines: src/include/storage/freespace.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.23 2006/10/04 00:30:10 momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.24 2006/10/19 18:32:47 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -124,8 +124,8 @@ struct FSMRelation
124124

125125

126126
/* GUC variables */
127-
extern int MaxFSMRelations;
128-
extern int MaxFSMPages;
127+
extern DLLIMPORT int MaxFSMRelations;
128+
extern DLLIMPORT int MaxFSMPages;
129129

130130

131131
/*

‎src/include/utils/guc.h

Copy file name to clipboardExpand all lines: src/include/utils/guc.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
88
* Written by Peter Eisentraut <peter_e@gmx.net>.
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.75 2006/08/14 02:27:27 momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.76 2006/10/19 18:32:47 tgl Exp $
1111
*--------------------------------------------------------------------
1212
*/
1313
#ifndef GUC_H
@@ -115,9 +115,9 @@ extern bool log_executor_stats;
115115
extern bool log_statement_stats;
116116
extern bool log_btree_build_stats;
117117

118-
extern bool SQL_inheritance;
119-
118+
extern DLLIMPORT bool check_function_bodies;
120119
extern bool default_with_oids;
120+
extern bool SQL_inheritance;
121121

122122
extern int log_min_error_statement;
123123
extern int log_min_messages;

‎src/pl/plperl/plperl.c

Copy file name to clipboardExpand all lines: src/pl/plperl/plperl.c
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plperl.c - perl as a procedural language for PostgreSQL
33
*
4-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.120 2006/10/15 18:56:39 tgl Exp $
4+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.121 2006/10/19 18:32:47 tgl Exp $
55
*
66
**********************************************************************/
77

@@ -23,13 +23,11 @@
2323
#include "miscadmin.h"
2424
#include "nodes/makefuncs.h"
2525
#include "parser/parse_type.h"
26+
#include "utils/guc.h"
2627
#include "utils/lsyscache.h"
2728
#include "utils/memutils.h"
2829
#include "utils/typcache.h"
2930

30-
/* define this before the perl headers get a chance to mangle DLLIMPORT */
31-
extern DLLIMPORT bool check_function_bodies;
32-
3331
/* perl stuff */
3432
#include "plperl.h"
3533

‎src/pl/plpgsql/src/pl_handler.c

Copy file name to clipboardExpand all lines: src/pl/plpgsql/src/pl_handler.c
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.32 2006/10/04 00:30:13 momjian Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.33 2006/10/19 18:32:48 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -21,11 +21,10 @@
2121
#include "catalog/pg_type.h"
2222
#include "funcapi.h"
2323
#include "utils/builtins.h"
24+
#include "utils/guc.h"
2425
#include "utils/lsyscache.h"
2526
#include "utils/syscache.h"
2627

27-
extern DLLIMPORT bool check_function_bodies;
28-
2928
PG_MODULE_MAGIC;
3029

3130
PLpgSQL_plugin **plugin_ptr = NULL;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.