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: Fred Wright
Subject: Re: [gpsd-dev] Today's warnings....
Date: Fri, 12 Aug 2016 19:30:14 -0700 (PDT)

On Fri, 12 Aug 2016, Hal Murray wrote:

> 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

You can't use #ifdef on a function.

AFAICT the issue is __LONG_LONG_SUPPORTED, which in turn isn't set if it's
not C99 and either -ansi or -posix is specified.

Fred Wright



reply via email to

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