Make it compile on Ultrix. Thanks Erik Bertelson.
This commit is contained in:
parent
02c0eb6549
commit
46d58fba33
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.15 1996/11/13 20:48:55 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.16 1996/11/26 03:17:45 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -37,6 +37,8 @@
|
||||
#include "optimizer/clauses.h"
|
||||
#include "access/heapam.h"
|
||||
|
||||
#include "port-protos.h" /* strdup() */
|
||||
|
||||
/* convert the parse tree into a query tree */
|
||||
static Query *transformStmt(ParseState *pstate, Node *stmt);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.10 1996/11/13 20:48:58 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.11 1996/11/26 03:17:47 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -48,6 +48,8 @@
|
||||
#include "utils/lsyscache.h"
|
||||
#include "storage/lmgr.h"
|
||||
|
||||
#include "port-protos.h" /* strdup() */
|
||||
|
||||
struct {
|
||||
char *field;
|
||||
int code;
|
||||
|
@ -19,7 +19,7 @@
|
||||
# be converted to Method 2.
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.4 1996/11/10 03:13:27 bryanh Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/port/Makefile,v 1.5 1996/11/26 03:18:38 bryanh Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -36,6 +36,11 @@ ifeq ($(PORTNAME), sparc_solaris)
|
||||
OBJS += inet_aton.o
|
||||
endif
|
||||
|
||||
ifeq ($(PORTNAME), ultrix4)
|
||||
# Other ports get the inet_aton() function from their standard C libraries.
|
||||
OBJS += inet_aton.o
|
||||
endif
|
||||
|
||||
all: submake SUBSYS.o
|
||||
|
||||
SUBSYS.o: $(OBJS)
|
||||
|
@ -42,6 +42,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <ctype.h>
|
||||
#include "inet_aton.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: dl.h,v 1.2 1996/11/14 20:08:57 scrappy Exp $
|
||||
* $Id: dl.h,v 1.3 1996/11/26 03:18:46 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -34,6 +34,7 @@
|
||||
#ifndef _DL_HEADER_
|
||||
#define _DL_HEADER_
|
||||
|
||||
#include <stdio.h> /* needed to declare FILE for ldfcn.h */
|
||||
#include <filehdr.h>
|
||||
#include <syms.h>
|
||||
#include <ldfcn.h>
|
||||
|
@ -9,13 +9,14 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.2 1996/11/14 20:08:58 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.3 1996/11/26 03:18:50 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <postgres.h>
|
||||
#include "dl.h"
|
||||
#include <utils/dynamic_loader.h>
|
||||
#include "c.h"
|
||||
#include "fmgr.h"
|
||||
#include "port-protos.h"
|
||||
|
@ -6,16 +6,13 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: port-protos.h,v 1.1.1.1 1996/07/09 06:21:45 scrappy Exp $
|
||||
* $Id: port-protos.h,v 1.2 1996/11/26 03:18:58 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef PORT_PORTOS_H
|
||||
#define PORT_PORTOS_H
|
||||
|
||||
#include "utils/dynamic_loader.h"
|
||||
#include "dl.h"
|
||||
|
||||
/* dynloader.c */
|
||||
/*
|
||||
* New dynamic loader.
|
||||
@ -33,4 +30,7 @@
|
||||
|
||||
extern void init_address_fixup(void);
|
||||
|
||||
/* strdup.c: strdup() is not part of libc on Ultrix */
|
||||
extern char* strdup(char const*);
|
||||
|
||||
#endif /* PORT_PORTOS_H */
|
||||
|
@ -7,14 +7,18 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.1.1.1 1996/07/09 06:21:45 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.2 1996/11/26 03:19:04 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include <utils/palloc.h>
|
||||
|
||||
#include "port-protos.h"
|
||||
|
||||
char *
|
||||
strdup(char *string)
|
||||
strdup(char const *string)
|
||||
{
|
||||
char *nstr;
|
||||
|
||||
|
@ -7,10 +7,13 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.2 1996/11/24 04:44:17 bryanh Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.3 1996/11/26 03:19:12 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "c.h"
|
||||
|
||||
#include "utils/mcxt.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
.include <postgres.global.mk>
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../../backend/tmp
|
||||
CFLAGS+= -I${.CURDIR}/../../backend/tmp -I${.CURDIR}/../../backend/port/${PORTNAME}
|
||||
|
||||
PROG= pg4_dump
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "postgres.h"
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq/auth.h"
|
||||
#include <port-protos.h> /* for strdup () *(
|
||||
|
||||
#include "pg_dump.h"
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "tmp/postgres.h"
|
||||
#include "tmp/libpq-fe.h"
|
||||
#include "libpq/auth.h"
|
||||
#include <port-protos.h> /* for strdup () */
|
||||
|
||||
#include "pg_dump.h"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.8 1996/11/12 06:10:37 bryanh Exp $
|
||||
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.9 1996/11/26 03:19:36 bryanh Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -15,6 +15,8 @@ SRCDIR= ../..
|
||||
include ../Makefile.global
|
||||
include ../../Makefile.global
|
||||
|
||||
CFLAGS+= -I../../backend/port/${PORTNAME}
|
||||
|
||||
OBJS= pg_dump.o common.o
|
||||
|
||||
all: submake pg_dump
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.7 1996/11/04 03:59:53 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.8 1996/11/26 03:19:40 bryanh Exp $
|
||||
*
|
||||
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
||||
*
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
#include "postgres.h"
|
||||
#include "libpq-fe.h"
|
||||
#include <port-protos.h> /* for strdup() */
|
||||
|
||||
#include "pg_dump.h"
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.16 1996/11/20 22:32:55 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.17 1996/11/26 03:19:45 bryanh Exp $
|
||||
*
|
||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||
*
|
||||
@ -54,6 +54,7 @@
|
||||
#include "postgres.h"
|
||||
#include "access/htup.h"
|
||||
#include "libpq-fe.h"
|
||||
#include <port-protos.h> /* for strdup() */
|
||||
|
||||
#include "pg_dump.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pg_dump.h,v 1.7 1996/10/07 03:30:40 scrappy Exp $
|
||||
* $Id: pg_dump.h,v 1.8 1996/11/26 03:19:49 bryanh Exp $
|
||||
*
|
||||
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
||||
*
|
||||
@ -158,7 +158,6 @@ extern void flagInhAttrs(TableInfo* tbinfo, int numTables,
|
||||
InhInfo* inhinfo, int numInherits);
|
||||
|
||||
extern void check_conn_and_db(void);
|
||||
extern char* dupstr(const char *s);
|
||||
extern int strInArray(const char* pattern, char** arr, int arr_size);
|
||||
extern void parseArgTypes(char **argtypes, const char* str);
|
||||
extern int isArchiveName(const char*);
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.13 1996/11/13 10:35:26 bryanh Exp $
|
||||
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.14 1996/11/26 03:19:54 bryanh Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -16,7 +16,8 @@ include ../../Makefile.global
|
||||
|
||||
INCLUDE_OPT:= \
|
||||
-I$(LIBPQDIR) \
|
||||
-I../../include
|
||||
-I../../include \
|
||||
-I../../backend/port/$(PORTNAME)
|
||||
|
||||
CFLAGS+= $(INCLUDE_OPT)
|
||||
#
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.33 1996/11/24 04:44:24 bryanh Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.34 1996/11/26 03:19:58 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -23,8 +23,8 @@
|
||||
#include "postgres.h"
|
||||
#include "libpq-fe.h"
|
||||
#include "stringutils.h"
|
||||
|
||||
#include "psqlHelp.h"
|
||||
#include <port-protos.h> /* for strdup() */
|
||||
|
||||
#ifdef NOREADLINE
|
||||
#include "rlstubs.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.5 1996/11/14 16:08:05 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.6 1996/11/26 03:20:06 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -15,6 +15,9 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <port-protos.h> /* for strdup() */
|
||||
|
||||
#include "stringutils.h"
|
||||
|
||||
/* all routines assume null-terminated strings! */
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: stringutils.h,v 1.2 1996/07/28 07:08:15 scrappy Exp $
|
||||
* $Id: stringutils.h,v 1.3 1996/11/26 03:20:08 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -31,11 +31,6 @@ extern char *leftTrim(char *s);
|
||||
extern char *rightTrim(char *s);
|
||||
extern char *doubleTrim(char *s);
|
||||
|
||||
/* dupstr : copies a string, while making room for it */
|
||||
/* the CALLER is responsible for freeing the space */
|
||||
/* returns NULL if the argument is NULL */
|
||||
extern char *dupstr(char *s);
|
||||
|
||||
#ifdef STRINGUTILS_TEST
|
||||
extern void testStringUtils();
|
||||
#endif
|
||||
|
@ -37,6 +37,8 @@
|
||||
* @(#)utils.h 8.3 (Berkeley) 3/20/94
|
||||
*/
|
||||
|
||||
#include "config.h" /* HAVE_MEMMOVE */
|
||||
|
||||
/* utility definitions */
|
||||
#define DUPMAX 100000000 /* xxx is this right? */
|
||||
#define INFINITY (DUPMAX + 1)
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: dynamic_loader.h,v 1.2 1996/11/04 08:14:05 scrappy Exp $
|
||||
* $Id: dynamic_loader.h,v 1.3 1996/11/26 03:20:17 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -15,6 +15,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <postgres.h>
|
||||
|
||||
#ifdef MIN
|
||||
#undef MIN
|
||||
#undef MAX
|
||||
|
@ -6,13 +6,15 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: palloc.h,v 1.2 1996/10/31 09:51:28 scrappy Exp $
|
||||
* $Id: palloc.h,v 1.3 1996/11/26 03:20:23 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef PALLOC_H
|
||||
#define PALLOC_H
|
||||
|
||||
#include <c.h>
|
||||
|
||||
extern void* palloc(Size size);
|
||||
extern void pfree(void *pointer);
|
||||
extern void *repalloc(void *pointer, Size size);
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.18 1996/11/17 19:27:38 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.19 1996/11/26 03:20:33 bryanh Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -15,7 +15,7 @@ SRCDIR= ..
|
||||
include ../Makefile.global
|
||||
|
||||
# We need the backend directory here for its fmgr.h
|
||||
INCLUDE_OPT= -I../include -I../backend
|
||||
INCLUDE_OPT= -I../include -I../backend -I../backend/port/$(PORTNAME)
|
||||
|
||||
CFLAGS+= $(INCLUDE_OPT)
|
||||
|
||||
@ -73,7 +73,7 @@ postgres.h: ../include/postgres.h
|
||||
echo "#define NAMEDATALEN $(NAMEDATALEN)" >> postgres.h
|
||||
echo "#define OIDNAMELEN $(OIDNAMELEN)" >> postgres.h
|
||||
cat ../include/postgres.h >> postgres.h
|
||||
|
||||
|
||||
c.h: ../include/c.h
|
||||
rm -f c.h
|
||||
echo "#undef PORTNAME" > c.h
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.19 1996/11/14 10:25:50 bryanh Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20 1996/11/26 03:20:35 bryanh Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -30,11 +30,12 @@
|
||||
#include "fe-auth.h"
|
||||
#include "libpq-fe.h"
|
||||
|
||||
#include <port-protos.h> /* for strdup() */
|
||||
|
||||
#if defined(ultrix4) || defined(next)
|
||||
/* ultrix is lame and doesn't have strdup in libc for some reason */
|
||||
/* [TRH] So doesn't NEXTSTEP. But whaddaya expect for a non-ANSI
|
||||
standard function? (My, my. Touchy today, are we?) */
|
||||
static
|
||||
char *
|
||||
strdup(const char *string)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user