Fix bug: libpq clients (which include libpq-fe.h) won't compile.

Plus: sigjmp_buf/jmp_buf is backwards, so backend doesn't compile.
This commit is contained in:
Bryan Henderson 1996-12-10 07:03:43 +00:00
parent 41b3674754
commit 7492fb165f
3 changed files with 45 additions and 41 deletions

View File

@ -83,7 +83,7 @@
#endif
#if defined(hpux)
# define SIGJMP_BUF
# define JMP_BUF
# define USE_POSIX_TIME
# define HAVE_TZSET
# define NEED_CBRT
@ -129,7 +129,7 @@
__USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to
be used.
*/
# define SIGJMP_BUF
# define JMP_BUF
# define USE_POSIX_TIME
# define HAVE_TZSET
# define NEED_CBRT
@ -141,7 +141,7 @@
/* does anybody use this? */
#if defined(next)
# define SIGJMP_BUF
# define JMP_BUF
# define NEED_SIG_JMP
# define SB_PAD 56
typedef struct mutex slock_t;
@ -184,7 +184,7 @@
#endif
#if defined(win32)
# define SIGJMP_BUF
# define JMP_BUF
# define NEED_SIG_JMP
# define NO_UNISTD_H
# define USES_WINSOCK
@ -217,20 +217,6 @@
# define SIGNAL_ARGS int postgres_signal_arg
#endif
/* NAMEDATALEN is the max length for system identifiers (e.g. table names,
* attribute names, function names, etc.)
*
* These MUST be set here. DO NOT COMMENT THESE OUT
* Setting these too high will result in excess space usage for system catalogs
* Setting them too low will make the system unusable.
* values between 16 and 64 that are multiples of four are recommended.
*
* NOTE also that databases with different NAMEDATALEN's cannot interoperate!
*/
#define NAMEDATALEN 32
/* OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid) */
#define OIDNAMELEN 36
/*
* DEF_PGPORT is the TCP port number on which the Postmaster listens by
* default. This can be overriden by command options, environment variables,

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1995, Regents of the University of California
*
* $Id: postgres.h,v 1.2 1996/11/04 06:35:36 scrappy Exp $
* $Id: postgres.h,v 1.3 1996/12/10 07:03:40 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@ -36,6 +36,7 @@
#ifndef POSTGRES_H
#define POSTGRES_H
#include "postgres_ext.h"
#include "config.h"
#include "c.h"
#include "utils/elog.h"
@ -53,8 +54,6 @@ typedef double float8;
typedef int4 aclitem;
typedef uint32 Oid;
#define InvalidOid 0
#define OidIsValid(objectId) ((bool) (objectId != InvalidOid))
@ -105,26 +104,6 @@ typedef char16 *Char16;
typedef int2 int28[8];
typedef Oid oid8[8];
/* char16 is distinct from Name.
now, you can truly change the max length of system names
by altering the NAMEDATALEN define below.
don't set the value too high because tuples are still constrained
to be less than 8K
*/
/* NAMEDATALEN is the maximum string length (counting terminating null)
of a Name */
/* defined in Makefile.global */
/* if you change the value of NAMEDATALEN, you may need to change the
alignment of the 'name' type in pg_type.h */
#ifndef NAMEDATALEN
#define NAMEDATALEN 16
#endif /* NAMEDATALEN */
/* OIDNAMELEN should be NAMEDATALEN + sizeof(Oid) */
#ifndef OIDNAMELEN
#define OIDNAMELEN 20
#endif /* OIDNAMELEN */
typedef struct nameData {
char data[NAMEDATALEN];
} NameData;

View File

@ -0,0 +1,39 @@
/*-------------------------------------------------------------------------
*
* postgres_ext.h--
*
* This file contains declarations of things that are visible
* external to Postgres. For example, the Oid type is part of a
* structure that is passed to the front end via libpq, and is
* accordingly referenced in libpq-fe.h.
*
* Declarations which are specific to a particular interface should
* go in the header file for that interface (such as libpq-fe.h). This
* file is only for fundamental Postgres declarations.
*
* User-written C functions don't count as "external to Postgres."
* Those function much as local modifications to the backend itself, and
* use header files that are otherwise internal to Postgres to interface
* with the backend.
*
* $Id: postgres_ext.h,v 1.1 1996/12/10 07:03:43 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef POSTGRES_EXT_H
#define POSTGRES_EXT_H
typedef unsigned int Oid;
/* NAMEDATALEN is the max length for system identifiers (e.g. table names,
* attribute names, function names, etc.)
*
* NOTE that databases with different NAMEDATALEN's cannot interoperate!
*/
#define NAMEDATALEN 32
/* OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid) */
#define OIDNAMELEN 36
#endif