You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/11/01 02:33:26 UTC
[PATCH] sys/stat.h and sys/types.h again
In general, sys/types.h _needs_ to be included before sys/stat.h. BSD
weenies have this thing about never daring include a header file more than
once if they can help it, which results in you having to include
sys/types.h before a lot of things. Some FreeBSD 2.1.x installations have
this... "feature", along with some other boxes.
I would suggest the below change. The whole conf.h needs a major cleanup.
(yes, Sameer has suggested two patches but no one went for them...
something like this _is_ necessary)
Index: conf.h
===================================================================
RCS file: /export/home/cvs/apachen/src/main/conf.h,v
retrieving revision 1.150
diff -u -r1.150 conf.h
--- conf.h 1997/10/25 01:52:45 1.150
+++ conf.h 1997/11/01 01:20:56
@@ -57,11 +57,10 @@
*/
+#ifdef WIN32
/* Have to include sys/stat.h before ../os/win32/os.h so we can override
-stat() properly */
+ * stat() properly */
#include <sys/stat.h>
-
-#ifdef WIN32
#include "../os/win32/os.h"
#else
#include "os.h"
@@ -720,6 +719,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef WIN32
+#include <sys/stat.h>
+#endif
#include <ctype.h>
#if !defined(MPE) && !defined(WIN32)
#include <sys/file.h>
Re: [PATCH] sys/stat.h and sys/types.h again
Posted by Dean Gaudet <dg...@arctic.org>.
+1
On Fri, 31 Oct 1997, Marc Slemko wrote:
> In general, sys/types.h _needs_ to be included before sys/stat.h. BSD
> weenies have this thing about never daring include a header file more than
> once if they can help it, which results in you having to include
> sys/types.h before a lot of things. Some FreeBSD 2.1.x installations have
> this... "feature", along with some other boxes.
>
> I would suggest the below change. The whole conf.h needs a major cleanup.
> (yes, Sameer has suggested two patches but no one went for them...
> something like this _is_ necessary)
>
> Index: conf.h
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/main/conf.h,v
> retrieving revision 1.150
> diff -u -r1.150 conf.h
> --- conf.h 1997/10/25 01:52:45 1.150
> +++ conf.h 1997/11/01 01:20:56
> @@ -57,11 +57,10 @@
> */
>
>
> +#ifdef WIN32
> /* Have to include sys/stat.h before ../os/win32/os.h so we can override
> -stat() properly */
> + * stat() properly */
> #include <sys/stat.h>
> -
> -#ifdef WIN32
> #include "../os/win32/os.h"
> #else
> #include "os.h"
> @@ -720,6 +719,9 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> +#ifndef WIN32
> +#include <sys/stat.h>
> +#endif
> #include <ctype.h>
> #if !defined(MPE) && !defined(WIN32)
> #include <sys/file.h>
>
>
>