]> granicus.if.org Git - postgresql/commitdiff
Fix bug: libpq clients (which include libpq-fe.h) won't compile.
authorBryan Henderson <bryanh@giraffe.netgate.net>
Tue, 10 Dec 1996 07:03:43 +0000 (07:03 +0000)
committerBryan Henderson <bryanh@giraffe.netgate.net>
Tue, 10 Dec 1996 07:03:43 +0000 (07:03 +0000)
Plus: sigjmp_buf/jmp_buf is backwards, so backend doesn't compile.

src/include/config.h
src/include/postgres.h
src/include/postgres_ext.h [new file with mode: 0644]

index f28a51c012710193c8274f9db31b6521d4664b30..d6110c6670d93110d293e1eb87874d47aae91852 100644 (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
    __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
 
 /* 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;
 #endif
 
 #if defined(win32)
-#  define SIGJMP_BUF
+#  define JMP_BUF
 #  define NEED_SIG_JMP
 #  define NO_UNISTD_H
 #  define USES_WINSOCK 
 #  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,
index 3b3b0620269e4abaf56abaa0b5073e51d002518f..a40a28d25484907b9cdcfb62448ea71882cf9b8e 100644 (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;
diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h
new file mode 100644 (file)
index 0000000..b79b11f
--- /dev/null
@@ -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