diff options
author | Bruce Momjian | 2006-07-13 16:49:20 +0000 |
---|---|---|
committer | Bruce Momjian | 2006-07-13 16:49:20 +0000 |
commit | a22d76d96adaa98ab20de290a1b710a199805ddc (patch) | |
tree | 0c54c219cae248d98b5fffb1189ac5af559468b7 /src/include/utils | |
parent | 70e2e3d8b1189c2c74007b39137ba475ae9f1cbb (diff) |
Allow include files to compile own their own.
Strip unused include files out unused include files, and add needed
includes to C files.
The next step is to remove unused include files in C files.
Diffstat (limited to 'src/include/utils')
-rw-r--r-- | src/include/utils/cash.h | 2 | ||||
-rw-r--r-- | src/include/utils/date.h | 4 | ||||
-rw-r--r-- | src/include/utils/geo_decls.h | 4 | ||||
-rw-r--r-- | src/include/utils/guc_tables.h | 4 | ||||
-rw-r--r-- | src/include/utils/pg_lzcompress.h | 8 | ||||
-rw-r--r-- | src/include/utils/portal.h | 4 | ||||
-rw-r--r-- | src/include/utils/timestamp.h | 8 | ||||
-rw-r--r-- | src/include/utils/tqual.h | 3 | ||||
-rw-r--r-- | src/include/utils/tuplesort.h | 3 |
9 files changed, 25 insertions, 15 deletions
diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h index b78da25edd1..193fe9aab57 100644 --- a/src/include/utils/cash.h +++ b/src/include/utils/cash.h @@ -9,6 +9,8 @@ #ifndef CASH_H #define CASH_H +#include "fmgr.h" + /* if we store this as 4 bytes, we better make it int, not long, bjm */ typedef int32 Cash; diff --git a/src/include/utils/date.h b/src/include/utils/date.h index 93736fec6bc..44eb8e81143 100644 --- a/src/include/utils/date.h +++ b/src/include/utils/date.h @@ -7,13 +7,15 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/date.h,v 1.33 2006/03/05 15:59:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/date.h,v 1.34 2006/07/13 16:49:20 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef DATE_H #define DATE_H +#include <math.h> + #include "fmgr.h" diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h index 322a08b5dd1..131cf16ccb1 100644 --- a/src/include/utils/geo_decls.h +++ b/src/include/utils/geo_decls.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/geo_decls.h,v 1.50 2006/03/05 15:59:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/geo_decls.h,v 1.51 2006/07/13 16:49:20 momjian Exp $ * * NOTE * These routines do *not* use the float types from adt/. @@ -21,6 +21,8 @@ #ifndef GEO_DECLS_H #define GEO_DECLS_H +#include <math.h> + #include "fmgr.h" /*-------------------------------------------------------------------- diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h index 48632fa2076..822bcfc9835 100644 --- a/src/include/utils/guc_tables.h +++ b/src/include/utils/guc_tables.h @@ -7,13 +7,15 @@ * * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.22 2006/03/05 15:59:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.23 2006/07/13 16:49:20 momjian Exp $ * *------------------------------------------------------------------------- */ #ifndef GUC_TABLES_H #define GUC_TABLES_H 1 +#include "utils/guc.h" + /* * GUC supports these types of variables: */ diff --git a/src/include/utils/pg_lzcompress.h b/src/include/utils/pg_lzcompress.h index 027025f939d..0b94c9c5b72 100644 --- a/src/include/utils/pg_lzcompress.h +++ b/src/include/utils/pg_lzcompress.h @@ -1,7 +1,7 @@ /* ---------- * pg_lzcompress.h - * - * $PostgreSQL: pgsql/src/include/utils/pg_lzcompress.h,v 1.11 2005/05/25 21:40:42 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/pg_lzcompress.h,v 1.12 2006/07/13 16:49:20 momjian Exp $ * * Definitions for the builtin LZ compressor * ---------- @@ -180,7 +180,8 @@ extern PGLZ_Strategy *PGLZ_strategy_never; * Initialize a decomp state from a compressed input. * ---------- */ -#define pglz_decomp_init(_ds,_lz) do { \ +#define pglz_decomp_init(_ds,_lz) \ +do { \ (_ds)->cp_in = ((unsigned char *)(_lz)) \ + sizeof(PGLZ_Header); \ (_ds)->cp_end = (_ds)->cp_in + (_lz)->varsize \ @@ -205,7 +206,8 @@ extern PGLZ_Strategy *PGLZ_strategy_never; * Deallocate resources after decompression. * ---------- */ -#define pglz_decomp_end(_ds) do { \ +#define pglz_decomp_end(_ds) \ +do { \ if ((_ds)->temp_buf != NULL) \ pfree((void *)((_ds)->temp_buf)); \ } while (0) diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h index d9bbd44ffed..64079fa9c1f 100644 --- a/src/include/utils/portal.h +++ b/src/include/utils/portal.h @@ -39,7 +39,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/portal.h,v 1.61 2006/04/25 14:11:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/portal.h,v 1.62 2006/07/13 16:49:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -49,9 +49,9 @@ #include "executor/execdesc.h" #include "nodes/memnodes.h" #include "utils/resowner.h" +#include "utils/timestamp.h" #include "utils/tuplestore.h" - /* * We have several execution strategies for Portals, depending on what * query or queries are to be executed. (Note: in all cases, a Portal diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 47832c8b3fc..2497f425614 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.61 2006/06/20 22:52:00 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.62 2006/07/13 16:49:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -144,10 +144,12 @@ typedef struct #endif /* HAVE_INT64_TIMESTAMP */ -#define TIMESTAMP_NOBEGIN(j) do {(j) = DT_NOBEGIN;} while (0) +#define TIMESTAMP_NOBEGIN(j) \ + do {(j) = DT_NOBEGIN;} while (0) #define TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN) -#define TIMESTAMP_NOEND(j) do {(j) = DT_NOEND;} while (0) +#define TIMESTAMP_NOEND(j) \ + do {(j) = DT_NOEND;} while (0) #define TIMESTAMP_IS_NOEND(j) ((j) == DT_NOEND) #define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j)) diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 10679be1611..6c1fdfd3af8 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/tqual.h,v 1.61 2006/03/05 15:59:08 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/tqual.h,v 1.62 2006/07/13 16:49:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,6 @@ #define TQUAL_H #include "access/htup.h" -#include "access/xact.h" #include "storage/buf.h" diff --git a/src/include/utils/tuplesort.h b/src/include/utils/tuplesort.h index 75a12ac2290..ef33237318e 100644 --- a/src/include/utils/tuplesort.h +++ b/src/include/utils/tuplesort.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/tuplesort.h,v 1.21 2006/06/27 16:53:02 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/tuplesort.h,v 1.22 2006/07/13 16:49:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,6 @@ #include "access/itup.h" #include "executor/tuptable.h" -#include "fmgr.h" /* Tuplesortstate is an opaque type whose details are not known outside |