Allow each C include file to compile on its own by including any needed

header files.
This commit is contained in:
Bruce Momjian 2006-07-11 13:54:25 +00:00
parent 45a4309074
commit b85a965f5f
13 changed files with 58 additions and 34 deletions

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup.h,v 1.39 2006/05/28 21:13:54 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup.h,v 1.40 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -26,6 +26,7 @@
#include "postgres_fe.h"
#include "pg_dump.h"
#include "dumputils.h"
#include "libpq-fe.h"
#include "pqexpbuffer.h"

View File

@ -17,7 +17,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.70 2006/05/28 21:13:54 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.71 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/

View File

@ -2,11 +2,18 @@
* Definitions for pg_backup_db.c
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.11 2005/06/21 20:45:44 tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.12 2006/07/11 13:54:24 momjian Exp $
*/
#ifndef PG_BACKUP_DB_H
#define PG_BACKUP_DB_H
#include "pg_backup_archiver.h"
extern int ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc);
extern int ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qry, size_t bufLen);
extern void StartTransaction(ArchiveHandle *AH);
extern void CommitTransaction(ArchiveHandle *AH);
#endif

View File

@ -3,7 +3,7 @@
* header file for postgres inverted index access method implementation.
*
* Copyright (c) 2006, PostgreSQL Global Development Group
* $PostgreSQL: pgsql/src/include/access/gin.h,v 1.3 2006/07/03 22:45:39 tgl Exp $
* $PostgreSQL: pgsql/src/include/access/gin.h,v 1.4 2006/07/11 13:54:24 momjian Exp $
*--------------------------------------------------------------------------
*/
@ -11,6 +11,8 @@
#ifndef GIN_H
#define GIN_H
#include "access/relscan.h"
#include "access/skey.h"
#include "access/xlog.h"
#include "access/xlogdefs.h"
#include "storage/bufpage.h"

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/commands/sequence.h,v 1.36 2006/03/24 04:32:13 tgl Exp $
* $PostgreSQL: pgsql/src/include/commands/sequence.h,v 1.37 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -14,6 +14,7 @@
#define SEQUENCE_H
#include "nodes/parsenodes.h"
#include "storage/relfilenode.h"
#include "access/xlog.h"
#include "fmgr.h"

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.93 2006/06/25 00:18:24 momjian Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.94 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -184,6 +184,10 @@ extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
* pgpipe, but in other cases we define rename to pgrename just on Win32.
*/
#ifndef WIN32
/*
* The function prototypes are not supplied because every C file
* includes this file.
*/
#define pgpipe(a) pipe(a)
#define piperead(a,b,c) read(a,b,c)
#define pipewrite(a,b,c) write(a,b,c)

View File

@ -7,13 +7,14 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/rewrite/rewriteHandler.h,v 1.26 2006/03/05 15:58:58 momjian Exp $
* $PostgreSQL: pgsql/src/include/rewrite/rewriteHandler.h,v 1.27 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef REWRITEHANDLER_H
#define REWRITEHANDLER_H
#include "utils/rel.h"
#include "nodes/parsenodes.h"
extern List *QueryRewrite(Query *parsetree);

View File

@ -7,13 +7,15 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/inet.h,v 1.23 2006/03/05 15:59:07 momjian Exp $
* $PostgreSQL: pgsql/src/include/utils/inet.h,v 1.24 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef INET_H
#define INET_H
#include "fmgr.h"
/*
* This is the internal storage format for IP addresses
* (both INET and CIDR datatypes):

View File

@ -7,13 +7,15 @@
*
* Copyright (c) 1998-2006, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/utils/numeric.h,v 1.21 2006/03/05 15:59:07 momjian Exp $
* $PostgreSQL: pgsql/src/include/utils/numeric.h,v 1.22 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef _PG_NUMERIC_H_
#define _PG_NUMERIC_H_
#include "fmgr.h"
/*
* Hardcoded precision limit - arbitrary, but must be small enough that
* dscale values will fit in 14 bits.

View File

@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/syscache.h,v 1.63 2006/05/03 22:45:26 tgl Exp $
* $PostgreSQL: pgsql/src/include/utils/syscache.h,v 1.64 2006/07/11 13:54:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -17,6 +17,7 @@
#define SYSCACHE_H
#include "access/htup.h"
#include "utils/catcache.h"
/*
* Declarations for util/syscache.c.

View File

@ -1,7 +1,7 @@
/*
* this is a small part of c.h since we don't want to leak all postgres
* definitions into ecpg programs
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.66 2006/03/11 04:38:39 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.67 2006/07/11 13:54:25 momjian Exp $
*/
#ifndef _ECPGLIB_H
@ -9,6 +9,7 @@
#include "libpq-fe.h"
#include "ecpgtype.h"
#include "sqlca.h"
#include <string.h>
#ifndef __cplusplus

View File

@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.16 2006/03/05 15:59:11 momjian Exp $
* $PostgreSQL: pgsql/src/timezone/pgtz.h,v 1.17 2006/07/11 13:54:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -17,6 +17,7 @@
#define _PGTZ_H
#include "tzfile.h"
#include "pgtime.h"
extern char *pg_TZDIR(void);

View File

@ -13,4 +13,5 @@ pgrminclude [-v]
pgdefine create macro calls for all defines in the file (used by
the above routines)
It is also a good idea to sort the pg-specific include files in alphabetic
order. This is best done with a text editor.