> hi, > > The included is a patch which will help you making > httpd-2.0 successfully on such OSs as FreeBSD. > Unless applying this patch, the correct apr.exports > file cannot be created and the make fails when server/exports.c > is being compiled.
Oh dear, I got bitten by buildexports/make_export, didn't I? Ok, I'll move the #if down a few lines (and the matching #endif up) and see if that fixes the problem. Someone should really look into make_export one day and resolve the issues you won't expect when you code outside of httpd (ie, in apr). #if APR_HAS_THREADS #ifdef __cplusplus #endif #ifdef __cplusplus #endif #endif Shouldn't be any different (from buildexports point of view) than: #ifdef __cplusplus #endif #if APR_HAS_THREADS #endif #ifdef __cplusplus #endif The problem seems to be in apr/build/make_export: /^#[ \t]*if(def)? (AP[RU]?_|!?defined).*/ { if (old_filename != FILENAME) { if (old_filename != "") printf("%s", line) macro_no = 0 found = 0 count = 0 old_filename = FILENAME line = "" } macro_stack[macro_no++] = macro macro = substr($0, length($1)+2) count++ line = line macro "\n" next } /^#[ \t]*endif/ { if (count > 0) { count-- line = line "/" macro "\n" macro = macro_stack[--macro_no] } if (count == 0) { if (found != 0) { printf("%s", line) } line = "" } next } The 'endif rule' reduces the count, but the count isn't increased when an if other than #if APR_ or defined is present. So #ifdef __cplusplus doesn't bump the count, where the matching #endif does reduce it. Am I missing something? If not, I can't think of a decent fix right now, but it should be possible. Hmmm, total weirdness, I can't reproduce Hiroyukis problem on my machine... (linux from scratch, linux 2.4.2, glibc 2.2.2, gawk 3.0.6). Can someone reproduce it on their systems, so maybe we can look for a constructive fix? Thoughts anyone? Sander PS. Hiroyuki, could you send me your httpd-2.0/srclib/apr/apr.exports please? I'm curious if my thoughts are matching the behaviour on your machine.