mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Compile and warning cleanup
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.9 1996/11/06 10:30:38 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.10 1996/11/08 05:59:38 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -47,15 +47,19 @@ static char *_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
|
||||
func_ptr inputproc, Oid typelem, char typdelim,
|
||||
int typlen, bool typbyval, char typalign,
|
||||
int *nbytes);
|
||||
#ifdef LOARRAY
|
||||
static char *_ReadLOArray(char *str, int *nbytes, int *fd, bool *chunkFlag,
|
||||
int ndim, int dim[], int baseSize);
|
||||
#endif
|
||||
static void _CopyArrayEls(char **values, char *p, int nitems, int typlen,
|
||||
char typalign, bool typbyval);
|
||||
static void system_cache_lookup(Oid element_type, bool input, int *typlen,
|
||||
bool *typbyval, char *typdelim, Oid *typelem, Oid *proc,
|
||||
char *typalign);
|
||||
static Datum _ArrayCast(char *value, bool byval, int len);
|
||||
#ifdef LOARRAY
|
||||
static char *_AdvanceBy1word(char *str, char **word);
|
||||
#endif
|
||||
static void _ArrayRange(int st[], int endp[], int bsize, char *destPtr,
|
||||
ArrayType *array, int from);
|
||||
static int _ArrayClipCount(int stI[], int endpI[], ArrayType *array);
|
||||
@@ -63,8 +67,6 @@ static void _LOArrayRange(int st[], int endp[], int bsize, int srcfd,
|
||||
int destfd, ArrayType *array, int isSrcLO, bool *isNull);
|
||||
static void _ReadArray (int st[], int endp[], int bsize, int srcfd, int destfd,
|
||||
ArrayType *array, int isDestLO, bool *isNull);
|
||||
static char *_array_set(ArrayType *array, struct varlena *indx_str,
|
||||
struct varlena *dataPtr);
|
||||
static ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
|
||||
|
||||
|
||||
@@ -90,7 +92,7 @@ array_in(char *string, /* input array in external form */
|
||||
int i, nitems, dummy;
|
||||
int32 nbytes;
|
||||
char *dataPtr;
|
||||
ArrayType *retval;
|
||||
ArrayType *retval = NULL;
|
||||
int ndim, dim[MAXDIM], lBound[MAXDIM];
|
||||
char typalign;
|
||||
|
||||
@@ -407,6 +409,7 @@ _ReadArrayStr(char *arrayStr,
|
||||
* Read data about an array to be stored as a large object
|
||||
*----------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef LOARRAY
|
||||
static char *
|
||||
_ReadLOArray(char *str,
|
||||
int *nbytes,
|
||||
@@ -460,6 +463,7 @@ _ReadLOArray(char *str,
|
||||
}
|
||||
return(retStr);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
_CopyArrayEls(char **values,
|
||||
@@ -659,8 +663,8 @@ array_ref(ArrayType *array,
|
||||
bool *isNull)
|
||||
{
|
||||
int i, ndim, *dim, *lb, offset, nbytes;
|
||||
struct varlena *v;
|
||||
char *retval;
|
||||
struct varlena *v = NULL;
|
||||
char *retval = NULL;
|
||||
|
||||
if (array == (ArrayType *) NULL) RETURN_NULL;
|
||||
if (arraylen > 0) {
|
||||
@@ -684,7 +688,7 @@ array_ref(ArrayType *array,
|
||||
|
||||
if (ARR_IS_LO(array)) {
|
||||
char * lo_name;
|
||||
int fd;
|
||||
int fd = 0;
|
||||
|
||||
/* We are assuming fixed element lengths here */
|
||||
offset *= elmlen;
|
||||
@@ -786,8 +790,8 @@ array_clip(ArrayType *array,
|
||||
#ifdef LOARRAY
|
||||
char * lo_name;
|
||||
#endif
|
||||
char * newname;
|
||||
int fd, newfd, isDestLO = true, rsize;
|
||||
char *newname = NULL;
|
||||
int fd = 0, newfd = 0, isDestLO = true, rsize;
|
||||
|
||||
if (len < 0)
|
||||
elog(WARN, "array_clip: array of variable length objects not supported");
|
||||
@@ -863,7 +867,7 @@ array_clip(ArrayType *array,
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* array_set :
|
||||
* array_set :
|
||||
* This routine sets the value of an array location (specified by an index array)
|
||||
* to a new value specified by "dataPtr".
|
||||
* result :
|
||||
@@ -908,7 +912,7 @@ array_set(ArrayType *array,
|
||||
offset = GetOffset( n, dim, lb, indx);
|
||||
|
||||
if (ARR_IS_LO(array)) {
|
||||
int fd;
|
||||
int fd = 0;
|
||||
struct varlena *v;
|
||||
|
||||
/* We are assuming fixed element lengths here */
|
||||
@@ -1017,7 +1021,7 @@ array_assgn(ArrayType *array,
|
||||
elog(WARN, "lowerIndex larger than upperIndx");
|
||||
|
||||
if (ARR_IS_LO(array)) {
|
||||
int fd, newfd;
|
||||
int fd = 0, newfd = 0;
|
||||
|
||||
#ifdef LOARRAY
|
||||
char * lo_name;
|
||||
@@ -1156,6 +1160,7 @@ ArrayCastAndSet(char *src,
|
||||
return(inc);
|
||||
}
|
||||
|
||||
#ifdef LOARRAY
|
||||
static char *
|
||||
_AdvanceBy1word(char *str, char **word)
|
||||
{
|
||||
@@ -1173,6 +1178,7 @@ _AdvanceBy1word(char *str, char **word)
|
||||
retstr = NULL;
|
||||
return retstr;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
SanityCheckInput(int ndim, int n, int dim[], int lb[], int indx[])
|
||||
@@ -1371,7 +1377,7 @@ _LOtransfer(char **destfd,
|
||||
{
|
||||
#define MAX_READ (512 * 1024)
|
||||
#define min(a, b) (a < b ? a : b)
|
||||
struct varlena *v;
|
||||
struct varlena *v = NULL;
|
||||
int tmp, inc, resid;
|
||||
|
||||
inc = nitems*size;
|
||||
|
||||
@@ -6,11 +6,14 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.3 1996/11/06 10:30:40 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.4 1996/11/08 05:59:40 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include <libpq/be-fsstubs.h>
|
||||
@@ -46,12 +49,14 @@ static int _FindBestChunk(int size, int dmax[], int dbest[], int dim,
|
||||
int A[MAXPAT][MAXDIM+1], int N);
|
||||
static int get_next(int d[], int k, int C, int dmax[]);
|
||||
static void initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[]);
|
||||
#ifdef LOARRAY
|
||||
static void _ConvertToChunkFile(int n, int baseSize, int dim[], int C[],
|
||||
int srcfd, int destfd);
|
||||
static void read_chunk(int chunk_no[], int C[], char a_chunk[], int srcfd,
|
||||
int n, int baseSize, int PX[], int dist[]);
|
||||
static int write_chunk(struct varlena * a_chunk, int ofile);
|
||||
static int seek_and_read(int pos, int size, char buff[], int fp, int from);
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
* _ChunkArray ---
|
||||
@@ -71,7 +76,9 @@ _ChunkArray(int fd,
|
||||
int *nbytes,
|
||||
char *chunkfile)
|
||||
{
|
||||
int cfd;
|
||||
#ifdef LOARRAY
|
||||
int cfd = 0;
|
||||
#endif
|
||||
int chunk[MAXDIM], csize;
|
||||
bool reorgFlag;
|
||||
|
||||
@@ -86,17 +93,20 @@ _ChunkArray(int fd,
|
||||
chunkfile = _array_newLO( &cfd, fileFlag );
|
||||
else
|
||||
cfd = LOopen(chunkfile, O_RDONLY);
|
||||
#endif
|
||||
if (cfd < 0)
|
||||
elog(WARN, "Enable to open chunk file");
|
||||
elog(WARN, "Unable to open chunk file");
|
||||
#endif
|
||||
|
||||
strcpy (cInfo.lo_name, chunkfile);
|
||||
|
||||
/* find chunk size */
|
||||
csize = GetChunkSize(afd, ndim, dim, baseSize, chunk);
|
||||
|
||||
#ifdef LOARRAY
|
||||
if (reorgFlag)
|
||||
/* copy data from input file to chunked file */
|
||||
_ConvertToChunkFile(ndim, baseSize, dim, chunk, fd, cfd);
|
||||
#endif
|
||||
|
||||
initialize_info(&cInfo, ndim, dim, chunk);
|
||||
*nbytes = sizeof(CHUNK_INFO);
|
||||
@@ -231,8 +241,10 @@ get_next(int d[], int k, int C, int dmax[])
|
||||
return(1);
|
||||
}
|
||||
|
||||
#ifdef LOARRAY
|
||||
static char a_chunk[_PAGE_SIZE_ + 4]; /* 4 since a_chunk is in
|
||||
varlena format */
|
||||
#endif
|
||||
|
||||
static void
|
||||
initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
|
||||
@@ -254,6 +266,7 @@ initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef LOARRAY
|
||||
static void
|
||||
_ConvertToChunkFile(int n,
|
||||
int baseSize,
|
||||
@@ -337,7 +350,7 @@ read_chunk(int chunk_no[],
|
||||
static int
|
||||
write_chunk(struct varlena * a_chunk, int ofile)
|
||||
{
|
||||
int got_n;
|
||||
int got_n = 0;
|
||||
#ifdef LOARRAY
|
||||
got_n = LOwrite (ofile, a_chunk);
|
||||
#endif
|
||||
@@ -354,7 +367,7 @@ write_chunk(struct varlena * a_chunk, int ofile)
|
||||
static int
|
||||
seek_and_read(int pos, int size, char buff[], int fp, int from)
|
||||
{
|
||||
struct varlena *v;
|
||||
struct varlena *v = NULL;
|
||||
|
||||
/* Assuming only one file */
|
||||
if ( lo_lseek(fp, pos, from ) < 0)
|
||||
@@ -369,6 +382,7 @@ seek_and_read(int pos, int size, char buff[], int fp, int from)
|
||||
return(1);
|
||||
|
||||
}
|
||||
#endif /* LOARRAY */
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* _ReadChunkArray --
|
||||
@@ -453,7 +467,7 @@ _ReadChunkArray(int st[],
|
||||
for (i = 0; i < n; range[i++] = 0);
|
||||
j = n-1; bptr *= bsize;
|
||||
if (isDestLO) {
|
||||
if (lo_lseek(destfp, bptr, SEEK_SET) < 0)
|
||||
if (lo_lseek((int)destfp, bptr, SEEK_SET) < 0)
|
||||
RETURN_NULL;
|
||||
}
|
||||
else
|
||||
@@ -480,7 +494,7 @@ _ReadChunkArray(int st[],
|
||||
block_seek += cdist[j];
|
||||
bptr += adist[j]*bsize;
|
||||
if (isDestLO) {
|
||||
if (lo_lseek(destfp, bptr, SEEK_SET) < 0)
|
||||
if (lo_lseek((int)destfp, bptr, SEEK_SET) < 0)
|
||||
RETURN_NULL;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.2 1996/11/06 06:49:47 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.3 1996/11/08 05:59:41 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
|
||||
{
|
||||
|
||||
struct varlena *s;
|
||||
Size size;
|
||||
Size size = 0;
|
||||
|
||||
if (byVal) {
|
||||
if (len >= 0 && len <= sizeof(Datum)) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.4 1996/11/06 10:30:51 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.5 1996/11/08 05:59:43 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ char *
|
||||
filename_in(char *file)
|
||||
{
|
||||
char *str, *getenv();
|
||||
int ind;
|
||||
int ind = 0;
|
||||
|
||||
/*
|
||||
* XXX - HACK CITY --- REDO
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.6 1996/11/06 06:49:51 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.7 1996/11/08 05:59:45 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -589,8 +589,9 @@ qmktime(struct tm *tp)
|
||||
* correction
|
||||
*/
|
||||
if (day > nmdays[mon])
|
||||
if (mon != 2 || year % 4 == 0 &&
|
||||
(year % 100 != 0 || year % 400 == 0) && day > 29)
|
||||
if (mon != 2 ||
|
||||
(year % 4 == 0 &&
|
||||
((year % 100 != 0 || year % 400 == 0)) && day > 29))
|
||||
return -1; /* day too large for month */
|
||||
|
||||
/* split year into century and year-of-century */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.2 1996/11/06 06:49:59 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.3 1996/11/08 05:59:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ int32 regprocin(char *proname)
|
||||
HeapScanDesc procscan;
|
||||
HeapTuple proctup;
|
||||
ScanKeyData key;
|
||||
RegProcedure result;
|
||||
RegProcedure result = (Oid)0;
|
||||
bool isnull;
|
||||
|
||||
if (proname == NULL)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.2 1996/11/06 06:50:01 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.3 1996/11/08 05:59:49 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ SetDefine(char *querystr, char *typename)
|
||||
char *procname = GENERICSETNAME;
|
||||
char *fileName = "-";
|
||||
char realprocname[16];
|
||||
HeapTuple tup, newtup;
|
||||
HeapTuple tup, newtup = NULL;
|
||||
Form_pg_proc proc;
|
||||
Relation procrel;
|
||||
int i;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.7 1996/11/06 06:50:07 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.8 1996/11/08 05:59:51 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -133,7 +133,7 @@ byteaout(struct varlena *vlena)
|
||||
vp = vlena->vl_dat;
|
||||
for (i = vlena->vl_len - sizeof(int32); i != 0; i--) /* varlena? */
|
||||
if (*vp == '\\') {
|
||||
*vp++;
|
||||
vp++;
|
||||
*rp++ = '\\';
|
||||
*rp++ = '\\';
|
||||
} else if (isascii(*vp) && isprint(*vp))
|
||||
|
||||
4
src/backend/utils/cache/catcache.c
vendored
4
src/backend/utils/cache/catcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.3 1996/10/24 07:59:46 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.4 1996/11/08 05:59:53 momjian Exp $
|
||||
*
|
||||
* Notes:
|
||||
* XXX This needs to use exception.h to handle recovery when
|
||||
@@ -744,7 +744,7 @@ SearchSysCache(struct catcache *cache,
|
||||
CatCTup *nct;
|
||||
CatCTup *nct2;
|
||||
Dlelem *elt;
|
||||
HeapTuple ntp;
|
||||
HeapTuple ntp = 0;
|
||||
Buffer buffer;
|
||||
|
||||
Relation relation;
|
||||
|
||||
4
src/backend/utils/cache/inval.c
vendored
4
src/backend/utils/cache/inval.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.2 1996/11/06 10:31:24 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.3 1996/11/08 05:59:55 momjian Exp $
|
||||
*
|
||||
* Note - this code is real crufty...
|
||||
*
|
||||
@@ -449,7 +449,7 @@ RelationInvalidateRelationCache(Relation relation,
|
||||
void (*function)())
|
||||
{
|
||||
Oid relationId;
|
||||
Oid objectId;
|
||||
Oid objectId = (Oid)0;
|
||||
|
||||
/* ----------------
|
||||
* get the relation object id
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.8 1996/11/06 10:31:33 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.9 1996/11/08 05:59:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -58,7 +58,10 @@ elog(int lev, const char *fmt, ... )
|
||||
#ifndef PG_STANDALONE
|
||||
extern FILE *Pfout;
|
||||
#endif /* !PG_STANDALONE */
|
||||
time_t tim, time();
|
||||
time_t time();
|
||||
#ifdef ELOG_TIMESTAMPS
|
||||
time_t tim;
|
||||
#endif
|
||||
int len;
|
||||
int i = 0;
|
||||
|
||||
@@ -231,7 +234,7 @@ DebugFileOpen()
|
||||
fd = fileno(stderr);
|
||||
if (fcntl(fd, F_GETFD, 0) < 0) {
|
||||
sprintf(OutputFileName, "%s/pg.errors.%d",
|
||||
GetPGData(), getpid());
|
||||
GetPGData(), (int)getpid());
|
||||
fd = open(OutputFileName, O_CREAT|O_APPEND|O_WRONLY, 0666);
|
||||
}
|
||||
#endif /* WIN32 */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.1.1.1 1996/07/09 06:22:08 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.2 1996/11/08 06:00:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -113,7 +113,7 @@ fmgr_c(func_ptr user_fn,
|
||||
void
|
||||
fmgr_info(Oid procedureId, func_ptr *function, int *nargs)
|
||||
{
|
||||
func_ptr user_fn;
|
||||
func_ptr user_fn = NULL;
|
||||
FmgrCall *fcp;
|
||||
HeapTuple procedureTuple;
|
||||
FormData_pg_proc *procedureStruct;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.3 1996/11/06 10:31:43 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.4 1996/11/08 06:00:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -43,6 +43,7 @@
|
||||
# include <sys/types.h>
|
||||
# include <string.h>
|
||||
# include "postgres.h"
|
||||
# include "utils/dynahash.h"
|
||||
# include "utils/hsearch.h"
|
||||
#ifndef FRONTEND
|
||||
# include "utils/mcxt.h"
|
||||
@@ -65,7 +66,6 @@
|
||||
*/
|
||||
static long *DynaHashAlloc(unsigned int size);
|
||||
static void DynaHashFree(Pointer ptr);
|
||||
static int hash_clear(HTAB *hashp);
|
||||
static uint32 call_hash(HTAB *hashp, char *k, int len);
|
||||
static SEG_OFFSET seg_alloc(HTAB *hashp);
|
||||
static int bucket_alloc(HTAB *hashp);
|
||||
@@ -352,14 +352,6 @@ init_htab (HTAB *hashp, int nelem)
|
||||
|
||||
/********************** DESTROY ROUTINES ************************/
|
||||
|
||||
static int
|
||||
hash_clear(HTAB *hashp)
|
||||
{
|
||||
elog(NOTICE,"hash_clear not implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
hash_destroy (HTAB *hashp)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.4 1996/11/06 10:31:59 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.5 1996/11/08 06:00:33 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* InitPostgres() is the function called from PostgresMain
|
||||
@@ -325,7 +325,7 @@ InitCommunication()
|
||||
char *getenv(); /* XXX style */
|
||||
char *postid;
|
||||
char *postport;
|
||||
IPCKey key;
|
||||
IPCKey key = 0;
|
||||
|
||||
/* ----------------
|
||||
* try and get the backend tag from POSTID
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.2 1996/11/06 10:32:04 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.3 1996/11/08 06:00:48 momjian Exp $
|
||||
*
|
||||
* NOTE
|
||||
* XXX This is a preliminary implementation which lacks fail-fast
|
||||
@@ -368,7 +368,7 @@ AllocPointerGetNext(AllocPointer pointer)
|
||||
void
|
||||
AllocPointerDump(AllocPointer pointer)
|
||||
{
|
||||
printf("\t%-10d@ %0#x\n", ((long*)pointer)[-1], pointer); /* XXX */
|
||||
printf("\t%-10ld@ %0#lx\n", ((long*)pointer)[-1], (long)pointer); /* XXX */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.2 1996/11/08 06:00:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -77,8 +77,9 @@ static Pointer GlobalMemoryRealloc(GlobalMemory this, Pointer pointer,
|
||||
Size size);
|
||||
static char *GlobalMemoryGetName(GlobalMemory this);
|
||||
static void GlobalMemoryDump(GlobalMemory this);
|
||||
#ifdef NOT_USED
|
||||
static void DumpGlobalMemories(void);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global Memory Methods
|
||||
@@ -493,6 +494,7 @@ GlobalMemoryDump(GlobalMemory this)
|
||||
* Exceptions:
|
||||
* ???
|
||||
*/
|
||||
#ifdef NOT_USED
|
||||
static void
|
||||
DumpGlobalMemories()
|
||||
{
|
||||
@@ -507,4 +509,4 @@ DumpGlobalMemories()
|
||||
&context->elemData);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.2 1996/11/03 06:54:25 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.3 1996/11/08 06:00:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -465,6 +465,7 @@ AtEOXact_portals()
|
||||
* PortalDump
|
||||
* ----------------
|
||||
*/
|
||||
#ifdef NOT_USED
|
||||
static void
|
||||
PortalDump(Portal *thisP)
|
||||
{
|
||||
@@ -473,11 +474,13 @@ PortalDump(Portal *thisP)
|
||||
PortalVariableMemoryDump(PortalGetVariableMemory(*thisP));
|
||||
PortalHeapMemoryDump(PortalGetHeapMemory(*thisP));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ----------------
|
||||
* DumpPortals
|
||||
* ----------------
|
||||
*/
|
||||
#ifdef NOT_USED
|
||||
static void
|
||||
DumpPortals()
|
||||
{
|
||||
@@ -485,7 +488,8 @@ DumpPortals()
|
||||
|
||||
HashTableWalk(PortalHashTable, PortalDump, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* public portal interface functions
|
||||
* ----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user