You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1998/02/05 23:14:28 UTC

[PATCH] fix mod_so on older systems

Note that recent versions of FreeBSD 2.2 do define RTLD_LAZY/RTLD_NOW, but
many older systems don't.  If a system doesn't, we have no choice but to
use 1 which has the implied semantics of RTLD_LAZY. 

Index: modules/standard/mod_so.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_so.c,v
retrieving revision 1.2
diff -u -r1.2 mod_so.c
--- mod_so.c	1998/02/04 10:22:18	1.2
+++ mod_so.c	1998/02/05 22:14:10
@@ -96,7 +96,6 @@
 #endif
 
 #if defined(__FreeBSD__)
-#define NEED_RTLD_LAZY
 #define NEED_UNDERSCORE_SYM
 #endif
 
@@ -109,15 +108,19 @@
 #ifdef HAS_DLFCN
 #include <dlfcn.h>
 #else
-#define NEED_RTLD_LAZY
 void * dlopen (__const char * __filename, int __flag);
 __const char * dlerror (void);
 void * dlsym (void *, __const char *);
 int dlclose (void *);
 #endif
 
-#ifdef NEED_RTLD_LAZY
-#define RTLD_LAZY 1
+#ifndef RTLD_NOW
+/* 
+ * probably on an older system that doesn't support RTLD_NOW or RTLD_LAZY.
+ * The below define is a lie since we are really doing RTLD_LAZY since the
+ * system doesn't support RTLD_NOW.
+ */
+#define RTLD_NOW 1
 #endif
 
 /*


Re: [PATCH] fix mod_so on older systems

Posted by Marc Slemko <ma...@worldgate.com>.
BTW, this makes it compile but I didn't test if it actually worked...

On Thu, 5 Feb 1998, Marc Slemko wrote:

> Note that recent versions of FreeBSD 2.2 do define RTLD_LAZY/RTLD_NOW, but
> many older systems don't.  If a system doesn't, we have no choice but to
> use 1 which has the implied semantics of RTLD_LAZY. 
> 
> Index: modules/standard/mod_so.c
> ===================================================================
> RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_so.c,v
> retrieving revision 1.2
> diff -u -r1.2 mod_so.c
> --- mod_so.c	1998/02/04 10:22:18	1.2
> +++ mod_so.c	1998/02/05 22:14:10
> @@ -96,7 +96,6 @@
>  #endif
>  
>  #if defined(__FreeBSD__)
> -#define NEED_RTLD_LAZY
>  #define NEED_UNDERSCORE_SYM
>  #endif
>  
> @@ -109,15 +108,19 @@
>  #ifdef HAS_DLFCN
>  #include <dlfcn.h>
>  #else
> -#define NEED_RTLD_LAZY
>  void * dlopen (__const char * __filename, int __flag);
>  __const char * dlerror (void);
>  void * dlsym (void *, __const char *);
>  int dlclose (void *);
>  #endif
>  
> -#ifdef NEED_RTLD_LAZY
> -#define RTLD_LAZY 1
> +#ifndef RTLD_NOW
> +/* 
> + * probably on an older system that doesn't support RTLD_NOW or RTLD_LAZY.
> + * The below define is a lie since we are really doing RTLD_LAZY since the
> + * system doesn't support RTLD_NOW.
> + */
> +#define RTLD_NOW 1
>  #endif
>  
>  /*
>