]> granicus.if.org Git - postgresql/commitdiff
Make it compile on Ultrix. Thanks Erik Bertelson.
authorBryan Henderson <bryanh@giraffe.netgate.net>
Tue, 26 Nov 1996 03:20:35 +0000 (03:20 +0000)
committerBryan Henderson <bryanh@giraffe.netgate.net>
Tue, 26 Nov 1996 03:20:35 +0000 (03:20 +0000)
25 files changed:
src/backend/parser/analyze.c
src/backend/parser/catalog_utils.c
src/backend/port/Makefile
src/backend/port/inet_aton.c
src/backend/port/ultrix4/dl.h
src/backend/port/ultrix4/dynloader.c
src/backend/port/ultrix4/port-protos.h
src/backend/port/ultrix4/strdup.c
src/backend/utils/mmgr/palloc.c
src/bin/pg4_dump/Makefile
src/bin/pg4_dump/common.c
src/bin/pg4_dump/pg4_dump.c
src/bin/pg_dump/Makefile
src/bin/pg_dump/common.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/psql/Makefile
src/bin/psql/psql.c
src/bin/psql/stringutils.c
src/bin/psql/stringutils.h
src/include/regex/utils.h
src/include/utils/dynamic_loader.h
src/include/utils/palloc.h
src/interfaces/libpq/Makefile
src/interfaces/libpq/fe-connect.c

index 874023c187293fb26780bd3102b54931128af6f4..9704b94965e12749127cd229a0617c8bcea8a300 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.15 1996/11/13 20:48:55 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.16 1996/11/26 03:17:45 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -37,6 +37,8 @@
 #include "optimizer/clauses.h"
 #include "access/heapam.h"
 
+#include "port-protos.h"        /* strdup() */
+
 /* convert the parse tree into a query tree */
 static Query *transformStmt(ParseState *pstate, Node *stmt);
 
index 20206e01341cf96f8a02ca0ce441d2d6a9b28dc5..91a744beb77bd488976464423312b2db93c0a00b 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.10 1996/11/13 20:48:58 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.11 1996/11/26 03:17:47 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -48,6 +48,8 @@
 #include "utils/lsyscache.h"
 #include "storage/lmgr.h"
 
+#include "port-protos.h"              /* strdup() */
+
 struct {
     char *field;
     int code;
index 54c4482c432a06c62da90b17955b587a9becee73..8969d82c1c2604008f986f5362f56601f7735ca4 100644 (file)
@@ -19,7 +19,7 @@
 # be converted to Method 2.  
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.4 1996/11/10 03:13:27 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.5 1996/11/26 03:18:38 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -36,6 +36,11 @@ ifeq ($(PORTNAME), sparc_solaris)
 OBJS += inet_aton.o
 endif
 
+ifeq ($(PORTNAME), ultrix4)
+# Other ports get the inet_aton() function from their standard C libraries.
+OBJS += inet_aton.o
+endif
+
 all: submake SUBSYS.o
 
 SUBSYS.o: $(OBJS)
index 1b08e7eaa7be0f6d8f7da0f617c0b9f3707a0f1f..37c11b621b756004b1ce5459c8222a80bbd88d63 100644 (file)
@@ -42,6 +42,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.  */
 
+#include <sys/types.h>
 #include <netinet/in.h>
 #include <ctype.h>
 #include "inet_aton.h"
index 883a6833248b181fd86a44ef152a5f14506b4c38..7855db38f302cf1410cf40e0fe34a79147dcac5c 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: dl.h,v 1.2 1996/11/14 20:08:57 scrappy Exp $
+ * $Id: dl.h,v 1.3 1996/11/26 03:18:46 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -34,6 +34,7 @@
 #ifndef _DL_HEADER_
 #define _DL_HEADER_
 
+#include <stdio.h> /* needed to declare FILE for ldfcn.h */
 #include <filehdr.h>
 #include <syms.h>
 #include <ldfcn.h>
index dc526885caa285ef7dbd3d005491ee5a6628b9fd..1acc54260a118e79e54b765771da505de195604e 100644 (file)
@@ -9,13 +9,14 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.2 1996/11/14 20:08:58 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.3 1996/11/26 03:18:50 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <stdio.h>
 #include <postgres.h>
 #include "dl.h"
+#include <utils/dynamic_loader.h>
 #include "c.h"
 #include "fmgr.h"
 #include "port-protos.h"
index ed055dd19c0034514ef6ed9c2fdbd129e98b83a6..ea313040d96609dd2c42cbc87c52f1e783eb889b 100644 (file)
@@ -6,16 +6,13 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: port-protos.h,v 1.1.1.1 1996/07/09 06:21:45 scrappy Exp $
+ * $Id: port-protos.h,v 1.2 1996/11/26 03:18:58 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef PORT_PORTOS_H
 #define PORT_PORTOS_H
 
-#include "utils/dynamic_loader.h"
-#include "dl.h"
-
 /* dynloader.c */
 /*
  * New dynamic loader.
@@ -33,4 +30,7 @@
 
 extern void init_address_fixup(void);
 
+/* strdup.c: strdup() is not part of libc on Ultrix */
+extern char* strdup(char const*);
+
 #endif         /* PORT_PORTOS_H */
index f140711226ebca7be2b3d1c62082eee476360edf..882f0047e63a4376824a58bc7f9b9c024d7215db 100644 (file)
@@ -7,14 +7,18 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.1.1.1 1996/07/09 06:21:45 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.2 1996/11/26 03:19:04 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <string.h>
 
+#include <utils/palloc.h>
+
+#include "port-protos.h"
+
 char *
-strdup(char *string)
+strdup(char const *string)
 {
     char *nstr;
 
index c3b9ec77ccc42624a447798fa6030268f0c89a0c..8830a21f40a05c688d1dcd1f5fc800887189b8ed 100644 (file)
@@ -7,10 +7,13 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.2 1996/11/24 04:44:17 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.3 1996/11/26 03:19:12 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
+
+#include <string.h>
+
 #include "c.h"
 
 #include "utils/mcxt.h"
index 286f96ea299ec27056fb01eb0d3a7b4d9655b3d5..74136f2de7f5378cace30be26d6b8d75c5284a8d 100644 (file)
@@ -4,7 +4,7 @@
 
 .include <postgres.global.mk>
 
-CFLAGS+= -I${.CURDIR}/../../backend/tmp
+CFLAGS+= -I${.CURDIR}/../../backend/tmp -I${.CURDIR}/../../backend/port/${PORTNAME}
 
 PROG= pg4_dump
 
index caa941b57183e7cb748823b717bd58ab794cf050..408a4a7fe626f1bd707ca73bee37fb98dc1c8c59 100644 (file)
@@ -23,6 +23,7 @@
 #include "postgres.h"
 #include "libpq-fe.h"
 #include "libpq/auth.h"
+#include <port-protos.h> /* for strdup () *(
 
 #include "pg_dump.h"
 
index 6f484d48c64eb83d048b3e0dea9511d25a7a0efa..dad51dc9d6691fc38c0dbd73750e057869a3bc93 100644 (file)
@@ -36,6 +36,7 @@
 #include "tmp/postgres.h"
 #include "tmp/libpq-fe.h"
 #include "libpq/auth.h"
+#include <port-protos.h> /* for strdup () */
 
 #include "pg_dump.h"
 
index 9028cd4fb485b5ca6a0adb7474137a3137cb1244..8faf2235c78dacb019a2b3c9fc2c5a2e1164bd25 100644 (file)
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.8 1996/11/12 06:10:37 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.9 1996/11/26 03:19:36 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,6 +15,8 @@ SRCDIR= ../..
 include ../Makefile.global
 include ../../Makefile.global
 
+CFLAGS+= -I../../backend/port/${PORTNAME}
+
 OBJS= pg_dump.o common.o
 
 all: submake pg_dump
index ac03f9e2e175eb98b24d7aabf82a24daa0b9568a..c5c750f0d7bcb3b5570f81de21ba3f5d43c543a3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.7 1996/11/04 03:59:53 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.8 1996/11/26 03:19:40 bryanh Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -29,6 +29,7 @@
 
 #include "postgres.h"
 #include "libpq-fe.h"
+#include <port-protos.h> /* for strdup() */
 
 #include "pg_dump.h"
 
index 1a52c41457d15d78fae2d9c9b3e4f87ced0f2434..28eba5358099bbbdebd333681ef2338a8d576cbf 100644 (file)
@@ -20,7 +20,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.16 1996/11/20 22:32:55 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.17 1996/11/26 03:19:45 bryanh Exp $
  *
  * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
  *
@@ -54,6 +54,7 @@
 #include "postgres.h"
 #include "access/htup.h"
 #include "libpq-fe.h"
+#include <port-protos.h> /* for strdup() */
 
 #include "pg_dump.h"
 
index 2db57cb7f64ce017317b383b2607e74105c3bf2a..d6d5c301eb463cf0f4d8259d095a4ed31d7bdabc 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: pg_dump.h,v 1.7 1996/10/07 03:30:40 scrappy Exp $
+ * $Id: pg_dump.h,v 1.8 1996/11/26 03:19:49 bryanh Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -158,7 +158,6 @@ extern void flagInhAttrs(TableInfo* tbinfo, int numTables,
                           InhInfo* inhinfo, int numInherits);
 
 extern void check_conn_and_db(void);
-extern char* dupstr(const char *s);
 extern int strInArray(const char* pattern, char** arr, int arr_size);
 extern void parseArgTypes(char **argtypes, const char* str);
 extern int isArchiveName(const char*);
index c0a8ff9afc04f0fd5106d770882b1b586eeec8ee..30c3b229bc8bae82c57d9cd3e4eab79fb01006eb 100644 (file)
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.13 1996/11/13 10:35:26 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.14 1996/11/26 03:19:54 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,7 +16,8 @@ include ../../Makefile.global
 
 INCLUDE_OPT:= \
                -I$(LIBPQDIR) \
-               -I../../include
+               -I../../include \
+               -I../../backend/port/$(PORTNAME)
 
 CFLAGS+= $(INCLUDE_OPT)
 #
index 5d0ce15fe3725f2fb02bbc7882204762f74893c4..8202d6db7b43546c24a23d6e5e712a77955eaa92 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.33 1996/11/24 04:44:24 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.34 1996/11/26 03:19:58 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -23,8 +23,8 @@
 #include "postgres.h"
 #include "libpq-fe.h"
 #include "stringutils.h"
-
 #include "psqlHelp.h"
+#include <port-protos.h> /* for strdup() */
 
 #ifdef NOREADLINE
 #include "rlstubs.h"
index 870bfdefe058a4640a91b3636e6ec2f095480470..5d209ec859a4d9f504d86fb2c7e575286a03d956 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.5 1996/11/14 16:08:05 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.6 1996/11/26 03:20:06 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -15,6 +15,9 @@
 #include <string.h>
 #include <ctype.h>
 #include <stdlib.h>
+
+#include <port-protos.h> /* for strdup() */
+
 #include "stringutils.h"
 
 /* all routines assume null-terminated strings! */
index f5140469d68c83d60cffb8db2b00117b7614f8d0..11da94449ea3b1b49b0fa0784b661cedca80f840 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: stringutils.h,v 1.2 1996/07/28 07:08:15 scrappy Exp $
+ * $Id: stringutils.h,v 1.3 1996/11/26 03:20:08 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -31,11 +31,6 @@ extern char *leftTrim(char *s);
 extern char *rightTrim(char *s);
 extern char *doubleTrim(char *s);
 
-/* dupstr : copies a string, while making room for it */
-/* the CALLER is responsible for freeing the space */
-/* returns NULL if the argument is NULL */
-extern char *dupstr(char *s);
-
 #ifdef STRINGUTILS_TEST
 extern void testStringUtils();
 #endif
index e2d8b6cda36aa10c2ec4928defecb94637ab5ec7..98857d0977cf813ae4badb655a302d8f6615808f 100644 (file)
@@ -37,6 +37,8 @@
  *     @(#)utils.h     8.3 (Berkeley) 3/20/94
  */
 
+#include "config.h"  /* HAVE_MEMMOVE */
+
 /* utility definitions */
 #define        DUPMAX          100000000       /* xxx is this right? */
 #define        INFINITY        (DUPMAX + 1)
index f79c732eb4005ea4111802b622227ade81e0b1ea..f4f9c7163b97623c121b82c7a4f8bb97f29ee5f6 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: dynamic_loader.h,v 1.2 1996/11/04 08:14:05 scrappy Exp $
+ * $Id: dynamic_loader.h,v 1.3 1996/11/26 03:20:17 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -15,6 +15,8 @@
 
 #include <sys/types.h>
 
+#include <postgres.h>
+
 #ifdef MIN
 #undef MIN
 #undef MAX
index 03767ce8a8ebbf8ac69ba8fdd5e444ea1c815fc6..02c7b9ab25721035ed54e543375cd6675ad82454 100644 (file)
@@ -6,13 +6,15 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: palloc.h,v 1.2 1996/10/31 09:51:28 scrappy Exp $
+ * $Id: palloc.h,v 1.3 1996/11/26 03:20:23 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef        PALLOC_H
 #define PALLOC_H
 
+#include <c.h>
+
 extern void*   palloc(Size size);
 extern void    pfree(void *pointer); 
 extern void *repalloc(void *pointer, Size size);
index af39505743ee05a30e7cc9fb5b5275f2f91e0e2f..52f9a058d60732e36e724261be4de09fd7ddd668 100644 (file)
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.18 1996/11/17 19:27:38 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.19 1996/11/26 03:20:33 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,7 +15,7 @@ SRCDIR= ..
 include ../Makefile.global
 
 # We need the backend directory here for its fmgr.h
-INCLUDE_OPT= -I../include -I../backend
+INCLUDE_OPT= -I../include -I../backend -I../backend/port/$(PORTNAME)
 
 CFLAGS+= $(INCLUDE_OPT) 
 
@@ -73,7 +73,7 @@ postgres.h: ../include/postgres.h
        echo "#define NAMEDATALEN $(NAMEDATALEN)" >> postgres.h
        echo "#define OIDNAMELEN $(OIDNAMELEN)" >> postgres.h
        cat ../include/postgres.h >> postgres.h
-       
+
 c.h: ../include/c.h
        rm -f c.h
        echo "#undef PORTNAME" >  c.h
index 88e2c294ad8a5e13b0e621005056b40635e5fee3..696065a3ff921998430a059427aad070b06dbf13 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.19 1996/11/14 10:25:50 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20 1996/11/26 03:20:35 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include "fe-auth.h"
 #include "libpq-fe.h"
 
+#include <port-protos.h>  /* for strdup() */
+
 #if defined(ultrix4) || defined(next)
   /* ultrix is lame and doesn't have strdup in libc for some reason */
  /* [TRH] So doesn't NEXTSTEP.  But whaddaya expect for a non-ANSI  
 standard function? (My, my. Touchy today, are we?) */
-static
 char *
 strdup(const char *string)
 {