Another directory that compiles with no errors, and few warnings

This commit is contained in:
Marc G. Fournier 1996-11-06 10:32:10 +00:00
parent 1d0dd471fa
commit 0020e8790d
24 changed files with 109 additions and 57 deletions

View File

@ -4,14 +4,15 @@
# Makefile for utils/adt
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.2 1996/11/03 06:52:59 scrappy Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.3 1996/11/06 10:30:35 scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR = ../../..
include ../../../Makefile.global
INCLUDE_OPT = -I../../port/$(PORTNAME) \
INCLUDE_OPT = -I../.. \
-I../../port/$(PORTNAME) \
-I../../../include
CFLAGS+=$(INCLUDE_OPT)

View File

@ -7,17 +7,18 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.4 1996/11/06 06:49:34 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.5 1996/11/06 10:30:36 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
#include <string.h>
#include "postgres.h"
#include <utils/memutils.h>
#include "utils/acl.h"
#include "catalog/pg_user.h"
#include "utils/syscache.h"
#include "utils/palloc.h"
#include "miscadmin.h"
static char *getid(char *s, char *n);

View File

@ -7,13 +7,14 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.8 1996/11/06 06:49:36 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.9 1996/11/06 10:30:38 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "postgres.h"
@ -21,7 +22,6 @@
#include "catalog/pg_type.h"
#include "utils/syscache.h"
#include "utils/palloc.h"
#include "utils/memutils.h"
#include "storage/fd.h" /* for SEEK_ */
#include "fmgr.h"
@ -783,7 +783,10 @@ array_clip(ArrayType *array,
mda_get_range(n, span, lowerIndx, upperIndx);
if (ARR_IS_LO(array)) {
char * lo_name, * newname;
#ifdef LOARRAY
char * lo_name;
#endif
char * newname;
int fd, newfd, isDestLO = true, rsize;
if (len < 0)
@ -906,12 +909,13 @@ array_set(ArrayType *array,
if (ARR_IS_LO(array)) {
int fd;
char * lo_name;
struct varlena *v;
/* We are assuming fixed element lengths here */
offset *= elmlen;
#ifdef LOARRAY
char * lo_name;
lo_name = ARR_DATA_PTR(array);
if ((fd = LOopen(lo_name, ARR_IS_INV(array)?INV_WRITE:O_WRONLY)) < 0)
return((char *)array);
@ -1013,10 +1017,11 @@ array_assgn(ArrayType *array,
elog(WARN, "lowerIndex larger than upperIndx");
if (ARR_IS_LO(array)) {
char * lo_name;
int fd, newfd;
#ifdef LOARRAY
char * lo_name;
lo_name = (char *)ARR_DATA_PTR(array);
if ((fd = LOopen(lo_name, ARR_IS_INV(array)?INV_WRITE:O_WRONLY)) < 0)
return((char *)array);

View File

@ -6,12 +6,14 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.2 1996/11/06 06:49:43 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.3 1996/11/06 10:30:40 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
#include "postgres.h"
#include <libpq/be-fsstubs.h>
#include "utils/memutils.h"
#include "libpq/libpq-fs.h"
@ -19,11 +21,16 @@
#include "catalog/pg_type.h"
#include "utils/palloc.h"
#include "fmgr.h"
#include "utils/array.h"
#include "optimizer/internal.h"
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
# include <string.h>
#endif
#define INFTY 500000000
#define MANY 10000

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.2 1996/11/06 06:49:44 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.3 1996/11/06 10:30:44 scrappy Exp $
*
* NOTES
* This code is actually (almost) unused.
@ -88,10 +88,6 @@
#define ABSTIMEMIN(t1, t2) abstimele((t1),(t2)) ? (t1) : (t2)
#define ABSTIMEMAX(t1, t2) abstimelt((t1),(t2)) ? (t2) : (t1)
static char *month_name[] = {
"Jan","Feb","Mar","Apr","May","Jun","Jul",
"Aug","Sep","Oct","Nov","Dec" };
static char *unit_tab[] = {
"second", "seconds", "minute", "minutes",
"hour", "hours", "day", "days", "week", "weeks",
@ -113,8 +109,6 @@ static int unit_max_quantity[] = {
struct timeb *TimeDifferenceFromGMT = NULL;
static bool TimeDiffIsInited = false;
static char *timezonename = NULL;
/*
* Function prototypes -- internal to this file only

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.3 1996/11/03 06:53:05 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.4 1996/11/06 10:30:51 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -21,7 +21,7 @@
#include <sys/param.h>
#include "postgres.h"
#include "utils/palloc.h"
#include <miscadmin.h>
#include "utils/builtins.h" /* where function declarations go */
char *

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.2 1996/11/06 06:49:49 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.3 1996/11/06 10:30:55 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -28,11 +28,11 @@
* 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 "postgres.h"
#include "fmgr.h"
#include "utils/builtins.h" /* where the declarations go */
#include "utils/palloc.h"
/*****************************************************************************
* USER I/O ROUTINES *

View File

@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.5 1996/11/06 06:49:54 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.6 1996/11/06 10:30:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -19,6 +19,11 @@
#include <math.h>
#include "postgres.h"
#include "utils/builtins.h" /* where the declarations go */
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
# include <string.h>
#endif
int32
pg_atoi(char *s, int size, int c)

View File

@ -7,12 +7,14 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.2 1996/11/06 06:49:55 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.3 1996/11/06 10:31:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <stdio.h>
#include "postgres.h"
#include "utils/palloc.h"
#include "utils/builtins.h" /* where function declarations go */
/*****************************************************************************

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.3 1996/11/06 06:49:58 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.4 1996/11/06 10:31:04 scrappy Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
@ -29,7 +29,9 @@
*/
#include <string.h>
#include "postgres.h" /* postgres system include file */
#include "utils/palloc.h"
#include <regex/regex.h>
#include "utils/builtins.h" /* where the function declarations go */
#if defined(DISABLE_XOPEN_NLS)

View File

@ -4,14 +4,15 @@
# Makefile for utils/cache
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.2 1996/11/03 06:53:14 scrappy Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.3 1996/11/06 10:31:16 scrappy Exp $
#
#-------------------------------------------------------------------------
SRCDIR = ../../..
include ../../../Makefile.global
INCLUDE_OPT = -I../../port/$(PORTNAME) \
INCLUDE_OPT = -I../.. \
-I../../port/$(PORTNAME) \
-I../../../include
CFLAGS+=$(INCLUDE_OPT)

View File

@ -7,11 +7,15 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.2 1996/11/03 06:53:17 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.3 1996/11/06 10:31:22 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <nodes/parsenodes.h>
#include <fmgr.h>
#include "access/htup.h"
#include "utils/catcache.h"
#include "utils/syscache.h"
@ -22,9 +26,13 @@
#include "parser/parsetree.h" /* for getrelname() */
#include "utils/builtins.h"
#include "utils/fcache.h"
#include "utils/palloc.h"
#include "nodes/primnodes.h"
#include "nodes/execnodes.h"
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
# include <string.h>
#endif
static Oid GetDynamicFuncArgType(Var *arg, ExprContext *econtext);
static FunctionCachePtr init_fcache(Oid foid,

View File

@ -7,13 +7,16 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.1.1.1 1996/07/09 06:22:06 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.2 1996/11/06 10:31:24 scrappy Exp $
*
* Note - this code is real crufty...
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include <miscadmin.h>
#include "access/heapam.h" /* XXX to support hacks below */
#include "access/htup.h"
#include "catalog/catalog.h"
@ -23,7 +26,6 @@
#include "storage/sinval.h"
#include "utils/catcache.h"
#include "utils/inval.h"
#include "utils/elog.h"
#include "utils/rel.h"
#include "utils/relcache.h"
#include "catalog/catname.h" /* XXX to support hacks below */

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.3 1996/10/24 07:55:29 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.4 1996/11/06 10:31:27 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -37,7 +37,8 @@
#include "postgres.h"
#include "miscadmin.h"
#include "access/attnum.h"
#include <storage/smgr.h>
#include "access/genam.h"
#include "access/heapam.h"
#include "access/htup.h"
@ -45,7 +46,6 @@
#include "access/itup.h"
#include "access/skey.h"
#include "utils/builtins.h"
#include "utils/tqual.h" /* for NowTimeQual */
#include "access/tupdesc.h"
#include "access/tupmacs.h"
#include "access/xact.h"
@ -54,17 +54,14 @@
#include "storage/fd.h" /* for SEEK_ */
#include "storage/lmgr.h"
#include "storage/bufmgr.h"
#include "lib/hasht.h"
#include "utils/memutils.h"
#include "utils/elog.h"
#include "utils/mcxt.h"
#include "utils/rel.h"
#include "utils/relcache.h"
#include "utils/hsearch.h"
#include "utils/palloc.h"
#include "utils/relcache.h"
#include "catalog/catname.h"

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.3 1996/11/03 06:53:19 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.4 1996/11/06 10:31:29 scrappy Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@ -23,8 +23,12 @@
#include "access/htup.h"
#include "catalog/catname.h"
#include "utils/catcache.h"
#include "utils/palloc.h"
#include "nodes/pg_list.h"
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
# include <string.h>
#endif
/* ----------------
* hardwired attribute information comes from system catalog files.

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.7 1996/10/31 10:23:26 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.8 1996/11/06 10:31:33 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -21,10 +21,11 @@
#include <sys/types.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include "postgres.h"
#include "miscadmin.h"
#include "utils/elog.h"
#include "libpq/libpq.h"
#include "storage/proc.h"

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.2 1996/11/03 06:54:13 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.3 1996/11/06 10:31:43 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -70,6 +70,7 @@ static uint32 call_hash(HTAB *hashp, char *k, int len);
static SEG_OFFSET seg_alloc(HTAB *hashp);
static int bucket_alloc(HTAB *hashp);
static int dir_realloc(HTAB *hashp);
static int my_log2(long num);
typedef long * ((*dhalloc_ptr)());

View File

@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.1.1.1 1996/07/09 06:22:08 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.2 1996/11/06 10:31:52 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -20,8 +20,9 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "c.h"
#include "postgres.h"
#include "miscadmin.h" /* for DebugLvl */
#ifndef S_IRUSR /* XXX [TRH] should be in a header */

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.1.1.1 1996/07/09 06:22:08 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.2 1996/11/06 10:31:54 scrappy Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
@ -21,10 +21,12 @@
#include <sys/file.h>
#include <sys/types.h>
#include <math.h>
#include <unistd.h>
#include "postgres.h"
#include "miscadmin.h" /* where the declarations go */
#include <storage/backendid.h>
#include "access/heapam.h"
#include "utils/tqual.h"
#include "storage/sinval.h"

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/magic.c,v 1.2 1996/10/07 03:29:30 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/magic.c,v 1.3 1996/11/06 10:31:56 scrappy Exp $
*
* NOTES
* XXX eventually, should be able to handle version identifiers
@ -23,10 +23,10 @@
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "postgres.h"
#include "utils/elog.h"
#include "miscadmin.h" /* for global decls */
#include "storage/fd.h" /* for O_ */

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.2 1996/11/06 10:31:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@ -17,6 +17,7 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <stdio.h>
#include <unistd.h>
#ifndef WIN32
#include <grp.h> /* for getgrgid */
#include <pwd.h> /* for getpwuid */

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.3 1996/10/31 05:55:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.4 1996/11/06 10:31:59 scrappy Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
@ -33,9 +33,16 @@
#include <sys/types.h>
#include <sys/ipc.h>
#include <math.h>
#include <unistd.h>
#include "postgres.h"
#include <storage/backendid.h>
#include <storage/buf_internals.h>
#include <storage/smgr.h>
#include <storage/proc.h>
#include <utils/relcache.h>
#include "access/heapam.h"
#include "access/xact.h"
#include "storage/bufmgr.h"

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.2 1996/11/06 10:32:04 scrappy Exp $
*
* NOTE
* XXX This is a preliminary implementation which lacks fail-fast
@ -16,11 +16,14 @@
*-------------------------------------------------------------------------
*/
#include <stdio.h>
#include "c.h"
#include "postgres.h"
#include "utils/excid.h" /* for ExhaustedMemory */
#include "utils/memutils.h" /* where funnction declarations go */
#include "utils/elog.h"
#include "utils/palloc.h"
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
# include <string.h>
#endif
#undef AllocSetReset
#undef malloc

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.2 1996/11/03 06:54:38 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.3 1996/11/06 10:32:10 scrappy Exp $
*
* NOTES
* Sorts the first relation into the second relation. The sort may
@ -21,6 +21,7 @@
*/
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include "postgres.h"
@ -41,6 +42,12 @@
#include "storage/fd.h"
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
# include <string.h>
#endif
#define TEMPDIR "./"
int Nkeys;