diff options
Diffstat (limited to 'src/backend/utils/adt')
41 files changed, 122 insertions, 246 deletions
diff --git a/src/backend/utils/adt/Makefile b/src/backend/utils/adt/Makefile index f06ffef5da8..e948c05c05a 100644 --- a/src/backend/utils/adt/Makefile +++ b/src/backend/utils/adt/Makefile @@ -4,7 +4,7 @@ # Makefile for utils/adt # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.21 1998/12/30 19:56:29 wieck Exp $ +# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.21.2.1 1999/08/02 05:24:49 scrappy Exp $ # #------------------------------------------------------------------------- @@ -13,6 +13,16 @@ include ../../../Makefile.global CFLAGS += -I../.. +# seems to be required for some date/time stuff 1999/07/22 bjm +ifeq ($(CPU),alpha) +ifeq ($(CC), gcc) +CFLAGS+= -mieee +endif +ifeq ($(CC), egcs) +CFLAGS+= -mieee +endif +endif + ifdef MULTIBYTE CFLAGS+= $(MBFLAGS) endif @@ -40,4 +50,3 @@ clean: ifeq (depend,$(wildcard depend)) include depend endif - diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index b456a5f6c70..9c4b1c6c6cd 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -7,21 +7,20 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.37 1999/07/09 03:28:51 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.37.2.1 1999/08/02 05:24:49 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <ctype.h> -#include <string.h> #include "postgres.h" -#include <utils/memutils.h> -#include "utils/acl.h" -#include "utils/syscache.h" #include "catalog/catalog.h" #include "catalog/pg_shadow.h" #include "catalog/pg_type.h" #include "miscadmin.h" +#include "utils/acl.h" +#include "utils/memutils.h" +#include "utils/syscache.h" static char *getid(char *s, char *n); static int32 aclitemeq(AclItem *a1, AclItem *a2); diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index b0e59e3ff08..fd01b17e19a 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -7,30 +7,25 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.43 1999/05/25 16:11:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.43.2.1 1999/08/02 05:24:49 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <ctype.h> -#include <stdio.h> -#include <string.h> -#include <stdarg.h> #include "postgres.h" + #include "catalog/catalog.h" #include "catalog/pg_type.h" - -#include "utils/syscache.h" -#include "utils/memutils.h" -#include "storage/fd.h" #include "fmgr.h" -#include "utils/array.h" -#include "utils/elog.h" - -#include "libpq/libpq-fs.h" #include "libpq/be-fsstubs.h" +#include "libpq/libpq-fs.h" +#include "storage/fd.h" +#include "utils/array.h" +#include "utils/memutils.h" +#include "utils/syscache.h" #define ASSGN "=" @@ -477,7 +472,7 @@ _ReadArrayStr(char *arrayStr, if (values[i]) { if (typalign == 'd') - *nbytes += DOUBLEALIGN(*(int32 *) values[i]); + *nbytes += MAXALIGN(*(int32 *) values[i]); else *nbytes += INTALIGN(*(int32 *) values[i]); } diff --git a/src/backend/utils/adt/arrayutils.c b/src/backend/utils/adt/arrayutils.c index a0fe502895a..fdd98099c35 100644 --- a/src/backend/utils/adt/arrayutils.c +++ b/src/backend/utils/adt/arrayutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.7 1999/02/13 23:19:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.7.2.1 1999/08/02 05:24:50 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,9 +15,7 @@ #define WEAK_C_OPTIMIZER #include "postgres.h" - #include "utils/array.h" - int GetOffset(int n, int *dim, int *lb, int *indx) { diff --git a/src/backend/utils/adt/bool.c b/src/backend/utils/adt/bool.c index 57bb7c32721..cc22a110282 100644 --- a/src/backend/utils/adt/bool.c +++ b/src/backend/utils/adt/bool.c @@ -7,16 +7,14 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.16 1999/02/13 23:19:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.16.2.1 1999/08/02 05:24:50 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <string.h> #include "postgres.h" -#include "utils/builtins.h" /* where the declarations go */ -#include "utils/palloc.h" +#include "utils/builtins.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index 9f74645d38a..f827bee4cdd 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -9,11 +9,9 @@ * workings can be found in the book "Software Solutions in C" by * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.28 1999/05/25 16:11:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.28.2.1 1999/08/02 05:24:50 scrappy Exp $ */ -#include <stdio.h> -#include <string.h> #include <limits.h> #include <ctype.h> #include <locale.h> @@ -34,7 +32,6 @@ static const char *num_word(Cash value); #ifdef USE_LOCALE static struct lconv *lconvert = NULL; - #endif /* cash_in() diff --git a/src/backend/utils/adt/char.c b/src/backend/utils/adt/char.c index 4c6e3711065..1646548ac2b 100644 --- a/src/backend/utils/adt/char.c +++ b/src/backend/utils/adt/char.c @@ -8,15 +8,12 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.22 1999/05/25 16:11:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/char.c,v 1.22.2.1 1999/08/02 05:24:50 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ -#include <string.h> #include "postgres.h" -#include "utils/palloc.h" -#include "utils/builtins.h" /* where the declarations go */ +#include "utils/builtins.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/chunk.c b/src/backend/utils/adt/chunk.c index a9a49fe940e..48d55b43942 100644 --- a/src/backend/utils/adt/chunk.c +++ b/src/backend/utils/adt/chunk.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.20 1999/05/25 16:11:55 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.20.2.1 1999/08/02 05:24:50 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,21 +15,15 @@ #include <fcntl.h> #include "postgres.h" -#include "fmgr.h" #include "catalog/pg_type.h" +#include "fmgr.h" #include "libpq/be-fsstubs.h" #include "libpq/libpq-fs.h" #include "optimizer/internal.h" #include "utils/array.h" #include "utils/memutils.h" -#ifndef HAVE_MEMMOVE -#include <regex/utils.h> -#else -#include <string.h> -#endif - #define INFTY 500000000 #define MANY 10000 #define MAXPAT 20 diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 7ad18a067e4..71cb1f126c1 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.32 1999/05/25 16:11:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.32.2.1 1999/08/02 05:24:51 scrappy Exp $ * * NOTES * This code is actually (almost) unused. @@ -24,23 +24,21 @@ *------------------------------------------------------------------------- */ #include <ctype.h> -#include <stdio.h> #include <time.h> #include <sys/time.h> #include <sys/types.h> -#include <string.h> #include "postgres.h" -#include "miscadmin.h" #ifdef HAVE_FLOAT_H #include <float.h> #endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif + #include "access/xact.h" -#include "utils/builtins.h" /* where function declarations go */ -#include "utils/palloc.h" +#include "miscadmin.h" +#include "utils/builtins.h" #include "utils/dt.h" #define INVALID_RELTIME_STR "Undefined RelTime" diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 84163583ef8..66ac4e60714 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -7,12 +7,10 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.33 1999/05/25 16:11:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.33.2.1 1999/08/02 05:24:51 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ -#include <string.h> #include <limits.h> #include "postgres.h" @@ -21,9 +19,6 @@ #endif #include "miscadmin.h" #include "utils/builtins.h" -#include "utils/nabstime.h" -#include "utils/datetime.h" -#include "access/xact.h" static int date2tm(DateADT dateVal, int *tzp, struct tm * tm, double *fsec, char **tzn); diff --git a/src/backend/utils/adt/datum.c b/src/backend/utils/adt/datum.c index 79a9d205ebd..e1566d21388 100644 --- a/src/backend/utils/adt/datum.c +++ b/src/backend/utils/adt/datum.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.12 1999/02/13 23:19:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.12.2.1 1999/08/02 05:24:51 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -27,11 +27,8 @@ * particular instance of the type and about its value. * */ -#include <string.h> #include "postgres.h" #include "utils/datum.h" -#include "catalog/pg_type.h" -#include "utils/palloc.h" /*------------------------------------------------------------------------- * datumGetSize diff --git a/src/backend/utils/adt/dt.c b/src/backend/utils/adt/dt.c index 74028c439a3..72004e9b1db 100644 --- a/src/backend/utils/adt/dt.c +++ b/src/backend/utils/adt/dt.c @@ -7,19 +7,16 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.72 1999/07/08 03:22:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.72.2.1 1999/08/02 05:24:51 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> #include <ctype.h> #include <math.h> -#include <string.h> #include <sys/types.h> #include <errno.h> #include "postgres.h" -#include "miscadmin.h" #ifdef HAVE_FLOAT_H #include <float.h> #endif @@ -29,8 +26,9 @@ #ifndef USE_POSIX_TIME #include <sys/timeb.h> #endif -#include "utils/builtins.h" +#include "miscadmin.h" +#include "utils/builtins.h" static int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm); static int DecodeNumber(int flen, char *field, diff --git a/src/backend/utils/adt/filename.c b/src/backend/utils/adt/filename.c index bb062132323..db4da50f312 100644 --- a/src/backend/utils/adt/filename.c +++ b/src/backend/utils/adt/filename.c @@ -7,20 +7,18 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.17 1999/02/13 23:19:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.17.2.1 1999/08/02 05:24:52 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <string.h> -#include <stdio.h> #include <pwd.h> #include <sys/param.h> #include "postgres.h" -#include <miscadmin.h> -#include "utils/builtins.h" /* where function declarations go */ +#include "miscadmin.h" +#include "utils/builtins.h" char * filename_in(char *file) diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 5f2a4f15232..f9bf22625a3 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.42 1999/05/25 16:12:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.42.2.1 1999/08/02 05:24:52 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -45,10 +45,7 @@ * for calls to pow(), exp() since on some machines (my Linux box * included) these routines do not set errno. - tgl 97/05/10 */ -#include <stdio.h> /* for sprintf() */ -#include <string.h> #include <ctype.h> -#include <stdlib.h> #include <errno.h> #include <float.h> /* faked on sunos4 */ @@ -60,8 +57,7 @@ #include <limits.h> #endif #include "fmgr.h" -#include "utils/builtins.h" /* for ftod() prototype */ -#include "utils/palloc.h" +#include "utils/builtins.h" #ifndef NAN #define NAN (0.0/0.0) @@ -134,7 +130,7 @@ extern double rint(double x); * until the distributions are updated. * --djm 12/16/96 */ -#if ( defined(linux) && defined(__alpha) ) && !defined(UNSAFE_FLOATS) +#if ( defined(linux) && defined(__alpha__) ) && !defined(UNSAFE_FLOATS) #define UNSAFE_FLOATS #endif diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index 72166c5a54f..78da702af9f 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -7,22 +7,18 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.41 1999/02/21 03:49:30 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.41.2.1 1999/08/02 05:24:52 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <math.h> #include <limits.h> #include <float.h> -#include <stdio.h> /* for sprintf proto, etc. */ -#include <stdlib.h> /* for strtod, etc. */ -#include <string.h> #include <ctype.h> #include "postgres.h" #include "utils/geo_decls.h" -#include "utils/palloc.h" #ifndef PI #define PI 3.1415926536 diff --git a/src/backend/utils/adt/geo_selfuncs.c b/src/backend/utils/adt/geo_selfuncs.c index 5c55dcdaacf..35b3831207c 100644 --- a/src/backend/utils/adt/geo_selfuncs.c +++ b/src/backend/utils/adt/geo_selfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.8 1999/03/28 01:56:12 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_selfuncs.c,v 1.8.2.1 1999/08/02 05:24:53 scrappy Exp $ * * XXX These are totally bogus. * @@ -16,9 +16,6 @@ */ #include "postgres.h" -#include "access/attnum.h" -#include "utils/geo_decls.h" /* where function declarations go */ -#include "utils/palloc.h" #include "utils/builtins.h" float64 diff --git a/src/backend/utils/adt/inet_net_ntop.c b/src/backend/utils/adt/inet_net_ntop.c index 11a0cb9363a..195c5211945 100644 --- a/src/backend/utils/adt/inet_net_ntop.c +++ b/src/backend/utils/adt/inet_net_ntop.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.6 1999/05/25 16:12:04 momjian Exp $"; +static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.6.2.1 1999/08/02 05:24:53 scrappy Exp $"; #endif @@ -26,12 +26,9 @@ static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.6 1999/05/25 16:12:04 momj #include <arpa/inet.h> #include <errno.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <postgres.h> -#include <utils/builtins.h> +#include "postgres.h" +#include "utils/builtins.h" #ifdef SPRINTF_CHAR #define SPRINTF(x) strlen(sprintf/**/x) diff --git a/src/backend/utils/adt/inet_net_pton.c b/src/backend/utils/adt/inet_net_pton.c index bcc9ff681a2..ca2ff8a0902 100644 --- a/src/backend/utils/adt/inet_net_pton.c +++ b/src/backend/utils/adt/inet_net_pton.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_pton.c,v 1.8 1999/05/25 16:12:05 momjian Exp $"; +static const char rcsid[] = "$Id: inet_net_pton.c,v 1.8.2.1 1999/08/02 05:24:53 scrappy Exp $"; #endif @@ -28,12 +28,9 @@ static const char rcsid[] = "$Id: inet_net_pton.c,v 1.8 1999/05/25 16:12:05 momj #include <assert.h> #include <ctype.h> #include <errno.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <postgres.h> -#include <utils/builtins.h> +#include "postgres.h" +#include "utils/builtins.h" #ifdef SPRINTF_CHAR #define SPRINTF(x) strlen(sprintf/**/x) diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c index 636b6ae5ce8..09ce93b5dc9 100644 --- a/src/backend/utils/adt/int.c +++ b/src/backend/utils/adt/int.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.21 1999/07/09 15:09:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.21.2.1 1999/08/02 05:24:53 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -28,15 +28,13 @@ * XXX makes massive and possibly unwarranted type promotion assumptions. * fix me when we figure out what we want to do about ANSIfication... */ -#include <stdio.h> -#include <string.h> + +#include "postgres.h" #ifdef HAVE_LIMITS_H #include <limits.h> #endif -#include "postgres.h" -#include "fmgr.h" -#include "utils/builtins.h" /* where the declarations go */ +#include "utils/builtins.h" #ifndef SHRT_MAX #define SHRT_MAX (0x7FFF) diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c index ba609865db8..2e5e4ebf776 100644 --- a/src/backend/utils/adt/int8.c +++ b/src/backend/utils/adt/int8.c @@ -5,9 +5,6 @@ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf proto, etc. */ -#include <stdlib.h> /* for strtod, etc. */ -#include <string.h> #include <ctype.h> #include <time.h> #include <math.h> @@ -15,7 +12,6 @@ #include <limits.h> #include "postgres.h" -#include "utils/palloc.h" #include "utils/int8.h" #define MAXINT8LEN 25 diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index 2d35bfabaca..84b8b6fff41 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -17,11 +17,9 @@ * *------------------------------------------------------------------------- */ -#include <string.h> -#include "postgres.h" /* postgres system include file */ -#include "utils/palloc.h" -#include "utils/builtins.h" /* where the function declarations go */ +#include "postgres.h" #include "mb/pg_wchar.h" +#include "utils/builtins.h" static int like(pg_wchar * text, pg_wchar * p); @@ -111,7 +109,7 @@ textnlike(struct varlena * s, struct varlena * p) } -/* $Revision: 1.25 $ +/* $Revision: 1.25.2.1 $ ** "like.c" A first attempt at a LIKE operator for Postgres95. ** ** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c index 48dd19db94b..1d874e1a208 100644 --- a/src/backend/utils/adt/mac.c +++ b/src/backend/utils/adt/mac.c @@ -1,16 +1,12 @@ /* * PostgreSQL type definitions for MAC addresses. * - * $Id: mac.c,v 1.8 1999/05/25 16:12:08 momjian Exp $ + * $Id: mac.c,v 1.8.2.1 1999/08/02 05:24:54 scrappy Exp $ */ -#include <stdio.h> -#include <string.h> -#include <postgres.h> -#include <utils/palloc.h> -#include <utils/builtins.h> -#include <utils/inet.h> +#include "postgres.h" +#include "utils/builtins.h" manufacturer manufacturers[] = { {0x00, 0x00, 0x0C, "Cisco"}, diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index d7651355cf3..fb9ac6599bb 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.16 1999/02/13 23:19:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.16.2.1 1999/08/02 05:24:54 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -15,8 +15,6 @@ #include <sys/file.h> #include <time.h> #include "postgres.h" -#include "utils/datum.h" -#include "catalog/pg_type.h" #include "utils/builtins.h" /*------------------------------------------------------------------------- diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index dbbc54c3f82..015c7bb9dcb 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -4,16 +4,13 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nabstime.c,v 1.55 1999/05/25 16:12:09 momjian Exp $ + * $Id: nabstime.c,v 1.55.2.1 1999/08/02 05:24:54 scrappy Exp $ * */ -#include <stdio.h> #include <ctype.h> -#include <string.h> #include <sys/types.h> #include "postgres.h" -#include <miscadmin.h> #ifdef HAVE_FLOAT_H #include <float.h> #endif @@ -23,8 +20,10 @@ #ifndef USE_POSIX_TIME #include <sys/timeb.h> #endif -#include "utils/builtins.h" + #include "access/xact.h" +#include "miscadmin.h" +#include "utils/builtins.h" static AbsoluteTime tm2abstime(struct tm * tm, int tz); @@ -348,8 +347,6 @@ nabstimeout(AbsoluteTime time) break; default: abstime2tm(time, &tz, tm, tzn); -#if DATEDEBUG -#endif EncodeDateTime(tm, fsec, &tz, &tzn, DateStyle, buf); break; } diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c index 1780df2c427..292f6a9d785 100644 --- a/src/backend/utils/adt/name.c +++ b/src/backend/utils/adt/name.c @@ -11,14 +11,12 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.18 1999/05/25 16:12:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.18.2.1 1999/08/02 05:24:55 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <string.h> #include "postgres.h" -#include "utils/builtins.h" /* where the declarations go */ -#include "utils/palloc.h" /* where the declarations go */ +#include "utils/builtins.h" /***************************************************************************** * USER I/O ROUTINES (none) * diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index 7c1aa24dbcf..62e20185864 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -3,24 +3,20 @@ * is for IP V4 CIDR notation, but prepared for V6: just * add the necessary bits where the comments indicate. * - * $Id: network.c,v 1.10 1999/06/02 03:37:15 momjian Exp $ + * $Id: network.c,v 1.10.2.1 1999/08/02 05:24:55 scrappy Exp $ * Jon Postel RIP 16 Oct 1998 */ #include <sys/types.h> #include <sys/socket.h> -#include <stdio.h> -#include <string.h> #include <errno.h> #include <netinet/in.h> #include <arpa/inet.h> -#include <postgres.h> -#include <utils/palloc.h> -#include <utils/builtins.h> -#include <utils/inet.h> +#include "postgres.h" +#include "utils/builtins.h" static int v4bitncmp(unsigned int a1, unsigned int a2, int bits); diff --git a/src/backend/utils/adt/not_in.c b/src/backend/utils/adt/not_in.c index 7082b0d007e..41497847d78 100644 --- a/src/backend/utils/adt/not_in.c +++ b/src/backend/utils/adt/not_in.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.16 1999/05/25 16:12:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.16.2.1 1999/08/02 05:24:55 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -22,12 +22,10 @@ * columns are ******REALLY****** implemented!!!!!!!!!!! * */ -#include <stdio.h> -#include <string.h> + #include "postgres.h" #include "access/heapam.h" -#include "access/relscan.h" -#include "utils/builtins.h" /* where function decls go */ +#include "utils/builtins.h" static int my_varattno(Relation rd, char *a); diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index da720f0f196..eaee00fbd1b 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -5,14 +5,11 @@ * * 1998 Jan Wieck * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.16 1999/05/25 22:42:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.16.2.1 1999/08/02 05:24:55 scrappy Exp $ * * ---------- */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <ctype.h> #include <float.h> #include <math.h> @@ -21,10 +18,8 @@ #include "postgres.h" #include "utils/builtins.h" -#include "utils/palloc.h" #include "utils/numeric.h" - /* ---------- * Uncomment the following to enable compilation of dump_numeric() * and dump_var() and to get a dump of any result produced by make_result(). diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c index 5faaa5ddab4..d72d044f046 100644 --- a/src/backend/utils/adt/numutils.c +++ b/src/backend/utils/adt/numutils.c @@ -10,23 +10,18 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.34 1999/07/10 17:03:33 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.34.2.1 1999/08/02 05:24:56 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ #include <errno.h> #include <math.h> + +#include "postgres.h" #ifdef HAVE_LIMITS_H #include <limits.h> #endif -#include "postgres.h" -#include "utils/builtins.h" /* where the declarations go */ -#ifndef HAVE_MEMMOVE -#include <regex/utils.h> -#else -#include <string.h> -#endif +#include "utils/builtins.h" #ifndef INT_MAX #define INT_MAX (0x7FFFFFFFL) diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c index 8cee64521a2..2e335ddefaf 100644 --- a/src/backend/utils/adt/oid.c +++ b/src/backend/utils/adt/oid.c @@ -7,16 +7,14 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.23 1999/05/10 00:45:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.23.2.1 1999/08/02 05:24:56 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> -#include <string.h> #include "postgres.h" -#include "utils/builtins.h" /* where function declarations go */ +#include "utils/builtins.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index ce5aefee6bc..0197887772a 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -1,7 +1,7 @@ /* * Edmund Mergl <E.Mergl@bawue.de> * - * $Id: oracle_compat.c,v 1.18 1999/05/26 12:56:00 momjian Exp $ + * $Id: oracle_compat.c,v 1.18.2.1 1999/08/02 05:24:56 scrappy Exp $ * */ @@ -9,7 +9,6 @@ #include <ctype.h> #include "postgres.h" - text *lower(text *string); text *upper(text *string); text *initcap(text *string); diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index f2f2ca8c00a..25fc30c4add 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.22 1999/02/13 23:19:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.22.2.1 1999/08/02 05:24:56 scrappy Exp $ * * Alistair Crooks added the code for the regex caching * agc - cached the regular expressions used - there's a good chance @@ -27,12 +27,11 @@ * *------------------------------------------------------------------------- */ -#include <string.h> -#include "postgres.h" /* postgres system include file */ +#include "postgres.h" -#include <regex/regex.h> -#include "utils/builtins.h" /* where the function declarations go */ +#include "regex/regex.h" +#include "utils/builtins.h" #if defined(DISABLE_XOPEN_NLS) #undef _XOPEN_SOURCE diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 1db8ddcc057..5d46f6e0b0f 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -7,27 +7,21 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.37 1999/05/25 16:12:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.37.2.1 1999/08/02 05:24:57 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <string.h> #include "postgres.h" -#include "miscadmin.h" -#include "access/heapam.h" -#include "access/genam.h" -#include "access/itup.h" -#include "access/relscan.h" -#include "storage/bufmgr.h" -#include "fmgr.h" -#include "utils/palloc.h" -#include "utils/syscache.h" +#include "access/genam.h" +#include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" -#include "utils/builtins.h" /* where function declarations go */ +#include "miscadmin.h" +#include "utils/builtins.h" +#include "utils/syscache.h" /***************************************************************************** * USER I/O ROUTINES * diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 6df5fb04ad7..37b1e30b758 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -3,7 +3,7 @@ * out of it's tuple * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.18 1999/06/02 11:52:28 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.18.2.1 1999/08/02 05:24:57 scrappy Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -35,27 +35,15 @@ * **********************************************************************/ -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> #include <unistd.h> #include <fcntl.h> -#include <string.h> +#include "postgres.h" #include "executor/spi.h" -#include "commands/trigger.h" -#include "utils/elog.h" -#include "utils/builtins.h" -#include "nodes/nodes.h" #include "optimizer/clauses.h" -#include "utils/syscache.h" #include "utils/lsyscache.h" -#include "catalog/pg_class.h" -#include "catalog/pg_type.h" #include "catalog/pg_shadow.h" #include "catalog/pg_index.h" -#include "catalog/pg_opclass.h" -#include "fmgr.h" #define BUFSIZE 8192 diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index fe11c77b193..a8cb9385f2f 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -12,25 +12,19 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.30 1999/06/19 00:44:44 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.30.2.1 1999/08/02 05:24:57 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> -#include <string.h> #include "postgres.h" #include "access/heapam.h" -#include "fmgr.h" -#include "utils/builtins.h" /* for textout() prototype and where the - * declarations go */ -#include "utils/palloc.h" - #include "catalog/catname.h" -#include "utils/syscache.h" -#include "utils/lsyscache.h" /* for get_oprrest() */ #include "catalog/pg_statistic.h" +#include "utils/builtins.h" +#include "utils/lsyscache.h" +#include "utils/syscache.h" /* N is not a valid var/constant or relation id */ #define NONVALUE(N) ((N) == -1) diff --git a/src/backend/utils/adt/sets.c b/src/backend/utils/adt/sets.c index 94b6a1157bb..414a63c7d57 100644 --- a/src/backend/utils/adt/sets.c +++ b/src/backend/utils/adt/sets.c @@ -9,27 +9,19 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.21 1999/02/13 23:19:33 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.21.2.1 1999/08/02 05:24:57 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ -#include <string.h> #include "postgres.h" #include "access/heapam.h" -#include "access/relscan.h" -#include "access/xact.h" -#include "catalog/pg_proc.h" /* for Form_pg_proc */ -#include "catalog/catname.h" /* for ProcedureRelationName */ -#include "catalog/indexing.h" /* for Num_pg_proc_indices */ -#include "fmgr.h" -#include "storage/lmgr.h" -#include "tcop/dest.h" -#include "utils/sets.h" /* for GENERICSETNAME */ -#include "utils/syscache.h" /* for PROOID */ -#include "utils/tqual.h" +#include "catalog/catname.h" +#include "catalog/indexing.h" +#include "catalog/pg_proc.h" +#include "utils/sets.h" +#include "utils/syscache.h" extern CommandDest whereToSendOutput; /* defined in tcop/postgres.c */ diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index 8de800ca24d..891036dc47c 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -7,21 +7,16 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.6 1999/02/13 23:19:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.6.2.1 1999/08/02 05:24:57 scrappy Exp $ * * NOTES * input routine largely stolen from boxin(). * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ -#include <string.h> -#include "postgres.h" -#include "storage/bufpage.h" - -#include "utils/palloc.h" -#include "utils/builtins.h" /* where function declarations go */ +#include "postgres.h" +#include "utils/builtins.h" #define LDELIM '(' #define RDELIM ')' diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 3c67ab854e2..cdbac4c7f13 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -1,11 +1,10 @@ -#include <stdio.h> -#include <string.h> #include <time.h> #include <ctype.h> + #include "postgres.h" +#include "access/xact.h" #include "miscadmin.h" #include "utils/builtins.h" -#include "access/xact.h" time_t timestamp_in(const char *timestamp_str) diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c index d7bb2738cb8..cbe7cd14631 100644 --- a/src/backend/utils/adt/varchar.c +++ b/src/backend/utils/adt/varchar.c @@ -7,24 +7,24 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.48 1999/07/04 04:56:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.48.2.1 1999/08/02 05:24:58 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <stdio.h> /* for sprintf() */ -#include <string.h> + #include "postgres.h" #include "access/htup.h" -#include "utils/array.h" -#include "utils/builtins.h" #include "catalog/pg_type.h" +#include "utils/builtins.h" + +#ifdef MULTIBYTE +#include "mb/pg_wchar.h" +#endif #ifdef CYR_RECODE char *convertstr(char *, int, int); - #endif -#include "mb/pg_wchar.h" /* * CHAR() and VARCHAR() types are part of the ANSI SQL standard. CHAR() diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index b649ef225a3..e6a90d73db1 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -7,18 +7,16 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.48 1999/05/25 16:12:21 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.48.2.1 1999/08/02 05:24:58 scrappy Exp $ * *------------------------------------------------------------------------- */ #include <ctype.h> -#include <string.h> #include "postgres.h" -#include "utils/palloc.h" -#include "utils/builtins.h" /* where function declarations go */ #include "mb/pg_wchar.h" +#include "utils/builtins.h" static int text_cmp(text *arg1, text *arg2); diff --git a/src/backend/utils/adt/version.c b/src/backend/utils/adt/version.c index cdacd6dbcea..bc8fbcc71f6 100644 --- a/src/backend/utils/adt/version.c +++ b/src/backend/utils/adt/version.c @@ -5,12 +5,11 @@ * * IDENTIFICATION * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.6 1999/04/06 15:35:36 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.6.2.1 1999/08/02 05:24:58 scrappy Exp $ * *------------------------------------------------------------------------- */ -#include <string.h> #include "postgres.h" #include "version.h" |