From: Florian Forster <[EMAIL PROTECTED]>

Checking if the library has the required symbol is not enough. If we
specify standard-compliance headers those functions may not be declared.
---
 configure.in   |    8 +++-----
 src/dbi_main.c |    4 ++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/configure.in b/configure.in
index d31dd73..f434239 100644
--- a/configure.in
+++ b/configure.in
@@ -150,11 +150,9 @@ AC_ARG_WITH(dlsym-prefix,
 AC_DEFINE_UNQUOTED(DRIVER_EXT, "$shlib_ext", [ Specifies the filename 
extension of loadable modules ])
 AC_DEFINE_UNQUOTED(DLSYM_PREFIX, "$dlsym_prefix", [ Specifies a required 
prefix for symbol names of dynamically loaded modules ])
 
-
-AC_CHECK_FUNCS(strtoll readdir_r gmtime_r fpathconf dirfd)
-AC_REPLACE_FUNCS(atoll timegm)
-AC_CHECK_FUNCS(vasprintf)
-AC_REPLACE_FUNCS(asprintf)
+AC_CHECK_DECLS([readdir_r, gmtime_r, vasprintf, asprintf])
+AC_CHECK_FUNCS(strtoll readdir_r gmtime_r fpathconf dirfd vasprintf)
+AC_REPLACE_FUNCS(atoll timegm asprintf)
 
 dnl ==============================
 dnl Checks for header files
diff --git a/src/dbi_main.c b/src/dbi_main.c
index 3902267..43fc08d 100644
--- a/src/dbi_main.c
+++ b/src/dbi_main.c
@@ -110,10 +110,10 @@ char *win_dlerror();
 #endif
 
 /* declarations of optional external functions */
-#ifndef HAVE_VASPRINTF
+#if !HAVE_DECL_VASPRINTF
 int vasprintf(char **result, const char *format, va_list args);
 #endif
-#ifndef HAVE_ASPRINTF
+#if !HAVE_DECL_ASPRINTF
 int asprintf(char **result, const char *format, ...);
 #endif
 
-- 
1.5.6.5


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libdbi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to