Yo Hal!

On Sun, 02 Feb 2025 01:29:22 -0800
Hal Murray <halmur...@sonic.net> wrote:

> There are several tangles in your response.
> 
> >> +        ("sys/time.h",  "struct timeval"),  
> > DOn't do that.  Per the man page:  
> 
> That was my first try.  It didn't work on BSD.

Care to share what the failure was?

> On all the systems I'v tried, man timeval says:
>        #include <sys/time.h>
> So that part seems to be working OK.

Where can I find that man page?

It just is at odds with POSIX.

> >> That list gets sorted.  (I don't know why.)  
> > I like things sorted.  
> Me too, but the code says:
>       for header, sizeof in sorted(sizeofs, key=lambda x: x[1:]):
> Why sort stuff in the code when you could manually sort the sizeofs
> list?

I was commenting on the 1st, not the 2nd.  No idea why one would bother
with sorted().

> >> But now it's dying on code that previously worked.  I think.  
> > Then why change the include test?  The man page says the old one is
> > sufficient.   
> 
> I didn't change that line.  I added it.  That broke another line.

Yes, that is how I read that too.

> >> Details in https://gitlab.com/NTPsec/ntpsec/-/jobs/9016721971  
> > What C code did that try to generate for the test?  
> 
> I don't know.  The only test case I have (so far) is on gitlab.
> I haven't found configure.log on gitlab.
> Do you know how? URL above.

configure.log will not tell you.  You need to look in the hidden
directory that waf runs the tests in.

> The code that does the work is in wafhelpers/check_sizeof.py
> There is a separate path for cross builds.  I can work out the code I 
> expect it to generate but I'm not sure what actually happens.

Oh, now I have context.  The only extra code for cross builds would
be the --march.  When you use --march then /usr/include/sys may
not be used for <sys/time.h>.  cc swaps sys directory to one approriate
to the target.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        g...@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin
_______________________________________________
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to