apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r551917 - in /apr/apr/trunk: CHANGES configure.in
Date Fri, 29 Jun 2007 15:03:15 GMT
Author: davi
Date: Fri Jun 29 08:03:14 2007
New Revision: 551917

URL: http://svn.apache.org/viewvc?view=rev&rev=551917
Log:
Define SEM_FAILED if it isn't already defined, as the proc mutex
code already does it. Also search for the sem_open function in
the realtime library.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/configure.in

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?view=diff&rev=551917&r1=551916&r2=551917
==============================================================================
--- apr/apr/trunk/CHANGES (original)
+++ apr/apr/trunk/CHANGES Fri Jun 29 08:03:14 2007
@@ -1,5 +1,10 @@
 Changes for APR 1.3.0
 
+  *) Define SEM_FAILED if it isn't already defined, as the proc mutex
+     code already does it. Also search for the sem_open function in
+     the realtime library. (This fixes HP-UX sem_open detection).
+     [Davi Arnaut]
+
   *) Define the _HPUX_SOURCE feature test macro to obtain maximum
      functionality.
      PR 42261.  [Davi Arnaut]

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?view=diff&rev=551917&r1=551916&r2=551917
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Fri Jun 29 08:03:14 2007
@@ -1594,6 +1594,7 @@
 
 AC_CHECK_FUNCS(semget semctl flock)
 AC_CHECK_HEADERS(semaphore.h OS.h)
+AC_SEARCH_LIBS(sem_open, rt)
 AC_CHECK_FUNCS(sem_close sem_unlink sem_post sem_wait create_sem)
 
 # Some systems return ENOSYS from sem_open.
@@ -1603,6 +1604,9 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <semaphore.h>
+#ifndef SEM_FAILED
+#define SEM_FAILED (-1)
+#endif
 main()
 {
     sem_t *psem;
@@ -1613,6 +1617,11 @@
 	exit(1);
     }
     sem_close(psem);
+    psem = sem_open(sem_name, O_CREAT | O_EXCL, 0644, 1);
+    if (psem != (sem_t *)SEM_FAILED) {
+        sem_close(psem);
+        exit(1);
+    }
     sem_unlink(sem_name);
     exit(0);
 }], [ac_cv_func_sem_open=yes], [ac_cv_func_sem_open=no],



Mime
View raw message