svn commit: samba r23208 - in
branches/SAMBA_4_0/source/lib/replace: .
metze at samba.org
metze at samba.org
Tue May 29 15:18:21 GMT 2007
Author: metze
Date: 2007-05-29 15:18:20 +0000 (Tue, 29 May 2007)
New Revision: 23208
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23208
Log:
on some HP-UX boxes dlfcn.h is available and use unsigned int flags
for dlopen but no library contains the function...
metze
Modified:
branches/SAMBA_4_0/source/lib/replace/dlfcn.c
branches/SAMBA_4_0/source/lib/replace/dlfcn.m4
branches/SAMBA_4_0/source/lib/replace/replace.h
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/dlfcn.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/dlfcn.c 2007-05-29 14:53:46 UTC (rev 23207)
+++ branches/SAMBA_4_0/source/lib/replace/dlfcn.c 2007-05-29 15:18:20 UTC (rev 23208)
@@ -26,7 +26,11 @@
#include "replace.h"
#ifndef HAVE_DLOPEN
+#ifdef DLOPEN_TAKES_UNSIGNED_FLAGS
+void *rep_dlopen(const char *name, unsigned int flags)
+#else
void *rep_dlopen(const char *name, int flags)
+#endif
{
return NULL;
}
Modified: branches/SAMBA_4_0/source/lib/replace/dlfcn.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/dlfcn.m4 2007-05-29 14:53:46 UTC (rev 23207)
+++ branches/SAMBA_4_0/source/lib/replace/dlfcn.m4 2007-05-29 15:18:20 UTC (rev 23208)
@@ -5,13 +5,18 @@
libreplace_cv_dlfcn=no
AC_SEARCH_LIBS(dlopen, dl)
-if test x"${ac_cv_search_dlopen}" = x"no"; then
- libreplace_cv_dlfcn=yes
-else
- AC_CHECK_HEADERS(dlfcn.h)
- AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes])
-fi
+AC_CHECK_HEADERS(dlfcn.h)
+AC_CHECK_FUNCS([dlopen dlsym dlerror dlclose],[],[libreplace_cv_dlfcn=yes])
+AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)],
+ [
+ return 0;
+ ],[
+ AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsinged int flags])
+ ],[],[
+ #include <dlfcn.h>
+ ])
+
if test x"${libreplace_cv_dlfcn}" = x"yes";then
LIBREPLACEOBJ="${LIBREPLACEOBJ} dlfcn.o"
fi
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2007-05-29 14:53:46 UTC (rev 23207)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2007-05-29 15:18:20 UTC (rev 23208)
@@ -228,8 +228,12 @@
#ifndef HAVE_DLOPEN
#define dlopen rep_dlopen
+#ifdef DLOPEN_TAKES_UNSIGNED_FLAGS
+void *rep_dlopen(const char *name, unsigned int flags);
+#else
void *rep_dlopen(const char *name, int flags);
#endif
+#endif
#ifndef HAVE_DLSYM
#define dlsym rep_dlsym
More information about the samba-cvs
mailing list