[EMAIL PROTECTED] (Doug MacEachern) wrote:
>On Tue, 15 May 2001, Ken Williams wrote:
>> ../gen_test_char >test_char.h
>> env LD_RUN_PATH=/System/Library/Perl/darwin/CORE cc -c -I..
>>-I/System/Library/Perl/darwin/CORE -I../os/unix -I../include -DDARWIN
>>-DMOD_PERL
>> -DUSE_PERL_SSI -g -pipe -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE
>>-fno-strict-aliasing -DUSE_HSREGEX -DNO_DL_NEEDED -g -pipe -pipe -fno-common
>> -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing `../apaci` alloc.c
>
>can you capture the output of the succesful compilation and compare the
>flags here?
Yup - it's a lot more terse when compiling Apache:
-------------------------------------------------
[localhost:~/src/apache_1.3.19] ken% ./configure --with-layout=Darwin --with-port=80
Configuring for Apache, Version 1.3.19
+ using installation path layout: Darwin (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Darwin platform
+ setting C compiler to cc
+ setting C pre-processor to cc -E -traditional-cpp
+ checking for system header files
+ adding selected modules
+ checking sizeof various data types
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
[localhost:~/src/apache_1.3.19] ken% make
===> src
===> src/regex
cc -I. -I../os/unix -I../include -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -DNO_DL_NEEDED `../apaci` -DPOSIX_MISTAKE -c -o regcomp.o
regcomp.c
cc -I. -I../os/unix -I../include -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT
-I../lib/expat-lite -DNO_DL_NEEDED `../apaci` -DPOSIX_MISTAKE -c -o regexec.o
regexec.c
[... and so on ...]
-------------------------------------------------
>
>> alloc.c: In function `spawn_child_core':
>> alloc.c:2291: `STDOUT_FILENO' undeclared (first use in this function)
>> alloc.c:2291: (Each undeclared identifier is reported only once
>> alloc.c:2291: for each function it appears in.)
>> alloc.c:2297: `STDIN_FILENO' undeclared (first use in this function)
>> alloc.c:2303: `STDERR_FILENO' undeclared (first use in this function)
>
>on my system these are defined in /usr/include/unistd.h
>ap_config.h seems to take care of a few systems who don't define them,
>darwin doesn't appear to be one of those. can you find them in darwin's
>standard header files anywhere?
They're also in /usr/include/unistd.h , but is the opening #ifndef
messing things up, perhaps? (don't know what yours looks like)
----------- from unistd.h --------------------------------------
#ifndef _UNISTD_H_
#define _UNISTD_H_
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/unistd.h>
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
#ifndef NULL
#define NULL 0 /* null pointer constant */
#endif
-------------------------------------------------
>my ap_config_auto.h looks like this:
>/* check: #include <unistd.h> */
>#ifndef HAVE_UNISTD_H
>#define HAVE_UNISTD_H 1
>#endif
>
>then ap_config.h tests that value:
>#ifdef HAVE_UNISTD_H
>#include <unistd.h>
>#endif
>
>it would be worth comparing the two versions of ap_config_auto.h from the
>two builds to see what's different.
Good call. Here's a diff (plain apache is '-', modperl is '+'). Several
interesting bits.
-------------------------------------------------
--- /Users/ken/orig.h Thu May 17 00:23:44 2001
+++ src/include/ap_config_auto.h Thu May 17 00:25:08 2001
@@ -27,8 +27,8 @@
#endif
/* check: #include <unistd.h> */
-#ifndef HAVE_UNISTD_H
-#define HAVE_UNISTD_H 1
+#ifdef HAVE_UNISTD_H
+#undef HAVE_UNISTD_H
#endif
/* check: #include <sys/resource.h> */
@@ -47,8 +47,8 @@
#endif
/* check: #include <sys/param.h> */
-#ifndef HAVE_SYS_PARAM_H
-#define HAVE_SYS_PARAM_H 1
+#ifdef HAVE_SYS_PARAM_H
+#undef HAVE_SYS_PARAM_H
#endif
/* determine: longest possible integer type */
@@ -76,19 +76,34 @@
#define DARWIN 1
#endif
+/* build flag: -DMOD_PERL */
+#ifndef MOD_PERL
+#define MOD_PERL 1
+#endif
+
+/* build flag: -DUSE_PERL_SSI */
+#ifndef USE_PERL_SSI
+#define USE_PERL_SSI 1
+#endif
+
+/* build flag: -DHAS_TELLDIR_PROTOTYPE */
+#ifndef HAS_TELLDIR_PROTOTYPE
+#define HAS_TELLDIR_PROTOTYPE 1
+#endif
+
/* build flag: -DUSE_HSREGEX */
#ifndef USE_HSREGEX
#define USE_HSREGEX 1
#endif
-/* build flag: -DUSE_EXPAT */
-#ifndef USE_EXPAT
-#define USE_EXPAT 1
-#endif
-
/* build flag: -DNO_DL_NEEDED */
#ifndef NO_DL_NEEDED
#define NO_DL_NEEDED 1
+#endif
+
+/* build flag: -DHAS_TELLDIR_PROTOTYPE */
+#ifndef HAS_TELLDIR_PROTOTYPE
+#define HAS_TELLDIR_PROTOTYPE 1
#endif
#endif /* AP_CONFIG_AUTO_H */
-------------------------------------------------
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]