From 54227767347f4a42b00645c55615d7f41761beea Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 30 Nov 1998 00:31:20 +0000 Subject: [PATCH] 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... --- src/Makefile.shlib | 2 ++ src/bin/psql/Makefile.in | 2 +- src/include/port/sunos4.h | 5 +++++ src/include/regex/utils.h | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Makefile.shlib b/src/Makefile.shlib index d1cf4390e2..d6d864e3e4 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -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 6f3e39e9ed..20639e3f85 100644 --- a/src/bin/psql/Makefile.in +++ b/src/bin/psql/Makefile.in @@ -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 f08580cfaf..e9c0ec29d4 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 e6f169065f..de36c6ffb5 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 -- 2.39.5