Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d5e21e0

Browse files
committed
HPUX 10 patches from Vladimir Turin
1 parent 3ac9d2f commit d5e21e0

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

src/backend/port/hpux/port-protos.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port-protos.h,v 1.1.1.1 1996/07/09 06:21:43 scrappy Exp $
9+
* $Id: port-protos.h,v 1.2 1997/07/27 18:51:57 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -28,7 +28,7 @@ extern int init_address_fixup(void);
2828
extern double rint(double x);
2929
extern double cbrt(double x);
3030
extern long random(void);
31-
extern void srandom(int seed);
31+
extern void srandom(unsigned seed);
3232
extern int getrusage(int who, struct rusage *ru);
3333

3434
#endif /* PORT_PROTOS_H */

src/backend/port/hpux/port.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.1.1.1 1996/07/09 06:21:43 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.2 1997/07/27 18:52:05 momjian Exp $
1111
*
1212
* NOTES
1313
* For the most part, this file gets around some non-POSIX calls
@@ -36,7 +36,7 @@ random()
3636
return(lrand48());
3737
}
3838

39-
void srandom(int seed)
39+
void srandom(unsigned seed)
4040
{
4141
srand48((long int) seed);
4242
}

src/include/port/hpux.h

+14
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,17 @@
22
# define USE_POSIX_TIME
33
# define HAS_TEST_AND_SET
44
typedef struct { int sem[4]; } slock_t;
5+
6+
#ifndef BIG_ENDIAN
7+
#define BIG_ENDIAN 4321
8+
#endif
9+
#ifndef LITTLE_ENDIAN
10+
#define LITTLE_ENDIAN 1234
11+
#endif
12+
#ifndef PDP_ENDIAN
13+
#define PDP_ENDIAN 3412
14+
#endif
15+
#ifndef BYTE_ORDER
16+
#define BYTE_ORDER BIG_ENDIAN
17+
#endif
18+

src/makefiles/Makefile.hpux

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11

2+
#HPUX_VERS:= $(shell uname -r)
3+
#HPUX_MAJOR= ${HPUX_VERS:R:E}
4+
#HPUX_MINOR= ${HPUX_VERS:E}
25
#ifdef ENFORCE_ALIGNMENT
3-
# CFLAGS_BE= -DNOFIXADE
6+
# CFLAGS+= -DNOFIXADE
47
#else
5-
# HPUX_VERS:= $(shell uname -r)
6-
# HPUX_MAJOR= ${HPUX_VERS:R:E}
7-
# HPUX_MINOR= ${HPUX_VERS:E}
88
# ifeq ($(HPUX_MAJOR), 08)
9-
# CFLAGS_BE+= +u -DHP_S500_ALIGN
10-
# LDFLAGS_BE+= +u
9+
# CFLAGS+= +u -DHP_S500_ALIGN
10+
# LDFLAGS+= +u
1111
# else
1212
# ifeq ($(HPUX_MAJOR), 09)
1313
# ifeq ($(CC), cc)
14-
# CFLAGS_BE+= +u4
15-
# LDFLAGS_BE+= +u4
14+
# CFLAGS+= +u4
15+
# LDFLAGS+= +u4
1616
# endif
1717
# endif
1818
# endif
1919
#endif
20+
# HP-UX 10 has a select() in libcurses, so we need to get the libc version first
21+
#ifeq ($(HPUX_MAJOR), 10)
22+
# LDFLAGS:= -lc $(LDFLAGS)
23+
#endif
2024

2125
%.sl: %.o
2226
$(LD) -b -o $@ $<

0 commit comments

Comments
 (0)