httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@lerdorf.on.ca (Rasmus Lerdorf)
Subject [PATCH] HAS_DLFCN -> HAVE_DLFCN_H 1
Date Thu, 05 Mar 1998 15:26:24 GMT
Ok, with the 3 patches I submitted.  (ap_config.h, conf.h and the typo fix
to os.h) PHP3 now compiles nicely with the latest Apache CVS and it does
so with all the correct -D's to avoid any potential voodoo.

I still don't like this piece of code from os.h:

#if defined(LINUX) || defined(__FreeBSD__) || defined(SOLARIS2) || \
    defined(__bsdi__) || defined(IRIX)
# define HAS_DLFCN
#endif

#ifdef HAS_DLFCN
# include <dlfcn.h>
#else
void * dlopen (const char * __filename, int __flag);
const char * dlerror (void);
void * dlsym (void *, const char *);
int dlclose (void *);
#endif

This should be in src/include/conf.h and it should be doing a
#define HAVE_DLFCN_H 1

The reason being that an autoconf'ed module may detect a dlfcn.h header
file on a system other than the ones Apache thinks might have such a file.
If that is the case, it is likely that one of those dl* functions will end
up being defined differently by Apache.  

By moving this to conf.h and checking HAVE_DLFCN_H instead of HAS_DLFCN we
can ensure that if somebody somewhere has defined HAVE_DLFCN_H, we won't
try to redefine those functions.

-Rasmus


Mime
View raw message