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/03/27 21:02:21 UTC
cvs commit: apache-2.0/src/lib/apr/include apr_dso.h apr_errno.h
rbb 00/03/27 11:02:19
Modified: src/lib/apr configure.in
src/lib/apr/dso/unix dso.c dso.h
src/lib/apr/include apr_dso.h apr_errno.h
Log:
Add DSO's to the APR build process. This also cleans up the DSO stuff, to
make it look more like the rest of APR.
Revision Changes Path
1.59 +1 -1 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.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- configure.in 2000/03/22 22:51:19 1.58
+++ configure.in 2000/03/27 19:02:14 1.59
@@ -15,7 +15,7 @@
# These added to allow default directories to be used...
DEFAULT_OSDIR="unix"
-MODULES="file_io network_io threadproc misc locks time mmap shmem"
+MODULES="file_io network_io threadproc misc locks time mmap shmem dso"
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
1.2 +17 -12 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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dso.c 2000/03/26 20:53:33 1.1
+++ dso.c 2000/03/27 19:02:16 1.2
@@ -55,7 +55,6 @@
*/
#include "dso.h"
-#include "ltdl.h"
/*
* ap_dso_init: Initialize the underlying DSO library
@@ -84,13 +83,13 @@
* Return values: Returns APR_SUCCESS on success, else APR_EINIT
*/
-ap_status_t ap_dso_load(const char *path, ap_context_t *ctx,
- ap_dso_handle_t **res_handle)
+ap_status_t ap_dso_load(struct dso_handle_t **res_handle, const char *path,
+ ap_context_t *ctx)
{
lt_dlhandle dlhandle;
if((dlhandle = lt_dlopen(path)) == NULL)
- return APR_EINIT;
+ return APR_EDSOOPEN;
*res_handle = ap_pcalloc(ctx, sizeof(*res_handle));
(*res_handle)->handle = dlhandle;
@@ -107,7 +106,7 @@
* Return values: Returns APR_SUCCESS on success, else APR_EINIT
*/
-ap_status_t ap_dso_unload(ap_dso_handle_t *handle)
+ap_status_t ap_dso_unload(struct dso_handle_t *handle)
{
if(lt_dlclose(handle->handle))
return APR_EINIT;
@@ -126,16 +125,22 @@
* Return values: Returns APR_SUCCESS on success, else APR_EINIT
*/
-ap_status_t ap_dso_sym(ap_dso_handle_t *handle, const char *symname,
- ap_dso_handle_sym_t *ressym)
+ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym,
+ struct dso_handle_t *handle,
+ const char *symname)
{
lt_ptr_t sym;
-
- if (symname == NULL || ressym == NULL)
- return APR_EINIT;
- if((sym = lt_dlsym(handle->handle, symname)) == NULL)
- return APR_EINIT;
+ if (ressym == NULL) {
+ return APR_ENOFUNCPOINTER;
+ }
+ if (handle == NULL) {
+ return APR_ENODSOHANDLE;
+ }
+
+ if((sym = lt_dlsym(handle->handle, symname)) == NULL) {
+ return APR_EFUNCNOTFOUND;
+ }
*ressym = sym;
return APR_SUCCESS;
1.2 +4 -3 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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dso.h 2000/03/26 20:53:33 1.1
+++ dso.h 2000/03/27 19:02:16 1.2
@@ -61,10 +61,11 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "ltdl.h"
-struct ap_dso_handle_st {
+struct dso_handle_t {
+ ap_context_t *cont;
lt_dlhandle handle; /* libtool handle */
- ap_context_t cont;
};
-#endif
\ No newline at end of file
+#endif
1.2 +7 -7 apache-2.0/src/lib/apr/include/apr_dso.h
Index: apr_dso.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_dso.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_dso.h 2000/03/26 21:16:06 1.1
+++ apr_dso.h 2000/03/27 19:02:17 1.2
@@ -61,17 +61,17 @@
extern "C" {
#endif
-typedef struct ap_dso_handle_st ap_dso_handle_t;
-typedef void * ap_dso_handle_sym_t;
+typedef struct dso_handle_t ap_dso_handle_t;
+typedef void * ap_dso_handle_sym_t;
ap_status_t ap_dso_init(void);
-ap_status_t ap_dso_load(const char *path, ap_context_t *ctx,
- ap_dso_handle_t **res_handle);
+ap_status_t ap_dso_load(ap_dso_handle_t **res_handle, const char *path,
+ ap_context_t *ctx);
ap_status_t ap_dso_unload(ap_dso_handle_t *handle);
-ap_status_t ap_dso_sym(ap_dso_handle_t *handle, const char *symname,
- ap_dso_handle_sym_t *ressym);
+ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym, ap_dso_handle_t *handle,
+ const char *symname);
#ifdef __cplusplus
}
#endif
-#endif
\ No newline at end of file
+#endif
1.15 +4 -0 apache-2.0/src/lib/apr/include/apr_errno.h
Index: apr_errno.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_errno.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- apr_errno.h 2000/03/10 00:06:09 1.14
+++ apr_errno.h 2000/03/27 19:02:18 1.15
@@ -108,6 +108,10 @@
#define APR_ENOTHDKEY (APR_OS_START_ERROR + 13)
#define APR_ENOTTHREADSAFE (APR_OS_START_ERROR + 14)
#define APR_ESHMLOCK (APR_OS_START_ERROR + 15)
+#define APR_EFUNCNOTFOUND (APR_OS_START_ERROR + 16)
+#define APR_ENOFUNCPOINTER (APR_OS_START_ERROR + 17)
+#define APR_ENODSOHANDLE (APR_OS_START_ERROR + 18)
+#define APR_EDSOOPEN (APR_OS_START_ERROR + 19)
/* APR STATUS VALUES */
#define APR_INCHILD (APR_OS_START_STATUS + 1)