Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitdef651f

Browse files
committed
Clean up local redeclarations of variables with DLLIMPORT, per report
from Magnus that MSVC complains about this.
1 parentfd38d72 commitdef651f

File tree

12 files changed

+27
-50
lines changed

12 files changed

+27
-50
lines changed

‎contrib/adminpack/adminpack.c

Lines 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/1917:48:04 neilc Exp $
11+
* $PostgreSQL: pgsql/contrib/adminpack/adminpack.c,v 1.6 2006/10/1918: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-
externDLLIMPORTchar*DataDir;
41-
externDLLIMPORTchar*Log_directory;
42-
externDLLIMPORTchar*Log_filename;
43-
4441
PG_MODULE_MAGIC;
4542

4643
Datumpg_file_write(PG_FUNCTION_ARGS);

‎contrib/pg_buffercache/pg_buffercache_pages.c

Lines 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
#defineNUM_BUFFERCACHE_PAGES_ELEM6
1818

19-
#if defined(WIN32)|| defined(__CYGWIN__)
20-
externDLLIMPORTBufferDesc*BufferDescriptors;
21-
externDLLIMPORTvolatileuint32InterruptHoldoffCount;
22-
#endif
23-
2419
PG_MODULE_MAGIC;
2520

2621
Datumpg_buffercache_pages(PG_FUNCTION_ARGS);

‎contrib/pg_freespacemap/pg_freespacemap.c

Lines 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
#defineNUM_FREESPACE_PAGES_ELEM5
1818
#defineNUM_FREESPACE_RELATIONS_ELEM7
1919

20-
#if defined(WIN32)|| defined(__CYGWIN__)
21-
/* Need DLLIMPORT for some things that are not so marked in main headers */
22-
externDLLIMPORTintMaxFSMPages;
23-
externDLLIMPORTintMaxFSMRelations;
24-
externDLLIMPORTvolatileuint32InterruptHoldoffCount;
25-
#endif
26-
2720
PG_MODULE_MAGIC;
2821

2922
Datumpg_freespacemap_pages(PG_FUNCTION_ARGS);

‎src/backend/catalog/pg_proc.c

Lines 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-
boolcheck_function_bodies= true;
40-
41-
4238
Datumfmgr_internal_validator(PG_FUNCTION_ARGS);
4339
Datumfmgr_c_validator(PG_FUNCTION_ARGS);
4440
Datumfmgr_sql_validator(PG_FUNCTION_ARGS);

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

Lines 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
externboolLog_disconnections;
96-
externboolcheck_function_bodies;
9796
externintCommitDelay;
9897
externintCommitSiblings;
9998
externchar*default_tablespace;
@@ -171,12 +170,12 @@ boollog_statement_stats = false;/* this is sort of all three
171170
* above together */
172171
boollog_btree_build_stats= false;
173172

173+
boolcheck_function_bodies= true;
174+
booldefault_with_oids= false;
174175
boolSQL_inheritance= true;
175176

176177
boolPassword_encryption= true;
177178

178-
booldefault_with_oids= false;
179-
180179
intlog_min_error_statement=PANIC;
181180
intlog_min_messages=NOTICE;
182181
intclient_min_messages=NOTICE;

‎src/include/miscadmin.h

Lines 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
externvolatileboolImmediateInterruptOK;
73-
externvolatileuint32InterruptHoldoffCount;
74-
externvolatileuint32CritSectionCount;
73+
externDLLIMPORTvolatileuint32InterruptHoldoffCount;
74+
externDLLIMPORTvolatileuint32CritSectionCount;
7575

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

126126
externboolExitOnAnyError;
127127

128-
externchar*DataDir;
128+
externDLLIMPORTchar*DataDir;
129129

130130
externDLLIMPORTintNBuffers;
131131
externintMaxBackends;

‎src/include/postmaster/syslogger.h

Lines 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
externboolRedirect_stderr;
1717
externintLog_RotationAge;
1818
externintLog_RotationSize;
19-
externchar*Log_directory;
20-
externchar*Log_filename;
19+
externDLLIMPORTchar*Log_directory;
20+
externDLLIMPORTchar*Log_filename;
2121
externboolLog_truncate_on_rotation;
2222

2323
externboolam_syslogger;

‎src/include/storage/buf_internals.h

Lines 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-
externBufferDesc*BufferDescriptors;
165+
externDLLIMPORTBufferDesc*BufferDescriptors;
166166

167167
/* in localbuf.c */
168168
externBufferDesc*LocalBufferDescriptors;

‎src/include/storage/freespace.h

Lines 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-
externintMaxFSMRelations;
128-
externintMaxFSMPages;
127+
externDLLIMPORTintMaxFSMRelations;
128+
externDLLIMPORTintMaxFSMPages;
129129

130130

131131
/*

‎src/include/utils/guc.h

Lines 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
#ifndefGUC_H
@@ -115,9 +115,9 @@ extern bool log_executor_stats;
115115
externboollog_statement_stats;
116116
externboollog_btree_build_stats;
117117

118-
externboolSQL_inheritance;
119-
118+
externDLLIMPORTboolcheck_function_bodies;
120119
externbooldefault_with_oids;
120+
externboolSQL_inheritance;
121121

122122
externintlog_min_error_statement;
123123
externintlog_min_messages;

‎src/pl/plperl/plperl.c

Lines 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-
externDLLIMPORTboolcheck_function_bodies;
32-
3331
/* perl stuff */
3432
#include"plperl.h"
3533

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

Lines 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-
externDLLIMPORTboolcheck_function_bodies;
28-
2928
PG_MODULE_MAGIC;
3029

3130
PLpgSQL_plugin**plugin_ptr=NULL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp