More waf confusion

Eric S. Raymond esr at thyrsus.com
Mon Mar 27 11:07:21 UTC 2017


Hal Murray <hmurray at megapathdsl.net>:
> HAVE_UINT64_T isn't currently used.  The comment in wafhelpers/configure.py 
> says
>      # int32_t and uint32_t probes aren't really needed, POSIX guarantees
>      # them.  But int64_t and uint64_t are not guaranteed to exist on 32-bit
>      # machines.  The calendar and ISC code needs them.
> The calendar and/or ISC code no longer uses HAVE_UINT64_T so I assume it's 
> safe it remove that.

I see you removed that.  That's OK; it's no longer needed because we
assume a c99 baseline, which assumes that the 64-bit scalars exist.

> Here is the interesting one:
>   ##    ctx.check_cc(auto_add_header_name=True,
>   ##                 header_name="stddef.h",
>   ##                 mandatory=False)
> 
> Nobody references HAVE_STDDEF_H, but commenting out that code breaks things.  
> The test for HAVE_STRUCT_TIMEX_MODES uses size_t which isn't defined.
> 
> Working test code has an "#include <stddef.h>"
> I assume that drags in something that provides size_t and it's due to the 
> "auto_add_header_name=True"
> 
> Does anybody understand this area?  Is there any simple way to get that 
> header added to the test code without cluttering up config.h?
> 
> There is another bunch of stuff that isn't used by code but is used by waf 
> internally.  Gary's recent work added:
>   #define HAS_PIC 1
>   /* #undef HAS_PIE */
>   #define HAS_gnu99 1
>   #define HAS_unused 1
>   #define HAS_z_now 1
> 
> This looks like the same problem.  I think I'm looking for a flag to check_cc 
> that says "don't put this in config.h"

That might happen if you leave out the define_name argument.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

Please consider contributing to my Patreon page at https://www.patreon.com/esr
so I can keep the invisible wheels of the Internet turning. Give generously -
the civilization you save might be your own.



More information about the devel mailing list