Subject: Postgres on AIX

From: [email-masked] (Postgres)
Date: Thu, 14 Jan 93 09:09:04 -0800

Today, Postgres is running in AIX 3.2.  Of course, I have not already tested
it so much, so I am very happy, yet...

Rafael.

---

From: [email-masked] (Postgres)
Date: Thu, 21 Jan 1993 14:11:37 -0600

That is the diff file obtained when comparing the new src directory with
the original one; the command was diff -r -c src src.original in AIX 3.2:

------------------------------ cut here --------------------------------------
diff -r -c src/access/common/heapvalid.c src.original/access/common/heapvalid.c
*** src/access/common/heapvalid.c	Wed Dec  9 12:21:15 1992
--- src.original/access/common/heapvalid.c	Thu Aug 27 01:29:12 1992
***************
*** 60,66 ****
      int		test;
  
      for (; nkeys--; keys++) {
! 	atp = heap_getattr(t, InvalidBuffer, keys->sk_attnum,  tupdesc, &isnull);
  	
  	if (isnull)
  	    /* XXX eventually should check if SK_ISNULL */
--- 60,67 ----
      int		test;
  
      for (; nkeys--; keys++) {
! 	atp = heap_getattr(t, InvalidBuffer,
! 			   keys->sk_attnum,  tupdesc, &isnull);
  	
  	if (isnull)
  	    /* XXX eventually should check if SK_ISNULL */
diff -r -c src/executor/ex_procnode.c src.original/executor/ex_procnode.c
*** src/executor/ex_procnode.c	Thu Dec 10 08:22:05 1992
--- src.original/executor/ex_procnode.c	Thu Aug 27 01:28:34 1992
***************
*** 191,203 ****
  #else /*EXEC_ASSIGNDEBUGHOOKS*/
  
  #define INIT_WITH_HOOKS(n,s) \
!     result = (List) CppConcat(ExecInit,n)((n) node, estate, parent);
  
  #define PROC_WITH_HOOKS(f,n,s) \
      result = (TupleTableSlot) f((n) node);
  
  #define END_WITH_HOOKS(n,s) \
!     CppConcat(ExecEnd,n)((n) node);
  	
  #endif /*EXEC_ASSIGNDEBUGHOOKS*/
  
--- 191,203 ----
  #else /*EXEC_ASSIGNDEBUGHOOKS*/
  
  #define INIT_WITH_HOOKS(n,s) \
!     result = (List) CppIdentity(ExecInit)n((n) node, estate, parent);
  
  #define PROC_WITH_HOOKS(f,n,s) \
      result = (TupleTableSlot) f((n) node);
  
  #define END_WITH_HOOKS(n,s) \
!     CppIdentity(ExecEnd)n((n) node);
  	
  #endif /*EXEC_ASSIGNDEBUGHOOKS*/
  
diff -r -c src/lib/Gen/Gen_accessors.sh src.original/lib/Gen/Gen_accessors.sh
*** src/lib/Gen/Gen_accessors.sh	Wed Dec  9 11:35:53 1992
--- src.original/lib/Gen/Gen_accessors.sh	Thu Aug 27 01:29:45 1992
***************
*** 43,49 ****
  #define CppConcat(a,b)CppIdentity(a)b
  
  #define	SETACCESSOR(_nodetype_,_fieldname_,_fieldtype_) \
! !define \
  CppConcat(set_,_fieldname_)(node, value) \
      { \
  	NODEAssertArg(IsA(node,_nodetype_)); \
--- 43,49 ----
  #define CppConcat(a,b)CppIdentity(a)b
  
  #define	SETACCESSOR(_nodetype_,_fieldname_,_fieldtype_) \
! #define \
  CppConcat(set_,_fieldname_)(node, value) \
      { \
  	NODEAssertArg(IsA(node,_nodetype_)); \
***************
*** 51,57 ****
      }
  
  #define	GETACCESSOR(_nodetype_,_fieldname_,_fieldtype_) \
! !define CppConcat(get_,_fieldname_)(node) ((node)->_fieldname_)
  EOF
  
  # ----------------
--- 51,57 ----
      }
  
  #define	GETACCESSOR(_nodetype_,_fieldname_,_fieldtype_) \
! #define CppConcat(get_,_fieldname_)(node) ((node)->_fieldname_)
  EOF
  
  # ----------------
***************
*** 78,84 ****
  $SED -f $SEDTMP | \
  $CAT $CTMP1 - | \
  $CPP -P | \
- $SED 's/^!/#/' | \
  $SED 's/T_ /T_/' | \
  $CB | \
  $EGREP -v '^$'
--- 78,83 ----
Only in src/lib/H/nodes: execnodes.gen
Only in src/lib/H/nodes: plannodes.gen
Only in src/lib/H/nodes: primnodes.gen
Only in src/lib/H/nodes: relation.gen
diff -r -c src/lib/H/storage/ipc.h src.original/lib/H/storage/ipc.h
*** src/lib/H/storage/ipc.h	Thu Dec 10 15:34:59 1992
--- src.original/lib/H/storage/ipc.h	Thu Aug 27 01:30:44 1992
***************
*** 37,51 ****
  #endif /* sprite */
  #endif
  
- #ifdef aix
- union semun {
-     int val;
-     struct semid_ds *buf;
-     unsigned short *array;
- };
- #endif /* aix */
- 
- 
  typedef uint16	SystemPortAddress;

--- 37,42 ----
diff -r -c src/lib/H/support/bkint.h src.original/lib/H/support/bkint.h
*** src/lib/H/support/bkint.h	Thu Dec 10 17:06:07 1992
--- src.original/lib/H/support/bkint.h	Thu Aug 27 01:30:49 1992
***************
*** 25,30 ****
--- 25,31 ----
  #include "utils/log.h"
  #include "utils/rel.h"
  
+ extern char *calloc();
  #define ALLOC(t, c)	(t *)calloc((unsigned)(c), sizeof(t))
  
  #define FIRST_TYPE_OID 16	/* OID of the first type */
***************
*** 64,69 ****
--- 65,72 ----
  
  #define EMITPROMPT printf("> ")
  
+ char		*strcpy(), *strncpy(), *strcat(), *strncat();
+ char		*sprintf();
  extern          int Int_yylval;
  
  /* ami_sup.c */
diff -r -c src/lib/H/tmp/c.h src.original/lib/H/tmp/c.h
*** src/lib/H/tmp/c.h	Thu Dec 10 17:16:56 1992
--- src.original/lib/H/tmp/c.h	Thu Aug 27 01:51:41 1992
***************
*** 47,54 ****
  
  #define C_H	"$Header: /private/postgres/src/lib/H/tmp/RCS/c.h,v 1.39 1992/07/13 07:40:12 hong Exp $"
  
- #include <stddef.h>
- 
  /* ----------------------------------------------------------------
   *		Section 1:  palloc debugging defines
   * ----------------------------------------------------------------
--- 47,52 ----
***************
*** 229,235 ****
   * CppConcat --
   *	Concatenate two arguments together, using the C preprocessor.
   */
! #if defined(sprite) || defined(aix)
  #define CppConcat(x, y)         x/**/y
  #define CppConcat0(x, y)        x/**/y
  #define CppConcat1(x, y)        x/**/y
--- 227,233 ----
   * CppConcat --
   *	Concatenate two arguments together, using the C preprocessor.
   */
! #ifdef sprite
  #define CppConcat(x, y)         x/**/y
  #define CppConcat0(x, y)        x/**/y
  #define CppConcat1(x, y)        x/**/y
***************
*** 243,249 ****
  #define CppConcat2(x, y)	CppIdentity(x)y
  #define CppConcat3(x, y)	CppIdentity(x)y
  #define CppConcat4(x, y)	CppIdentity(x)y
! #endif /* sprite || aix */
  
  /*
   * const --
--- 241,247 ----
  #define CppConcat2(x, y)	CppIdentity(x)y
  #define CppConcat3(x, y)	CppIdentity(x)y
  #define CppConcat4(x, y)	CppIdentity(x)y
! #endif /* sprite */
  
  /*
   * const --
***************
*** 474,493 ****
  ));
  #else /* PALLOC_DEBUG */
  extern
- #ifdef aix
- void *
- #else
  char *	/* as defined in /usr/lib/lint/llib-lc */
- #endif /* aix */
  malloc ARGS((
  	Size	nBytes
  ));
  extern
- #ifdef aix
- void
- #else
  /* void */      /* as defined in /usr/lib/lint/llib-lc */
- #endif /* aix */
  free ARGS((
          char    *p
  ));
--- 472,483 ----
***************
*** 674,682 ****
   * offsetof --
   *	Offset of a structure/union field within that structure/union.
   */
- #ifndef offsetof
  #define offsetof(type, field)	((long) &((type *)0)->field)
- #endif
  
  /*
   * lengthof --
--- 664,670 ----
diff -r -c src/lib/H/tmp/datum.h src.original/lib/H/tmp/datum.h
*** src/lib/H/tmp/datum.h	Thu Dec 10 17:14:20 1992
--- src.original/lib/H/tmp/datum.h	Thu Aug 27 01:31:13 1992
***************
*** 55,61 ****
  
  #endif
  
! #if defined(sequent) || defined(mips) || defined(sun) || defined(sparc) || defined(aix)
  
  #define GET_1_BYTE(datum)   (((Datum) (datum)) & 0x000000ff)
  #define GET_2_BYTES(datum)  (((Datum) (datum)) & 0x0000ffff)
--- 55,61 ----
  
  #endif
  
! #if defined(sequent) || defined(mips) || defined(sun) || defined(sparc)
  
  #define GET_1_BYTE(datum)   (((Datum) (datum)) & 0x000000ff)
  #define GET_2_BYTES(datum)  (((Datum) (datum)) & 0x0000ffff)
diff -r -c src/lib/H/tmp/postgres.h src.original/lib/H/tmp/postgres.h
*** src/lib/H/tmp/postgres.h	Thu Dec 10 17:14:45 1992
--- src.original/lib/H/tmp/postgres.h	Thu Aug 27 01:31:16 1992
***************
*** 279,285 ****
  
  #endif
  
! #if defined(sequent) || defined(mips) || defined(sun) || defined(sparc) || defined(aix)
  
  #define GET_1_BYTE(datum)   (((Datum) (datum)) & 0x000000ff)
  #define GET_2_BYTES(datum)  (((Datum) (datum)) & 0x0000ffff)
--- 279,285 ----
  
  #endif
  
! #if defined(sequent) || defined(mips) || defined(sun) || defined(sparc)
  
  #define GET_1_BYTE(datum)   (((Datum) (datum)) & 0x000000ff)
  #define GET_2_BYTES(datum)  (((Datum) (datum)) & 0x0000ffff)
***************
*** 552,558 ****
  #define OID	oid
  #define	REGPROC	oid		/* for now */
  
! #if defined(sun) || defined(sequent) || defined(mips) || defined(aix)
  typedef	char	*DATUM;
  #else
  typedef	union {
--- 552,558 ----
  #define OID	oid
  #define	REGPROC	oid		/* for now */
  
! #if defined(sun) || defined(sequent) || defined(mips)
  typedef	char	*DATUM;
  #else
  typedef	union {
diff -r -c src/lib/H/utils/nabstime.h src.original/lib/H/utils/nabstime.h
*** src/lib/H/utils/nabstime.h	Thu Dec 10 16:57:05 1992
--- src.original/lib/H/utils/nabstime.h	Thu Aug 27 01:31:04 1992
***************
*** 93,103 ****
  
  /* keep this struct small; it gets used a lot */
  typedef struct {
- #ifdef aix
- 	char *token;
- #else
  	char token[TOKMAXLEN];
- #endif /* aix */
  	char type;
  	char value;		/* this may be unsigned, alas */
  } datetkn;
--- 93,99 ----
diff -r -c src/lib/catalog/pg_aggregate.c src.original/lib/catalog/pg_aggregate.c
*** src/lib/catalog/pg_aggregate.c	Thu Dec 10 08:35:12 1992
--- src.original/lib/catalog/pg_aggregate.c	Thu Aug 27 01:31:21 1992
***************
*** 18,24 ****
  
   RcsId("$Header: /private/postgres/src/lib/catalog/RCS/pg_aggregate.c,v 1.6 1991/11/14 15:07:10 jolly Exp $");
  
- #include <math.h>
  #include "access/ftup.h"
  #include "access/heapam.h"
  #include "access/relscan.h"
--- 18,23 ----
diff -r -c src/lib/libpq/be-fsstubs.c src.original/lib/libpq/be-fsstubs.c
*** src/lib/libpq/be-fsstubs.c	Thu Dec 10 08:49:28 1992
--- src.original/lib/libpq/be-fsstubs.c	Thu Aug 27 01:31:27 1992
***************
*** 81,87 ****
   *       partial blocks).
   */
  
- #include <signal.h>
  #include "tmp/c.h"
  #include "tmp/postgres.h"
  #include "tmp/simplelists.h"
--- 81,86 ----
diff -r -c src/lib/libpq/be-pqexec.c src.original/lib/libpq/be-pqexec.c
*** src/lib/libpq/be-pqexec.c	Thu Dec 10 08:52:01 1992
--- src.original/lib/libpq/be-pqexec.c	Thu Aug 27 01:31:27 1992
***************
*** 18,24 ****
   * ----------------------------------------------------------------
   */
  
- #include <math.h>
  #include "tmp/postgres.h"
  
  RcsId ("$Header: /private/postgres/src/lib/libpq/RCS/be-pqexec.c,v 1.10 1992/06/28 03:49:07 mao Exp $");
--- 18,23 ----
diff -r -c src/lib/libpq/fe-pqufs.c src.original/lib/libpq/fe-pqufs.c
*** src/lib/libpq/fe-pqufs.c	Thu Dec 10 08:49:53 1992
--- src.original/lib/libpq/fe-pqufs.c	Thu Aug 27 01:31:28 1992
***************
*** 62,68 ****
   * as queries.
   */
  
- #include <signal.h>
  #include "tmp/simplelists.h"
  #include "tmp/libpq.h"
  #include "tmp/libpq-fe.h"
--- 62,67 ----
diff -r -c src/parser/parse_query.c src.original/parser/parse_query.c
*** src/parser/parse_query.c	Thu Dec 10 09:32:14 1992
--- src.original/parser/parse_query.c	Thu Aug 27 01:28:46 1992
***************
*** 263,269 ****
  	LispValue tall = LispNil;
  	Resdom resnode;
  	Var varnode;
-         extern LispValue p_rtable;
  	LispValue temp = LispNil;
  	int i,maxattrs,first_resno;
  	int type_id,type_len,vnum;
--- 263,268 ----
***************
*** 737,743 ****
  {
  	extern char yytext[];
  	extern LispValue yychar;
-         extern char *Ch;
          char *temp = yytext;
  	extern int yyleng;
  	int i;
--- 736,741 ----
***************
*** 763,769 ****
  
  StripRangeTable()
  {
-         extern LispValue p_rtable;
  	LispValue temp;
  	temp = p_rtable;
  	
--- 761,766 ----
diff -r -c src/parser/ylib.c src.original/parser/ylib.c
*** src/parser/ylib.c	Thu Dec 10 09:44:24 1992
--- src.original/parser/ylib.c	Thu Aug 27 01:28:47 1992
***************
*** 2,8 ****
  
  #include <strings.h>
  #include <stdio.h>
- #include <math.h>
  #include <pwd.h>
  
  #include "utils/log.h"
--- 2,7 ----
***************
*** 703,709 ****
      List entry = NULL;
      bool IsConcatenation = false;
      List existing_varnos = NULL;
-     extern List p_rtable;
      extern List RangeTablePositions();
  
      /* from_list will be a list of strings */
--- 702,707 ----
diff -r -c src/planner/plan/initsplan.c src.original/planner/plan/initsplan.c
*** src/planner/plan/initsplan.c	Thu Dec 10 09:47:58 1992
--- src.original/planner/plan/initsplan.c	Thu Aug 27 01:31:36 1992
***************
*** 82,88 ****
  
      foreach (xtl,tlist) {
  	TLE entry;
! 	/*(LispValue)*/entry = CAR(xtl);
  
  #ifdef NO_PLEASE
          if(!Quiet) {
--- 82,88 ----
  
      foreach (xtl,tlist) {
  	TLE entry;
! 	(LispValue)entry = CAR(xtl);
  
  #ifdef NO_PLEASE
          if(!Quiet) {
diff -r -c src/planner/util/pathnode.c src.original/planner/util/pathnode.c
*** src/planner/util/pathnode.c	Fri Dec 11 07:57:47 1992
--- src.original/planner/util/pathnode.c	Thu Aug 27 01:31:46 1992
***************
*** 425,431 ****
       set_keys ((Path)pathnode,keys);
       set_pathsortkey ((Path)pathnode,(SortKey)NULL);
       set_joinid((Path)pathnode,LispNil);
!      set_outerjoincost((Path)pathnode,(Cost)0);
       set_p_ordering((Path)pathnode,LispNil);
       set_locclauseinfo((Path)pathnode,LispNil);
  
--- 425,431 ----
       set_keys ((Path)pathnode,keys);
       set_pathsortkey ((Path)pathnode,(SortKey)NULL);
       set_joinid((Path)pathnode,LispNil);
!      set_outerjoincost((Path)pathnode,(Cost)NULL);
       set_p_ordering((Path)pathnode,LispNil);
       set_locclauseinfo((Path)pathnode,LispNil);
  
Only in src/port: aix
diff -r -c src/rewrite/RewriteSupport.c src.original/rewrite/RewriteSupport.c
*** src/rewrite/RewriteSupport.c	Thu Dec 10 12:23:11 1992
--- src.original/rewrite/RewriteSupport.c	Thu Aug 27 01:28:51 1992
***************
*** 9,15 ****
   * ----------------------------------------------------------------
   */
  
- #include <math.h>
  #include "catalog/catname.h"
  #include "catalog/pg_rewrite.h"
  #include "utils/rel.h"			/* Relation, RelationData ... */
--- 9,14 ----
diff -r -c src/rules/prs2/prs2explain.c src.original/rules/prs2/prs2explain.c
*** src/rules/prs2/prs2explain.c	Thu Dec 10 14:56:45 1992
--- src.original/rules/prs2/prs2explain.c	Thu Aug 27 01:32:13 1992
***************
*** 161,167 ****
       * find the scan relation's name
       */
      strncpy(relName.data,
! 	RelationGetRelationTupleForm(relation)->relname.data, 16);

      /*
--- 161,167 ----
       * find the scan relation's name
       */
      strncpy(relName.data,
! 	RelationGetRelationTupleForm(relation)->relname, 16);

      /*
Only in src/scripts: vacuum
diff -r -c src/support/pagedoc.c src.original/support/pagedoc.c
*** src/support/pagedoc.c	Thu Dec 10 08:53:50 1992
--- src.original/support/pagedoc.c	Thu Aug 27 01:28:57 1992
***************
*** 184,190 ****
      pagedoc(fd, level, reltype);
  
      if (close(fd) < 0) {
! 	fprintf(stderr,"close: ");
  	perror(relname);
  	fflush(stderr);
  	exit (1);
--- 184,190 ----
      pagedoc(fd, level, reltype);
  
      if (close(fd) < 0) {
! 	fprintf("close: ");
  	perror(relname);
  	fflush(stderr);
  	exit (1);
diff -r -c src/support/postmaster.c src.original/support/postmaster.c
*** src/support/postmaster.c	Fri Dec 11 09:47:26 1992
--- src.original/support/postmaster.c	Thu Aug 27 01:28:58 1992
***************
*** 39,47 ****
  #include <errno.h>
  #include <fcntl.h>
  #include <stdio.h>
- #ifdef aix
- #include <unistd.h>
- #endif /* aix */
  #include <netdb.h>
  #if !sprite
  #include <sys/un.h>
--- 39,44 ----
***************
*** 193,200 ****
  char	*argv[];
  {
    char  	*getenv();
!   /* char		getopt(); */
!   int		opt;
    int		serverMask;
    char		*hostName;
    int		status;
--- 190,197 ----
  char	*argv[];
  {
    char  	*getenv();
!   char		getopt();
!   char		opt;
    int		serverMask;
    char		*hostName;
    int		status;
diff -r -c src/utils/adt/date.c src.original/utils/adt/date.c
*** src/utils/adt/date.c	Fri Dec 11 08:13:01 1992
--- src.original/utils/adt/date.c	Thu Aug 27 01:32:49 1992
***************
*** 13,21 ****
   * XXX	definitions in h/tim.h may need to be rethought also.
   */
  
- #define _POSIX_SOURCE
- #include <time.h>
- #undef _POSIX_SOURCE
  #include <ctype.h>
  #include <stdio.h>
  #include <sys/time.h>
--- 13,18 ----
***************
*** 218,223 ****
--- 215,224 ----
  	AbsoluteTime	datetime;
  	/* seconds in respect of Greenwich Mean Time GMT!! */
  {
+ 	extern	struct tm	*gmtime();
+ 	extern	char		*asctime();
+ 	extern	char		*index();
+ 	extern	char		*strcpy();
  	struct tm		*brokentime;
  	/*points to static structure in gmtime*/
  	char			*datestring, *p;
***************
*** 328,337 ****
  char	*
  reltimeout(timevalue)
  	int32 /* RelativeTime */	timevalue;
! {	
! #ifndef aix
! 	extern char	*sprintf();
! #endif /* aix */
  	char		*timestring;
  	long		quantity;
  	register int	i;
--- 329,335 ----
  char	*
  reltimeout(timevalue)
  	int32 /* RelativeTime */	timevalue;
! {	extern char	*sprintf();
  	char		*timestring;
  	long		quantity;
  	register int	i;
***************
*** 403,408 ****
--- 401,408 ----
  tintervalout(interval)
  	TimeInterval	interval;
  {	extern	char	*abstimeout();
+ 	extern	char	*strcat();
+ 	extern	char	*strcpy();
  	char	*i_str, *p;
  
  	i_str = (char	*) palloc( T_INTERVAL_LEN );  /* ['...' '...'] */
***************
*** 887,892 ****
--- 887,894 ----
  	int	*sign, *unitnr;
  	long	*quantity;
  {
+ 	extern	int	strncmp();
+ 	extern 	char	*strcpy();
  	register char	*p;
  	register char	c;
  	int		i;
diff -r -c src/utils/adt/nabstime.c src.original/utils/adt/nabstime.c
*** src/utils/adt/nabstime.c	Thu Dec 10 16:48:21 1992
--- src.original/utils/adt/nabstime.c	Thu Aug 27 01:32:51 1992
***************
*** 428,440 ****
  #ifdef OLD_DEC
      tzoneStr = "";
  #else
- #ifdef aix
-     tzoneStr = "";
- #else
      tzoneStr = timeValp->tm_zone;
! #endif /* aix */
! #endif /* OLD_DEC */
! #endif /* sequent */
  
      sprintf(outStr,
  	    "%s %s %d %2.2d:%2.2d:%2.2d %d %s",
--- 428,436 ----
  #ifdef OLD_DEC
      tzoneStr = "";
  #else
      tzoneStr = timeValp->tm_zone;
! #endif
! #endif
  
      sprintf(outStr,
  	    "%s %s %d %2.2d:%2.2d:%2.2d %d %s",
***************
*** 628,637 ****
  }
  
  /* Globals */
! #ifndef aix
! static 
! #endif
! int dtok_numparsed;
  
  /* forwards */
  extern datetkn datetktbl[];
--- 624,630 ----
  }
  
  /* Globals */
! static int dtok_numparsed;
  
  /* forwards */
  extern datetkn datetktbl[];
***************
*** 725,859 ****
   * entries by 10 and truncate the text field at MAXTOKLEN characters.
   * the text field is not guaranteed to be NUL-terminated.
   */
! #ifndef aix
! static 
! #endif
! datetkn datetktbl[] = {
  /*	text		token	lexval */
! {	"acsst",	DTZ,	63		/* Cent. Australia */},
! {	"acst",		TZ,	57		/* Cent. Australia */},
! {	"adt",		DTZ,	NEG(18)	/* Atlantic Daylight Time */},
! {	"aesst",	DTZ,	66		/* E. Australia */},
! {	"aest",		TZ,	60		/* Australia Eastern Std Time */},
! {	"ahst",		TZ,	60		/* Alaska-Hawaii Std Time */},
! {	"am",		AMPM,	AM},
! {	"apr",		MONTH,	4},
! {	"april",	MONTH,	4},
! {	"ast",		TZ,	NEG(24)	/* Atlantic Std Time (Canada) */},
! {	"at",		IGNORE,	0		/* "at" (throwaway) */},
! {	"aug",		MONTH,	8},
! {	"august",	MONTH,	8},
! {	"awsst",	DTZ,	54		/* W. Australia */},
! {	"awst",		TZ,	48		/* W. Australia */},
! {	"bst",		TZ,	6		/* British Summer Time */},
! {	"bt",		TZ,	18		/* Baghdad Time */},
! {	"cadt",		DTZ,	63		/* Central Australian DST */},
! {	"cast",		TZ,	57		/* Central Australian ST */},
! {	"cat",		TZ,	NEG(60)	/* Central Alaska Time */},
! {	"cct",		TZ,	48		/* China Coast */},
! {	"cdt",		DTZ,	NEG(30)	/* Central Daylight Time */},
! {	"cet",		TZ,	6		/* Central European Time */},
! {	"cetdst",	DTZ,	12		/* Central European Dayl.Time */},
! {	"cst",		TZ,	NEG(36)	/* Central Standard Time */},
! {	"dec",		MONTH,	12},
! {	"decemb",	MONTH,	12},
! {	"dnt",		TZ,	6		/* Dansk Normal Tid */},
! {	"dst",		IGNORE,	0},
! {	"east",		TZ,	NEG(60)	/* East Australian Std Time */},
! {	"edt",		DTZ,	NEG(24)	/* Eastern Daylight Time */},
! {	"eet",		TZ,	12		/* East. Europe, USSR Zone 1 */},
! {	"eetdst",	DTZ,	18		/* Eastern Europe */},
! {	"est",		TZ,	NEG(30)	/* Eastern Standard Time */},
! {	"feb",		MONTH,	2},
! {	"februa",	MONTH,	2},
! {	"fri",		IGNORE,	5},
! {	"friday",	IGNORE,	5},
! {	"fst",		TZ,	6		/* French Summer Time */},
! {	"fwt",		DTZ,	12		/* French Winter Time  */},
! {	"gmt",		TZ,	0		/* Greenwish Mean Time */},
! {	"gst",		TZ,	60		/* Guam Std Time, USSR Zone 9 */},
! {	"hdt",		DTZ,	NEG(54)	/* Hawaii/Alaska */},
! {	"hmt",		DTZ,	18		/* Hellas ? ? */},
! {	"hst",		TZ,	NEG(60)	/* Hawaii Std Time */},
! {	"idle",		TZ,	72		/* Intl. Date Line, East */},
! {	"idlw",		TZ,	NEG(72)	/* Intl. Date Line, West */},
! {	"ist",		TZ,	12		/* Israel */},
! {	"it",		TZ,	22		/* Iran Time */},
! {	"jan",		MONTH,	1},
! {	"januar",	MONTH,	1},
! {	"jst",		TZ,	54	/* Japan Std Time,USSR Zone 8 */},
! {	"jt",		TZ,	45		/* Java Time */},
! {	"jul",		MONTH,	7},
! {	"july",		MONTH,	7},
! {	"jun",		MONTH,	6},
! {	"june",		MONTH,	6},
! {	"kst",		TZ,	54	/* Korea Standard Time */},
! {	"ligt",		TZ,	60		/* From Melbourne, Australia */},
! {	"mar",		MONTH,	3},
! {	"march",	MONTH,	3},
! {	"may",		MONTH,	5},
! {	"mdt",		DTZ,	NEG(36)	/* Mountain Daylight Time */},
! {	"mest",		DTZ,	12,		/* Middle Europe Summer Time */},
! {	"met",		TZ,	6,		/* Middle Europe Time */},
! {	"metdst",	DTZ,	12,		/* Middle Europe Daylight Time*/},
! {	"mewt",		TZ,	6,		/* Middle Europe Winter Time */},
! {	"mez",		TZ,	6,		/* Middle Europe Zone */},
! {	"mon",		IGNORE,	1,},
! {	"monday",	IGNORE,	1,},
! {	"mst",		TZ,	NEG(42),	/* Mountain Standard Time */},
! {	"mt",		TZ,	51,		/* Moluccas Time */},
! {	"ndt",		DTZ,	NEG(15),	/* Nfld. Daylight Time */},
! {	"nft",		TZ,	NEG(21),	/* Newfoundland Standard Time */},
! {	"nor",		TZ,	6,		/* Norway Standard Time */},
! {	"nov",		MONTH,	11,},
! {	"novemb",	MONTH,	11,},
! {	"nst",		TZ,	NEG(21),	/* Nfld. Standard Time */},
! {	"nt",		TZ,	NEG(66),	/* Nome Time */},
! {	"nzdt",		DTZ,	78,		/* New Zealand Daylight Time */},
! {	"nzst",		TZ,	72,		/* New Zealand Standard Time */},
! {	"nzt",		TZ,	72,		/* New Zealand Time */},
! {	"oct",		MONTH,	10,},
! {	"octobe",	MONTH,	10,},
! {	"on",		IGNORE,	0,		/* "on" (throwaway) */},
! {	"pdt",		DTZ,	NEG(42),	/* Pacific Daylight Time */},
! {	"pm",		AMPM,	PM,},
! {	"pst",		TZ,	NEG(48),	/* Pacific Standard Time */},
! {	"sadt",		DTZ,	63,		/* S. Australian Dayl. Time */},
! {	"sast",		TZ,	57,		/* South Australian Std Time */},
! {	"sat",		IGNORE,	6},
! {	"saturd",	IGNORE,	6},
! {	"sep",		MONTH,	9},
! {	"sept",		MONTH,	9},
! {	"septem",	MONTH,	9},
! {	"set",		TZ,	NEG(6)		/* Seychelles Time ?? */},
! {	"sst",		DTZ,	12		/* Swedish Summer Time */},
! {	"sun",		IGNORE,	0},
! {	"sunday",	IGNORE,	0},
! {	"swt",		TZ,	6		/* Swedish Winter Time  */},
! {	"thu",		IGNORE,	4},
! {	"thur",		IGNORE,	4},
! {	"thurs",	IGNORE,	4},
! {	"thursd",	IGNORE,	4},
! {	"tue",		IGNORE,	2},
! {	"tues",		IGNORE,	2},
! {	"tuesda",	IGNORE,	2},
! {	"ut",		TZ,	0},
! {	"utc",		TZ,	0},
! {	"wadt",		DTZ,	48		/* West Australian DST */},
! {	"wast",		TZ,	42		/* West Australian Std Time */},
! {	"wat",		TZ,	NEG(6)		/* West Africa Time */},
! {	"wdt",		DTZ,	54		/* West Australian DST */},
! {	"wed",		IGNORE,	3},
! {	"wednes",	IGNORE,	3},
! {	"weds",		IGNORE,	3},
! {	"wet",		TZ,	0		/* Western Europe */},
! {	"wetdst",	DTZ,	6		/* Western Europe */},
! {	"wst",		TZ,	48		/* West Australian Std Time */},
! {	"ydt",		DTZ,	NEG(48)	/* Yukon Daylight Time */},
! {	"yst",		TZ,	NEG(54)	/* Yukon Standard Time */},
! {	"zp4",		TZ,	NEG(24)	/* GMT +4  hours. */},
! {	"zp5",		TZ,	NEG(30)	/* GMT +5  hours. */},
! {	"zp6",		TZ,	NEG(36)		/* GMT +6  hours. */}
  };
  
  #if	0
--- 718,849 ----
   * entries by 10 and truncate the text field at MAXTOKLEN characters.
   * the text field is not guaranteed to be NUL-terminated.
   */
! static datetkn datetktbl[] = {
  /*	text		token	lexval */
! 	"acsst",	DTZ,	63,		/* Cent. Australia */
! 	"acst",		TZ,	57,		/* Cent. Australia */
! 	"adt",		DTZ,	NEG(18),	/* Atlantic Daylight Time */
! 	"aesst",	DTZ,	66,		/* E. Australia */
! 	"aest",		TZ,	60,		/* Australia Eastern Std Time */
! 	"ahst",		TZ,	60,		/* Alaska-Hawaii Std Time */
! 	"am",		AMPM,	AM,
! 	"apr",		MONTH,	4,
! 	"april",	MONTH,	4,
! 	"ast",		TZ,	NEG(24),	/* Atlantic Std Time (Canada) */
! 	"at",		IGNORE,	0,		/* "at" (throwaway) */
! 	"aug",		MONTH,	8,
! 	"august",	MONTH,	8,
! 	"awsst",	DTZ,	54,		/* W. Australia */
! 	"awst",		TZ,	48,		/* W. Australia */
! 	"bst",		TZ,	6,		/* British Summer Time */
! 	"bt",		TZ,	18,		/* Baghdad Time */
! 	"cadt",		DTZ,	63,		/* Central Australian DST */
! 	"cast",		TZ,	57,		/* Central Australian ST */
! 	"cat",		TZ,	NEG(60),	/* Central Alaska Time */
! 	"cct",		TZ,	48,		/* China Coast */
! 	"cdt",		DTZ,	NEG(30),	/* Central Daylight Time */
! 	"cet",		TZ,	6,		/* Central European Time */
! 	"cetdst",	DTZ,	12,		/* Central European Dayl.Time */
! 	"cst",		TZ,	NEG(36),	/* Central Standard Time */
! 	"dec",		MONTH,	12,
! 	"decemb",	MONTH,	12,
! 	"dnt",		TZ,	6,		/* Dansk Normal Tid */
! 	"dst",		IGNORE,	0,
! 	"east",		TZ,	NEG(60),	/* East Australian Std Time */
! 	"edt",		DTZ,	NEG(24),	/* Eastern Daylight Time */
! 	"eet",		TZ,	12,		/* East. Europe, USSR Zone 1 */
! 	"eetdst",	DTZ,	18,		/* Eastern Europe */
! 	"est",		TZ,	NEG(30),	/* Eastern Standard Time */
! 	"feb",		MONTH,	2,
! 	"februa",	MONTH,	2,
! 	"fri",		IGNORE,	5,
! 	"friday",	IGNORE,	5,
! 	"fst",		TZ,	6,		/* French Summer Time */
! 	"fwt",		DTZ,	12,		/* French Winter Time  */
! 	"gmt",		TZ,	0,		/* Greenwish Mean Time */
! 	"gst",		TZ,	60,		/* Guam Std Time, USSR Zone 9 */
! 	"hdt",		DTZ,	NEG(54),	/* Hawaii/Alaska */
! 	"hmt",		DTZ,	18,		/* Hellas ? ? */
! 	"hst",		TZ,	NEG(60),	/* Hawaii Std Time */
! 	"idle",		TZ,	72,		/* Intl. Date Line, East */
! 	"idlw",		TZ,	NEG(72),	/* Intl. Date Line, West */
! 	"ist",		TZ,	12,		/* Israel */
! 	"it",		TZ,	22,		/* Iran Time */
! 	"jan",		MONTH,	1,
! 	"januar",	MONTH,	1,
! 	"jst",		TZ,	54,		/* Japan Std Time,USSR Zone 8 */
! 	"jt",		TZ,	45,		/* Java Time */
! 	"jul",		MONTH,	7,
! 	"july",		MONTH,	7,
! 	"jun",		MONTH,	6,
! 	"june",		MONTH,	6,
! 	"kst",		TZ,	54,		/* Korea Standard Time */
! 	"ligt",		TZ,	60,		/* From Melbourne, Australia */
! 	"mar",		MONTH,	3,
! 	"march",	MONTH,	3,
! 	"may",		MONTH,	5,
! 	"mdt",		DTZ,	NEG(36),	/* Mountain Daylight Time */
! 	"mest",		DTZ,	12,		/* Middle Europe Summer Time */
! 	"met",		TZ,	6,		/* Middle Europe Time */
! 	"metdst",	DTZ,	12,		/* Middle Europe Daylight Time*/
! 	"mewt",		TZ,	6,		/* Middle Europe Winter Time */
! 	"mez",		TZ,	6,		/* Middle Europe Zone */
! 	"mon",		IGNORE,	1,
! 	"monday",	IGNORE,	1,
! 	"mst",		TZ,	NEG(42),	/* Mountain Standard Time */
! 	"mt",		TZ,	51,		/* Moluccas Time */
! 	"ndt",		DTZ,	NEG(15),	/* Nfld. Daylight Time */
! 	"nft",		TZ,	NEG(21),	/* Newfoundland Standard Time */
! 	"nor",		TZ,	6,		/* Norway Standard Time */
! 	"nov",		MONTH,	11,
! 	"novemb",	MONTH,	11,
! 	"nst",		TZ,	NEG(21),	/* Nfld. Standard Time */
! 	"nt",		TZ,	NEG(66),	/* Nome Time */
! 	"nzdt",		DTZ,	78,		/* New Zealand Daylight Time */
! 	"nzst",		TZ,	72,		/* New Zealand Standard Time */
! 	"nzt",		TZ,	72,		/* New Zealand Time */
! 	"oct",		MONTH,	10,
! 	"octobe",	MONTH,	10,
! 	"on",		IGNORE,	0,		/* "on" (throwaway) */
! 	"pdt",		DTZ,	NEG(42),	/* Pacific Daylight Time */
! 	"pm",		AMPM,	PM,
! 	"pst",		TZ,	NEG(48),	/* Pacific Standard Time */
! 	"sadt",		DTZ,	63,		/* S. Australian Dayl. Time */
! 	"sast",		TZ,	57,		/* South Australian Std Time */
! 	"sat",		IGNORE,	6,
! 	"saturd",	IGNORE,	6,
! 	"sep",		MONTH,	9,
! 	"sept",		MONTH,	9,
! 	"septem",	MONTH,	9,
! 	"set",		TZ,	NEG(6),		/* Seychelles Time ?? */
! 	"sst",		DTZ,	12,		/* Swedish Summer Time */
! 	"sun",		IGNORE,	0,
! 	"sunday",	IGNORE,	0,
! 	"swt",		TZ,	6,		/* Swedish Winter Time  */
! 	"thu",		IGNORE,	4,
! 	"thur",		IGNORE,	4,
! 	"thurs",	IGNORE,	4,
! 	"thursd",	IGNORE,	4,
! 	"tue",		IGNORE,	2,
! 	"tues",		IGNORE,	2,
! 	"tuesda",	IGNORE,	2,
! 	"ut",		TZ,	0,
! 	"utc",		TZ,	0,
! 	"wadt",		DTZ,	48,		/* West Australian DST */
! 	"wast",		TZ,	42,		/* West Australian Std Time */
! 	"wat",		TZ,	NEG(6),		/* West Africa Time */
! 	"wdt",		DTZ,	54,		/* West Australian DST */
! 	"wed",		IGNORE,	3,
! 	"wednes",	IGNORE,	3,
! 	"weds",		IGNORE,	3,
! 	"wet",		TZ,	0,		/* Western Europe */
! 	"wetdst",	DTZ,	6,		/* Western Europe */
! 	"wst",		TZ,	48,		/* West Australian Std Time */
! 	"ydt",		DTZ,	NEG(48),	/* Yukon Daylight Time */
! 	"yst",		TZ,	NEG(54),	/* Yukon Standard Time */
! 	"zp4",		TZ,	NEG(24),	/* GMT +4  hours. */
! 	"zp5",		TZ,	NEG(30),	/* GMT +5  hours. */
! 	"zp6",		TZ,	NEG(36),	/* GMT +6  hours. */
  };
  
  #if	0
***************
*** 899,908 ****
  	"z",		TZ,	0,		/* UTC */
  #endif
  
! #ifndef aix
! static 
! #endif
! unsigned int szdatetktbl = sizeof datetktbl / sizeof datetktbl[0];

  /*
--- 889,895 ----
  	"z",		TZ,	0,		/* UTC */
  #endif
  
! static unsigned int szdatetktbl = sizeof datetktbl / sizeof datetktbl[0];

  /*
diff -r -c src/utils/adt/regexp.c src.original/utils/adt/regexp.c
*** src/utils/adt/regexp.c	Fri Dec 11 08:40:48 1992
--- src.original/utils/adt/regexp.c	Thu Aug 27 01:32:52 1992
***************
*** 22,37 ****
  #ifdef sprite
  #include "regexp.h"
  #else
! #    ifdef aix
! #	ifdef _XOPEN_SOURCE
! #	undef _XOPEN_SOURCE
! #	endif
! #	define _POSIX_SOURCE
! #	include <regexp.h>
! #	undef _POSIX_SOURCE
! #    else
! #	include <regexp.h>
! #    endif /* aix */
  #endif /* sprite */
  
  /*
--- 22,28 ----
  #ifdef sprite
  #include "regexp.h"
  #else
! #include <regexp.h>
  #endif /* sprite */
  
  /*
diff -r -c src/utils/adt/selfuncs.c src.original/utils/adt/selfuncs.c
*** src/utils/adt/selfuncs.c	Thu Dec 10 16:57:44 1992
--- src.original/utils/adt/selfuncs.c	Thu Aug 27 01:32:53 1992
***************
*** 10,16 ****
  
  #include <stdio.h>
  #include <strings.h>
- #include <math.h>
  
  #include "access/heapam.h"
  #include "access/tqual.h"	/* for NowTimeQual */
--- 10,15 ----
diff -r -c src/utils/adt/varlena.c src.original/utils/adt/varlena.c
*** src/utils/adt/varlena.c	Thu Dec 10 16:59:56 1992
--- src.original/utils/adt/varlena.c	Thu Aug 27 01:32:53 1992
***************
*** 7,13 ****
  
  #include <ctype.h>
  #include <strings.h>
- #include <math.h>
  
  #include "tmp/postgres.h"
  #include "utils/log.h"
--- 7,12 ----
diff -r -c src/utils/cache/relcache.c src.original/utils/cache/relcache.c
*** src/utils/cache/relcache.c	Thu Dec 10 15:56:06 1992
--- src.original/utils/cache/relcache.c	Thu Aug 27 01:32:57 1992
***************
*** 987,993 ****
  {
      int			i;
      Attribute		*p;
-     extern GlobalMemory CacheCxt;
      MemoryContext	oldcxt;
      
      if (relation->rd_isnailed) {
--- 987,992 ----
diff -r -c src/utils/error/elog.c src.original/utils/error/elog.c
*** src/utils/error/elog.c	Thu Dec 10 15:50:26 1992
--- src.original/utils/error/elog.c	Thu Aug 27 01:33:00 1992
***************
*** 66,76 ****
  	char		buf[ELOG_MAXLEN], line[ELOG_MAXLEN];
  	register char	*bp, *cp;
  	extern	int	errno, sys_nerr;
! 	extern	char	*sys_errlist[], *ctime();
! #ifndef aix
! 	extern char     *sprintf();
! #endif /* aix */
! 
  #ifndef PG_STANDALONE
  	extern	FILE	*Pfout;
  #endif /* !PG_STANDALONE */
--- 66,72 ----
  	char		buf[ELOG_MAXLEN], line[ELOG_MAXLEN];
  	register char	*bp, *cp;
  	extern	int	errno, sys_nerr;
! 	extern	char	*sys_errlist[], *ctime(), *sprintf();
  #ifndef PG_STANDALONE
  	extern	FILE	*Pfout;
  #endif /* !PG_STANDALONE */
diff -r -c src/utils/fmgr/dfmgr.c src.original/utils/fmgr/dfmgr.c
*** src/utils/fmgr/dfmgr.c	Thu Dec 10 15:44:07 1992
--- src.original/utils/fmgr/dfmgr.c	Thu Aug 27 01:33:05 1992
***************
*** 6,12 ****
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <stdio.h>
- #include <math.h>
  
  #include "access/heapam.h"
  #include "nodes/pg_lisp.h"
--- 6,11 ----
diff -r -c src/utils/fmgr/fmgr.c src.original/utils/fmgr/fmgr.c
*** src/utils/fmgr/fmgr.c	Thu Dec 10 15:45:49 1992
--- src.original/utils/fmgr/fmgr.c	Thu Aug 27 01:33:05 1992
***************
*** 7,13 ****
  #include <varargs.h>
  #include <sys/types.h>
  #include <sys/stat.h>
- #include <math.h>
  
  #include "tmp/c.h"
  #include "tmp/postgres.h"
--- 7,12 ----
diff -r -c src/utils/init/postinit.c src.original/utils/init/postinit.c
*** src/utils/init/postinit.c	Fri Dec 18 10:26:43 1992
--- src.original/utils/init/postinit.c	Thu Aug 27 01:33:11 1992
***************
*** 569,575 ****
  	 */
  	myPath[0] = '\0';
  	
! 	/* if (! bootstrap) */
  	    if (! DatabaseMetaGunkIsConsistent(name, myPath))
  		if (! Noversion)
  		    elog(FATAL,
--- 569,575 ----
  	 */
  	myPath[0] = '\0';
  	
! 	if (! bootstrap)
  	    if (! DatabaseMetaGunkIsConsistent(name, myPath))
  		if (! Noversion)
  		    elog(FATAL,
-------------------------------- cut here -------------------------------------

Rafael Morales Gamboa
ITESM Campus Morelos
Cuernavaca, Mor.
MEXICO