From a723d151605c2c85523a4aa60a048ee9a57cc60d Mon Sep 17 00:00:00 2001 From: mainzelm Date: Mon, 22 Jan 2001 12:48:00 +0000 Subject: [PATCH] Fixed include directive for dlfcn.h: include if HAVE_DLOPEN, ../fake/dlfcn.h otherwise. --- c/fake/dlfcn.h | 4 ---- c/fake/libdl1.c | 7 ++++++- c/unix/dynamo.c | 6 +++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/c/fake/dlfcn.h b/c/fake/dlfcn.h index 2c29be7..e76adc9 100644 --- a/c/fake/dlfcn.h +++ b/c/fake/dlfcn.h @@ -1,11 +1,7 @@ /* * This include file is for systems which do not have dynamic loading. */ -#if ! defined(HAVE_DLOPEN) - extern void *dlopen(char *filename, int flags); extern char *dlerror(void); extern void *dlsym(void *lib, char *name); extern int dlclose(void *lib); - -#endif diff --git a/c/fake/libdl1.c b/c/fake/libdl1.c index 5d0049d..e59e974 100644 --- a/c/fake/libdl1.c +++ b/c/fake/libdl1.c @@ -7,11 +7,16 @@ #include "sysdep.h" #include #include -#include "../fake/dlfcn.h" #ifdef USCORE #include #endif +#if defined(HAVE_DLOPEN) +#include +#else +#include "../fake/dlfcn.h" +#endif + #if ! defined(NLIST_HAS_N_NAME) #define n_name n_un.n_name #endif diff --git a/c/unix/dynamo.c b/c/unix/dynamo.c index 9ab5bd1..1231513 100644 --- a/c/unix/dynamo.c +++ b/c/unix/dynamo.c @@ -7,8 +7,12 @@ #include #include "sysdep.h" #include "scheme48.h" -#include "../fake/dlfcn.h" +#if defined(HAVE_DLOPEN) +#include +#else +#include "../fake/dlfcn.h" +#endif #if defined(RTLD_NOW) #define DLOPEN_MODE RTLD_NOW