1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00

Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number of

places that were including the wrong files.
This commit is contained in:
Peter Eisentraut
2001-08-24 14:07:50 +00:00
parent 7326e78c42
commit 968d7733a1
76 changed files with 575 additions and 644 deletions

View File

@@ -4,7 +4,7 @@
# Makefile for access/transam
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.13 2000/10/13 12:05:21 vadim Exp $
# $Header: /cvsroot/pgsql/src/backend/access/transam/Makefile,v 1.14 2001/08/24 14:07:48 petere Exp $
#
#-------------------------------------------------------------------------
@@ -19,17 +19,8 @@ all: SUBSYS.o
SUBSYS.o: $(OBJS)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
clean:
rm -f SUBSYS.o $(OBJS)
# ensure that version checks in xlog.c get recompiled when config.h or
# catversion.h changes, even if "make depend" hasn't been done.
xlog.o: xlog.c $(top_builddir)/src/include/config.h $(top_srcdir)/src/include/catalog/catversion.h
ifeq (depend,$(wildcard depend))
include depend
endif
# ensure that version checks in xlog.c get recompiled when catversion.h changes
xlog.o: xlog.c $(top_srcdir)/src/include/catalog/catversion.h

View File

@@ -2,7 +2,7 @@
#
# Makefile for catalog
#
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.35 2001/06/12 05:55:49 tgl Exp $
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.36 2001/08/24 14:07:48 petere Exp $
#
#-------------------------------------------------------------------------
@@ -37,7 +37,7 @@ POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/config.h
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config.h
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o postgres $(pg_includes) $(POSTGRES_BKI_SRCS) --set-version=$(VERSION)
.PHONY: install-bki
@@ -55,11 +55,3 @@ uninstall-bki:
clean:
rm -f SUBSYS.o $(OBJS) $(BKIFILES)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif

View File

@@ -10,7 +10,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.21 2001/08/10 18:57:33 tgl Exp $
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.22 2001/08/24 14:07:48 petere Exp $
#
# NOTES
# non-essential whitespace is removed from the generated file.
@@ -66,7 +66,7 @@ do
echo " $CMDNAME [ -D define [...] ] [ -I dir ] --set-version=VERSION -o prefix files..."
echo
echo "Options:"
echo " -I path to postgres_ext.h and config.h files"
echo " -I path to postgres_ext.h and pg_config.h files"
echo " -o prefix of output files"
echo " --set-version PostgreSQL version number for initdb cross-check"
echo
@@ -126,12 +126,12 @@ for dir in $INCLUDE_DIRS; do
fi
done
# Get INDEX_MAX_KEYS and DEFAULT_ATTSTATTARGET from config.h
# Get INDEX_MAX_KEYS and DEFAULT_ATTSTATTARGET from pg_config.h
# (who needs consistency?)
for dir in $INCLUDE_DIRS; do
if [ -f "$dir/config.h" ]; then
INDEXMAXKEYS=`grep '#define[ ]*INDEX_MAX_KEYS' $dir/config.h | $AWK '{ print $3 }'`
DEFAULTATTSTATTARGET=`grep '#define[ ]*DEFAULT_ATTSTATTARGET' $dir/config.h | $AWK '{ print $3 }'`
if [ -f "$dir/pg_config.h" ]; then
INDEXMAXKEYS=`grep '#define[ ]*INDEX_MAX_KEYS' $dir/pg_config.h | $AWK '{ print $3 }'`
DEFAULTATTSTATTARGET=`grep '#define[ ]*DEFAULT_ATTSTATTARGET' $dir/pg_config.h | $AWK '{ print $3 }'`
break
fi
done
@@ -146,7 +146,7 @@ done
export BKIOBJECTID
# NOTE: we assume here that FUNC_MAX_ARGS has the same value as INDEX_MAX_KEYS,
# and don't read it separately from config.h. This is OK because both of them
# and don't read it separately from pg_config.h. This is OK because both of them
# must be equal to the length of oidvector.
INDEXMAXKEYS2=`expr $INDEXMAXKEYS '*' 2` || exit

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.20 2001/03/22 03:59:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.21 2001/08/24 14:07:49 petere Exp $
*
* NOTES
* This shouldn't be in libpq, but the monitor and some other
@@ -17,7 +17,7 @@
*
* A NOTE ABOUT SIGNAL HANDLING ACROSS THE VARIOUS PLATFORMS.
*
* config.h defines the macro HAVE_POSIX_SIGNALS for some platforms and
* pg_config.h defines the macro HAVE_POSIX_SIGNALS for some platforms and
* not for others. This file and pqsignal.h use that macro to decide
* how to handle signalling.
*

View File

@@ -1,12 +1,12 @@
/* $Id: gethostname.c,v 1.4 1998/09/01 03:24:25 momjian Exp $ */
/* $Id: gethostname.c,v 1.5 2001/08/24 14:07:49 petere Exp $ */
#include "c.h"
#include <sys/types.h>
#include <string.h>
#include <sys/utsname.h>
#include "config.h"
int
gethostname(char *name, int namelen)
{

View File

@@ -1,4 +1,4 @@
/* $Id: inet_aton.c,v 1.18 2000/12/03 20:45:34 tgl Exp $
/* $Id: inet_aton.c,v 1.19 2001/08/24 14:07:49 petere Exp $
*
* This inet_aton() function was taken from the GNU C library and
* incorporated into Postgres for those systems which do not have this
@@ -42,12 +42,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. */
#include "c.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <ctype.h>
#include "config.h"
/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.

View File

@@ -1,9 +1,9 @@
/* $Id: isinf.c,v 1.15 2000/04/12 17:15:28 momjian Exp $ */
/* $Id: isinf.c,v 1.16 2001/08/24 14:07:49 petere Exp $ */
#include "c.h"
#include <math.h>
#include "config.h"
#if HAVE_FPCLASS /* this is _not_ HAVE_FP_CLASS, and not
* typo */

View File

@@ -7,12 +7,12 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/isnan.c,v 1.2 2000/04/12 17:15:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/isnan.c,v 1.3 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "os.h"
#include "c.h"
unsigned char __nan[8] = __nan_bytes;

View File

@@ -7,13 +7,13 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/rint.c,v 1.2 2000/04/12 17:15:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/rint.c,v 1.3 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "c.h"
#include <math.h>
#include "os.h"
double
rint(double x)

View File

@@ -7,11 +7,13 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.5 2001/05/24 15:53:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.6 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <errno.h>
#include <semaphore.h>
#include <string.h>
@@ -19,7 +21,6 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include "postgres.h"
#include "storage/ipc.h"
#include "storage/proc.h"
#include <sys/sem.h>

View File

@@ -7,11 +7,13 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.5 2001/05/24 15:53:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.6 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>

View File

@@ -7,15 +7,16 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.2 2000/04/12 17:15:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.3 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "c.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "os.h"
int

View File

@@ -7,17 +7,17 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.4 2001/05/24 15:53:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.5 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "postgres.h"
#include "storage/ipc.h"
#include <sys/mman.h>
#include <sys/sem.h>

View File

@@ -7,11 +7,13 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.2 2000/04/12 17:15:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.3 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@@ -1,11 +1,11 @@
/* $Id: random.c,v 1.9 1999/07/16 23:09:45 tgl Exp $ */
/* $Id: random.c,v 1.10 2001/08/24 14:07:49 petere Exp $ */
#include "c.h"
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include "config.h"
long
random()
{

View File

@@ -1,11 +1,11 @@
/* $Id: srandom.c,v 1.9 1999/07/16 23:09:45 tgl Exp $ */
/* $Id: srandom.c,v 1.10 2001/08/24 14:07:49 petere Exp $ */
#include "c.h"
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include "config.h"
void
srandom(unsigned int seed)
{

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.86 2001/06/27 23:31:39 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.87 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@
* to support relations larger than the OS' file size limit (often 2GBytes).
* In order to do that, we break relations up into chunks of < 2GBytes
* and store one chunk in each of several files that represent the relation.
* See the BLCKSZ and RELSEG_SIZE configuration constants in include/config.h.
* See the BLCKSZ and RELSEG_SIZE configuration constants in include/pg_config.h.
*
* The file descriptor stored in the relation cache (see RelationGetFile())
* is actually an index into the Md_fdvec array. -1 indicates not open.

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.31 2001/08/14 22:21:58 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.32 2001/08/24 14:07:49 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,7 +21,7 @@
#include "utils/int8.h"
/* this should be set in config.h, but just in case it wasn't: */
/* this should be set in pg_config.h, but just in case it wasn't: */
#ifndef INT64_FORMAT
#define INT64_FORMAT "%ld"
#endif