You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/06/01 03:01:16 UTC
cvs commit: apache-2.0/src/modules/standard config.m4
rbb 00/05/31 18:01:16
Modified: src/lib/apr configure.in
src/lib/apr/dso/aix dso.c dso.h
src/lib/apr/dso/beos dso.c dso.h
src/lib/apr/dso/os2 dso.c dso.h
src/lib/apr/dso/unix dso.c dso.h
src/lib/apr/dso/win32 dso.c dso.h
src/lib/apr/include apr.h.in
src/lib/apr/misc/unix errorcodes.c
src/modules/standard config.m4
Log:
Fix building with DSO support. If any module is configured to be
compiled for shared support then APR_HAS_DSO is enabled and -ldl is
added to the LIBS variable. -ldl may need to be modified based on
platform. If no modules are designated as shared then APR_HAS_DSO is
disabled and nothing is added to LIBS. In basic testing this compiled
without errors or warnings.
Revision Changes Path
1.95 +16 -0 apache-2.0/src/lib/apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- configure.in 2000/05/25 18:15:38 1.94
+++ configure.in 2000/06/01 01:01:12 1.95
@@ -317,6 +317,22 @@
AC_SUBST(ssize_t_fmt)
AC_SUBST(off_t_fmt)
+dnl #----------------------------- Checking for DSO support
+echo $ac_n "${nl}Checking for DSO...${nl}"
+AC_CACHE_CHECK([for DSO support], ac_cv_enable_dso,
+ [ AC_ARG_ENABLE(dso,
+ [ --enable-dso Enable reliable child processes ],
+ [ ac_cv_enable_dso=$enableval],
+ [ aprdso="1" ] ) ] )
+
+if test "$ac_cv_enable_dso" = "no"; then
+ aprdso="0"
+else
+ aprdso="1"
+fi
+
+AC_SUBST(aprdso)
+
dnl #----------------------------- Checking for Threads
echo $ac_n "${nl}Checking for Threads...${nl}"
AC_CACHE_CHECK([for threads], ac_cv_enable_threads,
1.5 +4 -0 apache-2.0/src/lib/apr/dso/aix/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/aix/dso.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dso.c 2000/04/14 15:58:19 1.4
+++ dso.c 2000/06/01 01:01:12 1.5
@@ -87,6 +87,8 @@
#include <a.out.h>
#include "dso.h"
+#if APR_HAS_DSO
+
#undef FREAD
#undef FWRITE
#include <ldfcn.h>
@@ -704,3 +706,5 @@
free(buf);
return ret;
}
+
+#endif
1.5 +5 -0 apache-2.0/src/lib/apr/dso/aix/dso.h
Index: dso.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/aix/dso.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dso.h 2000/04/22 06:16:13 1.4
+++ dso.h 2000/06/01 01:01:12 1.5
@@ -59,7 +59,10 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+#if APR_HAS_DSO
+
void *dlopen(const char *path, int mode);
void *dlsym(void *handle, const char *symbol);
const char *dlerror(void);
@@ -69,5 +72,7 @@
ap_pool_t *cont;
void *handle;
};
+
+#endif
#endif
1.5 +3 -0 apache-2.0/src/lib/apr/dso/beos/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/beos/dso.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dso.c 2000/04/14 15:58:19 1.4
+++ dso.c 2000/06/01 01:01:13 1.5
@@ -54,6 +54,7 @@
#include "dso.h"
+#if APR_HAS_DSO
ap_status_t ap_dso_init(void){
return APR_SUCCESS;
@@ -97,3 +98,5 @@
return APR_SUCCESS;
}
+
+#endif
1.7 +5 -0 apache-2.0/src/lib/apr/dso/beos/dso.h
Index: dso.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/beos/dso.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dso.h 2000/04/22 06:16:15 1.6
+++ dso.h 2000/06/01 01:01:13 1.7
@@ -60,11 +60,16 @@
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_dso.h"
+#include "apr.h"
#include <kernel/image.h>
+#if APR_HAS_DSO
+
struct ap_dso_handle_t {
image_id handle; /* Handle to the DSO loaded */
ap_pool_t *cont;
};
+
+#endif
#endif
1.10 +4 -0 apache-2.0/src/lib/apr/dso/os2/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/os2/dso.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dso.c 2000/05/31 02:30:23 1.9
+++ dso.c 2000/06/01 01:01:13 1.10
@@ -58,6 +58,8 @@
#include <stdio.h>
#include <string.h>
+#if APR_HAS_DSO
+
ap_status_t ap_dso_init()
{
return APR_SUCCESS;
@@ -141,3 +143,5 @@
ap_cpystrn(buffer, message, buflen);
return buffer;
}
+
+#endif
1.10 +5 -0 apache-2.0/src/lib/apr/dso/os2/dso.h
Index: dso.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/os2/dso.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- dso.h 2000/05/31 02:30:23 1.9
+++ dso.h 2000/06/01 01:01:13 1.10
@@ -62,12 +62,17 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+#if APR_HAS_DSO
+
struct ap_dso_handle_t {
ap_pool_t *cont; /* Context for returning error strings */
HMODULE handle; /* Handle to the DSO loaded */
ap_status_t load_error;
char *failed_module;
};
+
+#endif
#endif
1.17 +4 -0 apache-2.0/src/lib/apr/dso/unix/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/unix/dso.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dso.c 2000/05/31 02:30:24 1.16
+++ dso.c 2000/06/01 01:01:14 1.17
@@ -54,6 +54,8 @@
#include "dso.h"
+#if APR_HAS_DSO
+
ap_status_t ap_dso_init(void){
return APR_SUCCESS;
}
@@ -144,3 +146,5 @@
return dso->errormsg;
return "No Error";
}
+
+#endif
1.9 +5 -0 apache-2.0/src/lib/apr/dso/unix/dso.h
Index: dso.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/unix/dso.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dso.h 2000/05/31 02:30:24 1.8
+++ dso.h 2000/06/01 01:01:14 1.9
@@ -59,7 +59,10 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+#if APR_HAS_DSO
+
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
@@ -87,5 +90,7 @@
void *handle;
char *errormsg;
};
+
+#endif
#endif
1.7 +4 -0 apache-2.0/src/lib/apr/dso/win32/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/win32/dso.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dso.c 2000/05/31 02:30:25 1.6
+++ dso.c 2000/06/01 01:01:15 1.7
@@ -54,6 +54,8 @@
#include "dso.h"
+#if APR_HAS_DSO
+
ap_status_t ap_dso_init(void){
return APR_SUCCESS;
}
@@ -101,3 +103,5 @@
{
return ap_strerror(dso->load_error, buf, bufsize);
}
+
+#endif
1.5 +5 -0 apache-2.0/src/lib/apr/dso/win32/dso.h
Index: dso.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/win32/dso.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dso.h 2000/05/31 02:30:25 1.4
+++ dso.h 2000/06/01 01:01:15 1.5
@@ -59,11 +59,16 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+#if APR_HAS_DSO
+
struct ap_dso_handle_t {
ap_pool_t *cont;
void *handle;
ap_status_t load_error;
};
+
+#endif
#endif
1.28 +1 -0 apache-2.0/src/lib/apr/include/apr.h.in
Index: apr.h.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- apr.h.in 2000/05/28 02:47:08 1.27
+++ apr.h.in 2000/06/01 01:01:15 1.28
@@ -65,6 +65,7 @@
#define APR_HAS_RANDOM @rand@
#define APR_HAS_XLATE @iconv@
#define APR_HAS_OTHER_CHILD @oc@
+#define APR_HAS_DSO @aprdso@
/* This macro tells APR that it is safe to make a file masquerade as a
* socket. This is necessary, because some platforms support poll'ing
1.20 +3 -1 apache-2.0/src/lib/apr/misc/unix/errorcodes.c
Index: errorcodes.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/errorcodes.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- errorcodes.c 2000/05/31 02:30:27 1.19
+++ errorcodes.c 2000/06/01 01:01:16 1.20
@@ -101,12 +101,14 @@
return "No thread key structure was provided and one was required.";
case APR_ENOSHMAVAIL:
return "No shared memory is currently available";
+#if APR_HAS_DSO
case APR_EDSOOPEN:
#ifdef HAVE_LIBDL
return dlerror();
#else
return "DSO load failed";
-#endif
+#endif /* HAVE_LIBDL */
+#endif /* APR_HAS_DSO */
case APR_INCHILD:
return
"Your code just forked, and you are currently executing in the "
1.16 +3 -0 apache-2.0/src/modules/standard/config.m4
Index: config.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/config.m4,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- config.m4 2000/05/24 16:17:58 1.15
+++ config.m4 2000/06/01 01:01:16 1.16
@@ -57,9 +57,12 @@
APACHE_MODPATH_FINISH
+ac_cv_enable_dso="no"
if test "$sharedobjs" = "yes"; then
LIBS="$LIBS -ldl"
LTFLAGS="$LTFLAGS -export-dynamic"
+ ac_cv_enable_dso="yes"
fi
+AC_CACHE_SAVE
APACHE_SUBST(STANDARD_LIBS)
Re: cvs commit: apache-2.0/src/modules/standard config.m4
Posted by rb...@covalent.net.
> > Fix building with DSO support. If any module is configured to be
> > compiled for shared support then APR_HAS_DSO is enabled and -ldl is
> > added to the LIBS variable. -ldl may need to be modified based on
> > platform. If no modules are designated as shared then APR_HAS_DSO is
> > disabled and nothing is added to LIBS. In basic testing this compiled
> > without errors or warnings.
>
> Thanks!
>
> I am a bit confused about why you did a cache check for
> ac_cv_enable_dso, but it seems to be working fine in spite of my
> confusion :)
The cache check is the only way I know of to propogate values from Apache
down to APR. Jim says hints.m4 does this, but as far as I can tell this
only works for EXTRA_* environment variables. I got this committed, but I
think I have a better way to do it later today.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: cvs commit: apache-2.0/src/modules/standard config.m4
Posted by Jeff Trawick <tr...@bellsouth.net>.
> From: rbb@locus.apache.org
> Date: 1 Jun 2000 01:01:16 -0000
>
> rbb 00/05/31 18:01:16
>
> Modified: src/lib/apr configure.in
> src/lib/apr/dso/aix dso.c dso.h
> src/lib/apr/dso/beos dso.c dso.h
> src/lib/apr/dso/os2 dso.c dso.h
> src/lib/apr/dso/unix dso.c dso.h
> src/lib/apr/dso/win32 dso.c dso.h
> src/lib/apr/include apr.h.in
> src/lib/apr/misc/unix errorcodes.c
> src/modules/standard config.m4
> Log:
> Fix building with DSO support. If any module is configured to be
> compiled for shared support then APR_HAS_DSO is enabled and -ldl is
> added to the LIBS variable. -ldl may need to be modified based on
> platform. If no modules are designated as shared then APR_HAS_DSO is
> disabled and nothing is added to LIBS. In basic testing this compiled
> without errors or warnings.
Thanks!
I am a bit confused about why you did a cache check for
ac_cv_enable_dso, but it seems to be working fine in spite of my
confusion :)
--
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...
Re: cvs commit: apache-2.0/src/modules/standard config.m4
Posted by rb...@covalent.net.
> > Fix building with DSO support. If any module is configured to be
> > compiled for shared support then APR_HAS_DSO is enabled and -ldl is
> > added to the LIBS variable. -ldl may need to be modified based on
> > platform. If no modules are designated as shared then APR_HAS_DSO is
> > disabled and nothing is added to LIBS. In basic testing this compiled
> > without errors or warnings.
>
> Err, what's the point of disabling ap_dso_* on platforms that will always
> be able to build them (those using a native API)? It's a library, if the
> functions aren't needed they won't be linked.
I didn't try to make this work on all platforms. The linking was a real
issue for Unix platforms. If OS/2 wants to always turn on the dso code,
then that's cool, just modify the configure.in in APR to ignore the check
or modify config.m4 in modules/standard to always turn it on. This needs
to be done for some paltforms however.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: cvs commit: apache-2.0/src/modules/standard config.m4
Posted by Brian Havard <br...@kheldar.apana.org.au>.
On 1 Jun 2000 01:01:16 -0000, rbb@locus.apache.org wrote:
>rbb 00/05/31 18:01:16
>
> Modified: src/lib/apr configure.in
> src/lib/apr/dso/aix dso.c dso.h
> src/lib/apr/dso/beos dso.c dso.h
> src/lib/apr/dso/os2 dso.c dso.h
> src/lib/apr/dso/unix dso.c dso.h
> src/lib/apr/dso/win32 dso.c dso.h
> src/lib/apr/include apr.h.in
> src/lib/apr/misc/unix errorcodes.c
> src/modules/standard config.m4
> Log:
> Fix building with DSO support. If any module is configured to be
> compiled for shared support then APR_HAS_DSO is enabled and -ldl is
> added to the LIBS variable. -ldl may need to be modified based on
> platform. If no modules are designated as shared then APR_HAS_DSO is
> disabled and nothing is added to LIBS. In basic testing this compiled
> without errors or warnings.
Err, what's the point of disabling ap_dso_* on platforms that will always
be able to build them (those using a native API)? It's a library, if the
functions aren't needed they won't be linked.
--
______________________________________________________________________________
| Brian Havard | "He is not the messiah! |
| brianh@kheldar.apana.org.au | He's a very naughty boy!" - Life of Brian |
------------------------------------------------------------------------------