[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] ✘gpsd is now C99, really.
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] ✘gpsd is now C99, really. |
Date: |
Mon, 15 Aug 2016 23:42:45 -0700 |
Yo Hal!
Can you tell me how daemon(), setgroups(), cfmaeraw() and others
need to be called?
Clearly your system is not POSIX 2001 compatible...
On Mon, 15 Aug 2016 23:39:31 -0700
Hal Murray <address@hidden> wrote:
> Lots and lots of troubles. Here is the first batch.
>
> From centos 7:
> gpsd.c: In function 'main':
> gpsd.c:1993:2: warning: implicit declaration of function 'daemon'
> [-Wimplicit-function-declaration]
> if (daemon(0, 0) != 0)
> ^
> gpsd.c:2109:2: warning: implicit declaration of function 'setgroups'
> [-Wimplicit-function-declaration]
> if (setgroups(0, NULL) != 0)
> ^
>
> serial.c: In function 'gpsd_set_raw':
> serial.c:248:5: warning: implicit declaration of function 'cfmakeraw'
> [-Wimplicit-function-declaration]
> (void)cfmakeraw(&session->ttyset);
> ^
> gpspipe.c: In function 'open_serial':
> gpspipe.c:89:5: warning: implicit declaration of function 'cfmakeraw'
> [-Wimplicit-function-declaration]
> (void)cfmakeraw(&newtio);
> ^
> gpspipe.c: In function 'main':
> gpspipe.c:254:2: warning: implicit declaration of function 'daemon'
> [-Wimplicit-function-declaration]
> if (daemon(0, 0) != 0)
> ^
>
> gps2udp.c: In function 'open_udp':
> gps2udp.c:144:8: warning: implicit declaration of function 'strsep'
> [-Wimplicit-function-declaration]
> hostname = strsep(&hostport[channel], ":");
> ^
> gps2udp.c:144:17: warning: assignment makes pointer from integer
> without a cast [enabled by default]
> hostname = strsep(&hostport[channel], ":");
> ^
> gps2udp.c:145:17: warning: assignment makes pointer from integer
> without a cast [enabled by default]
> portname = strsep(&hostport[channel], ":");
> ^
> gps2udp.c:171:45: error: 'struct hostent' has no member named 'h_addr'
> memcpy( &remote[channel].sin_addr, hp->h_addr, hp->h_length);
> ^
> gps2udp.c: In function 'main':
> gps2udp.c:431:2: warning: implicit declaration of function 'daemon'
> [-Wimplicit-function-declaration]
> if (daemon(0, 0) != 0) {
> ^
> gps2udp.c:467:14: warning: cast to pointer from integer of different
> size [-Wint-to-pointer-cast]
> info[j] = (unsigned char *)strsep((char **)&adrpkt, ",");
> ^
>
> Same stuff on Debian 7 (wheezy)
>
> -------
>
> From NetBSD, 32 bit if that matters.
>
> gpsd.c: In function 'filesock':
> gpsd.c:267:5: warning: implicit declaration of function 'strlcpy'
> [-Wimplicit-fu
> nction-declaration]
> (void)strlcpy(addr.sun_path, filename, sizeof(addr.sun_path));
> ^
> gpsd.c: In function 'json_devicelist_dump':
> gpsd.c:1079:6: warning: implicit declaration of function 'strlcat'
> [-Wimplicit-f
> unction-declaration]
> (void)strlcat(reply, ",", replylen);
> ^
> gpsd.c: In function 'main':
> gpsd.c:1993:2: warning: implicit declaration of function 'daemon'
> [-Wimplicit-fu
> nction-declaration]
> if (daemon(0, 0) != 0)
> ^
> gpsd.c:2109:2: warning: implicit declaration of function 'setgroups'
> [-Wimplicit
> -function-declaration]
> if (setgroups(0, NULL) != 0)
> ^
>
> In file included from timehint.c:25:0:
> timespec.h:31:36: warning: 'struct timespec' declared inside
> parameter list [ena
> bled by default]
> static inline void TS_NORM( struct timespec *ts)
> ^
> timespec.h:31:36: warning: its scope is only this definition or
> declaration, whi
> ch is probably not what you want [enabled by default]
> timespec.h: In function 'TS_NORM':
> timespec.h:33:20: error: dereferencing pointer to incomplete type
> if ( ( 1 <= ts->tv_sec ) ||
> ^
> timespec.h:34:20: error: dereferencing pointer to incomplete type
> ( (0 == ts->tv_sec ) && (0 <= ts->tv_nsec ) ) ) {
> ^
> timespec.h:34:42: error: dereferencing pointer to incomplete type
> ( (0 == ts->tv_sec ) && (0 <= ts->tv_nsec ) ) ) {
> ^
> timespec.h:36:22: error: dereferencing pointer to incomplete type
> if ( NS_IN_SEC <= ts->tv_nsec ) {
> ^
> timespec.h:38:8: error: dereferencing pointer to incomplete type
> ts->tv_nsec -= NS_IN_SEC;
> ^
> ...
>
> ------------
>
> From FreeBSD, 32 bit.
>
> In file included from gpsd.c:50:
> ./sockaddr.h:7:25: error: field has incomplete type 'struct
> sockaddr_in6' struct sockaddr_in6 sa_in6;
> ^
> ./sockaddr.h:7:12: note: forward declaration of 'struct sockaddr_in6'
> struct sockaddr_in6 sa_in6;
> ^
> In file included from gpsd.c:53:
> ./strfuncs.h:28:12: warning: implicitly declaring library function
> 'vsnprintf' w
> ith type 'int (char *, unsigned int, const char *, __builtin_va_list)'
> (void) vsnprintf(str + strlen(str), alloc_size - strlen(str),
> format, ap); ^
> ./strfuncs.h:28:12: note: please include the header <stdio.h> or
> explicitly prov
> ide a declaration for 'vsnprintf'
> gpsd.c:267:11: warning: implicitly declaring library function
> 'strlcpy' with typ
> e 'unsigned int (char *, const char *, unsigned int)'
> (void)strlcpy(addr.sun_path, filename, sizeof(addr.sun_path));
> ^
> gpsd.c:267:11: note: please include the header <string.h> or
> explicitly provide
> a declaration for 'strlcpy'
> gpsd.c:365:40: error: use of undeclared identifier 'INADDR_LOOPBACK'
> sat.sa_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
> ^
> /usr/include/arpa/inet.h:170:26: note: expanded from macro 'htonl'
> #define htonl(x) __htonl(x)
> ^
> /usr/include/x86/endian.h:126:30: note: expanded from macro '__htonl'
> #define __htonl(x) __bswap32(x)
> ^
> /usr/include/x86/endian.h:77:24: note: expanded from macro '__bswap32'
> (__builtin_constant_p(x) ? \
> ...
>
>
>
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
address@hidden Tel:+1 541 382 8588
pgp2VqMaOt6wj.pgp
Description: OpenPGP digital signature
- [gpsd-dev] ✘gpsd is now C99, really., Gary E. Miller, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really., Hal Murray, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really.,
Gary E. Miller <=
- Re: [gpsd-dev] ✘gpsd is now C99, really., Hal Murray, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really., Gary E. Miller, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really., Fred Wright, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really., Hal Murray, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really., Fred Wright, 2016/08/16
- Re: [gpsd-dev] ✘gpsd is now C99, really., Gary E. Miller, 2016/08/16
Re: [gpsd-dev] ✘gpsd is now C99, really., Jason Azze, 2016/08/16