1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Massive commit to run PGINDENT on all *.c and *.h files.

This commit is contained in:
Bruce Momjian
1997-09-07 05:04:48 +00:00
parent 8fecd4febf
commit 1ccd423235
687 changed files with 150775 additions and 136888 deletions

View File

@@ -1,15 +1,15 @@
/*-------------------------------------------------------------------------
*
* dynloader.c--
* This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
* (Note that pg_dlsym and pg_dlclose are actually macros defined in
* "port-protos.h".)
*
* This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
* (Note that pg_dlsym and pg_dlclose are actually macros defined in
* "port-protos.h".)
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.3 1996/11/26 03:18:50 bryanh Exp $
* $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/dynloader.c,v 1.4 1997/09/07 04:47:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,49 +22,54 @@
#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.
* (only needs to do this the first time pg_dlopen is called.)
*/
if (!dl_initialized) {
if (!dl_init(pg_pathname)) {
return NULL;
}
/*
* if there are undefined symbols, we want dl to search from the
* following libraries also.
* initializes the dynamic loader with the executable's pathname.
* (only needs to do this the first time pg_dlopen is called.)
*/
dl_setLibraries("/usr/lib/libm_G0.a:/usr/lib/libc_G0.a");
dl_initialized= 1;
}
if (!dl_initialized)
{
if (!dl_init(pg_pathname))
{
return NULL;
}
/*
* open the file. We do the symbol resolution right away so that we
* will know if there are undefined symbols. (This is in fact the
* same semantics as "ld -A". ie. you cannot have undefined symbols.
*/
if ((handle=dl_open(filename, DL_NOW))==NULL) {
int count;
char **list= dl_undefinedSymbols(&count);
/* list the undefined symbols, if any */
if(count) {
elog(NOTICE, "dl: Undefined:");
while(*list) {
elog(NOTICE, " %s", *list);
list++;
}
/*
* if there are undefined symbols, we want dl to search from the
* following libraries also.
*/
dl_setLibraries("/usr/lib/libm_G0.a:/usr/lib/libc_G0.a");
dl_initialized = 1;
}
}
return (void *)handle;
/*
* open the file. We do the symbol resolution right away so that we
* will know if there are undefined symbols. (This is in fact the same
* semantics as "ld -A". ie. you cannot have undefined symbols.
*/
if ((handle = dl_open(filename, DL_NOW)) == NULL)
{
int count;
char **list = dl_undefinedSymbols(&count);
/* list the undefined symbols, if any */
if (count)
{
elog(NOTICE, "dl: Undefined:");
while (*list)
{
elog(NOTICE, " %s", *list);
list++;
}
}
}
return (void *) handle;
}