httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject [1.3 PATCH] PR 12072 - fix union semun definition
Date Thu, 19 Sep 2002 09:22:18 GMT
This is the same fix which was applied to APR prior to Apache 2.0.40's
release.  With 2.0, the problem was first reported on HP-UX/Itanium.
With 1.3, the problem was first reported on Linux/zSeries.

I also removed a bogus comment.  In fact, it is normal for union semun
to not be defined in the header files for user applications.

Before I committed Madhu's fix to APR, I tried in vain to find any
doc which said that the first field should be long instead of int.
With this change to Apache 1.3, SysV sems still work and as far as I
can tell the world did not come to an end, so I'd like to commit this
before 1.3.27 is rolled.

Index: src/CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1851
diff -u -r1.1851 CHANGES
--- src/CHANGES	17 Sep 2002 01:09:18 -0000	1.1851
+++ src/CHANGES	19 Sep 2002 09:13:57 -0000
@@ -1,5 +1,9 @@
 Changes with Apache 1.3.27
 
+  *) Fix a problem with the definition of union semun which broke
+     System V semaphores on systems where sizeof(int) != sizeof(long).
+     PR 12072  [<winterling@de.ibm.com>]
+
   *) The protocol version (eg: HTTP/1.1) in the request line parsing
      is now case insensitive. This closes a few PRs and implies that
      ProtocolReqCheck will trigger on *true* invalid protocols.
Index: src/main/http_main.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.590
diff -u -r1.590 http_main.c
--- src/main/http_main.c	10 Sep 2002 22:51:14 -0000	1.590
+++ src/main/http_main.c	19 Sep 2002 09:14:02 -0000
@@ -749,9 +749,8 @@
 #include <sys/sem.h>
 
 #ifdef NEED_UNION_SEMUN
-/* it makes no sense, but this isn't defined on solaris */
 union semun {
-    long val;
+    int val;
     struct semid_ds *buf;
     ushort *array;
 };

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message