httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject NEED_UNION_SEMUN + 1.3.15-dev breakage
Date Wed, 20 Dec 2000 04:08:44 GMT
the change from dean below breaks 1.3.15-dev on my system.
2.2.16 kernel leads to -DLINUX=22, which triggers NEED_UNION_SEMUN to be
defined:

+#if LINUX > 20
...
+#define NEED_UNION_SEMUN

http_main.c includes sys/sem.h, which includes sys/sem_buf.h, which
contains:
/* Union used for argument for `semctl'.  */
union semun
{
  int val;				/* value for SETVAL */
  struct semid_ds *buf;			/* buffer for IPC_STAT & IPC_SET */
  unsigned short int *array;		/* array for GETALL & SETALL */
  struct seminfo *__buf;		/* buffer for IPC_INFO */
};

gcc -c  -I../os/unix -I../include   -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -g `../apaci` http_main.c
http_main.c:694: redefinition of `union semun'
make[3]: *** [http_main.o] Error 1

removing #define NEED_UNION_SEMUN from dean's patch makes everything happy
again.

from CHANGES:
  *) Linux 2.2.x and later do not need a serialised single listener,
     and sysv semaphores scale better than fcntl.  Updated GuessOS
     to distinguish 2.0.x from 2.2.x -- 2.0.x will still use fcntl.
     [Andrew Morton <andrewm@uow.edu.au>, Dean Gaudet]

the cvs log:
revision 1.296
date: 2000/11/05 02:56:17;  author: dgaudet;  state: Exp;  lines: +8 -5
linux kernel hackers indicated that it was time
for apache to drop the serialisation on linux; and a
switch to sysv semaphores is preferred for performance.
see <Pine.LNX.4.21.0011041233550.1897-100000@twinlark.arctic.org> in
new-httpd archive for more details.

and patch that was applied:

Index: ap_config.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
retrieving revision 1.295
retrieving revision 1.296
diff -u -r1.295 -r1.296
--- ap_config.h	2000/11/03 18:37:54	1.295
+++ ap_config.h	2000/11/05 02:56:17	1.296
@@ -522,12 +522,15 @@
 #define HAVE_MMAP 1
 #define USE_MMAP_FILES
 
-/* flock is faster ... but hasn't been tested on 1.x systems */
-/* PR#3531 indicates flock() may not be stable, probably depends on
- * kernel version.  Go back to using fcntl, but provide a way for
- * folks to tweak their Configuration to get flock.
+#if LINUX > 20
+/* see Pine.LNX.4.21.0011041233550.1897-100000@twinlark.arctic.org
+ * in new-httpd archives for performance numbers indicating these
+ * are the right choices for linux 2.2.x and later
  */
-#ifndef USE_FLOCK_SERIALIZED_ACCEPT
+#define USE_SYSVSEM_SERIALIZED_ACCEPT
+#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT 
+#define NEED_UNION_SEMUN
+#else
 #define USE_FCNTL_SERIALIZED_ACCEPT
 #endif
 


Mime
View raw message