From d5e21e0924401fc44bbcb2cf1f1491d01256a840 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 27 Jul 1997 18:52:43 +0000 Subject: [PATCH] HPUX 10 patches from Vladimir Turin --- src/backend/port/hpux/port-protos.h | 4 ++-- src/backend/port/hpux/port.c | 4 ++-- src/include/port/hpux.h | 14 ++++++++++++++ src/makefiles/Makefile.hpux | 20 ++++++++++++-------- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/backend/port/hpux/port-protos.h b/src/backend/port/hpux/port-protos.h index 16206bb250..33d2dd66de 100644 --- a/src/backend/port/hpux/port-protos.h +++ b/src/backend/port/hpux/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.1.1.1 1996/07/09 06:21:43 scrappy Exp $ + * $Id: port-protos.h,v 1.2 1997/07/27 18:51:57 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -28,7 +28,7 @@ extern int init_address_fixup(void); extern double rint(double x); extern double cbrt(double x); extern long random(void); -extern void srandom(int seed); +extern void srandom(unsigned seed); extern int getrusage(int who, struct rusage *ru); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/hpux/port.c b/src/backend/port/hpux/port.c index eccf3dc5c1..205a317826 100644 --- a/src/backend/port/hpux/port.c +++ b/src/backend/port/hpux/port.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.1.1.1 1996/07/09 06:21:43 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.2 1997/07/27 18:52:05 momjian Exp $ * * NOTES * For the most part, this file gets around some non-POSIX calls @@ -36,7 +36,7 @@ random() return(lrand48()); } -void srandom(int seed) +void srandom(unsigned seed) { srand48((long int) seed); } diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h index 8bf04ce5b0..0315f79d62 100644 --- a/src/include/port/hpux.h +++ b/src/include/port/hpux.h @@ -2,3 +2,17 @@ # define USE_POSIX_TIME # define HAS_TEST_AND_SET typedef struct { int sem[4]; } slock_t; + +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 +#endif +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 +#endif +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 +#endif +#ifndef BYTE_ORDER +#define BYTE_ORDER BIG_ENDIAN +#endif + diff --git a/src/makefiles/Makefile.hpux b/src/makefiles/Makefile.hpux index 9b530f7681..c053832337 100644 --- a/src/makefiles/Makefile.hpux +++ b/src/makefiles/Makefile.hpux @@ -1,22 +1,26 @@ +#HPUX_VERS:= $(shell uname -r) +#HPUX_MAJOR= ${HPUX_VERS:R:E} +#HPUX_MINOR= ${HPUX_VERS:E} #ifdef ENFORCE_ALIGNMENT -# CFLAGS_BE= -DNOFIXADE +# CFLAGS+= -DNOFIXADE #else -# HPUX_VERS:= $(shell uname -r) -# HPUX_MAJOR= ${HPUX_VERS:R:E} -# HPUX_MINOR= ${HPUX_VERS:E} # ifeq ($(HPUX_MAJOR), 08) -# CFLAGS_BE+= +u -DHP_S500_ALIGN -# LDFLAGS_BE+= +u +# CFLAGS+= +u -DHP_S500_ALIGN +# LDFLAGS+= +u # else # ifeq ($(HPUX_MAJOR), 09) # ifeq ($(CC), cc) -# CFLAGS_BE+= +u4 -# LDFLAGS_BE+= +u4 +# CFLAGS+= +u4 +# LDFLAGS+= +u4 # endif # endif # endif #endif +# HP-UX 10 has a select() in libcurses, so we need to get the libc version first +#ifeq ($(HPUX_MAJOR), 10) +# LDFLAGS:= -lc $(LDFLAGS) +#endif %.sl: %.o $(LD) -b -o $@ $< -- 2.11.0