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

Commit 926a066

Browse files
committed
Added a SVR4 port
--- below my signature, there are a coupls of diffs and files in a shell archive, which were needed to build postgres95 1.02 on Siemens Nixdorfs MIPS based SINIX systems. Except for the compiler switches "-W0" and "-LD-Blargedynsym" these diffs should also apply for other SVR4 based systems. The changes in "Makefile.global" and "genbki.sh" can probably be ignored (I needed gawk, to make the script run). There is one bugfix thou. In "src/backend/parser/sysfunc.c" the function in this file didn't honor the EUROPEAN_DATES ifdef. --- Submitted by: Frank Ridderbusch <ridderbusch.pad@sni.de>
1 parent 0e9f4ce commit 926a066

File tree

8 files changed

+82
-30
lines changed

8 files changed

+82
-30
lines changed

src/Makefile.global

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.20 1996/08/06 16:05:56 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.21 1996/08/19 13:50:41 scrappy Exp $
1111
#
1212
# NOTES
1313
# This is seen by any Makefiles that include mk/postgres.mk. To
@@ -59,15 +59,15 @@
5959
# until after this file is processed!
6060
# make sure that you have no whitespaces after the PORTNAME setting
6161
# or the makefiles can get confused
62-
PORTNAME= BSD44_derived
62+
PORTNAME= svr4
6363

6464
# SRCDIR specifies where the source files are.
65-
SRCDIR= /home/staff/scrappy/cvs/postgres95/src
65+
SRCDIR= /home/tools/postgres95-1.02/src
6666

6767
# For convenience, POSTGRESDIR is where DATADIR, BINDIR, and LIBDIR
6868
# and other target destinations are rooted. Of course, each of these is
6969
# changable separately.
70-
POSTGRESDIR= /home/staff/scrappy/cvs/postgres95
70+
POSTGRESDIR= /home/tools/postgres95-1.02
7171

7272
# POSTGRESLOGIN is the login name of the user who gets special
7373
# privileges within the database. By default it is "postgres", but
@@ -130,15 +130,15 @@ CFLAGS+= -DNAMEDATALEN=$(NAMEDATALEN) -DOIDNAMELEN=$(OIDNAMELEN)
130130
# Comment out CDEBUG to turn off debugging and sanity-checking.
131131
#
132132
# XXX on MIPS, use -g3 if you want to compile with -O
133-
#CDEBUG= -g
133+
CDEBUG= -O
134134

135135
# Comment out ENFORCE_ALIGNMENT if you do NOT want unaligned access to
136136
# multi-byte types to generate a bus error.
137137
ENFORCE_ALIGNMENT= true
138138

139139
# turn this on if you prefer European style dates instead of American
140140
# style dates
141-
# EUROPEAN_DATES = 1
141+
EUROPEAN_DATES = 1
142142

143143
# Comment out PROFILE to disable profiling.
144144
#
@@ -154,13 +154,13 @@ ENFORCE_ALIGNMENT= true
154154
# and READLINE_LIBDIR to reflect the location of the readline and history
155155
# headers and libraries.
156156
#
157-
#USE_READLINE= true
157+
USE_READLINE= true
158158

159159
# directories for the readline and history libraries.
160-
READLINE_INCDIR= /usr/local/include
161-
HISTORY_INCDIR= /usr/local/include
162-
READLINE_LIBDIR= /usr/local/lib
163-
HISTORY_LIBDIR= /usr/local/lib
160+
READLINE_INCDIR= /home/tools/include
161+
HISTORY_INCDIR= /home/tools/include -I/home/tools/include/readline
162+
READLINE_LIBDIR= /home/tools/lib
163+
HISTORY_LIBDIR= /home/tools/lib
164164

165165
# If you do not plan to use Host based authentication,
166166
# comment out the following line
@@ -208,19 +208,19 @@ endif
208208
# location of Tcl/Tk headers and libraries
209209
#
210210
# Uncomment this to build the tcl utilities.
211-
#USE_TCL= true
211+
USE_TCL= true
212212
# customize these to your site's needs
213213
#
214-
TCL_INCDIR= /usr/local/include
215-
TCL_LIBDIR= /usr/local/lib
214+
TCL_INCDIR= /home/tools/include
215+
TCL_LIBDIR= /home/tools/lib
216216
TCL_LIB = -ltcl7.5
217-
TK_INCDIR= /usr/local/include
218-
TK_LIBDIR= /usr/local/lib
217+
TK_INCDIR= /home/tools/include
218+
TK_LIBDIR= /home/tools/lib
219219
TK_LIB = -ltk4.1
220220

221-
X11_INCDIR = /usr/X11R6.1/include
222-
X11_LIBDIR = /usr/X11R6.1/lib
223-
X11_LIB = -lX11
221+
X11_INCDIR = /usr/include
222+
X11_LIBDIR = /usr/lib
223+
X11_LIB = -lX11 -lsocket -lnsl
224224

225225
#
226226
# include port specific rules and variables. For instance:

src/backend/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.2 1996/07/31 17:19:49 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.3 1996/08/19 13:51:55 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -118,6 +118,11 @@ ifeq ($(PORTNAME), linux)
118118
LDADD+= -lc
119119
endif
120120

121+
# the following is special for Reliant UNIX SVR4 (formerly SINIX)
122+
ifeq ($(PORTNAME), svr4)
123+
LDFLAGS+= -LD-Blargedynsym
124+
endif
125+
121126
postgres: $(POSTGRES_DEPEND) $(OBJS) $(EXPORTS)
122127
$(CC) $(LDFLAGS) -o $(objdir)/$(@F) $(addprefix $(objdir)/,$(notdir $(OBJS))) $(LDADD)
123128

src/backend/catalog/genbki.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
#
1212
# IDENTIFICATION
13-
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.1.1.1 1996/07/09 06:21:15 scrappy Exp $
13+
# $Header: /cvsroot/pgsql/src/backend/catalog/Attic/genbki.sh,v 1.2 1996/08/19 13:52:02 scrappy Exp $
1414
#
1515
# NOTES
1616
# non-essential whitespace is removed from the generated file.
@@ -62,7 +62,7 @@ sed -e 's/\/\*.*\*\///g' \
6262
-e 's/\ NameData/\ name/g' \
6363
-e 's/(NameData/(name/g' \
6464
-e 's/(Oid/(oid/g' | \
65-
awk '
65+
gawk '
6666
# ----------------
6767
# now use awk to process remaining .h file..
6868
#

src/backend/parser/sysfunc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ char *Sysfunc_system_date(void)
3030

3131
time(&cur_time_secs);
3232
cur_time_expanded = localtime(&cur_time_secs);
33+
#if defined(EUROPEAN_DATES) || defined(EUROPEAN_STYLE)
34+
sprintf(buf, "%02.2d-%02.2d-%04.4d", cur_time_expanded->tm_mday,
35+
cur_time_expanded->tm_mon+1, cur_time_expanded->tm_year+1900);
36+
#else
3337
sprintf(buf, "%02.2d-%02.2d-%04.4d", cur_time_expanded->tm_mon+1,
3438
cur_time_expanded->tm_mday, cur_time_expanded->tm_year+1900);
39+
#endif
3540
return &buf[0];
3641
}
3742

src/backend/storage/ipc.h

Lines changed: 2 additions & 1 deletion
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: ipc.h,v 1.5 1996/08/04 21:03:23 scrappy Exp $
9+
* $Id: ipc.h,v 1.6 1996/08/19 13:52:20 scrappy Exp $
1010
*
1111
* NOTES
1212
* This file is very architecture-specific. This stuff should actually
@@ -125,6 +125,7 @@ extern int S_LOCK_FREE(slock_t *lock);
125125
defined(PORTNAME_i386_solaris) || \
126126
defined(PORTNAME_sparc_solaris) || \
127127
defined(PORTNAME_ultrix4) || \
128+
defined(PORTNAME_svr4) || \
128129
defined(WIN32)
129130
union semun {
130131
int val;

src/backend/utils/adt/float.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.2 1996/07/20 08:36:17 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.3 1996/08/19 13:52:35 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1275,7 +1275,7 @@ static int isinf(x)
12751275
}
12761276
#endif /* PORTNAME_alpha */
12771277

1278-
#if defined(PORTNAME_sparc_solaris)||defined(PORTNAME_i386_solaris)
1278+
#if defined(PORTNAME_sparc_solaris)||defined(PORTNAME_i386_solaris) || defined(PORTNAME_svr4)
12791279
#include <ieeefp.h>
12801280
static int
12811281
isinf(d)

src/backend/utils/adt/nabstime.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.3 1996/07/22 21:56:03 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.4 1996/08/19 13:52:40 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -296,6 +296,7 @@ tryabsdate(char *fields[], int nf, struct tm *tm, int *tzp)
296296
defined(PORTNAME_i386_solaris) || \
297297
defined(PORTNAME_irix5) || \
298298
defined(PORTNAME_sparc_solaris) || \
299+
defined(PORTNAME_svr4) || \
299300
defined(WIN32)
300301
tzset();
301302
#ifndef WIN32

src/mk/port/postgres.mk.svr4

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Copyright (c) 1994-5, Regents of the University of California
77
#
8-
# $Id: postgres.mk.svr4,v 1.1.1.1 1996/07/09 06:22:20 scrappy Exp $
8+
# $Id: postgres.mk.svr4,v 1.2 1996/08/19 13:52:54 scrappy Exp $
99
#
1010
# NOTE
1111
# This file has not been tested. -ay 3/95
@@ -14,6 +14,11 @@
1414
ifndef MK_PORT
1515
MK_PORT= svr4
1616

17+
# cc won't work?
18+
#CC= gcc
19+
CC= cc -W0
20+
YACC= bison -y
21+
1722
#
1823
# for postgres.mk
1924
#
@@ -23,13 +28,48 @@ CFLAGS_BE+= -DUSE_POSIX_SIGNALS
2328
# symbol names to tell them what to export/import.
2429
MAKE_EXPORTS= true
2530

31+
# RANLIB is not used on svr4
32+
RANLIB=touch
33+
34+
# GNU install
35+
INSTALL=/home/tools/bin/install
36+
37+
#
38+
# Random things that must be passed everywhere to enable
39+
# everything to compile. :-/
40+
#
41+
# The extra -I flag is to scoop up extra BSD-emulating headers.
42+
CFLAGS_BE+= -DSYSV_DIRENT -I$(POSTGRESDIR)/src/backend/port/svr4
43+
LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
44+
45+
LD_ADD+= $(LDADD_BE)
46+
47+
#
48+
# for postgres.mk
49+
#
50+
CFLAGS_OPT= -O
51+
2652
#
2753
# for postgres.user.mk
2854
#
29-
CFLAGS_SL= -K pic
55+
#CFLAGS_SL= -K pic
56+
ifeq ($(CC), cc)
57+
#CFLAGS_SL= -K PIC
58+
else
59+
#CFLAGS_SL= -fPIC
60+
endif
61+
3062
SLSUFF= .so
3163

32-
%.so: %.o
33-
$(LD) -G $(LDFLAGS) -o $(objdir)/$(@F) $(objdir)/$(<F)
64+
#%.so: %.o
65+
# $(LD) -G $(LDFLAGS) -o $(objdir)/$(@F) $(objdir)/$(<F)
66+
%.so: %.o
67+
$(LD) -G -Bdynamic -o $(objdir)/$(@F) $(objdir)/$(<F)
68+
69+
#
70+
# for postgres.shell.mk
71+
#
72+
DASH_N=''
73+
BACKSLASH_C='\\\\c'
3474

3575
endif

0 commit comments

Comments
 (0)