Skip to content

Commit 46d58fb

Browse files
author
Bryan Henderson
committed
Make it compile on Ultrix. Thanks Erik Bertelson.
1 parent 02c0eb6 commit 46d58fb

File tree

25 files changed

+66
-36
lines changed

25 files changed

+66
-36
lines changed

src/backend/parser/analyze.c

Lines changed: 3 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/parser/analyze.c,v 1.15 1996/11/13 20:48:55 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.16 1996/11/26 03:17:45 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -37,6 +37,8 @@
3737
#include "optimizer/clauses.h"
3838
#include "access/heapam.h"
3939

40+
#include "port-protos.h" /* strdup() */
41+
4042
/* convert the parse tree into a query tree */
4143
static Query *transformStmt(ParseState *pstate, Node *stmt);
4244

src/backend/parser/catalog_utils.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.10 1996/11/13 20:48:58 scrappy Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.11 1996/11/26 03:17:47 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -48,6 +48,8 @@
4848
#include "utils/lsyscache.h"
4949
#include "storage/lmgr.h"
5050

51+
#include "port-protos.h" /* strdup() */
52+
5153
struct {
5254
char *field;
5355
int code;

src/backend/port/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# be converted to Method 2.
2020
#
2121
# IDENTIFICATION
22-
# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.4 1996/11/10 03:13:27 bryanh Exp $
22+
# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.5 1996/11/26 03:18:38 bryanh Exp $
2323
#
2424
#-------------------------------------------------------------------------
2525

@@ -36,6 +36,11 @@ ifeq ($(PORTNAME), sparc_solaris)
3636
OBJS += inet_aton.o
3737
endif
3838

39+
ifeq ($(PORTNAME), ultrix4)
40+
# Other ports get the inet_aton() function from their standard C libraries.
41+
OBJS += inet_aton.o
42+
endif
43+
3944
all: submake SUBSYS.o
4045

4146
SUBSYS.o: $(OBJS)

src/backend/port/inet_aton.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4343
* SUCH DAMAGE. */
4444

45+
#include <sys/types.h>
4546
#include <netinet/in.h>
4647
#include <ctype.h>
4748
#include "inet_aton.h"

src/backend/port/ultrix4/dl.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: dl.h,v 1.2 1996/11/14 20:08:57 scrappy Exp $
9+
* $Id: dl.h,v 1.3 1996/11/26 03:18:46 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -34,6 +34,7 @@
3434
#ifndef _DL_HEADER_
3535
#define _DL_HEADER_
3636

37+
#include <stdio.h> /* needed to declare FILE for ldfcn.h */
3738
#include <filehdr.h>
3839
#include <syms.h>
3940
#include <ldfcn.h>

src/backend/port/ultrix4/dynloader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.2 1996/11/14 20:08:58 scrappy Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.3 1996/11/26 03:18:50 bryanh Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
1616
#include <stdio.h>
1717
#include <postgres.h>
1818
#include "dl.h"
19+
#include <utils/dynamic_loader.h>
1920
#include "c.h"
2021
#include "fmgr.h"
2122
#include "port-protos.h"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
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:45 scrappy Exp $
9+
* $Id: port-protos.h,v 1.2 1996/11/26 03:18:58 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
1313
#ifndef PORT_PORTOS_H
1414
#define PORT_PORTOS_H
1515

16-
#include "utils/dynamic_loader.h"
17-
#include "dl.h"
18-
1916
/* dynloader.c */
2017
/*
2118
* New dynamic loader.
@@ -33,4 +30,7 @@
3330

3431
extern void init_address_fixup(void);
3532

33+
/* strdup.c: strdup() is not part of libc on Ultrix */
34+
extern char* strdup(char const*);
35+
3636
#endif /* PORT_PORTOS_H */

src/backend/port/ultrix4/strdup.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.1.1.1 1996/07/09 06:21:45 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.2 1996/11/26 03:19:04 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include <string.h>
1515

16+
#include <utils/palloc.h>
17+
18+
#include "port-protos.h"
19+
1620
char *
17-
strdup(char *string)
21+
strdup(char const *string)
1822
{
1923
char *nstr;
2024

src/backend/utils/mmgr/palloc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.2 1996/11/24 04:44:17 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.3 1996/11/26 03:19:12 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
14+
15+
#include <string.h>
16+
1417
#include "c.h"
1518

1619
#include "utils/mcxt.h"

src/bin/pg4_dump/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.include <postgres.global.mk>
66

7-
CFLAGS+= -I${.CURDIR}/../../backend/tmp
7+
CFLAGS+= -I${.CURDIR}/../../backend/tmp -I${.CURDIR}/../../backend/port/${PORTNAME}
88

99
PROG= pg4_dump
1010

0 commit comments

Comments
 (0)