Charles Randall <[EMAIL PROTECTED]> writes:

> perchild.c doesn't compile on FreeBSD 4.2R.  The following patch should
> illustrate the problem. Someone will have to determine the correct way to
> integrate this with the build process (autoconf, etc).

try the patch at the bottom...

> The resulting executable doesn't work correctly either, but getting it to
> compile is the first step.

Now ou get to the almost indescribable problems we've had running a
threaded MPM, or even a non-threaded MPM which links with libc_r and
adds a thread lock here and there within APR, on various levels of
FreeBSD.

> % cvs diff -u
> cvs server: Diffing .
> Index: perchild.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-2.0/server/mpm/perchild/perchild.c,v
> retrieving revision 1.49
> diff -u -r1.49 perchild.c
> --- perchild.c  2001/02/19 02:06:58     1.49
> +++ perchild.c  2001/02/20 04:23:28
> @@ -104,7 +104,12 @@
>  #include <sys/stat.h>
>  #include <sys/un.h>
>  #include <setjmp.h>
> +#ifdef __FreeBSD__
> +#include <sys/param.h>
> +#include <sys/socket.h>
> +#else
>  #include <stropts.h>

I don't see why any platform would need this (stream op
definitions)... I deleted this :) 


Index: server/mpm/perchild/perchild.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/perchild/perchild.c,v
retrieving revision 1.49
diff -u -r1.49 perchild.c
--- server/mpm/perchild/perchild.c      2001/02/19 02:06:58     1.49
+++ server/mpm/perchild/perchild.c      2001/02/20 19:04:10
@@ -69,6 +69,9 @@
 #if APR_HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#if APR_HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
 #if APR_HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -104,7 +107,6 @@
 #include <sys/stat.h>
 #include <sys/un.h>
 #include <setjmp.h>
-#include <stropts.h>
 
 /*
  * Actual definitions of config globals
Index: srclib/apr/configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.231
diff -u -r1.231 configure.in
--- srclib/apr/configure.in     2001/02/20 03:03:34     1.231
+++ srclib/apr/configure.in     2001/02/20 19:04:16
@@ -303,6 +303,7 @@
 AC_CHECK_HEADERS(memory.h)
 AC_CHECK_HEADERS(netdb.h, netdbh="1", netdbh="0")
 AC_CHECK_HEADERS(osreldate.h)
+AC_CHECK_HEADERS(sys/param.h, sys_paramh="1", sys_paramh="0")
 AC_CHECK_HEADERS(process.h)
 AC_CHECK_HEADERS(pwd.h)
 AC_CHECK_HEADERS(sys/syslimits.h, sys_syslimitsh="1", sys_syslimitsh="0")
@@ -356,6 +357,7 @@
 AC_SUBST(ioh)
 AC_SUBST(limitsh)
 AC_SUBST(netdbh)
+AC_SUBST(sys_paramh)
 AC_SUBST(sys_syslimitsh)
 AC_SUBST(netinet_inh)
 AC_SUBST(stdargh)
Index: srclib/apr/include/apr.hw
===================================================================
RCS file: /home/cvspublic/apr/include/apr.hw,v
retrieving revision 1.53
diff -u -r1.53 apr.hw
--- srclib/apr/include/apr.hw   2001/02/16 04:15:42     1.53
+++ srclib/apr/include/apr.hw   2001/02/20 19:04:20
@@ -130,6 +130,7 @@
 #define APR_HAVE_STDLIB_H       1
 #define APR_HAVE_STRING_H       1
 #define APR_HAVE_STRINGS_H      0
+#define APR_HAVE_SYS_PARAM_H    0
 #define APR_HAVE_SYS_SIGNAL_H   0
 #define APR_HAVE_SYS_SOCKET_H   0
 #define APR_HAVE_SYS_SYSLIMITS_H 0
Index: srclib/apr/include/apr.h.in
===================================================================
RCS file: /home/cvspublic/apr/include/apr.h.in,v
retrieving revision 1.66
diff -u -r1.66 apr.h.in
--- srclib/apr/include/apr.h.in 2001/02/13 18:48:51     1.66
+++ srclib/apr/include/apr.h.in 2001/02/20 19:04:20
@@ -40,6 +40,7 @@
 #define APR_HAVE_STDLIB_H       @stdlibh@
 #define APR_HAVE_STRING_H       @stringh@
 #define APR_HAVE_STRINGS_H      @stringsh@
+#define APR_HAVE_SYS_PARAM_H    @sys_paramh@
 #define APR_HAVE_SYS_SIGNAL_H   @sys_signalh@
 #define APR_HAVE_SYS_SOCKET_H   @sys_socketh@
 #define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Reply via email to