gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Build broken for non-QT


From: O'Connor, Daniel
Subject: Re: [gpsd-users] Build broken for non-QT
Date: Wed, 14 Jan 2015 00:02:08 +1030

> On 13 Jan 2015, at 22:21, Eric S. Raymond <address@hidden> wrote:
> 
> O'Connor, Daniel <address@hidden>:
>>> That patch would reintroduce a glibc dependency, which we're trying to 
>>> avoid.
>> 
>>> The timezone global is an ugly but standardized feature of the POSIX/SuS 
>>> API,
>>> supposed to be set after tzset(3).  Does FreeBSD really not have it?  
>>> Perhaps
>>> there's a feature macro you need to enable.
>> 
>> I couldn't see it, even better there is this in time.h...
>> #if __BSD_VISIBLE
>> char *timezone(int, int);       /* XXX XSI conflict */
>> void tzsetwall(void);
>> time_t timelocal(struct tm * const);
>> time_t timegm(struct tm * const);
>> #endif /* __BSD_VISIBLE */
>> 
>> So I guess the only way is "if BSD/OSX use timegm else use timezone".
> 
> OK.  I'll accept a patch conditionalizing the code in that way.

This works but is pretty ugly :(

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

Attachment: gpsd-non-qt-fix.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]