1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

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.
This commit is contained in:
Tom Lane
2001-02-10 02:31:31 +00:00
parent cf21985ab5
commit d08741eab5
144 changed files with 1088 additions and 1279 deletions

View File

@@ -9,23 +9,22 @@
*
*
* 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"
#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...
*/
/* can be used in frontend or backend */
#ifdef FRONTEND
#undef Assert
#include "postgres_fe.h"
/* No assert checks in frontend ... */
#define Assert(condition)
#else
#include "postgres.h"
#endif
#include "lib/dllist.h"
Dllist *
DLNewList(void)

View File

@@ -5,7 +5,7 @@
* wherein you authenticate a user by seeing what IP address the system
* 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
char Table[MAX_TOKEN];
};
int
static bool
InRange(char *buf, int host)
{
int valid,

View File

@@ -9,7 +9,7 @@
*
*
* 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
* This shouldn't be in libpq, but the monitor and some other
@@ -38,10 +38,10 @@
* is to do signal-handler reinstallation, which doesn't work well
* at all.
* ------------------------------------------------------------------------*/
#include <signal.h>
#include "postgres.h"
#include <signal.h>
#include "libpq/pqsignal.h"

View File

@@ -1,5 +1,5 @@
/*
* $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
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
@@ -56,7 +56,6 @@ extern "C"
#endif /* HAVE_DLOPEN */
#include "fmgr.h"
#include "utils/dynamic_loader.h"
#define pg_dlopen(f) dlopen(f, RTLD_LAZY)

View File

@@ -8,14 +8,14 @@
*
*
* 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 "utils/dynamic_loader.h"
#include "utils/elog.h"
void *
@@ -74,4 +74,4 @@ pg_dlclose(void *handle)
elog(NOTICE, "error while unloading add-on");
free(handle);
}
}
}

View File

@@ -14,7 +14,6 @@
#ifndef PORT_PROTOS_H
#define PORT_PROTOS_H
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/*

View File

@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h>
#include <stdlib.h>
#include "postgres.h"
#include "dynloader.h"
static char error_message[BUFSIZ];

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#include <nlist.h>
#include <link.h>
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -8,7 +8,7 @@
*
*
* 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
* all functions are defined here -- it's impossible to trace the
@@ -23,7 +23,6 @@
#include "dl.h"
#include "dynloader.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
void *

View File

@@ -15,7 +15,6 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -7,14 +7,13 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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
#define PORT_PROTOS_H
#include "fmgr.h"
#include "utils/dynamic_loader.h"
#ifdef __ELF__
#include <dlfcn.h>

View File

@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h>
#include <stdlib.h>
#include "postgres.h"
#include "dynloader.h"
static char error_message[BUFSIZ];

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#include <nlist.h>
#include "link.h"
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -9,7 +9,6 @@
#ifndef PORT_PROTOS_H
#define PORT_PROTOS_H
#include "fmgr.h"
#include "utils/dynamic_loader.h"
void *next_dlopen(char *name);

View File

@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h>
#include <stdlib.h>
#include "postgres.h"
#include "dynloader.h"
static char error_message[BUFSIZ];

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#include <nlist.h>
#include "link.h"
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -7,7 +7,7 @@
*
*
* 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
*
@@ -20,7 +20,7 @@
#include <dl.h>
*/
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
#include "dynloader.h"

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -1,11 +1,9 @@
/* $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
#define DYNLOADER_SOLARIS_H
#include "config.h"
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
#define pg_dlopen(f) dlopen(f,1)

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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 @@
#define DYNLOADER_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.h */

View File

@@ -2,22 +2,19 @@
*
* dynloader.c
* 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) 1994, Regents of the University of California
*
*
* 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 "dl.h"
#include "fmgr.h"
#include "port-protos.h"
#include "utils/dynamic_loader.h"
extern char pg_pathname[];

View File

@@ -15,7 +15,6 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -15,7 +15,6 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -15,7 +15,6 @@
#define PORT_PROTOS_H
#include <dlfcn.h>
#include "fmgr.h"
#include "utils/dynamic_loader.h"
/* dynloader.c */

View File

@@ -32,11 +32,12 @@
* SUCH DAMAGE.
*/
/* might be in either frontend or backend */
#include "postgres_fe.h"
#include <sys/ioctl.h>
#include <sys/param.h>
#include "postgres.h"
/*
* We do all internal arithmetic in the widest available integer type,
@@ -74,7 +75,7 @@ typedef unsigned long ulong_long;
* 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 int SnprfOverflow;

View File

@@ -11,7 +11,7 @@
*
*
* 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
*
@@ -235,11 +235,6 @@ static void InitSSL(void);
#endif
#ifdef CYR_RECODE
extern void GetCharSetByHost(char *, int, char *);
#endif
static void
checkDataDir(const char *checkdir)

View File

@@ -9,7 +9,7 @@
*
*
* 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 @@
#include "access/genam.h"
#include "access/heapam.h"
#include "access/nbtree.h"
#include "access/htup.h"
#include "access/nbtree.h"
#include "access/tuptoaster.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/heap.h"

View File

@@ -8,7 +8,7 @@
*
*
* 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 @@
#include "access/hash.h"
#include "catalog/pg_type.h"
#include "miscadmin.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"

View File

@@ -8,15 +8,16 @@
*
*
* 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 <ctype.h>
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "utils/builtins.h"
static int text_cmp(text *arg1, text *arg2);

View File

@@ -8,13 +8,14 @@
*
*
* 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 "access/tuptoaster.h"
#include "catalog/pg_language.h"
#include "catalog/pg_proc.h"
#include "executor/functions.h"

View File

@@ -4,10 +4,12 @@
*
* 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>
main()
{
int i;

View File

@@ -7,9 +7,12 @@
*
* 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"
typedef struct

View File

@@ -2,10 +2,9 @@
* This file contains some public functions
* usable for both the backend and the frontend.
* Tatsuo Ishii
* $Id: common.c,v 1.10 2000/10/30 10:40:28 ishii Exp $ */
#include <stdlib.h>
#include <string.h>
* $Id: common.c,v 1.11 2001/02/10 02:31:27 tgl Exp $
*/
#include "postgres.h"
#ifdef WIN32
#include "win32.h"
@@ -13,8 +12,6 @@
#include <unistd.h>
#endif
#include "postgres.h"
#include "miscadmin.h"
#include "mb/pg_wchar.h"
#include "utils/builtins.h"

View File

@@ -6,13 +6,12 @@
* WIN1250 client encoding support contributed by Pavel Behal
* 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 $
*
*
*/
#include <stdio.h>
#include <string.h>
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h"

View File

@@ -4,10 +4,12 @@
*
* 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>
main()
{
int i;

View File

@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
#include "postgres_fe.h"
#include <ctype.h>
#include "mb/pg_wchar.h"

View File

@@ -3,9 +3,8 @@
* client encoding and server internal encoding.
* (currently mule internal code (mic) is used)
* 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 "miscadmin.h"

View File

@@ -1,11 +1,13 @@
/*
* conversion functions between pg_wchar and multi-byte streams.
* 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
*
*/
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h"

View File

@@ -4,10 +4,12 @@
*
* 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>
main()
{
int i;

View File

@@ -33,6 +33,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h"

View File

@@ -32,6 +32,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* can be used in either frontend or backend */
#include "postgres_fe.h"
#include "mb/pg_wchar.h"