mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
FreeBSD doesn't require the dl{open,close,sym,error} functions, as they are
already included in the system libraries. Used if !defined(__FreeBSD__) to single FreeBSD out from the other BSD44 derived OSs
This commit is contained in:
@ -45,6 +45,8 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
|
|||||||
|
|
||||||
#include "port-protos.h"
|
#include "port-protos.h"
|
||||||
|
|
||||||
|
#if !defined(__FreeBSD__)
|
||||||
|
|
||||||
static char error_message[BUFSIZ];
|
static char error_message[BUFSIZ];
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -101,3 +103,5 @@ BSD44_derived_dlclose(void *handle)
|
|||||||
dlclose(handle);
|
dlclose(handle);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* __FreeBSD__ */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: port-protos.h,v 1.3 1996/10/31 11:09:37 scrappy Exp $
|
* $Id: port-protos.h,v 1.4 1997/01/03 04:59:01 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -35,10 +35,17 @@
|
|||||||
* begin with an underscore is fairly tricky, and some versions of
|
* begin with an underscore is fairly tricky, and some versions of
|
||||||
* NetBSD (like 1.0, and 1.0A pre June 1995) have no dlerror.)
|
* NetBSD (like 1.0, and 1.0A pre June 1995) have no dlerror.)
|
||||||
*/
|
*/
|
||||||
#define pg_dlopen(f) BSD44_derived_dlopen(f, 1)
|
#if !defined(__FreeBSD__)
|
||||||
#define pg_dlsym BSD44_derived_dlsym
|
# define pg_dlopen(f) BSD44_derived_dlopen(f, 1)
|
||||||
#define pg_dlclose BSD44_derived_dlclose
|
# define pg_dlsym BSD44_derived_dlsym
|
||||||
#define pg_dlerror BSD44_derived_dlerror
|
# define pg_dlclose BSD44_derived_dlclose
|
||||||
|
# define pg_dlerror BSD44_derived_dlerror
|
||||||
|
#else
|
||||||
|
# define pg_dlopen(f) dlopen(f, 1)
|
||||||
|
# define pg_dlsym dlsym
|
||||||
|
# define pg_dlclose dlclose
|
||||||
|
# define pg_dlerror dlerror
|
||||||
|
#endif
|
||||||
|
|
||||||
char * BSD44_derived_dlerror(void);
|
char * BSD44_derived_dlerror(void);
|
||||||
void * BSD44_derived_dlopen(const char *filename, int num);
|
void * BSD44_derived_dlopen(const char *filename, int num);
|
||||||
|
Reference in New Issue
Block a user