gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Today's warnings....


From: Hal Murray
Subject: Re: [gpsd-dev] Today's warnings....
Date: Fri, 12 Aug 2016 17:24:55 -0700

address@hidden said:
>> I think you fixed something similar but missed this one.  The problem
>> is that time_t is long long on FreeBSD but labs takes a long.  Patch
>> after I test it.
> I did that already, note the llabs(), not labs(): 

Sorry, I fatfingered a copy/paste.  You missed the pair in gpsmon.  Patch 
attached.


address@hidden said:
>> timespec_str.c:52:6: warning: implicit declaration of function
>> 'llabs' [-Wimplicit-function-declaration]
> So, what's the fix?  I don't want to get sucked into patching an OS I can't
> test. 

I have no idea.  From a glance at the header file, I assume it expects 
somebody to define some magic symbol.  That's lawyer land that I don't 
understand.

#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \  
    defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L
...
/* LONGLONG */
long long int   llabs(long long int);

This may be one of those cases that is best ignored.  If not, how about:
#ifndef llabs
extern long long int   llabs(long long int);
#endif

Attachment: 0001-Fix-warning-on-FreeBSD.patch
Description: 0001-Fix-warning-on-FreeBSD.patch

-- 
These are my opinions.  I hate spam.


reply via email to

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