Commit d08741ea authored by Tom Lane's avatar Tom Lane

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.
parent cf21985a
# #
# PostgreSQL top level makefile # PostgreSQL top level makefile
# #
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.16 2001/01/06 21:24:01 petere Exp $ # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.17 2001/02/10 02:31:25 tgl Exp $
# #
subdir = subdir =
...@@ -22,6 +22,9 @@ installdirs uninstall distprep: ...@@ -22,6 +22,9 @@ installdirs uninstall distprep:
$(MAKE) -C doc $@ $(MAKE) -C doc $@
$(MAKE) -C src $@ $(MAKE) -C src $@
install-all-headers:
$(MAKE) -C src $@
# clean, distclean, etc should apply to contrib too, even though # clean, distclean, etc should apply to contrib too, even though
# it's not built by default # it's not built by default
clean: clean:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# GNUmakefile won't exist yet, so we catch that case as well. # GNUmakefile won't exist yet, so we catch that case as well.
all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean: all check install installdirs install-all-headers installcheck uninstall dep depend clean distclean maintainer-clean:
@if [ ! -f GNUmakefile ] ; then \ @if [ ! -f GNUmakefile ] ; then \
echo "You need to run the 'configure' program first. See the file"; \ echo "You need to run the 'configure' program first. See the file"; \
echo "'INSTALL' for installation instructions." ; \ echo "'INSTALL' for installation instructions." ; \
......
/*#include "postgres.h"*/
typedef struct NDBOX { typedef struct NDBOX {
unsigned int size; /* required to be a Postgres varlena type */ unsigned int size; /* required to be a Postgres varlena type */
unsigned int dim; unsigned int dim;
......
#include "postgres.h"
#include <math.h> #include <math.h>
#include <stdio.h>
#include <string.h>
#include <postgres.h> #include "utils/geo_decls.h" /* for Pt */
#include <utils/geo_decls.h> /* for Pt */
#include <utils/palloc.h> /* for palloc */
/* Earth's radius is in statute miles. */ /* Earth's radius is in statute miles. */
const int EARTH_RADIUS = 3958.747716; const int EARTH_RADIUS = 3958.747716;
......
#include "postgres.h" #include "postgres.h"
#include <ctype.h>
#include "executor/spi.h" #include "executor/spi.h"
#include "commands/trigger.h" #include "commands/trigger.h"
#include <ctype.h>
#include <stdio.h> /* debugging */
/* /*
* Trigger function takes 2 arguments: * Trigger function takes 2 arguments:
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
format for these routines is dictated by Postgres architecture. format for these routines is dictated by Postgres architecture.
******************************************************************************/ ******************************************************************************/
#include <stdio.h> #include "postgres.h"
#include <float.h> #include <float.h>
#include <string.h> #include <string.h>
#include "postgres.h"
#include "access/gist.h" #include "access/gist.h"
#include "access/itup.h" #include "access/itup.h"
#include "access/rtree.h" #include "access/rtree.h"
......
/* /*
* PostgreSQL type definitions for ISBNs. * 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. * This is the internal storage format for ISBNs.
......
/* /*
* PostgreSQL type definitions for managed LargeObjects. * 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 "postgres.h"
#include <stdio.h>
#include "utils/palloc.h"
/* Required for largeobjects */ /* Required for largeobjects */
#include "libpq/libpq-fs.h" #include "libpq/libpq-fs.h"
#include "libpq/be-fsstubs.h" #include "libpq/be-fsstubs.h"
......
/* ------------------------------------------------------------------------- /* -------------------------------------------------------------------------
* pg_dumplo * 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 * 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 <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.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-fe.h>
#include <libpq/libpq-fs.h> #include <libpq/libpq-fs.h>
......
/* /*
* $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 * pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii * written by Tatsuo Ishii
...@@ -17,11 +17,8 @@ ...@@ -17,11 +17,8 @@
* suitability of this software for any purpose. It is provided "as * suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty. * is" without express or implied warranty.
*/ */
#include "postgres_fe.h"
#include "config.h"
#include <stdio.h>
#include "postgres.h"
#include "libpq-fe.h" #include "libpq-fe.h"
#include <errno.h> #include <errno.h>
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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 "postgres.h"
#include <fmgr.h>
#include "fmgr.h"
#include "encode.h" #include "encode.h"
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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" #include "pgcrypto.h"
......
...@@ -31,15 +31,15 @@ ...@@ -31,15 +31,15 @@
* It is possible that this works with other SHA1/MD5 * It is possible that this works with other SHA1/MD5
* implementations too. * 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 "pgcrypto.h"
#include <md5.h> #include "md5.h"
#include <sha.h> #include "sha.h"
#ifndef MD5_DIGEST_LENGTH #ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16 #define MD5_DIGEST_LENGTH 16
......
/* $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 $ */ /* $KAME: md5.c,v 1.3 2000/02/22 14:01:17 itojun Exp $ */
/* /*
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <postgres.h> #include "postgres.h"
#include "md5.h" #include "md5.h"
......
...@@ -26,10 +26,11 @@ ...@@ -26,10 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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 "pgcrypto.h"
#include <mhash.h> #include <mhash.h>
......
...@@ -26,10 +26,11 @@ ...@@ -26,10 +26,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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 "pgcrypto.h"
#include <evp.h> #include <evp.h>
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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 "postgres.h"
#include <utils/builtins.h>
#include "utils/builtins.h"
#include "pgcrypto.h" #include "pgcrypto.h"
......
/* $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 $ */ /* $KAME: sha1.c,v 1.3 2000/02/22 14:01:18 itojun Exp $ */
/* /*
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* implemented by Jun-ichiro itojun Itoh <itojun@itojun.org> * implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
*/ */
#include <postgres.h> #include "postgres.h"
#include "sha1.h" #include "sha1.h"
......
/* $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 "postgres.h"
#include <ctype.h>
#include "fmgr.h" #include "fmgr.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include <ctype.h>
#include <string.h>
#include <stdio.h>
Datum text_soundex(PG_FUNCTION_ARGS); Datum text_soundex(PG_FUNCTION_ARGS);
......
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
* either version 2, or (at your option) any later version. * either version 2, or (at your option) any later version.
*/ */
#include "postgres.h"
#include <ctype.h> #include <ctype.h>
#include <string.h>
#include "postgres.h"
#include "utils/elog.h"
#include "utils/palloc.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "string_io.h" #include "string_io.h"
......
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.34 2001/01/15 21:17:27 petere Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.35 2001/02/10 02:31:26 tgl Exp $ -->
<chapter id="installation"> <chapter id="installation">
<title><![%flattext-install-include[<productname>PostgreSQL</>]]> Installation Instructions</title> <title><![%flattext-install-include[<productname>PostgreSQL</>]]> Installation Instructions</title>
...@@ -783,11 +783,26 @@ All of PostgreSQL is successfully made. Ready to install. ...@@ -783,11 +783,26 @@ All of PostgreSQL is successfully made. Ready to install.
them, but how to do that is left as an exercise. them, but how to do that is left as an exercise.
</para> </para>
<para>
The standard install installs only the header files needed for client
application development. If you plan to do any server-side program
development (such as custom functions or datatypes written in C),
then you may want to install the entire <productname>PostgreSQL</>
include tree into your target include directory. To do that, enter
<screen>
<userinput>gmake install-all-headers</userinput>
</screen>
This adds a megabyte or two to the install footprint, and is only
useful if you don't plan to keep the whole source tree around for
reference. (If you do, you can just use the source's include
directory when building server-side software.)
</para>
<formalpara> <formalpara>
<title>Client-only installation</title> <title>Client-only installation</title>
<para> <para>
If you want to install only the client applications and If you want to install only the client applications and
interfaces, then you can use these commands: interface libraries, then you can use these commands:
<screen> <screen>
<userinput>gmake -C src/bin install</> <userinput>gmake -C src/bin install</>
<userinput>gmake -C src/interfaces install</> <userinput>gmake -C src/interfaces install</>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.60 2000/09/29 17:17:32 petere Exp $ # $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.61 2001/02/10 02:31:26 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -20,6 +20,9 @@ all install installdirs uninstall dep depend distprep: ...@@ -20,6 +20,9 @@ all install installdirs uninstall dep depend distprep:
$(MAKE) -C bin $@ $(MAKE) -C bin $@
$(MAKE) -C pl $@ $(MAKE) -C pl $@
install-all-headers:
$(MAKE) -C include $@
clean: clean:
$(MAKE) -C backend $@ $(MAKE) -C backend $@
$(MAKE) -C include $@ $(MAKE) -C include $@
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# GNUmakefile won't exist yet, so we catch that case as well. # GNUmakefile won't exist yet, so we catch that case as well.
all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean: all check install installdirs install-all-headers installcheck uninstall dep depend clean distclean maintainer-clean:
@if [ ! -f GNUmakefile ] ; then \ @if [ ! -f GNUmakefile ] ; then \
echo "You need to run the 'configure' program first. See the file"; \ echo "You need to run the 'configure' program first. See the file"; \
echo "'INSTALL' for installation instructions." ; \ echo "'INSTALL' for installation instructions." ; \
......
...@@ -9,23 +9,22 @@ ...@@ -9,23 +9,22 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.20 2001/01/24 19:42:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.21 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" /* can be used in frontend or backend */
#include "lib/dllist.h"
/* When this file is compiled for inclusion in libpq,
* it can't use assert checking. Probably this fix ought to be
* in c.h or somewhere like that...
*/
#ifdef FRONTEND #ifdef FRONTEND
#undef Assert #include "postgres_fe.h"
/* No assert checks in frontend ... */
#define Assert(condition) #define Assert(condition)
#else
#include "postgres.h"
#endif #endif
#include "lib/dllist.h"
Dllist * Dllist *
DLNewList(void) DLNewList(void)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* wherein you authenticate a user by seeing what IP address the system * wherein you authenticate a user by seeing what IP address the system
* says he comes from and possibly using ident). * says he comes from and possibly using ident).
* *
* $Id: hba.c,v 1.54 2000/08/27 21:50:18 tgl Exp $ * $Id: hba.c,v 1.55 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -882,7 +882,7 @@ struct CharsetItem ...@@ -882,7 +882,7 @@ struct CharsetItem
char Table[MAX_TOKEN]; char Table[MAX_TOKEN];
}; };
int static bool
InRange(char *buf, int host) InRange(char *buf, int host)
{ {
int valid, int valid,
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.18 2001/01/24 19:42:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.19 2001/02/10 02:31:26 tgl Exp $
* *
* NOTES * NOTES
* This shouldn't be in libpq, but the monitor and some other * This shouldn't be in libpq, but the monitor and some other
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
* is to do signal-handler reinstallation, which doesn't work well * is to do signal-handler reinstallation, which doesn't work well
* at all. * at all.
* ------------------------------------------------------------------------*/ * ------------------------------------------------------------------------*/
#include <signal.h>
#include "postgres.h" #include "postgres.h"
#include <signal.h>
#include "libpq/pqsignal.h" #include "libpq/pqsignal.h"
......
/* /*
* $Id: aix.h,v 1.3 2000/09/29 22:00:43 momjian Exp $ * $Id: aix.h,v 1.4 2001/02/10 02:31:26 tgl Exp $
* *
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52 * @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
...@@ -56,7 +56,6 @@ extern "C" ...@@ -56,7 +56,6 @@ extern "C"
#endif /* HAVE_DLOPEN */ #endif /* HAVE_DLOPEN */
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
#define pg_dlopen(f) dlopen(f, RTLD_LAZY) #define pg_dlopen(f) dlopen(f, RTLD_LAZY)
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/beos.c,v 1.5 2001/01/24 19:43:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/beos.c,v 1.6 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
#include "utils/elog.h"
void * void *
...@@ -74,4 +74,4 @@ pg_dlclose(void *handle) ...@@ -74,4 +74,4 @@ pg_dlclose(void *handle)
elog(NOTICE, "error while unloading add-on"); elog(NOTICE, "error while unloading add-on");
free(handle); free(handle);
} }
} }
\ No newline at end of file
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#ifndef PORT_PROTOS_H #ifndef PORT_PROTOS_H
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: dgux.h,v 1.8 2001/01/24 19:43:04 momjian Exp $ * $Id: dgux.h,v 1.9 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* /*
......
...@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; ...@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "postgres.h"
#include "dynloader.h" #include "dynloader.h"
static char error_message[BUFSIZ]; static char error_message[BUFSIZ];
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: freebsd.h,v 1.7 2001/01/24 19:43:04 momjian Exp $ * $Id: freebsd.h,v 1.8 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
#include <nlist.h> #include <nlist.h>
#include <link.h> #include <link.h>
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.16 2001/02/07 17:59:58 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.17 2001/02/10 02:31:26 tgl Exp $
* *
* NOTES * NOTES
* all functions are defined here -- it's impossible to trace the * all functions are defined here -- it's impossible to trace the
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "dl.h" #include "dl.h"
#include "dynloader.h" #include "dynloader.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
void * void *
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -7,14 +7,13 @@ ...@@ -7,14 +7,13 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: linux.h,v 1.10 2001/01/24 19:43:04 momjian Exp $ * $Id: linux.h,v 1.11 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifndef PORT_PROTOS_H #ifndef PORT_PROTOS_H
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
#ifdef __ELF__ #ifdef __ELF__
#include <dlfcn.h> #include <dlfcn.h>
......
...@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; ...@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "postgres.h"
#include "dynloader.h" #include "dynloader.h"
static char error_message[BUFSIZ]; static char error_message[BUFSIZ];
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: netbsd.h,v 1.2 2001/01/24 19:43:04 momjian Exp $ * $Id: netbsd.h,v 1.3 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
#include <nlist.h> #include <nlist.h>
#include "link.h" #include "link.h"
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#ifndef PORT_PROTOS_H #ifndef PORT_PROTOS_H
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
void *next_dlopen(char *name); void *next_dlopen(char *name);
......
...@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; ...@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "postgres.h"
#include "dynloader.h" #include "dynloader.h"
static char error_message[BUFSIZ]; static char error_message[BUFSIZ];
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: openbsd.h,v 1.2 2001/01/24 19:43:04 momjian Exp $ * $Id: openbsd.h,v 1.3 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
#include <nlist.h> #include <nlist.h>
#include "link.h" #include "link.h"
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.2 2000/05/28 17:56:02 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.3 2001/02/10 02:31:26 tgl Exp $
* *
* NOTES * NOTES
* *
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <dl.h> #include <dl.h>
*/ */
#include "postgres.h" #include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
#include "dynloader.h" #include "dynloader.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: sco.h,v 1.6 2001/01/24 19:43:04 momjian Exp $ * $Id: sco.h,v 1.7 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/solaris.h,v 1.1 2000/10/10 21:22:23 petere Exp $ */ /* $Header: /cvsroot/pgsql/src/backend/port/dynloader/solaris.h,v 1.2 2001/02/10 02:31:26 tgl Exp $ */
#ifndef DYNLOADER_SOLARIS_H #ifndef DYNLOADER_SOLARIS_H
#define DYNLOADER_SOLARIS_H #define DYNLOADER_SOLARIS_H
#include "config.h"
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
#define pg_dlopen(f) dlopen(f,1) #define pg_dlopen(f) dlopen(f,1)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: sunos4.h,v 1.6 2001/01/24 19:43:04 momjian Exp $ * $Id: sunos4.h,v 1.7 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: svr4.h,v 1.6 2001/01/24 19:43:04 momjian Exp $ * $Id: svr4.h,v 1.7 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define DYNLOADER_H #define DYNLOADER_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.h */ /* dynloader.h */
......
...@@ -2,22 +2,19 @@ ...@@ -2,22 +2,19 @@
* *
* dynloader.c * dynloader.c
* This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x. * This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
* (Note that pg_dlsym and pg_dlclose are actually macros defined in
* "port-protos.h".)
* *
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.12 2001/01/24 19:43:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.13 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "dl.h" #include "dl.h"
#include "fmgr.h"
#include "port-protos.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
extern char pg_pathname[]; extern char pg_pathname[];
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define PORT_PROTOS_H #define PORT_PROTOS_H
#include <dlfcn.h> #include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h" #include "utils/dynamic_loader.h"
/* dynloader.c */ /* dynloader.c */
......
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* might be in either frontend or backend */
#include "postgres_fe.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/param.h> #include <sys/param.h>
#include "postgres.h"
/* /*
* We do all internal arithmetic in the widest available integer type, * We do all internal arithmetic in the widest available integer type,
...@@ -74,7 +75,7 @@ typedef unsigned long ulong_long; ...@@ -74,7 +75,7 @@ typedef unsigned long ulong_long;
* causing nast effects. * causing nast effects.
**************************************************************/ **************************************************************/
/*static char _id[] = "$Id: snprintf.c,v 1.29 2000/12/30 19:17:47 tgl Exp $";*/ /*static char _id[] = "$Id: snprintf.c,v 1.30 2001/02/10 02:31:26 tgl Exp $";*/
static char *end; static char *end;
static int SnprfOverflow; static int SnprfOverflow;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.205 2001/02/08 00:35:10 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.206 2001/02/10 02:31:26 tgl Exp $
* *
* NOTES * NOTES
* *
...@@ -235,11 +235,6 @@ static void InitSSL(void); ...@@ -235,11 +235,6 @@ static void InitSSL(void);
#endif #endif
#ifdef CYR_RECODE
extern void GetCharSetByHost(char *, int, char *);
#endif
static void static void
checkDataDir(const char *checkdir) checkDataDir(const char *checkdir)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.84 2001/01/24 19:43:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.85 2001/02/10 02:31:26 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
#include "access/genam.h" #include "access/genam.h"
#include "access/heapam.h" #include "access/heapam.h"
#include "access/nbtree.h"
#include "access/htup.h" #include "access/htup.h"
#include "access/nbtree.h"
#include "access/tuptoaster.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "catalog/catname.h" #include "catalog/catname.h"
#include "catalog/heap.h" #include "catalog/heap.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.73 2001/01/24 19:43:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.74 2001/02/10 02:31:27 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "access/hash.h" #include "access/hash.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "miscadmin.h"
#include "utils/acl.h" #include "utils/acl.h"
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/fmgroids.h" #include "utils/fmgroids.h"
......
...@@ -8,15 +8,16 @@ ...@@ -8,15 +8,16 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.67 2001/01/24 19:43:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.68 2001/02/10 02:31:27 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include <ctype.h>
#include "postgres.h" #include "postgres.h"
#include <ctype.h>
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "utils/builtins.h" #include "utils/builtins.h"
static int text_cmp(text *arg1, text *arg2); static int text_cmp(text *arg1, text *arg2);
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.49 2001/01/24 19:43:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.50 2001/02/10 02:31:27 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres.h"
#include "access/tuptoaster.h"
#include "catalog/pg_language.h" #include "catalog/pg_language.h"
#include "catalog/pg_proc.h" #include "catalog/pg_proc.h"
#include "executor/functions.h" #include "executor/functions.h"
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
* *
* Tatsuo Ishii * Tatsuo Ishii
* *
* $Id: alt.c,v 1.2 1999/05/25 16:12:38 momjian Exp $ * $Id: alt.c,v 1.3 2001/02/10 02:31:27 tgl Exp $
*/ */
#include <stdio.h> #include <stdio.h>
main() main()
{ {
int i; int i;
......
...@@ -7,9 +7,12 @@ ...@@ -7,9 +7,12 @@
* *
* 1999/1/15 Tatsuo Ishii * 1999/1/15 Tatsuo Ishii
* *
* $Id: big5.c,v 1.6 2000/12/09 04:27:36 ishii Exp $ * $Id: big5.c,v 1.7 2001/02/10 02:31:27 tgl Exp $
*/ */
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
typedef struct typedef struct
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
* This file contains some public functions * This file contains some public functions
* usable for both the backend and the frontend. * usable for both the backend and the frontend.
* Tatsuo Ishii * Tatsuo Ishii
* $Id: common.c,v 1.10 2000/10/30 10:40:28 ishii Exp $ */ * $Id: common.c,v 1.11 2001/02/10 02:31:27 tgl Exp $
*/
#include <stdlib.h> #include "postgres.h"
#include <string.h>
#ifdef WIN32 #ifdef WIN32
#include "win32.h" #include "win32.h"
...@@ -13,8 +12,6 @@ ...@@ -13,8 +12,6 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#include "postgres.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#include "utils/builtins.h" #include "utils/builtins.h"
......
...@@ -6,13 +6,12 @@ ...@@ -6,13 +6,12 @@
* WIN1250 client encoding support contributed by Pavel Behal * WIN1250 client encoding support contributed by Pavel Behal
* SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya * SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
* *
* $Id: conv.c,v 1.21 2000/11/17 04:42:10 ishii Exp $ * $Id: conv.c,v 1.22 2001/02/10 02:31:27 tgl Exp $
* *
* *
*/ */
/* can be used in either frontend or backend */
#include <stdio.h> #include "postgres_fe.h"
#include <string.h>
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
* *
* Tatsuo Ishii * Tatsuo Ishii
* *
* $Id: iso.c,v 1.2 1999/05/25 16:12:42 momjian Exp $ * $Id: iso.c,v 1.3 2001/02/10 02:31:27 tgl Exp $
*/ */
#include <stdio.h> #include <stdio.h>
main() main()
{ {
int i; int i;
......
#include <stdio.h> #include "postgres_fe.h"
#include <string.h>
#include <ctype.h>
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
* client encoding and server internal encoding. * client encoding and server internal encoding.
* (currently mule internal code (mic) is used) * (currently mule internal code (mic) is used)
* Tatsuo Ishii * Tatsuo Ishii
* $Id: mbutils.c,v 1.14 2000/11/14 18:37:44 tgl Exp $ */ * $Id: mbutils.c,v 1.15 2001/02/10 02:31:27 tgl Exp $
*/
#include "postgres.h" #include "postgres.h"
#include "miscadmin.h" #include "miscadmin.h"
......
/* /*
* conversion functions between pg_wchar and multi-byte streams. * conversion functions between pg_wchar and multi-byte streams.
* Tatsuo Ishii * Tatsuo Ishii
* $Id: wchar.c,v 1.13 2000/10/12 06:06:50 ishii Exp $ * $Id: wchar.c,v 1.14 2001/02/10 02:31:27 tgl Exp $
* *
* WIN1250 client encoding updated by Pavel Behal * WIN1250 client encoding updated by Pavel Behal
* *
*/ */
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
* *
* Tatsuo Ishii * Tatsuo Ishii
* *
* $Id: win.c,v 1.2 1999/05/25 16:12:45 momjian Exp $ * $Id: win.c,v 1.3 2001/02/10 02:31:27 tgl Exp $
*/ */
#include <stdio.h> #include <stdio.h>
main() main()
{ {
int i; int i;
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.52 2001/01/28 03:47:49 pjw Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.53 2001/02/10 02:31:27 tgl Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -27,18 +27,15 @@ ...@@ -27,18 +27,15 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "pg_dump.h"
#include <ctype.h> #include <ctype.h>
#include "postgres.h"
#include "libpq-fe.h" #include "libpq-fe.h"
#ifndef HAVE_STRDUP #ifndef HAVE_STRDUP
#include "strdup.h" #include "strdup.h"
#endif #endif
#include "pg_dump.h"
static char **findParentsByOid(TableInfo *tbinfo, int numTables, static char **findParentsByOid(TableInfo *tbinfo, int numTables,
InhInfo *inhinfo, int numInherits, InhInfo *inhinfo, int numInherits,
const char *oid, const char *oid,
......
...@@ -40,13 +40,10 @@ ...@@ -40,13 +40,10 @@
*/ */
#ifndef PG_BACKUP__ #ifndef PG_BACKUP__
#include "config.h"
#include "c.h"
#define PG_BACKUP__ #define PG_BACKUP__
#include "postgres.h" #include "postgres_fe.h"
#include "libpq-fe.h" #include "libpq-fe.h"
typedef enum _archiveFormat { typedef enum _archiveFormat {
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#ifndef __PG_BACKUP_ARCHIVE__ #ifndef __PG_BACKUP_ARCHIVE__
#define __PG_BACKUP_ARCHIVE__ #define __PG_BACKUP_ARCHIVE__
#include <stdio.h> #include "postgres_fe.h"
#include <time.h> #include <time.h>
#include "postgres.h"
#include "pqexpbuffer.h" #include "pqexpbuffer.h"
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ
......
...@@ -31,9 +31,10 @@ ...@@ -31,9 +31,10 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include <stdlib.h>
#include "pg_backup.h" #include "pg_backup.h"
#include "pg_backup_archiver.h" #include "pg_backup_archiver.h"
#include <stdlib.h>
#include <errno.h> #include <errno.h>
/*-------- /*--------
......
...@@ -13,33 +13,24 @@ ...@@ -13,33 +13,24 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "pg_dump.h"
#include "pg_backup.h"
#include "pg_backup_archiver.h"
#include "pg_backup_db.h"
#include <unistd.h> /* for getopt() */ #include <unistd.h> /* for getopt() */
#include <ctype.h> #include <ctype.h>
#include "postgres.h"
#ifdef HAVE_TERMIOS_H #ifdef HAVE_TERMIOS_H
#include <termios.h> #include <termios.h>
#endif #endif
#include "access/attnum.h"
#include "access/htup.h"
#include "catalog/pg_index.h"
#include "catalog/pg_language.h"
#include "catalog/pg_trigger.h"
#include "catalog/pg_type.h"
#include "libpq-fe.h" #include "libpq-fe.h"
#include <libpq/libpq-fs.h> #include "libpq/libpq-fs.h"
#ifndef HAVE_STRDUP #ifndef HAVE_STRDUP
#include "strdup.h" #include "strdup.h"
#endif #endif
#include "pg_dump.h"
#include "pg_backup.h"
#include "pg_backup_archiver.h"
#include "pg_backup_db.h"
static const char *progname = "Archiver(db)"; static const char *progname = "Archiver(db)";
static void _prompt_for_password(char *username, char *password); static void _prompt_for_password(char *username, char *password);
......
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include <stdlib.h>
#include <string.h>
#include "pg_backup.h" #include "pg_backup.h"
#include "pg_backup_archiver.h" #include "pg_backup_archiver.h"
#include <stdlib.h>
#include <string.h>
static void _ArchiveEntry(ArchiveHandle* AH, TocEntry* te); static void _ArchiveEntry(ArchiveHandle* AH, TocEntry* te);
static void _StartData(ArchiveHandle* AH, TocEntry* te); static void _StartData(ArchiveHandle* AH, TocEntry* te);
static int _WriteData(ArchiveHandle* AH, const void* data, int dLen); static int _WriteData(ArchiveHandle* AH, const void* data, int dLen);
......
...@@ -30,11 +30,12 @@ ...@@ -30,11 +30,12 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "pg_backup.h"
#include "pg_backup_archiver.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> /* for dup */ #include <unistd.h> /* for dup */
#include "pg_backup.h"
#include "pg_backup_archiver.h"
static int _WriteData(ArchiveHandle* AH, const void* data, int dLen); static int _WriteData(ArchiveHandle* AH, const void* data, int dLen);
static void _EndData(ArchiveHandle* AH, TocEntry* te); static void _EndData(ArchiveHandle* AH, TocEntry* te);
......
...@@ -28,13 +28,14 @@ ...@@ -28,13 +28,14 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "pg_backup.h"
#include "pg_backup_archiver.h"
#include "pg_backup_tar.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <unistd.h> #include <unistd.h>
#include "pg_backup.h"
#include "pg_backup_archiver.h"
#include "pg_backup_tar.h"
static void _ArchiveEntry(ArchiveHandle* AH, TocEntry* te); static void _ArchiveEntry(ArchiveHandle* AH, TocEntry* te);
static void _StartData(ArchiveHandle* AH, TocEntry* te); static void _StartData(ArchiveHandle* AH, TocEntry* te);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.190 2001/01/28 03:47:49 pjw Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.191 2001/02/10 02:31:27 tgl Exp $
* *
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* *
...@@ -104,13 +104,18 @@ ...@@ -104,13 +104,18 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
/*
* Although this is not a backend module, we must include postgres.h anyway
* so that we can include a bunch of backend include files. pg_dump has
* never pretended to be very independent of the backend anyhow ...
*/
#include "postgres.h"
#include <unistd.h> /* for getopt() */ #include <unistd.h> /* for getopt() */
#include <ctype.h> #include <ctype.h>
#include "pg_backup.h" #include "pg_backup.h"
#include "postgres.h"
#ifdef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H
#include <getopt.h> #include <getopt.h>
#endif #endif
...@@ -120,13 +125,12 @@ ...@@ -120,13 +125,12 @@
#include "access/attnum.h" #include "access/attnum.h"
#include "access/htup.h" #include "access/htup.h"
#include "catalog/pg_index.h" #include "catalog/pg_class.h"
#include "catalog/pg_language.h"
#include "catalog/pg_trigger.h" #include "catalog/pg_trigger.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "libpq-fe.h" #include "libpq-fe.h"
#include <libpq/libpq-fs.h> #include "libpq/libpq-fs.h"
#ifndef HAVE_STRDUP #ifndef HAVE_STRDUP
#include "strdup.h" #include "strdup.h"
#endif #endif
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_dump.h,v 1.57 2001/01/24 19:43:18 momjian Exp $ * $Id: pg_dump.h,v 1.58 2001/02/10 02:31:27 tgl Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -29,9 +29,8 @@ ...@@ -29,9 +29,8 @@
#ifndef PG_DUMP_H #ifndef PG_DUMP_H
#define PG_DUMP_H #define PG_DUMP_H
#include "pqexpbuffer.h"
#include "catalog/pg_index.h"
#include "pg_backup.h" #include "pg_backup.h"
#include "pqexpbuffer.h"
/* The data structures used to store system catalog information */ /* The data structures used to store system catalog information */
......
...@@ -50,24 +50,13 @@ ...@@ -50,24 +50,13 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "pg_backup.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
/*
#include "postgres.h"
#include "access/htup.h"
#include "catalog/pg_type.h"
#include "catalog/pg_language.h"
#include "catalog/pg_index.h"
#include "catalog/pg_trigger.h"
#include "libpq-fe.h"
*/
#include "pg_backup.h"
#ifndef HAVE_STRDUP #ifndef HAVE_STRDUP
#include "strdup.h" #include "strdup.h"
#endif #endif
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
* *
* Copyright (C) 2000 by PostgreSQL Global Development Group * Copyright (C) 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.16 2000/10/07 14:39:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.17 2001/02/10 02:31:27 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#ifdef HAVE_GETOPT_H #ifdef HAVE_GETOPT_H
#include <getopt.h> #include <getopt.h>
......
/* /*
* @(#) pg_passwd.c 1.8 09:13:16 97/07/02 Y. Ichikawa * @(#) pg_passwd.c 1.8 09:13:16 97/07/02 Y. Ichikawa
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.45 2001/01/27 21:49:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.46 2001/02/10 02:31:27 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "command.h" #include "command.h"
#include <errno.h> #include <errno.h>
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "variables.h" #include "variables.h"
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include "miscadmin.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#else #else
/* Grand unified hard-coded badness */ /* Grand unified hard-coded badness */
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.29 2000/12/18 17:33:42 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.30 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "common.h" #include "common.h"
#include <errno.h> #include <errno.h>
...@@ -26,7 +27,6 @@ ...@@ -26,7 +27,6 @@
#endif #endif
#include "libpq-fe.h" #include "libpq-fe.h"
#include "postgres_ext.h"
#include "pqsignal.h" #include "pqsignal.h"
#include "settings.h" #include "settings.h"
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.12 2000/08/29 09:36:48 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.13 2001/02/10 02:31:28 tgl Exp $
*/ */
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#include "postgres.h" #include "postgres_fe.h"
#include <signal.h> #include <signal.h>
#include "pqsignal.h" #include "pqsignal.h"
#include "libpq-fe.h" #include "libpq-fe.h"
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.16 2000/12/03 15:39:38 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/copy.c,v 1.17 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "copy.h" #include "copy.h"
#include <errno.h> #include <errno.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.26 2000/10/25 20:36:52 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.27 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "describe.h" #include "describe.h"
#include "libpq-fe.h" #include "libpq-fe.h"
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.35 2001/01/24 19:43:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.36 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "help.h" #include "help.h"
#include <signal.h> #include <signal.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.14 2000/11/27 02:20:36 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.15 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "input.h" #include "input.h"
#include <errno.h> #include <errno.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.12 2000/10/24 04:13:28 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.13 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "large_obj.h" #include "large_obj.h"
#include "libpq-fe.h" #include "libpq-fe.h"
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.34 2000/07/17 18:24:33 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.35 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "mainloop.h" #include "mainloop.h"
#include "pqexpbuffer.h" #include "pqexpbuffer.h"
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.h,v 1.9 2000/04/12 17:16:22 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.h,v 1.10 2001/02/10 02:31:28 tgl Exp $
*/ */
#ifndef MAINLOOP_H #ifndef MAINLOOP_H
#define MAINLOOP_H #define MAINLOOP_H
#include "postgres.h" #include "postgres_fe.h"
#include <stdio.h> #include <stdio.h>
#ifndef WIN32 #ifndef WIN32
#include <setjmp.h> #include <setjmp.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.14 2000/11/16 05:51:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.15 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "print.h" #include "print.h"
#include <math.h> #include <math.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.16 2000/11/27 02:20:36 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.17 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "prompt.h" #include "prompt.h"
#include "libpq-fe.h" #include "libpq-fe.h"
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.43 2001/01/24 19:43:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.44 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include <sys/types.h> #include <sys/types.h>
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "variables.h" #include "variables.h"
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include "miscadmin.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#else #else
/* XXX Grand unified hard-coded badness; this should go into libpq */ /* XXX Grand unified hard-coded badness; this should go into libpq */
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.26 2000/04/12 17:16:23 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.27 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "stringutils.h" #include "stringutils.h"
#include <ctype.h> #include <ctype.h>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.25 2000/12/31 11:57:58 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.26 2001/02/10 02:31:28 tgl Exp $
*/ */
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "tab-complete.h" #include "tab-complete.h"
#include "input.h" #include "input.h"
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.h,v 1.5 2000/04/12 17:16:23 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.h,v 1.6 2001/02/10 02:31:28 tgl Exp $
*/ */
#ifndef TAB_COMPLETE_H #ifndef TAB_COMPLETE_H
#define TAB_COMPLETE_H #define TAB_COMPLETE_H
#include "postgres.h" #include "postgres_fe.h"
void initialize_readline(void); void initialize_readline(void);
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* *
* Copyright 2000 by PostgreSQL Global Development Group * Copyright 2000 by PostgreSQL Global Development Group
* *
* $Header: /cvsroot/pgsql/src/bin/psql/variables.c,v 1.8 2000/04/12 17:16:23 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/psql/variables.c,v 1.9 2001/02/10 02:31:28 tgl Exp $
*/ */
#include "postgres.h" #include "postgres_fe.h"
#include "variables.h" #include "variables.h"
#include <assert.h> #include <assert.h>
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
# #
# Makefile for src/include # Makefile for src/include
# #
# Install exported headers to the include directory (these headers are # 'make install' installs only those headers needed for client-side
# the minimal ones needed to build loadable backend extensions). # programming. 'make install-all-headers' installs the whole contents
# of src/include.
# #
# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.5 2000/10/20 21:04:03 petere Exp $ # $Header: /cvsroot/pgsql/src/include/Makefile,v 1.6 2001/02/10 02:31:28 tgl Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,30 +14,23 @@ subdir = src/include ...@@ -13,30 +14,23 @@ subdir = src/include
top_builddir = ../.. top_builddir = ../..
include $(top_builddir)/src/Makefile.global include $(top_builddir)/src/Makefile.global
# Headers needed by clients
srcdir_headers := c.h postgres_ext.h postgres_fe.h \
libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h
srcdir_headers := c.h postgres.h postgres_ext.h fmgr.h \ builddir_headers := os.h config.h
libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h \
utils/geo_decls.h utils/elog.h utils/palloc.h \
access/attnum.h executor/spi.h commands/trigger.h
builddir_headers := os.h config.h utils/fmgroids.h
HEADERS = $(srcdir_headers) $(builddir_headers) HEADERS = $(srcdir_headers) $(builddir_headers)
# Subdirectories containing headers that install-all-headers should install
all: $(HEADERS) SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
nodes optimizer parser port regex rewrite storage tcop utils
# These rules are necessary in case someone installs the include tree all: $(HEADERS)
# before building the backend tree. Very messy.
utils/fmgroids.h: $(top_builddir)/src/backend/utils/fmgroids.h
cd utils && rm -f fmgroids.h && $(LN_S) ../$(top_builddir)/src/backend/utils/fmgroids.h .
# This file is built in the backend tree, but we need to keep track of
# the dependencies here.
$(top_builddir)/src/backend/utils/fmgroids.h: $(top_srcdir)/src/backend/utils/Gen_fmgrtab.sh catalog/pg_proc.h
$(MAKE) -C $(dir $@) fmgroids.h
# Install only selected headers
install: all installdirs install: all installdirs
for file in $(srcdir_headers); do \ for file in $(srcdir_headers); do \
...@@ -46,13 +40,34 @@ install: all installdirs ...@@ -46,13 +40,34 @@ install: all installdirs
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \ $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \
done done
# Automatically pick out the needed subdirectories for the include # Automatically pick out the needed subdirectories for the include tree.
# tree.
installdirs: installdirs:
$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(sort $(dir $(HEADERS)))) $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(sort $(dir $(HEADERS))))
# Install all headers
install-all-headers: all install-all-dirs
for file in $(srcdir)/*.h; do \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/`basename $$file` || exit; \
done
for dir in $(SUBDIRS); do \
for file in $(srcdir)/$$dir/*.h; do \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$dir/`basename $$file` || exit; \
done \
done
for file in $(builddir_headers); do \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \
done
install-all-dirs:
$(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(SUBDIRS))
# This isn't a complete uninstall, but rm'ing everything under
# $(DESTDIR)$(includedir) is probably too drastic...
uninstall: uninstall:
rm -f $(addprefix $(DESTDIR)$(includedir)/, $(HEADERS)) rm -rf $(addprefix $(DESTDIR)$(includedir)/, $(HEADERS) $(SUBDIRS))
clean: clean:
rm -f utils/fmgroids.h parser/parse.h rm -f utils/fmgroids.h parser/parse.h
......
This diff is collapsed.
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
#ifndef SPI_H #ifndef SPI_H
#define SPI_H #define SPI_H
/*
* This file may be used by client modules that haven't already
* included postgres.h
*/
#include "postgres.h" #include "postgres.h"
/* /*
......
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* *
* libpq-fs.h * libpq-fs.h
* definitions for using Inversion file system routines * definitions for using Inversion file system routines (ie, large objects)
* *
* *
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: libpq-fs.h,v 1.11 2001/01/24 19:43:25 momjian Exp $ * $Id: libpq-fs.h,v 1.12 2001/02/10 02:31:28 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#ifndef LIBPQ_FS_H #ifndef LIBPQ_FS_H
#define LIBPQ_FS_H #define LIBPQ_FS_H
/* UNIX compatibility junk. This should be in all systems' include files,
but this is not always the case. */
#ifndef MAXNAMLEN
#define MAXNAMLEN 255
#endif /* MAXNAMLEN */
struct pgdirent
{
unsigned long d_ino;
unsigned short d_namlen;
char d_name[MAXNAMLEN + 1];
};
/* for stat(2) */
#ifndef S_IRUSR
/* file modes */
#define S_IRWXU 00700 /* read, write, execute: owner */
#define S_IRUSR 00400 /* read permission: owner */
#define S_IWUSR 00200 /* write permission: owner */
#define S_IXUSR 00100 /* execute permission: owner */
#define S_IRWXG 00070 /* read, write, execute: group */
#define S_IRGRP 00040 /* read permission: group */
#define S_IWGRP 00020 /* write permission: group */
#define S_IXGRP 00010 /* execute permission: group */
#define S_IRWXO 00007 /* read, write, execute: other */
#define S_IROTH 00004 /* read permission: other */
#define S_IWOTH 00002 /* write permission: other */
#define S_IXOTH 00001 /* execute permission: other */
#define _S_IFMT 0170000 /* type of file; sync with S_IFMT */
#define _S_IFBLK 0060000 /* block special; sync with S_IFBLK */
#define _S_IFCHR 0020000 /* character special sync with S_IFCHR */
#define _S_IFDIR 0040000 /* directory; sync with S_IFDIR */
#define _S_IFIFO 0010000 /* FIFO - named pipe; sync with S_IFIFO */
#define _S_IFREG 0100000 /* regular; sync with S_IFREG */
#define S_IFDIR _S_IFDIR
#define S_IFREG _S_IFREG
#define S_ISDIR( mode ) (((mode) & _S_IFMT) == _S_IFDIR)
#endif /* S_IRUSR */
/* /*
* Inversion doesn't have links. * Read/write mode flags for inversion (large object) calls
*/
#ifndef S_ISLNK
#define S_ISLNK(x) 0
#endif
/*
* Flags for inversion file system large objects. Normally, creat()
* takes mode arguments, but we don't use them in inversion, since
* you get postgres protections. Instead, we use the low sixteen bits
* of the integer mode argument to store the number of the storage
* manager to be used, and the high sixteen bits for flags.
*/ */
#define INV_WRITE 0x00020000 #define INV_WRITE 0x00020000
#define INV_READ 0x00040000 #define INV_READ 0x00040000
/* Error values for p_errno */
#define PEPERM 1 /* Not owner */
#define PENOENT 2 /* No such file or directory */
#define PEACCES 13 /* Permission denied */
#define PEEXIST 17 /* File exists */
#define PENOTDIR 20 /* Not a directory */
#define PEISDIR 21 /* Is a directory */
#define PEINVAL 22 /* Invalid argument */
#define PENAMETOOLONG 63 /* File name too long */
#define PENOTEMPTY 66 /* Directory not empty */
#define PEPGIO 99 /* postgres backend had problems */
#endif /* LIBPQ_FS_H */ #endif /* LIBPQ_FS_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment