[Nut-upsdev] [nut-commits] buildbot failure in Network UPS Tools on FreeBSD-i686

Charles Lepple clepple at gmail.com
Sun Jan 24 21:56:00 UTC 2010


On Jan 24, 2010, at 4:32 PM, Arjen de Korte wrote:

> Citeren Charles Lepple <clepple at gmail.com>:
>
>> You were very close with the first _XOPEN_SOURCE addition - I think  
>> it
>> just needs to be set to a specific version. Let's see how r2267  
>> fares.
>
> We're close now, but I think we need to use
>
>    AC_DEFINE(_XOPEN_SOURCE, 500)
>
> at the top of configure.in instead. What happens now, is that we  
> explicitly *disable* functions that are in not in SUSv2. One example  
> is snprintf() on FreeBSD (which is a SUSv3 / C99 function). We do  
> provide our own (if one is not available), but that one will not be  
> used since we test for presence *before* we specify this version in  
> mge-hid.c.

Ugh. The AC_DEFINE is probably the right thing to do, but that  
certainly means a lot more code gets affected by that.

> It might be even better to up the standards to
>
>    AC_DEFINE(_XOPEN_SOURCE, 600)
>
> to unlock SUSv3 compliance (POSIX 2001 and C99). But then the  
> question is, how many older systems would no longer be able to build  
> NUT? Any thoughts?

I'm not sure how many systems will be affected, but let's step back  
for a minute.

Could we just check for strptime() using one of the AC_* macros, and  
not use the date conversion functions if there are issues? I would  
hate to hear back from a user who couldn't build a serial driver for  
an older system just because a newer USB driver needed a new function.

-- 
Charles Lepple



More information about the Nut-upsdev mailing list