]> granicus.if.org Git - postgresql/commitdiff
Make strdup work for Ultrix. Thanks Erik Bertelsen
authorBryan Henderson <bryanh@giraffe.netgate.net>
Thu, 28 Nov 1996 03:32:18 +0000 (03:32 +0000)
committerBryan Henderson <bryanh@giraffe.netgate.net>
Thu, 28 Nov 1996 03:32:18 +0000 (03:32 +0000)
src/bin/pg_dump/Makefile
src/interfaces/libpq/fe-connect.c
src/utils/strdup.c

index 7f70aabcadf70f0d90283a1fa870b393c45b087d..6a79dd059420266b27997895eb30422daf2a2437 100644 (file)
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.10 1996/11/26 07:38:16 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.11 1996/11/28 03:31:27 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -27,7 +27,7 @@ pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
        $(CC) $(LDFLAGS) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
 
 ../../utils/strdup.o:
-       $(MAKE) -C ../../utils/strdup.o
+       $(MAKE) -C ../../utils strdup.o
 
 .PHONY: submake
 submake:
index bccb8fe6f14c000abcdb43ad3967592140975c22..f0c76f6513c94b0d062ae483eaec6fa36a0b3831 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.21 1996/11/26 07:38:55 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.22 1996/11/28 03:32:12 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include "strdup.h"
 #endif
 
-#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?) */
-char *
-strdup(const char *string)
-{
-    char *nstr;
-
-  if ((nstr = malloc(strlen(string)+1)) != NULL)
-      strcpy(nstr, string);
-    return nstr;
-}
-#endif
 
 /* use a local version instead of the one found in pqpacket.c */
 static ConnStatusType connectDB(PGconn *conn);
index a59cc505784e8a3a67fa9a6585480fb4b0d9851e..85d20814cae0510a28befd0b348a9126c2be832e 100644 (file)
@@ -7,18 +7,19 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.1 1996/11/27 01:46:52 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.2 1996/11/28 03:32:18 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <string.h>
+#include <stdlib.h>
 #include "strdup.h"
 
 char *
-strdup(char *string)
+strdup(char const *string)
 {
     char *nstr;
 
-    nstr = strcpy((char *)palloc(strlen(string)+1), string);
+    nstr = strcpy((char *)malloc(strlen(string)+1), string);
     return nstr;
 }