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

Commit52c9d25

Browse files
committed
Be careful to include postgres.h *before* any system headers, to ensure
that the right flavors of largefile-related definitions are seen.Most of these changes are probably unnecessary, but better safe thansorry.
1 parent3f63787 commit52c9d25

File tree

21 files changed

+68
-65
lines changed

21 files changed

+68
-65
lines changed

‎contrib/cube/cubeparse.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
#defineYYSTYPEchar *
88
#defineYYDEBUG1
99

10-
#include<string.h>
10+
#include"postgres.h"
11+
1112
#include"cubedata.h"
1213
#include"buffer.h"
1314

14-
#include"postgres.h"
1515
#include"utils/palloc.h"
1616
#include"utils/elog.h"
1717

‎contrib/cube/cubescan.l

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#defineYYSTYPEchar *
77
#defineyylval cube_yylval
88

9-
#include<stdio.h>
9+
#include"postgres.h"
10+
1011
#include"cubeparse.h"
1112
#include"buffer.h"
1213

‎contrib/dblink/dblink.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2727
*
2828
*/
29-
30-
#include<string.h>
3129
#include"postgres.h"
30+
3231
#include"libpq-fe.h"
3332
#include"libpq-int.h"
3433
#include"fmgr.h"

‎contrib/dbmirror/pending.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/****************************************************************************
22
* pending.c
3-
* $Id: pending.c,v 1.3 2002/09/04 22:49:22 petere Exp $
3+
* $Id: pending.c,v 1.4 2002/09/05 00:43:06 tgl Exp $
44
*
55
* This file contains a trigger for Postgresql-7.x to record changes to tables
66
* to a pending table for mirroring.
@@ -18,9 +18,10 @@
1818
*
1919
*
2020
***************************************************************************/
21+
#include<postgres.h>
22+
2123
#include<executor/spi.h>
2224
#include<commands/trigger.h>
23-
#include<postgres.h>
2425

2526
enumFieldUsage
2627
{

‎contrib/fuzzystrmatch/fuzzystrmatch.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@
4242
#ifndefFUZZYSTRMATCH_H
4343
#defineFUZZYSTRMATCH_H
4444

45-
#include<stdio.h>
46-
#include<string.h>
45+
#include"postgres.h"
46+
4747
#include<ctype.h>
4848

49-
#include"postgres.h"
5049
#include"fmgr.h"
5150
#include"utils/builtins.h"
5251

‎contrib/seg/segscan.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
** A scanner for EMP-style numeric ranges
44
*/
55

6-
#include<string.h>
7-
#include<stdio.h>
6+
#include"postgres.h"
7+
88
#include"segparse.h"
99
#include"buffer.h"
1010

‎contrib/tablefunc/tablefunc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@
2525
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2626
*
2727
*/
28-
#include<stdlib.h>
29-
#include<math.h>
30-
3128
#include"postgres.h"
3229

30+
#include<math.h>
31+
3332
#include"fmgr.h"
3433
#include"funcapi.h"
3534
#include"executor/spi.h"

‎contrib/tsearch/parser.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
%{
2-
#include<string.h>
2+
#include"postgres.h"
3+
34
#include"deflex.h"
45
#include"parser.h"
56

67
/* postgres allocation function*/
7-
#include"postgres.h"
88
#definefree pfree
99
#definemalloc palloc
1010
#definerealloc repalloc

‎src/backend/optimizer/geqo/geqo_selection.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: geqo_selection.c,v 1.13 2002/06/20 20:29:29 momjian Exp $
9+
* $Id: geqo_selection.c,v 1.14 2002/09/05 00:43:06 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -34,9 +34,10 @@
3434
/* */
3535
/*************************************************************/
3636

37+
#include"postgres.h"
38+
3739
#include<math.h>
3840

39-
#include"postgres.h"
4041
#include"optimizer/geqo_copy.h"
4142
#include"optimizer/geqo_random.h"
4243
#include"optimizer/geqo_selection.h"

‎src/backend/optimizer/path/tidpath.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.10 2002/06/20 20:29:30 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.11 2002/09/05 00:43:06 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
16-
#include<math.h>
17-
1816
#include"postgres.h"
1917

18+
#include<math.h>
19+
2020
#include"catalog/pg_operator.h"
2121
#include"optimizer/clauses.h"
2222
#include"optimizer/cost.h"

‎src/backend/parser/scansup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.22 2002/06/20 20:29:33 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.23 2002/09/05 00:43:07 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
16+
#include"postgres.h"
1617

1718
#include<ctype.h>
1819

19-
#include"postgres.h"
2020
#include"miscadmin.h"
2121
#include"parser/scansup.h"
2222

‎src/backend/port/dynloader/hpux.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.20 2002/06/20 20:29:33 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.21 2002/09/05 00:43:07 tgl Exp $
1212
*
1313
*NOTES
1414
*all functions are defined here -- it's impossible to trace the
1515
*shl_* routines from the bundled HP-UX debugger.
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
19+
#include"postgres.h"
20+
1921
/* System includes */
2022
#include<a.out.h>
2123

22-
#include"postgres.h"
23-
2424
#include"dl.h"
2525
#include"dynloader.h"
2626
#include"utils/dynamic_loader.h"

‎src/backend/port/dynloader/nextstep.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
#include"postgres.h"
2+
13
#include"mach-o/rld.h"
24
#include"streams/streams.h"
5+
36
#include<stdlib.h>
47

58
staticchar*lastError=NULL;

‎src/backend/port/nextstep/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
#include"postgres.h"
2+
13
#ifndef_POSIX_SOURCE
24
#include"libc.h"
35
#else
46
#include<unistd.h>
5-
#include<stdlib.h>
67
#endif
78

8-
#include<string.h>
99
#include<sys/signal.h>
1010

1111

‎src/backend/storage/file/buffile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.13 2002/06/20 20:29:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.14 2002/09/05 00:43:07 tgl Exp $
1111
*
1212
* NOTES:
1313
*
@@ -32,10 +32,10 @@
3232
*-------------------------------------------------------------------------
3333
*/
3434

35-
#include<errno.h>
36-
3735
#include"postgres.h"
3836

37+
#include<errno.h>
38+
3939
#include"storage/fd.h"
4040
#include"storage/buffile.h"
4141

‎src/backend/utils/adt/geo_ops.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.65 2002/09/04 20:31:27 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.66 2002/09/05 00:43:07 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
15+
#include"postgres.h"
16+
1517
#include<math.h>
1618
#include<limits.h>
1719
#include<float.h>
1820
#include<ctype.h>
1921

20-
#include"postgres.h"
21-
2222
#include"utils/geo_decls.h"
2323

2424
#ifndefPI

‎src/backend/utils/adt/quote.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/quote.c,v 1.9 2002/09/03 21:45:42 petere Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/quote.c,v 1.10 2002/09/05 00:43:07 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
14-
#include<ctype.h>
15-
1614
#include"postgres.h"
1715

16+
#include<ctype.h>
17+
1818
#include"mb/pg_wchar.h"
1919
#include"utils/builtins.h"
2020

‎src/include/commands/dbcommands.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: dbcommands.h,v 1.25 2002/08/09 16:45:16 tgl Exp $
10+
* $Id: dbcommands.h,v 1.26 2002/09/05 00:43:07 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#ifndefDBCOMMANDS_H
1515
#defineDBCOMMANDS_H
1616

17-
#include<nodes/parsenodes.h>
17+
#include"nodes/parsenodes.h"
1818

1919
externvoidcreatedb(constCreatedbStmt*stmt);
2020
externvoiddropdb(constchar*dbname);

‎src/include/pg_config.h.in

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
99
* changes will be overwritten the next time you run configure.
1010
*
11-
* $Id: pg_config.h.in,v 1.31 2002/09/04 22:54:18 petere Exp $
11+
* $Id: pg_config.h.in,v 1.32 2002/09/05 00:43:07 tgl Exp $
1212
*/
1313

1414
#ifndefPG_CONFIG_H
@@ -320,6 +320,23 @@
320320
/* Define as empty if the C compiler doesn't understand "volatile". */
321321
#undef volatile
322322

323+
/* Define to 1 to make fseeko visible on some hosts. */
324+
#undef _LARGEFILE_SOURCE
325+
326+
/* Define for large files, on AIX-style hosts. */
327+
#undef _LARGE_FILES
328+
329+
/* Number of bits in a file offset, on hosts where this is settable. */
330+
#undef _FILE_OFFSET_BITS
331+
332+
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
333+
#undef HAVE_FSEEKO
334+
335+
#ifndefHAVE_FSEEKO
336+
#definefseeko(a,b,c) fseek((a), (b), (c))
337+
#defineftello(a) ftell((a))
338+
#endif
339+
323340
/* Define if your cpp understands the ANSI stringizing operators in macros */
324341
#undef HAVE_STRINGIZE
325342

@@ -694,23 +711,6 @@ extern int fdatasync(int fildes);
694711
/* Define exactly one of these symbols to select shared-mem implementation */
695712
#undef USE_SYSV_SHARED_MEMORY
696713

697-
/* Define to 1 to make fseeko visible on some hosts. */
698-
#undef _LARGEFILE_SOURCE
699-
700-
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
701-
#undef HAVE_FSEEKO
702-
703-
#ifndefHAVE_FSEEKO
704-
#definefseeko(a,b,c) fseek((a), (b), (c))
705-
#defineftello(a) ftell((a))
706-
#endif
707-
708-
/* Number of bits in a file offset, on hosts where this is settable. */
709-
#undef _FILE_OFFSET_BITS
710-
711-
/* Define for large files, on AIX-style hosts. */
712-
#undef _LARGE_FILES
713-
714714

715715
/*
716716
*------------------------------------------------------------------------

‎src/pl/plpgsql/src/pl_exec.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.63 2002/09/04 20:31:47 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.64 2002/09/05 00:43:07 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -35,12 +35,12 @@
3535
*
3636
**********************************************************************/
3737

38-
#include<ctype.h>
39-
#include<setjmp.h>
40-
4138
#include"plpgsql.h"
4239
#include"pl.tab.h"
4340

41+
#include<ctype.h>
42+
#include<setjmp.h>
43+
4444
#include"access/heapam.h"
4545
#include"catalog/pg_proc.h"
4646
#include"catalog/pg_type.h"

‎src/pl/plpgsql/src/pl_funcs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.22 2002/09/04 20:31:47 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.23 2002/09/05 00:43:07 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -35,11 +35,11 @@
3535
*
3636
**********************************************************************/
3737

38-
#include<ctype.h>
39-
4038
#include"plpgsql.h"
4139
#include"pl.tab.h"
4240

41+
#include<ctype.h>
42+
4343
#include"mb/pg_wchar.h"
4444

4545

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp