Hello Martin,

On Friday 23 November 2007 13:00, Martin Simmons wrote:
...
>
> I've found the problem that causes all of these config failures: nothing
> includes sys/types.h in the config tests.
>
> It looks like other OSes (and older versions of Mac OS X) include this file
> indirectly from some other header file, so it works by luck.
>
> Note that nothing defines HAVE_SYS_TYPES_H either, on any OS :-)
>
> This patch fixes configure, but it should obviously be done properly in the
> autoconf:
>
> --- configure~        2007-10-05 18:56:48.000000000 +0100
> +++ configure 2007-11-23 11:22:02.000000000 +0000
> @@ -19283,6 +19283,7 @@
>       stdarg.h \
>       stdlib.h \
>       stdint.h \
> +     sys/types.h \
>       string.h \
>       termios.h \
>       termcap.h \
>

Well, in looking closely at the configure script (and the output of config.log 
submitted to the bug report), it is indeed the case that the configure script 
*blindly* assumes that HAVE_SYS_TYPES_H is defined, and if not, it does not 
include sys/types in many of its tests.  IMO, this is really incorrect.  The 
configure script also blindly assumes that several other HAVE_xxx are defined 
or will not include certain headers in some of the tests it does.  As a 
consequence, I have explicitly included sys/types.h as well as several other 
headers in the list of headers checked.  Hopefully that will resolve all 
current and future problems of this nature.

I have also made Bacula's typedef for int8_t contain "signed", which is what 
Mac does (now the Mac typedef and Bacula typedef are the same).  The Mac code 
that adds "signed" is a good idea.

It looks like on Unix sys/types.h is normally included by some other include, 
and was previously the case on Mac but is no longer the case, which is why it 
started failing on the Mac build.  The least I can say is that though it may 
not be wrong (I am not sure), the Mac has moved a bit away from the other 
Unix releases, and that autoconf is the "guilty" component because it makes 
assumptions it should not.

The patch that I have attached to the bug report should fix it.

Thanks for finding the "root" of the problem.

Best regards,

Kern

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to