1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

Fix Linux dynloader code for pre-HAVE_DLOPEN systems, which evidently

are still in use out there.  Per report from Brendan LeFebvre.
This commit is contained in:
Tom Lane
2002-10-15 16:04:17 +00:00
parent 951ec872c7
commit 3a2ef59116
2 changed files with 34 additions and 23 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: linux.h,v 1.18 2002/06/20 20:29:33 momjian Exp $
* $Id: linux.h,v 1.19 2002/10/15 16:04:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,21 +20,7 @@
#endif
#ifndef HAVE_DLOPEN
#ifndef HAVE_DLD_H
#define pg_dlsym(handle, funcname) (NULL)
#define pg_dlclose(handle) {}
#else
#define pg_dlsym(handle, funcname) ((PGFunction) dld_get_func((funcname)))
#define pg_dlclose(handle) \
do { \
dld_unlink_by_file(handle, 1); \
free(handle); \
} while (0)
#endif
#else /* HAVE_DLOPEN */
#ifdef HAVE_DLOPEN
/*
* In some older systems, the RTLD_NOW flag isn't defined and the mode
@@ -53,6 +39,7 @@ do { \
#define pg_dlsym dlsym
#define pg_dlclose dlclose
#define pg_dlerror dlerror
#endif /* HAVE_DLOPEN */
#endif /* PORT_PROTOS_H */