mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
pgindent run before 6.3 release, with Thomas' requested changes.
This commit is contained in:
@@ -72,10 +72,10 @@ static int readExports(ModulePtr);
|
||||
static void terminate(void);
|
||||
static void *findMain(void);
|
||||
|
||||
void *
|
||||
void *
|
||||
dlopen(const char *path, int mode)
|
||||
{
|
||||
ModulePtr mp;
|
||||
ModulePtr mp;
|
||||
static void *mainModule;
|
||||
|
||||
/*
|
||||
@@ -168,7 +168,7 @@ dlopen(const char *path, int mode)
|
||||
*/
|
||||
if (mode & RTLD_GLOBAL)
|
||||
{
|
||||
ModulePtr mp1;
|
||||
ModulePtr mp1;
|
||||
|
||||
for (mp1 = mp->next; mp1; mp1 = mp1->next)
|
||||
if (loadbind(0, mp1->entry, mp->entry) == -1)
|
||||
@@ -221,7 +221,7 @@ dlopen(const char *path, int mode)
|
||||
static void
|
||||
caterr(char *s)
|
||||
{
|
||||
char *p = s;
|
||||
char *p = s;
|
||||
|
||||
while (*p >= '0' && *p <= '9')
|
||||
p++;
|
||||
@@ -255,12 +255,12 @@ caterr(char *s)
|
||||
}
|
||||
}
|
||||
|
||||
void *
|
||||
void *
|
||||
dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
ModulePtr mp = (ModulePtr) handle;
|
||||
ExportPtr ep;
|
||||
int i;
|
||||
ModulePtr mp = (ModulePtr) handle;
|
||||
ExportPtr ep;
|
||||
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)
|
||||
@@ -289,9 +289,9 @@ dlerror(void)
|
||||
int
|
||||
dlclose(void *handle)
|
||||
{
|
||||
ModulePtr mp = (ModulePtr) handle;
|
||||
ModulePtr mp = (ModulePtr) handle;
|
||||
int result;
|
||||
ModulePtr mp1;
|
||||
ModulePtr mp1;
|
||||
|
||||
if (--mp->refCnt > 0)
|
||||
return 0;
|
||||
@@ -311,8 +311,8 @@ dlclose(void *handle)
|
||||
}
|
||||
if (mp->exports)
|
||||
{
|
||||
ExportPtr ep;
|
||||
int i;
|
||||
ExportPtr ep;
|
||||
int i;
|
||||
|
||||
for (ep = mp->exports, i = mp->nExports; i; i--, ep++)
|
||||
if (ep->name)
|
||||
@@ -537,7 +537,7 @@ readExports(ModulePtr mp)
|
||||
* first SYMNMLEN chars and make sure we have a zero byte at
|
||||
* the end.
|
||||
*/
|
||||
StrNCpy(tmpsym, ls->l_name, SYMNMLEN+1);
|
||||
StrNCpy(tmpsym, ls->l_name, SYMNMLEN + 1);
|
||||
symname = tmpsym;
|
||||
}
|
||||
ep->name = strdup(symname);
|
||||
|
||||
@@ -48,7 +48,7 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
|
||||
|
||||
static char error_message[BUFSIZ];
|
||||
|
||||
char *
|
||||
char *
|
||||
BSD44_derived_dlerror(void)
|
||||
{
|
||||
static char ret[BUFSIZ];
|
||||
@@ -58,7 +58,7 @@ BSD44_derived_dlerror(void)
|
||||
return ((ret[0] == 0) ? (char *) NULL : ret);
|
||||
}
|
||||
|
||||
void *
|
||||
void *
|
||||
BSD44_derived_dlopen(const char *file, int num)
|
||||
{
|
||||
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
|
||||
@@ -75,7 +75,7 @@ BSD44_derived_dlopen(const char *file, int num)
|
||||
#endif
|
||||
}
|
||||
|
||||
void *
|
||||
void *
|
||||
BSD44_derived_dlsym(void *handle, const char *name)
|
||||
{
|
||||
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
extern char pg_pathname[];
|
||||
|
||||
void *
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
{
|
||||
static int dl_initialized = 0;
|
||||
@@ -97,7 +97,7 @@ pg_dlopen(char *filename)
|
||||
return (void *) strdup(filename);
|
||||
}
|
||||
|
||||
char *
|
||||
char *
|
||||
pg_dlerror()
|
||||
{
|
||||
return dld_strerror(dld_errno);
|
||||
|
||||
@@ -2,6 +2,5 @@
|
||||
*
|
||||
* see dgux.h
|
||||
*
|
||||
* $Id: dgux.c,v 1.2 1998/02/14 19:56:19 scrappy Exp $
|
||||
* $Id: dgux.c,v 1.3 1998/02/26 04:34:24 momjian Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* dgux.h--
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: dgux.h,v 1.2 1998/02/14 19:56:21 scrappy Exp $
|
||||
* $Id: dgux.h,v 1.3 1998/02/26 04:34:25 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.2 1998/02/02 00:10:10 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.3 1998/02/26 04:34:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* all functions are defined here -- it's impossible to trace the
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "utils/dynamic_loader.h"
|
||||
#include "dynloader.h"
|
||||
|
||||
void *
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
{
|
||||
shl_t handle = shl_load(filename, BIND_DEFERRED, 0);
|
||||
@@ -50,7 +50,7 @@ pg_dlclose(void *handle)
|
||||
shl_unload((shl_t) handle);
|
||||
}
|
||||
|
||||
char *
|
||||
char *
|
||||
pg_dlerror()
|
||||
{
|
||||
static char errmsg[] = "shl_load failed";
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.6 1998/01/07 21:04:23 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.7 1998/02/26 04:34:27 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -28,7 +28,7 @@
|
||||
#if FALSE
|
||||
extern char pg_pathname[];
|
||||
|
||||
void *
|
||||
void *
|
||||
pg_dlopen(char *filename)
|
||||
{
|
||||
#ifndef HAVE_DLD_H
|
||||
@@ -106,7 +106,7 @@ pg_dlopen(char *filename)
|
||||
#endif
|
||||
}
|
||||
|
||||
char *
|
||||
char *
|
||||
pg_dlerror()
|
||||
{
|
||||
#ifndef HAVE_DLD_H
|
||||
@@ -115,4 +115,5 @@ pg_dlerror()
|
||||
return dld_strerror(dld_errno);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: linux.h,v 1.2 1998/01/01 06:02:04 thomas Exp $
|
||||
* $Id: linux.h,v 1.3 1998/02/26 04:34:28 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -39,4 +39,4 @@
|
||||
|
||||
/* port.c */
|
||||
|
||||
#endif /* PORT_PROTOS_H */
|
||||
#endif /* PORT_PROTOS_H */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Dummy file used for nothing at this point
|
||||
*
|
||||
* see univel.h
|
||||
*/
|
||||
/* Dummy file used for nothing at this point
|
||||
*
|
||||
* see univel.h
|
||||
*/
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* port-protos.h--
|
||||
* port-specific prototypes for Intel x86/UNIXWARE
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* port-protos.h,v 1.2 1995/03/17 06:40:18 andrew Exp
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* port-protos.h--
|
||||
* port-specific prototypes for Intel x86/UNIXWARE
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* port-protos.h,v 1.2 1995/03/17 06:40:18 andrew Exp
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef PORT_PROTOS_H
|
||||
#define PORT_PROTOS_H
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
#include "fmgr.h" /* for func_ptr */
|
||||
#include "utils/dynamic_loader.h"
|
||||
|
||||
/* dynloader.c */
|
||||
/*
|
||||
* Dynamic Loader on Intel x86/Intel SVR4.
|
||||
*
|
||||
* this dynamic loader uses the system dynamic loading interface for shared
|
||||
* libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
|
||||
* library as the file to be dynamically loaded.
|
||||
*
|
||||
*/
|
||||
/* dynloader.c */
|
||||
/*
|
||||
* Dynamic Loader on Intel x86/Intel SVR4.
|
||||
*
|
||||
* this dynamic loader uses the system dynamic loading interface for shared
|
||||
* libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
|
||||
* library as the file to be dynamically loaded.
|
||||
*
|
||||
*/
|
||||
#define pg_dlopen(f) dlopen(f,RTLD_LAZY)
|
||||
#define pg_dlsym dlsym
|
||||
#define pg_dlclose dlclose
|
||||
#define pg_dlerror dlerror
|
||||
|
||||
#endif /* PORT_PROTOS_H */
|
||||
#endif /* PORT_PROTOS_H */
|
||||
|
||||
Reference in New Issue
Block a user