*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#include "utils/lsyscache.h"
#include "storage/lmgr.h"
+#include "port-protos.h" /* strdup() */
+
struct {
char *field;
int code;
# 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 $
#
#-------------------------------------------------------------------------
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)
* 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"
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#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>
*
*
* 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"
*
* 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.
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 */
*
*
* 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;
*
*
* 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"
.include <postgres.global.mk>
-CFLAGS+= -I${.CURDIR}/../../backend/tmp
+CFLAGS+= -I${.CURDIR}/../../backend/tmp -I${.CURDIR}/../../backend/port/${PORTNAME}
PROG= pg4_dump
#include "postgres.h"
#include "libpq-fe.h"
#include "libpq/auth.h"
+#include <port-protos.h> /* for strdup () *(
#include "pg_dump.h"
#include "tmp/postgres.h"
#include "tmp/libpq-fe.h"
#include "libpq/auth.h"
+#include <port-protos.h> /* for strdup () */
#include "pg_dump.h"
#
#
# 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 $
#
#-------------------------------------------------------------------------
include ../Makefile.global
include ../../Makefile.global
+CFLAGS+= -I../../backend/port/${PORTNAME}
+
OBJS= pg_dump.o common.o
all: submake pg_dump
*
*
* 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
*
#include "postgres.h"
#include "libpq-fe.h"
+#include <port-protos.h> /* for strdup() */
#include "pg_dump.h"
*
*
* 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
*
#include "postgres.h"
#include "access/htup.h"
#include "libpq-fe.h"
+#include <port-protos.h> /* for strdup() */
#include "pg_dump.h"
*
* 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
*
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*);
#
#
# 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 $
#
#-------------------------------------------------------------------------
INCLUDE_OPT:= \
-I$(LIBPQDIR) \
- -I../../include
+ -I../../include \
+ -I../../backend/port/$(PORTNAME)
CFLAGS+= $(INCLUDE_OPT)
#
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "libpq-fe.h"
#include "stringutils.h"
-
#include "psqlHelp.h"
+#include <port-protos.h> /* for strdup() */
#ifdef NOREADLINE
#include "rlstubs.h"
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
+
+#include <port-protos.h> /* for strdup() */
+
#include "stringutils.h"
/* all routines assume null-terminated strings! */
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
* @(#)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)
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#include <sys/types.h>
+#include <postgres.h>
+
#ifdef MIN
#undef MIN
#undef MAX
*
* 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);
#
#
# 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 $
#
#-------------------------------------------------------------------------
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)
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#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)
{