summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTom Lane2001-02-10 02:31:31 +0000
committerTom Lane2001-02-10 02:31:31 +0000
commitd08741eab55f44214d08f33177523ec4821de532 (patch)
tree192af3b22d30b8be1ec3256ebf4806e601234612 /contrib
parentcf21985ab59e0075704b0322f7ba84033bf7e16e (diff)
Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cube/cubedata.h2
-rw-r--r--contrib/earthdistance/earthdistance.c9
-rw-r--r--contrib/fulltextindex/fti.c5
-rw-r--r--contrib/intarray/_int.c4
-rw-r--r--contrib/isbn_issn/isbn_issn.c6
-rw-r--r--contrib/lo/lo.c6
-rw-r--r--contrib/pg_dumplo/main.c12
-rw-r--r--contrib/pgbench/pgbench.c7
-rw-r--r--contrib/pgcrypto/encode.c7
-rw-r--r--contrib/pgcrypto/internal.c4
-rw-r--r--contrib/pgcrypto/krb.c8
-rw-r--r--contrib/pgcrypto/md5.c4
-rw-r--r--contrib/pgcrypto/mhash.c5
-rw-r--r--contrib/pgcrypto/openssl.c5
-rw-r--r--contrib/pgcrypto/pgcrypto.c7
-rw-r--r--contrib/pgcrypto/sha1.c4
-rw-r--r--contrib/soundex/soundex.c8
-rw-r--r--contrib/string/string_io.c6
18 files changed, 50 insertions, 59 deletions
diff --git a/contrib/cube/cubedata.h b/contrib/cube/cubedata.h
index 16495e74a57..18bb6485464 100644
--- a/contrib/cube/cubedata.h
+++ b/contrib/cube/cubedata.h
@@ -1,5 +1,3 @@
-/*#include "postgres.h"*/
-
typedef struct NDBOX {
unsigned int size; /* required to be a Postgres varlena type */
unsigned int dim;
diff --git a/contrib/earthdistance/earthdistance.c b/contrib/earthdistance/earthdistance.c
index 7f2826a35b8..2383256be9b 100644
--- a/contrib/earthdistance/earthdistance.c
+++ b/contrib/earthdistance/earthdistance.c
@@ -1,10 +1,9 @@
+#include "postgres.h"
+
#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <postgres.h>
-#include <utils/geo_decls.h> /* for Pt */
-#include <utils/palloc.h> /* for palloc */
+#include "utils/geo_decls.h" /* for Pt */
+
/* Earth's radius is in statute miles. */
const int EARTH_RADIUS = 3958.747716;
diff --git a/contrib/fulltextindex/fti.c b/contrib/fulltextindex/fti.c
index 75358958c5b..1f9c398fea5 100644
--- a/contrib/fulltextindex/fti.c
+++ b/contrib/fulltextindex/fti.c
@@ -1,8 +1,9 @@
#include "postgres.h"
+
+#include <ctype.h>
+
#include "executor/spi.h"
#include "commands/trigger.h"
-#include <ctype.h>
-#include <stdio.h> /* debugging */
/*
* Trigger function takes 2 arguments:
diff --git a/contrib/intarray/_int.c b/contrib/intarray/_int.c
index 6bfe2e1ae40..c81e86237ec 100644
--- a/contrib/intarray/_int.c
+++ b/contrib/intarray/_int.c
@@ -4,11 +4,11 @@
format for these routines is dictated by Postgres architecture.
******************************************************************************/
-#include <stdio.h>
+#include "postgres.h"
+
#include <float.h>
#include <string.h>
-#include "postgres.h"
#include "access/gist.h"
#include "access/itup.h"
#include "access/rtree.h"
diff --git a/contrib/isbn_issn/isbn_issn.c b/contrib/isbn_issn/isbn_issn.c
index 15d96d35db3..bc21a0622ea 100644
--- a/contrib/isbn_issn/isbn_issn.c
+++ b/contrib/isbn_issn/isbn_issn.c
@@ -1,13 +1,11 @@
/*
* PostgreSQL type definitions for ISBNs.
*
- * $Id: isbn_issn.c,v 1.2 2000/06/19 13:53:39 momjian Exp $
+ * $Id: isbn_issn.c,v 1.3 2001/02/10 02:31:25 tgl Exp $
*/
-#include <stdio.h>
+#include "postgres.h"
-#include <postgres.h>
-#include <utils/palloc.h>
/*
* This is the internal storage format for ISBNs.
diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c
index 6f45394ac60..33fa4cf98dd 100644
--- a/contrib/lo/lo.c
+++ b/contrib/lo/lo.c
@@ -1,16 +1,12 @@
/*
* PostgreSQL type definitions for managed LargeObjects.
*
- * $Header: /cvsroot/pgsql/contrib/lo/lo.c,v 1.6 2000/11/21 21:51:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/contrib/lo/lo.c,v 1.7 2001/02/10 02:31:25 tgl Exp $
*
*/
#include "postgres.h"
-#include <stdio.h>
-
-#include "utils/palloc.h"
-
/* Required for largeobjects */
#include "libpq/libpq-fs.h"
#include "libpq/be-fsstubs.h"
diff --git a/contrib/pg_dumplo/main.c b/contrib/pg_dumplo/main.c
index aa8ad104c1f..e8ff2f72e09 100644
--- a/contrib/pg_dumplo/main.c
+++ b/contrib/pg_dumplo/main.c
@@ -1,23 +1,23 @@
/* -------------------------------------------------------------------------
* pg_dumplo
*
- * $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.5 2001/01/24 19:42:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/contrib/pg_dumplo/Attic/main.c,v 1.6 2001/02/10 02:31:25 tgl Exp $
*
* Karel Zak 1999-2000
* -------------------------------------------------------------------------
*/
+/* We import postgres_fe.h mostly to get the HAVE_GETOPT_LONG configure result. */
+#ifndef OUT_OF_PG
+#include "postgres_fe.h"
+#endif
+
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-/* We import postgres.h mostly to get the HAVE_GETOPT_LONG configure result. */
-#ifndef OUT_OF_PG
-#include "postgres.h"
-#endif
-
#include <libpq-fe.h>
#include <libpq/libpq-fs.h>
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 866a41487ad..bdbabded5b2 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.7 2000/11/01 00:45:46 ishii Exp $
+ * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.8 2001/02/10 02:31:25 tgl Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
@@ -17,11 +17,8 @@
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*/
+#include "postgres_fe.h"
-#include "config.h"
-
-#include <stdio.h>
-#include "postgres.h"
#include "libpq-fe.h"
#include <errno.h>
diff --git a/contrib/pgcrypto/encode.c b/contrib/pgcrypto/encode.c
index 8875c41cdf6..0ad0a8f56ce 100644
--- a/contrib/pgcrypto/encode.c
+++ b/contrib/pgcrypto/encode.c
@@ -26,11 +26,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: encode.c,v 1.2 2001/02/06 18:05:13 momjian Exp $
+ * $Id: encode.c,v 1.3 2001/02/10 02:31:25 tgl Exp $
*/
-#include <postgres.h>
-#include <fmgr.h>
+#include "postgres.h"
+
+#include "fmgr.h"
#include "encode.h"
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c
index b1c24b20db9..3c6e6fc80b7 100644
--- a/contrib/pgcrypto/internal.c
+++ b/contrib/pgcrypto/internal.c
@@ -26,10 +26,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: internal.c,v 1.1 2000/10/31 13:11:28 petere Exp $
+ * $Id: internal.c,v 1.2 2001/02/10 02:31:25 tgl Exp $
*/
-#include <postgres.h>
+#include "postgres.h"
#include "pgcrypto.h"
diff --git a/contrib/pgcrypto/krb.c b/contrib/pgcrypto/krb.c
index ab67f1ced12..98b16136a3d 100644
--- a/contrib/pgcrypto/krb.c
+++ b/contrib/pgcrypto/krb.c
@@ -31,15 +31,15 @@
* It is possible that this works with other SHA1/MD5
* implementations too.
*
- * $Id: krb.c,v 1.1 2000/10/31 13:11:28 petere Exp $
+ * $Id: krb.c,v 1.2 2001/02/10 02:31:25 tgl Exp $
*/
-#include <postgres.h>
+#include "postgres.h"
#include "pgcrypto.h"
-#include <md5.h>
-#include <sha.h>
+#include "md5.h"
+#include "sha.h"
#ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16
diff --git a/contrib/pgcrypto/md5.c b/contrib/pgcrypto/md5.c
index 9cdfa6e1aca..d5387202312 100644
--- a/contrib/pgcrypto/md5.c
+++ b/contrib/pgcrypto/md5.c
@@ -1,4 +1,4 @@
-/* $Id: md5.c,v 1.3 2001/01/09 16:07:13 momjian Exp $ */
+/* $Id: md5.c,v 1.4 2001/02/10 02:31:25 tgl Exp $ */
/* $KAME: md5.c,v 1.3 2000/02/22 14:01:17 itojun Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <postgres.h>
+#include "postgres.h"
#include "md5.h"
diff --git a/contrib/pgcrypto/mhash.c b/contrib/pgcrypto/mhash.c
index ed16c124dfc..34ac7e9c7ac 100644
--- a/contrib/pgcrypto/mhash.c
+++ b/contrib/pgcrypto/mhash.c
@@ -26,10 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mhash.c,v 1.1 2000/10/31 13:11:28 petere Exp $
+ * $Id: mhash.c,v 1.2 2001/02/10 02:31:26 tgl Exp $
*/
-#include <postgres.h>
+#include "postgres.h"
+
#include "pgcrypto.h"
#include <mhash.h>
diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c
index 76a2a56b672..18fb0754887 100644
--- a/contrib/pgcrypto/openssl.c
+++ b/contrib/pgcrypto/openssl.c
@@ -26,10 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openssl.c,v 1.1 2000/10/31 13:11:28 petere Exp $
+ * $Id: openssl.c,v 1.2 2001/02/10 02:31:26 tgl Exp $
*/
-#include <postgres.h>
+#include "postgres.h"
+
#include "pgcrypto.h"
#include <evp.h>
diff --git a/contrib/pgcrypto/pgcrypto.c b/contrib/pgcrypto/pgcrypto.c
index cfd72374941..1feb3e4806a 100644
--- a/contrib/pgcrypto/pgcrypto.c
+++ b/contrib/pgcrypto/pgcrypto.c
@@ -26,11 +26,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pgcrypto.c,v 1.5 2001/02/06 18:05:13 momjian Exp $
+ * $Id: pgcrypto.c,v 1.6 2001/02/10 02:31:26 tgl Exp $
*/
-#include <postgres.h>
-#include <utils/builtins.h>
+#include "postgres.h"
+
+#include "utils/builtins.h"
#include "pgcrypto.h"
diff --git a/contrib/pgcrypto/sha1.c b/contrib/pgcrypto/sha1.c
index eef72325e99..63c28dc7e94 100644
--- a/contrib/pgcrypto/sha1.c
+++ b/contrib/pgcrypto/sha1.c
@@ -1,4 +1,4 @@
-/* $Id: sha1.c,v 1.3 2001/01/09 16:07:13 momjian Exp $ */
+/* $Id: sha1.c,v 1.4 2001/02/10 02:31:26 tgl Exp $ */
/* $KAME: sha1.c,v 1.3 2000/02/22 14:01:18 itojun Exp $ */
/*
@@ -35,7 +35,7 @@
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/
-#include <postgres.h>
+#include "postgres.h"
#include "sha1.h"
diff --git a/contrib/soundex/soundex.c b/contrib/soundex/soundex.c
index 165202d5ef5..5a7e238e380 100644
--- a/contrib/soundex/soundex.c
+++ b/contrib/soundex/soundex.c
@@ -1,10 +1,10 @@
-/* $Header: /cvsroot/pgsql/contrib/soundex/Attic/soundex.c,v 1.9 2000/12/03 20:45:31 tgl Exp $ */
+/* $Header: /cvsroot/pgsql/contrib/soundex/Attic/soundex.c,v 1.10 2001/02/10 02:31:26 tgl Exp $ */
#include "postgres.h"
+
+#include <ctype.h>
+
#include "fmgr.h"
#include "utils/builtins.h"
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
Datum text_soundex(PG_FUNCTION_ARGS);
diff --git a/contrib/string/string_io.c b/contrib/string/string_io.c
index 8c4e5b45e1a..840782dd515 100644
--- a/contrib/string/string_io.c
+++ b/contrib/string/string_io.c
@@ -9,12 +9,10 @@
* either version 2, or (at your option) any later version.
*/
+#include "postgres.h"
+
#include <ctype.h>
-#include <string.h>
-#include "postgres.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
#include "utils/builtins.h"
#include "string_io.h"