diff options
Diffstat (limited to 'src/backend/port')
41 files changed, 381 insertions, 381 deletions
diff --git a/src/backend/port/BSD44_derived/dl.c b/src/backend/port/BSD44_derived/dl.c index 091507204b..42d15d840f 100644 --- a/src/backend/port/BSD44_derived/dl.c +++ b/src/backend/port/BSD44_derived/dl.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; +static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; #endif /* LIBC_SCCS and not lint */ @@ -46,26 +46,26 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; #include "port-protos.h" -static char error_message[BUFSIZ]; +static char error_message[BUFSIZ]; -char * +char * BSD44_derived_dlerror(void) { - static char ret[BUFSIZ]; + static char ret[BUFSIZ]; strcpy(ret, error_message); error_message[0] = 0; return ((ret[0] == 0) ? (char *) NULL : ret); } -void * +void * BSD44_derived_dlopen(const char *file, int num) { #ifdef __mips__ sprintf(error_message, "dlopen (%s) not supported", file); return NULL; #else - void *vp; + void *vp; if ((vp = dlopen((char *) file, num)) == (void *) NULL) { @@ -75,15 +75,15 @@ BSD44_derived_dlopen(const char *file, int num) #endif } -void * +void * BSD44_derived_dlsym(void *handle, const char *name) { #ifdef __mips__ sprintf(error_message, "dlsym (%s) failed", name); return NULL; #else - void *vp; - char buf[BUFSIZ]; + void *vp; + char buf[BUFSIZ]; if (*name != '_') { diff --git a/src/backend/port/BSD44_derived/port-protos.h b/src/backend/port/BSD44_derived/port-protos.h index 2452355d29..224058dfea 100644 --- a/src/backend/port/BSD44_derived/port-protos.h +++ b/src/backend/port/BSD44_derived/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.7 1997/09/07 04:45:03 momjian Exp $ + * $Id: port-protos.h,v 1.8 1997/09/08 02:25:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -40,9 +40,9 @@ #define pg_dlclose BSD44_derived_dlclose #define pg_dlerror BSD44_derived_dlerror -char *BSD44_derived_dlerror(void); -void *BSD44_derived_dlopen(const char *filename, int num); -void *BSD44_derived_dlsym(void *handle, const char *name); -void BSD44_derived_dlclose(void *handle); +char *BSD44_derived_dlerror(void); +void *BSD44_derived_dlopen(const char *filename, int num); +void *BSD44_derived_dlsym(void *handle, const char *name); +void BSD44_derived_dlclose(void *handle); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/aix/dlfcn.c b/src/backend/port/aix/dlfcn.c index 58a3dea3c1..e42b00f247 100644 --- a/src/backend/port/aix/dlfcn.c +++ b/src/backend/port/aix/dlfcn.c @@ -24,9 +24,9 @@ typedef struct { - char *name; /* the symbols's name */ - void *addr; /* its relocated virtual address */ -} Export, *ExportPtr; + char *name; /* the symbols's name */ + void *addr; /* its relocated virtual address */ +} Export, *ExportPtr; /* * xlC uses the following structure to list its constructors and @@ -34,24 +34,24 @@ typedef struct */ typedef struct { - void (*init) (void); /* call static constructors */ - void (*term) (void); /* call static destructors */ -} Cdtor, *CdtorPtr; + void (*init) (void); /* call static constructors */ + void (*term) (void); /* call static destructors */ +} Cdtor, *CdtorPtr; /* * The void * handle returned from dlopen is actually a ModulePtr. */ typedef struct Module { - struct Module *next; - char *name; /* module name for refcounting */ - int refCnt; /* the number of references */ - void *entry; /* entry point from load */ + struct Module *next; + char *name; /* module name for refcounting */ + int refCnt; /* the number of references */ + void *entry; /* entry point from load */ struct dl_info *info; /* optional init/terminate functions */ - CdtorPtr cdtors; /* optional C++ constructors */ - int nExports; /* the number of exports found */ - ExportPtr exports; /* the array of exports */ -} Module, *ModulePtr; + CdtorPtr cdtors; /* optional C++ constructors */ + int nExports; /* the number of exports found */ + ExportPtr exports; /* the array of exports */ +} Module, *ModulePtr; /* * We keep a list of all loaded modules to be able to call the fini @@ -63,20 +63,20 @@ static ModulePtr modList; * The last error from one of the dl* routines is kept in static * variables here. Each error is returned only once to the caller. */ -static char errbuf[BUFSIZ]; -static int errvalid; +static char errbuf[BUFSIZ]; +static int errvalid; -extern char *strdup(const char *); -static void caterr(char *); -static int readExports(ModulePtr); -static void terminate(void); -static void *findMain(void); +extern char *strdup(const char *); +static void caterr(char *); +static int readExports(ModulePtr); +static void terminate(void); +static void *findMain(void); -void * +void * dlopen(const char *path, int mode) { register ModulePtr mp; - static void *mainModule; + static void *mainModule; /* * Upon the first call register a terminate handler that will close @@ -134,13 +134,13 @@ dlopen(const char *path, int mode) */ if (errno == ENOEXEC) { - char *tmp[BUFSIZ / sizeof(char *)]; + char *tmp[BUFSIZ / sizeof(char *)]; if (loadquery(L_GETMESSAGES, tmp, sizeof(tmp)) == -1) strcpy(errbuf, strerror(errno)); else { - char **p; + char **p; for (p = tmp; *p; p++) caterr(*p); @@ -221,46 +221,46 @@ dlopen(const char *path, int mode) static void caterr(char *s) { - register char *p = s; + register char *p = s; while (*p >= '0' && *p <= '9') p++; switch (atoi(s)) { - case L_ERROR_TOOMANY: - strcat(errbuf, "to many errors"); - break; - case L_ERROR_NOLIB: - strcat(errbuf, "can't load library"); - strcat(errbuf, p); - break; - case L_ERROR_UNDEF: - strcat(errbuf, "can't find symbol"); - strcat(errbuf, p); - break; - case L_ERROR_RLDBAD: - strcat(errbuf, "bad RLD"); - strcat(errbuf, p); - break; - case L_ERROR_FORMAT: - strcat(errbuf, "bad exec format in"); - strcat(errbuf, p); - break; - case L_ERROR_ERRNO: - strcat(errbuf, strerror(atoi(++p))); - break; - default: - strcat(errbuf, s); - break; + case L_ERROR_TOOMANY: + strcat(errbuf, "to many errors"); + break; + case L_ERROR_NOLIB: + strcat(errbuf, "can't load library"); + strcat(errbuf, p); + break; + case L_ERROR_UNDEF: + strcat(errbuf, "can't find symbol"); + strcat(errbuf, p); + break; + case L_ERROR_RLDBAD: + strcat(errbuf, "bad RLD"); + strcat(errbuf, p); + break; + case L_ERROR_FORMAT: + strcat(errbuf, "bad exec format in"); + strcat(errbuf, p); + break; + case L_ERROR_ERRNO: + strcat(errbuf, strerror(atoi(++p))); + break; + default: + strcat(errbuf, s); + break; } } -void * +void * dlsym(void *handle, const char *symbol) { register ModulePtr mp = (ModulePtr) handle; register ExportPtr ep; - register int i; + register int i; /* * Could speed up the search, but I assume that one assigns the result @@ -275,7 +275,7 @@ dlsym(void *handle, const char *symbol) return NULL; } -char * +char * dlerror(void) { if (errvalid) @@ -290,7 +290,7 @@ int dlclose(void *handle) { register ModulePtr mp = (ModulePtr) handle; - int result; + int result; register ModulePtr mp1; if (--mp->refCnt > 0) @@ -312,7 +312,7 @@ dlclose(void *handle) if (mp->exports) { register ExportPtr ep; - register int i; + register int i; for (ep = mp->exports, i = mp->nExports; i; i--, ep++) if (ep->name) @@ -348,20 +348,20 @@ terminate(void) static int readExports(ModulePtr mp) { - LDFILE *ldp = NULL; - SCNHDR sh, - shdata; - LDHDR *lhp; - char *ldbuf; - LDSYM *ls; - int i; - ExportPtr ep; + LDFILE *ldp = NULL; + SCNHDR sh, + shdata; + LDHDR *lhp; + char *ldbuf; + LDSYM *ls; + int i; + ExportPtr ep; if ((ldp = ldopen(mp->name, ldp)) == NULL) { struct ld_info *lp; - char *buf; - int size = 4 * 1024; + char *buf; + int size = 4 * 1024; if (errno != ENOENT) { @@ -522,8 +522,8 @@ readExports(ModulePtr mp) ls = (LDSYM *) (ldbuf + LDHDRSZ); for (i = lhp->l_nsyms; i; i--, ls++) { - char *symname; - char tmpsym[SYMNMLEN + 1]; + char *symname; + char tmpsym[SYMNMLEN + 1]; if (!LDR_EXPORT(*ls)) continue; @@ -555,14 +555,14 @@ readExports(ModulePtr mp) * Find the main modules entry point. This is used as export pointer * for loadbind() to be able to resolve references to the main part. */ -static void * +static void * findMain(void) { struct ld_info *lp; - char *buf; - int size = 4 * 1024; - int i; - void *ret; + char *buf; + int size = 4 * 1024; + int i; + void *ret; if ((buf = malloc(size)) == NULL) { diff --git a/src/backend/port/aix/dlfcn.h b/src/backend/port/aix/dlfcn.h index 1e874d9655..0a4f322e9d 100644 --- a/src/backend/port/aix/dlfcn.h +++ b/src/backend/port/aix/dlfcn.h @@ -8,7 +8,7 @@ #define __dlfcn_h__ #ifdef __cplusplus -extern "C" +extern "C" { #endif @@ -25,20 +25,20 @@ extern "C" */ struct dl_info { - void (*init) (void); - void (*fini) (void); + void (*init) (void); + void (*fini) (void); }; #if __STDC__ || defined(_IBMR2) - void *dlopen(const char *path, int mode); - void *dlsym(void *handle, const char *symbol); - char *dlerror(void); - int dlclose(void *handle); + void *dlopen(const char *path, int mode); + void *dlsym(void *handle, const char *symbol); + char *dlerror(void); + int dlclose(void *handle); #else - void *dlopen(); - void *dlsym(); - char *dlerror(); - int dlclose(); + void *dlopen(); + void *dlsym(); + char *dlerror(); + int dlclose(); #endif #ifdef __cplusplus diff --git a/src/backend/port/alpha/port-protos.h b/src/backend/port/alpha/port-protos.h index 3b5cb47ade..89c7d42043 100644 --- a/src/backend/port/alpha/port-protos.h +++ b/src/backend/port/alpha/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.2 1997/09/07 04:45:20 momjian Exp $ + * $Id: port-protos.h,v 1.3 1997/09/08 02:25:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -34,6 +34,6 @@ /* port.c */ -extern void init_address_fixup(void); +extern void init_address_fixup(void); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/alpha/port.c b/src/backend/port/alpha/port.c index 80b03088a4..e01ca93dc8 100644 --- a/src/backend/port/alpha/port.c +++ b/src/backend/port/alpha/port.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/alpha/Attic/port.c,v 1.2 1997/09/07 04:45:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/alpha/Attic/port.c,v 1.3 1997/09/08 02:25:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,11 +21,11 @@ void init_address_fixup() { #ifdef NOFIXADE - int buffer[] = {SSIN_UACPROC, UAC_SIGBUS}; + int buffer[] = {SSIN_UACPROC, UAC_SIGBUS}; #endif /* NOFIXADE */ #ifdef NOPRINTADE - int buffer[] = {SSIN_UACPROC, UAC_NOPRINT}; + int buffer[] = {SSIN_UACPROC, UAC_NOPRINT}; #endif /* NOPRINTADE */ diff --git a/src/backend/port/bsdi/dynloader.c b/src/backend/port/bsdi/dynloader.c index cfaeec0c20..9754236a20 100644 --- a/src/backend/port/bsdi/dynloader.c +++ b/src/backend/port/bsdi/dynloader.c @@ -22,12 +22,12 @@ #include "utils/elog.h" #include "fmgr.h" -extern char pg_pathname[]; +extern char pg_pathname[]; -void * +void * pg_dlopen(char *filename) { - static int dl_initialized = 0; + static int dl_initialized = 0; /* * initializes the dynamic loader with the executable's pathname. @@ -76,8 +76,8 @@ pg_dlopen(char *filename) } if (dld_undefined_sym_count > 0) { - int count = dld_undefined_sym_count; - char **list = dld_list_undefined_sym(); + int count = dld_undefined_sym_count; + char **list = dld_list_undefined_sym(); /* list the undefined symbols, if any */ elog(NOTICE, "dld: Undefined:"); @@ -97,7 +97,7 @@ pg_dlopen(char *filename) return (void *) strdup(filename); } -char * +char * pg_dlerror() { return dld_strerror(dld_errno); diff --git a/src/backend/port/bsdi/port-protos.h b/src/backend/port/bsdi/port-protos.h index acd0e85a49..579706d0bb 100644 --- a/src/backend/port/bsdi/port-protos.h +++ b/src/backend/port/bsdi/port-protos.h @@ -17,8 +17,8 @@ * Externals in libc that need prototypes (or at least declarations) */ -extern char *ecvt(double, int, int *, int *); -extern char *fcvt(double, int, int *, int *); +extern char *ecvt(double, int, int *, int *); +extern char *fcvt(double, int, int *, int *); #include "fmgr.h" /* for func_ptr */ diff --git a/src/backend/port/dgux/dynloader.c b/src/backend/port/dgux/dynloader.c index 0f7d38bc09..47834c7486 100644 --- a/src/backend/port/dgux/dynloader.c +++ b/src/backend/port/dgux/dynloader.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/dgux/Attic/dynloader.c,v 1.2 1997/09/07 04:45:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/dgux/Attic/dynloader.c,v 1.3 1997/09/08 02:26:05 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -19,12 +19,12 @@ #include "utils/elog.h" #include "fmgr.h" -extern char pg_pathname[]; +extern char pg_pathname[]; -void * +void * pg_dlopen(char *filename) { - static int dl_initialized = 0; + static int dl_initialized = 0; /* * initializes the dynamic loader with the executable's pathname. @@ -73,8 +73,8 @@ pg_dlopen(char *filename) } if (dld_undefined_sym_count > 0) { - int count = dld_undefined_sym_count; - char **list = dld_list_undefined_sym(); + int count = dld_undefined_sym_count; + char **list = dld_list_undefined_sym(); /* list the undefined symbols, if any */ elog(NOTICE, "dld: Undefined:"); @@ -94,7 +94,7 @@ pg_dlopen(char *filename) return (void *) strdup(filename); } -char * +char * pg_dlerror() { return dld_strerror(dld_errno); diff --git a/src/backend/port/hpux/dynloader.c b/src/backend/port/hpux/dynloader.c index 3c7a8acaa7..972654adb5 100644 --- a/src/backend/port/hpux/dynloader.c +++ b/src/backend/port/hpux/dynloader.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/dynloader.c,v 1.2 1997/09/07 04:45:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/dynloader.c,v 1.3 1997/09/08 02:26:15 momjian Exp $ * * NOTES * all functions are defined here -- it's impossible to trace the @@ -24,10 +24,10 @@ #include "utils/dynamic_loader.h" #include "port-protos.h" -void * +void * pg_dlopen(char *filename) { - shl_t handle = shl_load(filename, BIND_DEFERRED, 0); + shl_t handle = shl_load(filename, BIND_DEFERRED, 0); return ((void *) handle); } @@ -35,7 +35,7 @@ pg_dlopen(char *filename) func_ptr pg_dlsym(void *handle, char *funcname) { - func_ptr f; + func_ptr f; if (shl_findsym((shl_t *) & handle, funcname, TYPE_PROCEDURE, &f) == -1) { @@ -50,10 +50,10 @@ pg_dlclose(void *handle) shl_unload((shl_t) handle); } -char * +char * pg_dlerror() { - static char errmsg[] = "shl_load failed"; + static char errmsg[] = "shl_load failed"; return errmsg; } diff --git a/src/backend/port/hpux/fixade.h b/src/backend/port/hpux/fixade.h index 094cd13ca8..8ed40481ab 100644 --- a/src/backend/port/hpux/fixade.h +++ b/src/backend/port/hpux/fixade.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: fixade.h,v 1.2 1997/09/07 04:45:48 momjian Exp $ + * $Id: fixade.h,v 1.3 1997/09/08 02:26:22 momjian Exp $ * * NOTES * This must be included in EVERY source file. @@ -47,11 +47,11 @@ */ struct HP_WAY_BOGUS { - char hpwb_bogus[8192]; + char hpwb_bogus[8192]; }; struct HP_TOO_BOGUS { - int hptb_bogus[8192]; + int hptb_bogus[8192]; }; #endif /* BROKEN_STRUCT_INIT */ diff --git a/src/backend/port/hpux/port-protos.h b/src/backend/port/hpux/port-protos.h index 76b336aae2..7b4fad99fa 100644 --- a/src/backend/port/hpux/port-protos.h +++ b/src/backend/port/hpux/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.3 1997/09/07 04:45:51 momjian Exp $ + * $Id: port-protos.h,v 1.4 1997/09/08 02:26:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -24,11 +24,11 @@ /* port.c */ -extern int init_address_fixup(void); -extern double rint(double x); -extern double cbrt(double x); -extern long random(void); -extern void srandom(unsigned seed); -extern int getrusage(int who, struct rusage * ru); +extern int init_address_fixup(void); +extern double rint(double x); +extern double cbrt(double x); +extern long random(void); +extern void srandom(unsigned seed); +extern int getrusage(int who, struct rusage * ru); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/hpux/rusagestub.h b/src/backend/port/hpux/rusagestub.h index 5eda998802..9f32a10cc1 100644 --- a/src/backend/port/hpux/rusagestub.h +++ b/src/backend/port/hpux/rusagestub.h @@ -22,10 +22,10 @@ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* RUSAGESTUB_H */ diff --git a/src/backend/port/i386_solaris/port-protos.h b/src/backend/port/i386_solaris/port-protos.h index 6118a65046..dd5d73418a 100644 --- a/src/backend/port/i386_solaris/port-protos.h +++ b/src/backend/port/i386_solaris/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.2 1997/09/07 04:45:56 momjian Exp $ + * $Id: port-protos.h,v 1.3 1997/09/08 02:26:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -32,7 +32,7 @@ #define pg_dlerror dlerror /* port.c */ -extern long random(void); -extern void srandom(int seed); +extern long random(void); +extern void srandom(int seed); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/i386_solaris/port.c b/src/backend/port/i386_solaris/port.c index 119163a186..71e8d9b95d 100644 --- a/src/backend/port/i386_solaris/port.c +++ b/src/backend/port/i386_solaris/port.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/port.c,v 1.2 1997/09/07 04:45:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/port.c,v 1.3 1997/09/08 02:26:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -31,10 +31,10 @@ srandom(int seed) int getrusage(int who, struct rusage * rusage) { - struct tms tms; - register int tick_rate = CLK_TCK; /* ticks per second */ - clock_t u, - s; + struct tms tms; + register int tick_rate = CLK_TCK; /* ticks per second */ + clock_t u, + s; if (rusage == (struct rusage *) NULL) { @@ -48,17 +48,17 @@ getrusage(int who, struct rusage * rusage) } switch (who) { - case RUSAGE_SELF: - u = tms.tms_utime; - s = tms.tms_stime; - break; - case RUSAGE_CHILDREN: - u = tms.tms_cutime; - s = tms.tms_cstime; - break; - default: - errno = EINVAL; - return (-1); + case RUSAGE_SELF: + u = tms.tms_utime; + s = tms.tms_stime; + break; + case RUSAGE_CHILDREN: + u = tms.tms_cutime; + s = tms.tms_cstime; + break; + default: + errno = EINVAL; + return (-1); } #define TICK_TO_SEC(T, RATE) ((T)/(RATE)) #define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE) diff --git a/src/backend/port/i386_solaris/rusagestub.h b/src/backend/port/i386_solaris/rusagestub.h index c6e2ceae45..1370e509c5 100644 --- a/src/backend/port/i386_solaris/rusagestub.h +++ b/src/backend/port/i386_solaris/rusagestub.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rusagestub.h,v 1.2 1997/09/07 04:46:04 momjian Exp $ + * $Id: rusagestub.h,v 1.3 1997/09/08 02:26:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,10 +22,10 @@ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* RUSAGESTUB_H */ diff --git a/src/backend/port/inet_aton.c b/src/backend/port/inet_aton.c index 122875eda3..f1283e6e6b 100644 --- a/src/backend/port/inet_aton.c +++ b/src/backend/port/inet_aton.c @@ -58,10 +58,10 @@ int inet_aton(const char *cp, struct in_addr * addr) { register u_long val; - register int base, - n; - register char c; - u_int parts[4]; + register int base, + n; + register char c; + u_int parts[4]; register u_int *pp = parts; for (;;) @@ -125,26 +125,26 @@ inet_aton(const char *cp, struct in_addr * addr) switch (n) { - case 1: /* a -- 32 bits */ - break; + case 1: /* a -- 32 bits */ + break; - case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffff) - return (0); - val |= parts[0] << 24; - break; + case 2: /* a.b -- 8.24 bits */ + if (val > 0xffffff) + return (0); + val |= parts[0] << 24; + break; - case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16); - break; + case 3: /* a.b.c -- 8.8.16 bits */ + if (val > 0xffff) + return (0); + val |= (parts[0] << 24) | (parts[1] << 16); + break; - case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) - return (0); - val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); - break; + case 4: /* a.b.c.d -- 8.8.8.8 bits */ + if (val > 0xff) + return (0); + val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); + break; } if (addr) addr->s_addr = htonl(val); diff --git a/src/backend/port/inet_aton.h b/src/backend/port/inet_aton.h index b1df9a8ff3..8d04f544bc 100644 --- a/src/backend/port/inet_aton.h +++ b/src/backend/port/inet_aton.h @@ -1,2 +1,2 @@ int - inet_aton(const char *cp, struct in_addr * addr); + inet_aton(const char *cp, struct in_addr * addr); diff --git a/src/backend/port/irix5/port-protos.h b/src/backend/port/irix5/port-protos.h index be894ed5b1..2babb773e0 100644 --- a/src/backend/port/irix5/port-protos.h +++ b/src/backend/port/irix5/port-protos.h @@ -32,6 +32,6 @@ #define pg_dlerror dlerror /* port.c */ -extern long random(void); +extern long random(void); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/linux/dynloader.c b/src/backend/port/linux/dynloader.c index adb13b4019..ee4f17cb9d 100644 --- a/src/backend/port/linux/dynloader.c +++ b/src/backend/port/linux/dynloader.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/linux/Attic/dynloader.c,v 1.3 1997/09/07 04:46:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/linux/Attic/dynloader.c,v 1.4 1997/09/08 02:26:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -23,16 +23,16 @@ #include "utils/elog.h" #include "fmgr.h" -extern char pg_pathname[]; +extern char pg_pathname[]; -void * +void * pg_dlopen(char *filename) { #ifndef HAVE_DLD_H elog(WARN, "dynamic load not supported"); return (NULL); #else - static int dl_initialized = 0; + static int dl_initialized = 0; /* * initializes the dynamic loader with the executable's pathname. @@ -81,8 +81,8 @@ pg_dlopen(char *filename) } if (dld_undefined_sym_count > 0) { - int count = dld_undefined_sym_count; - char **list = dld_list_undefined_sym(); + int count = dld_undefined_sym_count; + char **list = dld_list_undefined_sym(); /* list the undefined symbols, if any */ elog(NOTICE, "dld: Undefined:"); @@ -103,7 +103,7 @@ pg_dlopen(char *filename) #endif } -char * +char * pg_dlerror() { #ifndef HAVE_DLD_H diff --git a/src/backend/port/nextstep/dynloader.c b/src/backend/port/nextstep/dynloader.c index c37508f7f1..649454d48a 100644 --- a/src/backend/port/nextstep/dynloader.c +++ b/src/backend/port/nextstep/dynloader.c @@ -2,7 +2,7 @@ #include <streams/streams.h> #include <stdlib.h> -static char *lastError = NULL; +static char *lastError = NULL; static NXStream * OpenError() @@ -20,9 +20,9 @@ CloseError(NXStream * s) static void TransferError(NXStream * s) { - char *buffer; - int len, - maxlen; + char *buffer; + int len, + maxlen; if (lastError) free(lastError); @@ -31,13 +31,13 @@ TransferError(NXStream * s) strcpy(lastError, buffer); } -void * +void * next_dlopen(char *name) { - int rld_success; - NXStream *errorStream; - char *result = NULL; - char **p; + int rld_success; + NXStream *errorStream; + char *result = NULL; + char **p; errorStream = OpenError(); p = calloc(2, sizeof(void *)); @@ -60,12 +60,12 @@ next_dlclose(void *handle) return 0; } -void * +void * next_dlsym(void *handle, char *symbol) { - NXStream *errorStream = OpenError(); - char symbuf[1024]; - unsigned long symref = 0; + NXStream *errorStream = OpenError(); + char symbuf[1024]; + unsigned long symref = 0; sprintf(symbuf, "_%s", symbol); if (!rld_lookup(errorStream, symbuf, &symref)) @@ -74,7 +74,7 @@ next_dlsym(void *handle, char *symbol) return (void *) symref; } -char * +char * next_dlerror(void) { return lastError; diff --git a/src/backend/port/nextstep/port-protos.h b/src/backend/port/nextstep/port-protos.h index ce17beb69a..9dfb20a99e 100644 --- a/src/backend/port/nextstep/port-protos.h +++ b/src/backend/port/nextstep/port-protos.h @@ -12,10 +12,10 @@ #include "fmgr.h" /* for func_ptr */ #include "utils/dynamic_loader.h" -void *next_dlopen(char *name); -int next_dlclose(void *handle); -void *next_dlsym(void *handle, char *symbol); -char *next_dlerror(void); +void *next_dlopen(char *name); +int next_dlclose(void *handle); +void *next_dlsym(void *handle, char *symbol); +char *next_dlerror(void); #define pg_dlopen(f) next_dlopen #define pg_dlsym next_dlsym diff --git a/src/backend/port/nextstep/port.c b/src/backend/port/nextstep/port.c index baf026d5d1..c71befe015 100644 --- a/src/backend/port/nextstep/port.c +++ b/src/backend/port/nextstep/port.c @@ -12,9 +12,9 @@ void putenv(char *name) { - extern char **environ; - static int was_mallocated = 0; - int size; + extern char **environ; + static int was_mallocated = 0; + int size; /* Compute the size of environ array including the final NULL */ for (size = 1; environ[size++];) @@ -22,8 +22,8 @@ putenv(char *name) if (!was_mallocated) { - char **tmp = environ; - int i; + char **tmp = environ; + int i; was_mallocated = 1; environ = malloc(size * sizeof(char *)); @@ -36,7 +36,7 @@ putenv(char *name) environ[size] = NULL; } -char * +char * strdup(const char *string) { return strcpy(malloc(strlen(string) + 1), string); @@ -56,7 +56,7 @@ sigemptyset(int *set) return (*set = 0); } -char * +char * getcwd(char *buf, size_t size) { return getwd(buf); diff --git a/src/backend/port/sco/port.c b/src/backend/port/sco/port.c index d1c868e842..d7acc97a75 100644 --- a/src/backend/port/sco/port.c +++ b/src/backend/port/sco/port.c @@ -21,10 +21,10 @@ int getrusage(int who, struct rusage * rusage) { - struct tms tms; - register int tick_rate = CLK_TCK; /* ticks per second */ - clock_t u, - s; + struct tms tms; + register int tick_rate = CLK_TCK; /* ticks per second */ + clock_t u, + s; if (rusage == (struct rusage *) NULL) { @@ -38,17 +38,17 @@ getrusage(int who, struct rusage * rusage) } switch (who) { - case RUSAGE_SELF: - u = tms.tms_utime; - s = tms.tms_stime; - break; - case RUSAGE_CHILDREN: - u = tms.tms_cutime; - s = tms.tms_cstime; - break; - default: - errno = EINVAL; - return (-1); + case RUSAGE_SELF: + u = tms.tms_utime; + s = tms.tms_stime; + break; + case RUSAGE_CHILDREN: + u = tms.tms_cutime; + s = tms.tms_cstime; + break; + default: + errno = EINVAL; + return (-1); } #define TICK_TO_SEC(T, RATE) ((T)/(RATE)) #define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE) diff --git a/src/backend/port/sco/rusagestub.h b/src/backend/port/sco/rusagestub.h index 5eda998802..9f32a10cc1 100644 --- a/src/backend/port/sco/rusagestub.h +++ b/src/backend/port/sco/rusagestub.h @@ -22,10 +22,10 @@ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* RUSAGESTUB_H */ diff --git a/src/backend/port/sparc_solaris/port-protos.h b/src/backend/port/sparc_solaris/port-protos.h index 9523917346..36a423df67 100644 --- a/src/backend/port/sparc_solaris/port-protos.h +++ b/src/backend/port/sparc_solaris/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.5 1997/09/07 04:46:50 momjian Exp $ + * $Id: port-protos.h,v 1.6 1997/09/08 02:27:06 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -36,17 +36,17 @@ #define pg_dlerror dlerror /* port.c */ -extern long random(void); -extern void srandom(int seed); +extern long random(void); +extern void srandom(int seed); /* inet_aton.c in backend/port directory */ -extern int inet_aton(const char *cp, struct in_addr * addr); +extern int inet_aton(const char *cp, struct in_addr * addr); /* In system library, but can't find prototype in system library .h files */ -extern int gethostname(char *name, int namelen); +extern int gethostname(char *name, int namelen); /* In system library, but can't find prototype in system library .h files */ #include <sys/resource.h> -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/sparc_solaris/port.c b/src/backend/port/sparc_solaris/port.c index 7f19a1ae23..69980d6ea8 100644 --- a/src/backend/port/sparc_solaris/port.c +++ b/src/backend/port/sparc_solaris/port.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.5 1997/09/07 04:46:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.6 1997/09/08 02:27:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -38,10 +38,10 @@ srandom(int seed) int getrusage(int who, struct rusage * rusage) { - struct tms tms; - register int tick_rate = CLK_TCK; /* ticks per second */ - clock_t u, - s; + struct tms tms; + register int tick_rate = CLK_TCK; /* ticks per second */ + clock_t u, + s; if (rusage == (struct rusage *) NULL) { @@ -55,17 +55,17 @@ getrusage(int who, struct rusage * rusage) } switch (who) { - case RUSAGE_SELF: - u = tms.tms_utime; - s = tms.tms_stime; - break; - case RUSAGE_CHILDREN: - u = tms.tms_cutime; - s = tms.tms_cstime; - break; - default: - errno = EINVAL; - return (-1); + case RUSAGE_SELF: + u = tms.tms_utime; + s = tms.tms_stime; + break; + case RUSAGE_CHILDREN: + u = tms.tms_cutime; + s = tms.tms_cstime; + break; + default: + errno = EINVAL; + return (-1); } #define TICK_TO_SEC(T, RATE) ((T)/(RATE)) #define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE) diff --git a/src/backend/port/sparc_solaris/rusagestub.h b/src/backend/port/sparc_solaris/rusagestub.h index 87957a45ea..708cfc9ff1 100644 --- a/src/backend/port/sparc_solaris/rusagestub.h +++ b/src/backend/port/sparc_solaris/rusagestub.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: rusagestub.h,v 1.2 1997/09/07 04:46:56 momjian Exp $ + * $Id: rusagestub.h,v 1.3 1997/09/08 02:27:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,10 +22,10 @@ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* RUSAGESTUB_H */ diff --git a/src/backend/port/strerror.c b/src/backend/port/strerror.c index 5bcd3cb452..2e0511d04d 100644 --- a/src/backend/port/strerror.c +++ b/src/backend/port/strerror.c @@ -12,12 +12,12 @@ #include <errno.h> extern const char *const sys_errlist[]; -extern int sys_nerr; +extern int sys_nerr; -const char * +const char * strerror(int errnum) { - static char buf[24]; + static char buf[24]; if (errnum < 0 || errnum > sys_nerr) { diff --git a/src/backend/port/sunos4/strtol.c b/src/backend/port/sunos4/strtol.c index c788d94bd5..dcf3e89860 100644 --- a/src/backend/port/sunos4/strtol.c +++ b/src/backend/port/sunos4/strtol.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91"; +static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91"; #endif /* LIBC_SCCS and not lint */ @@ -51,17 +51,17 @@ static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91"; */ long strtol(nptr, endptr, base) -const char *nptr; -char **endptr; -register int base; +const char *nptr; +char **endptr; +register int base; { register const char *s = nptr; register unsigned long acc; - register int c; + register int c; register unsigned long cutoff; - register int neg = 0, - any, - cutlim; + register int neg = 0, + any, + cutlim; /* * Skip white space and pick up leading +/- sign if any. If base is 0, diff --git a/src/backend/port/svr4/port-protos.h b/src/backend/port/svr4/port-protos.h index 1baff08876..3926b25342 100644 --- a/src/backend/port/svr4/port-protos.h +++ b/src/backend/port/svr4/port-protos.h @@ -32,7 +32,7 @@ #define pg_dlerror dlerror /* port.c */ -extern long random(void); -extern void srandom(int seed); +extern long random(void); +extern void srandom(int seed); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/svr4/port.c b/src/backend/port/svr4/port.c index 0b38e2c4ac..92acee71ec 100644 --- a/src/backend/port/svr4/port.c +++ b/src/backend/port/svr4/port.c @@ -31,10 +31,10 @@ srandom(int seed) int getrusage(int who, struct rusage * rusage) { - struct tms tms; - register int tick_rate = CLK_TCK; /* ticks per second */ - clock_t u, - s; + struct tms tms; + register int tick_rate = CLK_TCK; /* ticks per second */ + clock_t u, + s; if (rusage == (struct rusage *) NULL) { @@ -48,17 +48,17 @@ getrusage(int who, struct rusage * rusage) } switch (who) { - case RUSAGE_SELF: - u = tms.tms_utime; - s = tms.tms_stime; - break; - case RUSAGE_CHILDREN: - u = tms.tms_cutime; - s = tms.tms_cstime; - break; - default: - errno = EINVAL; - return (-1); + case RUSAGE_SELF: + u = tms.tms_utime; + s = tms.tms_stime; + break; + case RUSAGE_CHILDREN: + u = tms.tms_cutime; + s = tms.tms_cstime; + break; + default: + errno = EINVAL; + return (-1); } #define TICK_TO_SEC(T, RATE) ((T)/(RATE)) #define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE) @@ -82,7 +82,7 @@ getrusage(int who, struct rusage * rusage) */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; +static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; #endif /* LIBC_SCCS and not lint */ @@ -133,7 +133,7 @@ int strcasecmp(char *s1, char *s2) { register unsigned char u1, - u2; + u2; for (;;) { diff --git a/src/backend/port/svr4/rusagestub.h b/src/backend/port/svr4/rusagestub.h index 5eda998802..9f32a10cc1 100644 --- a/src/backend/port/svr4/rusagestub.h +++ b/src/backend/port/svr4/rusagestub.h @@ -22,10 +22,10 @@ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* RUSAGESTUB_H */ diff --git a/src/backend/port/ultrix4/dl.h b/src/backend/port/ultrix4/dl.h index 56eab754bf..9014e151a5 100644 --- a/src/backend/port/ultrix4/dl.h +++ b/src/backend/port/ultrix4/dl.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: dl.h,v 1.4 1997/09/07 04:47:18 momjian Exp $ + * $Id: dl.h,v 1.5 1997/09/08 02:27:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -42,73 +42,73 @@ #include <scnhdr.h> -typedef long CoreAddr; +typedef long CoreAddr; typedef struct ScnInfo { - CoreAddr addr; /* starting address of the section */ - SCNHDR hdr; /* section header */ - RELOC *relocEntries; /* relocation entries */ -} ScnInfo; + CoreAddr addr; /* starting address of the section */ + SCNHDR hdr; /* section header */ + RELOC *relocEntries; /* relocation entries */ +} ScnInfo; typedef enum { DL_NEEDRELOC, /* still need relocation */ DL_RELOCATED, /* no relocation necessary */ DL_INPROG /* relocation in progress */ -} dlRStatus; +} dlRStatus; typedef struct JmpTbl { - char *block; /* the jump table memory block */ - struct JmpTbl *next; /* next block */ -} JmpTbl; + char *block; /* the jump table memory block */ + struct JmpTbl *next; /* next block */ +} JmpTbl; typedef struct dlFile { - char *filename; /* file name of the object file */ + char *filename; /* file name of the object file */ - int textSize; /* used by mprotect */ - CoreAddr textAddress;/* start addr of text section */ - long textVaddr; /* vaddr of text section in obj file */ - CoreAddr rdataAddress; /* start addr of rdata section */ - long rdataVaddr; /* vaddr of text section in obj file */ - CoreAddr dataAddress;/* start addr of data section */ - long dataVaddr; /* vaddr of text section in obj file */ - CoreAddr bssAddress; /* start addr of bss section */ - long bssVaddr; /* vaddr of text section in obj file */ + int textSize; /* used by mprotect */ + CoreAddr textAddress; /* start addr of text section */ + long textVaddr; /* vaddr of text section in obj file */ + CoreAddr rdataAddress; /* start addr of rdata section */ + long rdataVaddr; /* vaddr of text section in obj file */ + CoreAddr dataAddress; /* start addr of data section */ + long dataVaddr; /* vaddr of text section in obj file */ + CoreAddr bssAddress; /* start addr of bss section */ + long bssVaddr; /* vaddr of text section in obj file */ - int nsect; /* number of sections */ - ScnInfo *sect; /* details of each section (array) */ + int nsect; /* number of sections */ + ScnInfo *sect; /* details of each section (array) */ - int issExtMax; /* size of string space */ - char *extss; /* extern sym string space (in core) */ - int iextMax; /* maximum number of Symbols */ - pEXTR extsyms; /* extern syms */ + int issExtMax; /* size of string space */ + char *extss; /* extern sym string space (in core) */ + int iextMax; /* maximum number of Symbols */ + pEXTR extsyms; /* extern syms */ - dlRStatus relocStatus;/* what relocation needed? */ - int needReloc; + dlRStatus relocStatus; /* what relocation needed? */ + int needReloc; - JmpTbl *jmptable; /* the jump table for R_JMPADDR */ + JmpTbl *jmptable; /* the jump table for R_JMPADDR */ - struct dlFile *next; /* next member of the archive */ -} dlFile; + struct dlFile *next; /* next member of the archive */ +} dlFile; typedef struct dlSymbol { - char *name; /* name of the symbol */ - long addr; /* address of the symbol */ - dlFile *objFile; /* from which file */ -} dlSymbol; + char *name; /* name of the symbol */ + long addr; /* address of the symbol */ + dlFile *objFile; /* from which file */ +} dlSymbol; /* * prototypes for the dl* interface */ -extern void *dl_open( /* char *filename, int mode */ ); -extern void *dl_sym( /* void *handle, char *name */ ); -extern void dl_close( /* void *handle */ ); -extern char *dl_error( /* void */ ); +extern void *dl_open( /* char *filename, int mode */ ); +extern void *dl_sym( /* void *handle, char *name */ ); +extern void dl_close( /* void *handle */ ); +extern char *dl_error( /* void */ ); #define DL_LAZY 0 /* lazy resolution */ #define DL_NOW 1 /* immediate resolution */ @@ -116,8 +116,8 @@ extern char *dl_error( /* void */ ); /* * Miscellaneous utility routines: */ -extern char **dl_undefinedSymbols( /* int *count */ ); -extern void dl_printAllSymbols( /* void *handle */ ); -extern void dl_setLibraries( /* char *libs */ ); +extern char **dl_undefinedSymbols( /* int *count */ ); +extern void dl_printAllSymbols( /* void *handle */ ); +extern void dl_setLibraries( /* char *libs */ ); #endif /* _DL_HEADER_ */ diff --git a/src/backend/port/ultrix4/dynloader.c b/src/backend/port/ultrix4/dynloader.c index d896eebf90..761289233e 100644 --- a/src/backend/port/ultrix4/dynloader.c +++ b/src/backend/port/ultrix4/dynloader.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.4 1997/09/07 04:47:21 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.5 1997/09/08 02:27:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -22,13 +22,13 @@ #include "port-protos.h" #include "utils/elog.h" -extern char pg_pathname[]; +extern char pg_pathname[]; -void * +void * pg_dlopen(char *filename) { - static int dl_initialized = 0; - void *handle; + static int dl_initialized = 0; + void *handle; /* * initializes the dynamic loader with the executable's pathname. @@ -56,8 +56,8 @@ pg_dlopen(char *filename) */ if ((handle = dl_open(filename, DL_NOW)) == NULL) { - int count; - char **list = dl_undefinedSymbols(&count); + int count; + char **list = dl_undefinedSymbols(&count); /* list the undefined symbols, if any */ if (count) diff --git a/src/backend/port/ultrix4/port-protos.h b/src/backend/port/ultrix4/port-protos.h index 25f49db393..091e852841 100644 --- a/src/backend/port/ultrix4/port-protos.h +++ b/src/backend/port/ultrix4/port-protos.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: port-protos.h,v 1.6 1997/09/07 04:47:24 momjian Exp $ + * $Id: port-protos.h,v 1.7 1997/09/08 02:27:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,8 +17,8 @@ * Externals in libc that need prototypes (or at least declarations) */ -extern char *ecvt(double, int, int *, int *); -extern char *fcvt(double, int, int *, int *); +extern char *ecvt(double, int, int *, int *); +extern char *fcvt(double, int, int *, int *); /* dynloader.c */ /* @@ -32,16 +32,16 @@ extern char *fcvt(double, int, int *, int *); #define pg_dlsym(h, f) ((func_ptr)dl_sym(h, f)) #define pg_dlclose(h) dl_close(h) #define pg_dlerror() dl_error() -extern int dl_init(char *); +extern int dl_init(char *); /* port.c */ -extern int syscall(); +extern int syscall(); -extern void init_address_fixup(void); +extern void init_address_fixup(void); /* strdup.c: strdup() is not part of libc on Ultrix */ -extern char *strdup(char const *); +extern char *strdup(char const *); /* inet_aton() is not part of libc on Ultrix. The following is from backend/port/inet_aton.h @@ -49,6 +49,6 @@ extern char *strdup(char const *); struct in_addr; int - inet_aton(const char *cp, struct in_addr * addr); + inet_aton(const char *cp, struct in_addr * addr); #endif /* PORT_PORTOS_H */ diff --git a/src/backend/port/ultrix4/strdup.c b/src/backend/port/ultrix4/strdup.c index a738e1611e..395e544a68 100644 --- a/src/backend/port/ultrix4/strdup.c +++ b/src/backend/port/ultrix4/strdup.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.3 1997/09/07 04:47:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/strdup.c,v 1.4 1997/09/08 02:27:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -17,10 +17,10 @@ #include "port-protos.h" -char * +char * strdup(char const * string) { - char *nstr; + char *nstr; nstr = strcpy((char *) palloc(strlen(string) + 1), string); return nstr; diff --git a/src/backend/port/univel/frontend-port-protos.h b/src/backend/port/univel/frontend-port-protos.h index 9ca0100cb9..215633b6b7 100644 --- a/src/backend/port/univel/frontend-port-protos.h +++ b/src/backend/port/univel/frontend-port-protos.h @@ -14,9 +14,9 @@ #define FPORT_PROTOS_H /* port.c */ -extern long random(void); -extern void srandom(int seed); -extern int strcasecmp(char *s1, char *s2); -extern int gethostname(char *name, int namelen); +extern long random(void); +extern void srandom(int seed); +extern int strcasecmp(char *s1, char *s2); +extern int gethostname(char *name, int namelen); #endif /* FPORT_PROTOS_H */ diff --git a/src/backend/port/univel/port-protos.h b/src/backend/port/univel/port-protos.h index c181edfc9e..a4af145110 100644 --- a/src/backend/port/univel/port-protos.h +++ b/src/backend/port/univel/port-protos.h @@ -32,9 +32,9 @@ #define pg_dlerror dlerror /* port.c */ -extern long random(void); -extern void srandom(int seed); -extern int strcasecmp(char *s1, char *s2); -extern int gethostname(char *name, int namelen); +extern long random(void); +extern void srandom(int seed); +extern int strcasecmp(char *s1, char *s2); +extern int gethostname(char *name, int namelen); #endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/univel/port.c b/src/backend/port/univel/port.c index d4c7658859..37cefb2221 100644 --- a/src/backend/port/univel/port.c +++ b/src/backend/port/univel/port.c @@ -32,10 +32,10 @@ srandom(int seed) int getrusage(int who, struct rusage * rusage) { - struct tms tms; - register int tick_rate = CLK_TCK; /* ticks per second */ - clock_t u, - s; + struct tms tms; + register int tick_rate = CLK_TCK; /* ticks per second */ + clock_t u, + s; if (rusage == (struct rusage *) NULL) { @@ -49,17 +49,17 @@ getrusage(int who, struct rusage * rusage) } switch (who) { - case RUSAGE_SELF: - u = tms.tms_utime; - s = tms.tms_stime; - break; - case RUSAGE_CHILDREN: - u = tms.tms_cutime; - s = tms.tms_cstime; - break; - default: - errno = EINVAL; - return (-1); + case RUSAGE_SELF: + u = tms.tms_utime; + s = tms.tms_stime; + break; + case RUSAGE_CHILDREN: + u = tms.tms_cutime; + s = tms.tms_cstime; + break; + default: + errno = EINVAL; + return (-1); } #define TICK_TO_SEC(T, RATE) ((T)/(RATE)) #define TICK_TO_USEC(T,RATE) (((T)%(RATE)*1000000)/RATE) @@ -83,7 +83,7 @@ getrusage(int who, struct rusage * rusage) */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; +static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87"; #endif /* LIBC_SCCS and not lint */ @@ -134,7 +134,7 @@ int strcasecmp(char *s1, char *s2) { register unsigned char u1, - u2; + u2; for (;;) { @@ -157,7 +157,7 @@ int gethostname(char *name, int namelen) { static struct utsname mname; - static int called = 0; + static int called = 0; if (!called) { diff --git a/src/backend/port/univel/rusagestub.h b/src/backend/port/univel/rusagestub.h index 5eda998802..9f32a10cc1 100644 --- a/src/backend/port/univel/rusagestub.h +++ b/src/backend/port/univel/rusagestub.h @@ -22,10 +22,10 @@ struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ }; -extern int getrusage(int who, struct rusage * rusage); +extern int getrusage(int who, struct rusage * rusage); #endif /* RUSAGESTUB_H */ |