apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r167847 - in /apr/apr/trunk: CHANGES configure.in include/apr.h.in misc/unix/rand.c
Date Tue, 03 May 2005 02:01:13 GMT
Author: pquerna
Date: Mon May  2 19:01:12 2005
New Revision: 167847

URL: http://svn.apache.org/viewcvs?rev=167847&view=rev
Log:
- Add support for uuid_generate on OS X 10.4.  This required some extra foot
work since Apple put the uuid_generate functions into their libc, while Linux
keeps them in libuuid.

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

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/CHANGES?rev=167847&r1=167846&r2=167847&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES (original)
+++ apr/apr/trunk/CHANGES Mon May  2 19:01:12 2005
@@ -1,5 +1,7 @@
 Changes for APR 1.2.0
 
+   *) Add support for uuid_generate on OS X 10.4. [Paul Querna]
+
    *) Include the C preprocessor flags in --cflags for pkg-config.
       [Paul Querna]
 

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/configure.in?rev=167847&r1=167846&r2=167847&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Mon May  2 19:01:12 2005
@@ -1005,6 +1005,7 @@
     tpfio.h		\
     unistd.h		\
     unix.h		\
+    uuid.h		\
     arpa/inet.h		\
     kernel/OS.h		\
     net/errno.h		\
@@ -1029,7 +1030,8 @@
     sys/types.h		\
     sys/uio.h		\
     sys/un.h		\
-    sys/wait.h)
+    sys/wait.h          \
+    uuid/uuid.h)
 
 # IRIX 6.5 has a problem in <netinet/tcp.h> which prevents it from
 # being included by itself.  Check for <netinet/tcp.h> manually,
@@ -1081,6 +1083,8 @@
 AC_SUBST(unistdh)
 AC_SUBST(signalh)
 AC_SUBST(sys_waith)
+AC_SUBST(uuidh)
+AC_SUBST(uuid_uuidh)
 AC_SUBST(pthreadh)
 AC_SUBST(semaphoreh)
 
@@ -1818,10 +1822,14 @@
 osuuid="0"
 AC_CHECK_FUNCS(uuid_create, [osuuid="1"
     AC_DEFINE([HAVE_UUID_CREATE], 1, [Define if libc has uuid_create])], [])
+
+AC_CHECK_FUNCS(uuid_generate, [osuuid="1"
+    AC_DEFINE([HAVE_UUID_GENERATE], 1, [Define if libc has uuid_generate])], [])
+
 AC_CHECK_LIB(uuid, uuid_generate, 
     [osuuid="1"
      APR_ADDTO(LIBS,-luuid)
-     AC_DEFINE([HAVE_LIBUUID], 1, [Define if libuuid is present])], [])
+     AC_DEFINE([HAVE_UUID_GENERATE], 1, [Define if libuuid is present])], [])
 AC_SUBST(osuuid)
 
 

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr.h.in?rev=167847&r1=167846&r2=167847&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Mon May  2 19:01:12 2005
@@ -101,6 +101,8 @@
 #define APR_HAVE_SYS_WAIT_H      @sys_waith@
 #define APR_HAVE_TIME_H          @timeh@
 #define APR_HAVE_UNISTD_H        @unistdh@
+#define APR_HAVE_UUID_UUID_H     @uuid_uuidh@
+#define APR_HAVE_UUID_H          @uuidh@
 
 /** @} */
 

Modified: apr/apr/trunk/misc/unix/rand.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/misc/unix/rand.c?rev=167847&r1=167846&r2=167847&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/rand.c (original)
+++ apr/apr/trunk/misc/unix/rand.c Mon May  2 19:01:12 2005
@@ -35,6 +35,12 @@
 #if APR_HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif
+#if APR_HAVE_UUID_UUID_H
+#include <uuid/uuid.h>
+#endif
+#if APR_HAVE_UUID_H
+#include <uuid.h>
+#endif
 
 #ifndef SHUT_RDWR
 #define SHUT_RDWR 2
@@ -42,8 +48,6 @@
 
 #if HAVE_UUID_CREATE
 
-#include <uuid.h>
-
 APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
 {
     uuid_t g;
@@ -55,9 +59,7 @@
     return APR_SUCCESS;
 }
 
-#elif HAVE_LIBUUID
-
-#include <uuid/uuid.h>
+#elif HAVE_UUID_GENERATE
 
 APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
 {



Mime
View raw message