Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit46d58fb

Browse files
author
Bryan Henderson
committed
Make it compile on Ultrix. Thanks Erik Bertelson.
1 parent02c0eb6 commit46d58fb

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
staticQuery*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
intcode;

‎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
#ifndefPORT_PORTOS_H
1414
#definePORT_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
externvoidinit_address_fixup(void);
3532

33+
/* strdup.c: strdup() is not part of libc on Ultrix */
34+
externchar*strdup(charconst*);
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(charconst*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

‎src/bin/pg4_dump/common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include"postgres.h"
2424
#include"libpq-fe.h"
2525
#include"libpq/auth.h"
26+
#include<port-protos.h>/* for strdup () *(
2627
2728
#include "pg_dump.h"
2829

‎src/bin/pg4_dump/pg4_dump.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include"tmp/postgres.h"
3737
#include"tmp/libpq-fe.h"
3838
#include"libpq/auth.h"
39+
#include<port-protos.h>/* for strdup () */
3940

4041
#include"pg_dump.h"
4142

‎src/bin/pg_dump/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.8 1996/11/12 06:10:37 bryanh Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.9 1996/11/26 03:19:36 bryanh Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

1414
SRCDIR= ../..
1515
include ../Makefile.global
1616
include ../../Makefile.global
1717

18+
CFLAGS+= -I../../backend/port/${PORTNAME}
19+
1820
OBJS= pg_dump.o common.o
1921

2022
all: submake pg_dump

‎src/bin/pg_dump/common.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/bin/pg_dump/common.c,v 1.7 1996/11/04 03:59:53 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.8 1996/11/26 03:19:40 bryanh Exp $
1111
*
1212
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1313
*
@@ -29,6 +29,7 @@
2929

3030
#include"postgres.h"
3131
#include"libpq-fe.h"
32+
#include<port-protos.h>/* for strdup() */
3233

3334
#include"pg_dump.h"
3435

‎src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*
2222
* IDENTIFICATION
23-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.16 1996/11/20 22:32:55 momjian Exp $
23+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.17 1996/11/26 03:19:45 bryanh Exp $
2424
*
2525
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2626
*
@@ -54,6 +54,7 @@
5454
#include"postgres.h"
5555
#include"access/htup.h"
5656
#include"libpq-fe.h"
57+
#include<port-protos.h>/* for strdup() */
5758

5859
#include"pg_dump.h"
5960

‎src/bin/pg_dump/pg_dump.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: pg_dump.h,v 1.7 1996/10/07 03:30:40 scrappy Exp $
8+
* $Id: pg_dump.h,v 1.8 1996/11/26 03:19:49 bryanh Exp $
99
*
1010
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
1111
*
@@ -158,7 +158,6 @@ extern void flagInhAttrs(TableInfo* tbinfo, int numTables,
158158
InhInfo*inhinfo,intnumInherits);
159159

160160
externvoidcheck_conn_and_db(void);
161-
externchar*dupstr(constchar*s);
162161
externintstrInArray(constchar*pattern,char**arr,intarr_size);
163162
externvoidparseArgTypes(char**argtypes,constchar*str);
164163
externintisArchiveName(constchar*);

‎src/bin/psql/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.13 1996/11/13 10:35:26 bryanh Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.14 1996/11/26 03:19:54 bryanh Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -16,7 +16,8 @@ include ../../Makefile.global
1616

1717
INCLUDE_OPT:=\
1818
-I$(LIBPQDIR)\
19-
-I../../include
19+
-I../../include\
20+
-I../../backend/port/$(PORTNAME)
2021

2122
CFLAGS+=$(INCLUDE_OPT)
2223
#

‎src/bin/psql/psql.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/bin/psql/Attic/psql.c,v 1.33 1996/11/24 04:44:24 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.34 1996/11/26 03:19:58 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -23,8 +23,8 @@
2323
#include"postgres.h"
2424
#include"libpq-fe.h"
2525
#include"stringutils.h"
26-
2726
#include"psqlHelp.h"
27+
#include<port-protos.h>/* for strdup() */
2828

2929
#ifdefNOREADLINE
3030
#include"rlstubs.h"

‎src/bin/psql/stringutils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.5 1996/11/14 16:08:05 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.6 1996/11/26 03:20:06 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include<stdio.h>
1515
#include<string.h>
1616
#include<ctype.h>
1717
#include<stdlib.h>
18+
19+
#include<port-protos.h>/* for strdup() */
20+
1821
#include"stringutils.h"
1922

2023
/* all routines assume null-terminated strings! */

‎src/bin/psql/stringutils.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: stringutils.h,v 1.2 1996/07/28 07:08:15 scrappy Exp $
8+
* $Id: stringutils.h,v 1.3 1996/11/26 03:20:08 bryanh Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -31,11 +31,6 @@ extern char *leftTrim(char *s);
3131
externchar*rightTrim(char*s);
3232
externchar*doubleTrim(char*s);
3333

34-
/* dupstr : copies a string, while making room for it */
35-
/* the CALLER is responsible for freeing the space */
36-
/* returns NULL if the argument is NULL */
37-
externchar*dupstr(char*s);
38-
3934
#ifdefSTRINGUTILS_TEST
4035
externvoidtestStringUtils();
4136
#endif

‎src/include/regex/utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
*@(#)utils.h8.3 (Berkeley) 3/20/94
3838
*/
3939

40+
#include"config.h"/* HAVE_MEMMOVE */
41+
4042
/* utility definitions */
4143
#defineDUPMAX100000000/* xxx is this right? */
4244
#defineINFINITY(DUPMAX + 1)

‎src/include/utils/dynamic_loader.h

Lines changed: 3 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: dynamic_loader.h,v 1.2 1996/11/04 08:14:05 scrappy Exp $
9+
* $Id: dynamic_loader.h,v 1.3 1996/11/26 03:20:17 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -15,6 +15,8 @@
1515

1616
#include<sys/types.h>
1717

18+
#include<postgres.h>
19+
1820
#ifdefMIN
1921
#undef MIN
2022
#undef MAX

‎src/include/utils/palloc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: palloc.h,v 1.2 1996/10/31 09:51:28 scrappy Exp $
9+
* $Id: palloc.h,v 1.3 1996/11/26 03:20:23 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
1313
#ifndefPALLOC_H
1414
#definePALLOC_H
1515

16+
#include<c.h>
17+
1618
externvoid*palloc(Sizesize);
1719
externvoidpfree(void*pointer);
1820
externvoid*repalloc(void*pointer,Sizesize);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp