apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r168337 - in /apr/apr/trunk: configure.in misc/unix/rand.c
Date Thu, 05 May 2005 14:44:05 GMT
Author: jorton
Date: Thu May  5 07:44:04 2005
New Revision: 168337

URL: http://svn.apache.org/viewcvs?rev=168337&view=rev
Log:
* configure.in: Simplify uuid checks.

* misc/unix/rand.c: Use #ifdef rather than #if for defined-or-not
HAVE_UUID_* macros.

Modified:
    apr/apr/trunk/configure.in
    apr/apr/trunk/misc/unix/rand.c

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/configure.in?rev=168337&r1=168336&r2=168337&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Thu May  5 07:44:04 2005
@@ -1819,16 +1819,11 @@
 
 AC_CHECK_HEADERS(uuid/uuid.h uuid.h)
 
-AC_CHECK_FUNCS(uuid_create, [osuuid="1"
-    AC_DEFINE([HAVE_UUID_CREATE], 1, [Define if libc has uuid_create])], [])
+# Check for uuid_generate in libc or libuuid
+AC_SEARCH_LIBS(uuid_generate, uuid)
 
-AC_CHECK_FUNCS(uuid_generate, [osuuid="1"
-    AC_DEFINE([HAVE_UUID_GENERATE], 1, [Define if libc has uuid_generate])], [])
+AC_CHECK_FUNCS([uuid_generate uuid_create], [osuuid=1; break])
 
-AC_CHECK_LIB(uuid, uuid_generate, 
-    [osuuid="1"
-     APR_ADDTO(LIBS,-luuid)
-     AC_DEFINE([HAVE_UUID_GENERATE], 1, [Define if libuuid is present])], [])
 AC_SUBST(osuuid)
 
 

Modified: apr/apr/trunk/misc/unix/rand.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/misc/unix/rand.c?rev=168337&r1=168336&r2=168337&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/rand.c (original)
+++ apr/apr/trunk/misc/unix/rand.c Thu May  5 07:44:04 2005
@@ -35,10 +35,10 @@
 #if APR_HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif
-#if HAVE_UUID_UUID_H
+#ifdef HAVE_UUID_UUID_H
 #include <uuid/uuid.h>
 #endif
-#if HAVE_UUID_H
+#ifdef HAVE_UUID_H
 #include <uuid.h>
 #endif
 
@@ -46,7 +46,7 @@
 #define SHUT_RDWR 2
 #endif
 
-#if HAVE_UUID_CREATE
+#if defined(HAVE_UUID_CREATE)
 
 APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
 {
@@ -59,7 +59,7 @@
     return APR_SUCCESS;
 }
 
-#elif HAVE_UUID_GENERATE
+#elif defined(HAVE_UUID_GENERATE)
 
 APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
 {



Mime
View raw message