aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-09-05 00:43:07 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-09-05 00:43:07 +0000
commit52c9d259335c9670f6487c5f40fc53b57a4c7b17 (patch)
tree721b585843dca83ac9517ca933fa891c4532a530
parent3f63787cbfe0f1e837c92cd8ac35fd7ab811c18b (diff)
downloadpostgresql-52c9d259335c9670f6487c5f40fc53b57a4c7b17.tar.gz
postgresql-52c9d259335c9670f6487c5f40fc53b57a4c7b17.zip
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 than sorry.
-rw-r--r--contrib/cube/cubeparse.y4
-rw-r--r--contrib/cube/cubescan.l3
-rw-r--r--contrib/dblink/dblink.c3
-rw-r--r--contrib/dbmirror/pending.c5
-rw-r--r--contrib/fuzzystrmatch/fuzzystrmatch.h5
-rw-r--r--contrib/seg/segscan.l4
-rw-r--r--contrib/tablefunc/tablefunc.c5
-rw-r--r--contrib/tsearch/parser.l4
-rw-r--r--src/backend/optimizer/geqo/geqo_selection.c5
-rw-r--r--src/backend/optimizer/path/tidpath.c6
-rw-r--r--src/backend/parser/scansup.c4
-rw-r--r--src/backend/port/dynloader/hpux.c6
-rw-r--r--src/backend/port/dynloader/nextstep.c3
-rw-r--r--src/backend/port/nextstep/port.c4
-rw-r--r--src/backend/storage/file/buffile.c6
-rw-r--r--src/backend/utils/adt/geo_ops.c6
-rw-r--r--src/backend/utils/adt/quote.c6
-rw-r--r--src/include/commands/dbcommands.h4
-rw-r--r--src/include/pg_config.h.in36
-rw-r--r--src/pl/plpgsql/src/pl_exec.c8
-rw-r--r--src/pl/plpgsql/src/pl_funcs.c6
21 files changed, 68 insertions, 65 deletions
diff --git a/contrib/cube/cubeparse.y b/contrib/cube/cubeparse.y
index 887528eb03d..6aba226c70b 100644
--- a/contrib/cube/cubeparse.y
+++ b/contrib/cube/cubeparse.y
@@ -7,11 +7,11 @@
#define YYSTYPE char *
#define YYDEBUG 1
-#include <string.h>
+#include "postgres.h"
+
#include "cubedata.h"
#include "buffer.h"
-#include "postgres.h"
#include "utils/palloc.h"
#include "utils/elog.h"
diff --git a/contrib/cube/cubescan.l b/contrib/cube/cubescan.l
index d160937c2f7..6fc51e81142 100644
--- a/contrib/cube/cubescan.l
+++ b/contrib/cube/cubescan.l
@@ -6,7 +6,8 @@
#define YYSTYPE char *
#define yylval cube_yylval
-#include <stdio.h>
+#include "postgres.h"
+
#include "cubeparse.h"
#include "buffer.h"
diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index 899143adab3..7718b65f33c 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -26,9 +26,8 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
*/
-
-#include <string.h>
#include "postgres.h"
+
#include "libpq-fe.h"
#include "libpq-int.h"
#include "fmgr.h"
diff --git a/contrib/dbmirror/pending.c b/contrib/dbmirror/pending.c
index 4164704abe3..d62da430d19 100644
--- a/contrib/dbmirror/pending.c
+++ b/contrib/dbmirror/pending.c
@@ -1,6 +1,6 @@
/****************************************************************************
* pending.c
- * $Id: pending.c,v 1.3 2002/09/04 22:49:22 petere Exp $
+ * $Id: pending.c,v 1.4 2002/09/05 00:43:06 tgl Exp $
*
* This file contains a trigger for Postgresql-7.x to record changes to tables
* to a pending table for mirroring.
@@ -18,9 +18,10 @@
*
*
***************************************************************************/
+#include <postgres.h>
+
#include <executor/spi.h>
#include <commands/trigger.h>
-#include <postgres.h>
enum FieldUsage
{
diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.h b/contrib/fuzzystrmatch/fuzzystrmatch.h
index 59e0d9258c9..c8dbddeb076 100644
--- a/contrib/fuzzystrmatch/fuzzystrmatch.h
+++ b/contrib/fuzzystrmatch/fuzzystrmatch.h
@@ -42,11 +42,10 @@
#ifndef FUZZYSTRMATCH_H
#define FUZZYSTRMATCH_H
-#include <stdio.h>
-#include <string.h>
+#include "postgres.h"
+
#include <ctype.h>
-#include "postgres.h"
#include "fmgr.h"
#include "utils/builtins.h"
diff --git a/contrib/seg/segscan.l b/contrib/seg/segscan.l
index 787fe28843c..271168d9f16 100644
--- a/contrib/seg/segscan.l
+++ b/contrib/seg/segscan.l
@@ -3,8 +3,8 @@
** A scanner for EMP-style numeric ranges
*/
-#include <string.h>
-#include <stdio.h>
+#include "postgres.h"
+
#include "segparse.h"
#include "buffer.h"
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c
index f620e61d5dc..254aa6c5c83 100644
--- a/contrib/tablefunc/tablefunc.c
+++ b/contrib/tablefunc/tablefunc.c
@@ -25,11 +25,10 @@
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
*/
-#include <stdlib.h>
-#include <math.h>
-
#include "postgres.h"
+#include <math.h>
+
#include "fmgr.h"
#include "funcapi.h"
#include "executor/spi.h"
diff --git a/contrib/tsearch/parser.l b/contrib/tsearch/parser.l
index f30fbcd4f46..fb34aac7137 100644
--- a/contrib/tsearch/parser.l
+++ b/contrib/tsearch/parser.l
@@ -1,10 +1,10 @@
%{
-#include <string.h>
+#include "postgres.h"
+
#include "deflex.h"
#include "parser.h"
/* postgres allocation function */
-#include "postgres.h"
#define free pfree
#define malloc palloc
#define realloc repalloc
diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c
index ae4cbbf426f..807e4efba1f 100644
--- a/src/backend/optimizer/geqo/geqo_selection.c
+++ b/src/backend/optimizer/geqo/geqo_selection.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_selection.c,v 1.13 2002/06/20 20:29:29 momjian Exp $
+ * $Id: geqo_selection.c,v 1.14 2002/09/05 00:43:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,9 +34,10 @@
/* */
/*************************************************************/
+#include "postgres.h"
+
#include <math.h>
-#include "postgres.h"
#include "optimizer/geqo_copy.h"
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_selection.h"
diff --git a/src/backend/optimizer/path/tidpath.c b/src/backend/optimizer/path/tidpath.c
index c9ab25d626e..f8d4f79d4db 100644
--- a/src/backend/optimizer/path/tidpath.c
+++ b/src/backend/optimizer/path/tidpath.c
@@ -9,14 +9,14 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.10 2002/06/20 20:29:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.11 2002/09/05 00:43:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
-#include <math.h>
-
#include "postgres.h"
+#include <math.h>
+
#include "catalog/pg_operator.h"
#include "optimizer/clauses.h"
#include "optimizer/cost.h"
diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c
index be1b5ad136c..c8d4ada5200 100644
--- a/src/backend/parser/scansup.c
+++ b/src/backend/parser/scansup.c
@@ -9,14 +9,14 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.22 2002/06/20 20:29:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.23 2002/09/05 00:43:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
+#include "postgres.h"
#include <ctype.h>
-#include "postgres.h"
#include "miscadmin.h"
#include "parser/scansup.h"
diff --git a/src/backend/port/dynloader/hpux.c b/src/backend/port/dynloader/hpux.c
index 8cbf3327da1..38a06b6dc6f 100644
--- a/src/backend/port/dynloader/hpux.c
+++ b/src/backend/port/dynloader/hpux.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.20 2002/06/20 20:29:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.21 2002/09/05 00:43:07 tgl Exp $
*
* NOTES
* all functions are defined here -- it's impossible to trace the
@@ -16,11 +16,11 @@
*
*-------------------------------------------------------------------------
*/
+#include "postgres.h"
+
/* System includes */
#include <a.out.h>
-#include "postgres.h"
-
#include "dl.h"
#include "dynloader.h"
#include "utils/dynamic_loader.h"
diff --git a/src/backend/port/dynloader/nextstep.c b/src/backend/port/dynloader/nextstep.c
index c7339636073..a96b394cda6 100644
--- a/src/backend/port/dynloader/nextstep.c
+++ b/src/backend/port/dynloader/nextstep.c
@@ -1,5 +1,8 @@
+#include "postgres.h"
+
#include "mach-o/rld.h"
#include "streams/streams.h"
+
#include <stdlib.h>
static char *lastError = NULL;
diff --git a/src/backend/port/nextstep/port.c b/src/backend/port/nextstep/port.c
index 6ef1b126f4b..0271a3287af 100644
--- a/src/backend/port/nextstep/port.c
+++ b/src/backend/port/nextstep/port.c
@@ -1,11 +1,11 @@
+#include "postgres.h"
+
#ifndef _POSIX_SOURCE
#include "libc.h"
#else
#include <unistd.h>
-#include <stdlib.h>
#endif
-#include <string.h>
#include <sys/signal.h>
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c
index e518897b348..7e78793a404 100644
--- a/src/backend/storage/file/buffile.c
+++ b/src/backend/storage/file/buffile.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.13 2002/06/20 20:29:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.14 2002/09/05 00:43:07 tgl Exp $
*
* NOTES:
*
@@ -32,10 +32,10 @@
*-------------------------------------------------------------------------
*/
-#include <errno.h>
-
#include "postgres.h"
+#include <errno.h>
+
#include "storage/fd.h"
#include "storage/buffile.h"
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index c19cbc42cf6..68917a64d60 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -8,17 +8,17 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.65 2002/09/04 20:31:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.66 2002/09/05 00:43:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
+#include "postgres.h"
+
#include <math.h>
#include <limits.h>
#include <float.h>
#include <ctype.h>
-#include "postgres.h"
-
#include "utils/geo_decls.h"
#ifndef PI
diff --git a/src/backend/utils/adt/quote.c b/src/backend/utils/adt/quote.c
index d41856c8478..72f32b6cec4 100644
--- a/src/backend/utils/adt/quote.c
+++ b/src/backend/utils/adt/quote.c
@@ -7,14 +7,14 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/quote.c,v 1.9 2002/09/03 21:45:42 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/quote.c,v 1.10 2002/09/05 00:43:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
-#include <ctype.h>
-
#include "postgres.h"
+#include <ctype.h>
+
#include "mb/pg_wchar.h"
#include "utils/builtins.h"
diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h
index 89e3f471f7a..a1a2a8da538 100644
--- a/src/include/commands/dbcommands.h
+++ b/src/include/commands/dbcommands.h
@@ -7,14 +7,14 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: dbcommands.h,v 1.25 2002/08/09 16:45:16 tgl Exp $
+ * $Id: dbcommands.h,v 1.26 2002/09/05 00:43:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef DBCOMMANDS_H
#define DBCOMMANDS_H
-#include <nodes/parsenodes.h>
+#include "nodes/parsenodes.h"
extern void createdb(const CreatedbStmt *stmt);
extern void dropdb(const char *dbname);
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 2d03838ed2d..bb44ed8722a 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -8,7 +8,7 @@
* or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: pg_config.h.in,v 1.31 2002/09/04 22:54:18 petere Exp $
+ * $Id: pg_config.h.in,v 1.32 2002/09/05 00:43:07 tgl Exp $
*/
#ifndef PG_CONFIG_H
@@ -320,6 +320,23 @@
/* Define as empty if the C compiler doesn't understand "volatile". */
#undef volatile
+/* Define to 1 to make fseeko visible on some hosts. */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+#ifndef HAVE_FSEEKO
+#define fseeko(a, b, c) fseek((a), (b), (c))
+#define ftello(a) ftell((a))
+#endif
+
/* Define if your cpp understands the ANSI stringizing operators in macros */
#undef HAVE_STRINGIZE
@@ -694,23 +711,6 @@ extern int fdatasync(int fildes);
/* Define exactly one of these symbols to select shared-mem implementation */
#undef USE_SYSV_SHARED_MEMORY
-/* Define to 1 to make fseeko visible on some hosts. */
-#undef _LARGEFILE_SOURCE
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-#undef HAVE_FSEEKO
-
-#ifndef HAVE_FSEEKO
-#define fseeko(a, b, c) fseek((a), (b), (c))
-#define ftello(a) ftell((a))
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
/*
*------------------------------------------------------------------------
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 37184b8af49..acddb23161e 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.63 2002/09/04 20:31:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.64 2002/09/05 00:43:07 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -35,12 +35,12 @@
*
**********************************************************************/
-#include <ctype.h>
-#include <setjmp.h>
-
#include "plpgsql.h"
#include "pl.tab.h"
+#include <ctype.h>
+#include <setjmp.h>
+
#include "access/heapam.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
diff --git a/src/pl/plpgsql/src/pl_funcs.c b/src/pl/plpgsql/src/pl_funcs.c
index 7da64447700..b0a527a3f2f 100644
--- a/src/pl/plpgsql/src/pl_funcs.c
+++ b/src/pl/plpgsql/src/pl_funcs.c
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.22 2002/09/04 20:31:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.23 2002/09/05 00:43:07 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -35,11 +35,11 @@
*
**********************************************************************/
-#include <ctype.h>
-
#include "plpgsql.h"
#include "pl.tab.h"
+#include <ctype.h>
+
#include "mb/pg_wchar.h"