httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <>
Subject HAS_DLFCN -- where to define?
Date Fri, 27 Feb 1998 16:05:30 GMT
I think there is problem with the order of inclusion of apache header
files and OS dependent #defines.

For example, os.h contains....
	 /* Start of real module */
    #ifdef HAS_DLFCN
    # include <dlfcn.h>
    void * dlopen (__const char * __filename, int __flag);
    __const char * dlerror (void);
    void * dlsym (void *, __const char *);
    int dlclose (void *);

(First problem: only gcc defines __const, and it is not checked before
use. That's how I ran into the bug in the first place, because I used a
non-gcc compiler).

Second problem: *Where* would a #define HAS_DLFCN be set? I would expect
it to live in conf.h, and be set depending on the detected OS
(like: #ifdef SVR4.... #define HAS_DLFCN....)

That is impossible, however, because conf.h #includes "os.h" right at
the beginning. So we end up with the old checken-and-egg problem.

A temporary solution for *-sni-svr4 was to define -DHAS_DLFCN in
Configure. But that is a very unesthetic solution IMHO. It requires
Configure to contain much-too-specific OS information.

Can you think of a better way to define things?

| S I E M E N S |  <>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

View raw message