1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00
Files
postgres/src/backend/port/dynloader/ultrix4.c
Bruce Momjian 92288a1cf9 Change made to elog:
o  Change all current CVS messages of NOTICE to WARNING.  We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.

o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.

o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.

o Remove INFO from the client_min_messages options and add NOTICE.

Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.

Regression passed.
2002-03-06 06:10:59 +00:00

69 lines
1.6 KiB
C

/*-------------------------------------------------------------------------
*
* dynloader.c
* This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
*
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.14 2002/03/06 06:09:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "dl.h"
#include "utils/dynamic_loader.h"
extern char pg_pathname[];
void *
pg_dlopen(char *filename)
{
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.
*/
dl_setLibraries("/usr/lib/libm_G0.a:/usr/lib/libc_G0.a");
dl_initialized = 1;
}
/*
* 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(WARNING, "dl: Undefined:");
while (*list)
{
elog(WARNING, " %s", *list);
list++;
}
}
}
return (void *) handle;
}