summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane1998-11-30 00:31:20 +0000
committerTom Lane1998-11-30 00:31:20 +0000
commit64cb864cb12dc7438a9e83e785982bdd8aa65550 (patch)
treed5822be9bce14e8b234da8a6abe5fa945465a41b
parent3be772cadc2919733d05ee7b41da4d97d013ba05 (diff)
Portability fixes found needed for SunOS 4.1.x:
SunOS has tas(), but not memmove or strerror, and its sprintf() doesn't return int. Also, older versions of GNU Make don't like rules with empty left-hand sides...
-rw-r--r--src/Makefile.shlib4
-rw-r--r--src/bin/psql/Makefile.in4
-rw-r--r--src/include/port/sunos4.h5
-rw-r--r--src/include/regex/utils.h2
4 files changed, 11 insertions, 4 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 51e5fdbb5d3..79b4e2a02e8 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.3.2.1 1998/11/12 05:25:03 tgl Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.3.2.2 1998/11/30 00:31:19 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -171,8 +171,10 @@ else
endif
$(RANLIB) $@
+ifneq ($(shlib),)
$(shlib): $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(SHLIB_LINK)
+endif
# Rules to install regular and shared libraries
diff --git a/src/bin/psql/Makefile.in b/src/bin/psql/Makefile.in
index 66a9748669f..465bc280012 100644
--- a/src/bin/psql/Makefile.in
+++ b/src/bin/psql/Makefile.in
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.13 1998/07/26 04:31:20 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.13.2.1 1998/11/30 00:31:20 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -28,7 +28,7 @@ ifdef MULTIBYTE
CFLAGS+= $(MBFLAGS)
endif
-OBJS= psql.o stringutils.o @STRDUP@
+OBJS= psql.o stringutils.o @STRDUP@ @STRERROR2@
all: submake psql
diff --git a/src/include/port/sunos4.h b/src/include/port/sunos4.h
index f08580cfafc..e9c0ec29d44 100644
--- a/src/include/port/sunos4.h
+++ b/src/include/port/sunos4.h
@@ -1,4 +1,9 @@
#define USE_POSIX_TIME
+#define HAS_TEST_AND_SET
+typedef unsigned char slock_t;
+
+/* sprintf() returns char *, not int, on SunOS 4.1.x */
+#define SPRINTF_CHAR
#ifndef BIG_ENDIAN
#define BIG_ENDIAN 4321
diff --git a/src/include/regex/utils.h b/src/include/regex/utils.h
index e6f169065fb..de36c6ffb56 100644
--- a/src/include/regex/utils.h
+++ b/src/include/regex/utils.h
@@ -58,6 +58,6 @@ typedef unsigned char uch;
#endif
/* for old systems with bcopy() but no memmove() */
-#if !defined(HAVE_MEMMOVE)
+#if !defined(HAVE_MEMMOVE) && !defined(memmove)
#define memmove(d, s, c) bcopy(s, d, c)
#endif