gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH 6/8] Shift JSON_DATE_MAX definition so shared_json


From: Gary E. Miller
Subject: Re: [gpsd-dev] [PATCH 6/8] Shift JSON_DATE_MAX definition so shared_json.c doesn't need to rely on gpsd.h
Date: Tue, 19 Apr 2016 13:47:06 -0700

Yo Rob!

Why move JSON_DATE_MAX into Sconstruct?  It is defined as a fixed
constant for one and all in ISO 8601 and thhus not something that
SConstruct should ever touch.

On Tue, 19 Apr 2016 21:01:43 +0100
Rob Norris <address@hidden> wrote:

> TESTED:
> 'scons build-all check' passes.
> ---
>  SConstruct    | 2 ++
>  gpsd.h-tail   | 2 --
>  gpsdclient.h  | 2 +-
>  shared_json.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/SConstruct b/SConstruct
> index 21e04b3..a850c35 100644
> --- a/SConstruct
> +++ b/SConstruct
> @@ -851,6 +851,8 @@ int clock_gettime(clockid_t, struct timespec *);
>   */
>  #define MAX_PACKET_LENGTH    516     /* 7 + 506 + 3 */
>  
> +#define JSON_DATE_MAX        24      /* ISO8601 timestamp with 2
> decimal places */ +
>  #define GPSD_CONFIG_H
>  #endif /* GPSD_CONFIG_H */
>  ''')
> diff --git a/gpsd.h-tail b/gpsd.h-tail
> index 85990f0..892067a 100644
> --- a/gpsd.h-tail
> +++ b/gpsd.h-tail
> @@ -37,8 +37,6 @@
>  #define GPSD_PROTO_MAJOR_VERSION     3       /* bump on
> incompatible changes */ #define GPSD_PROTO_MINOR_VERSION
> 12    /* bump on compatible changes */ 
> -#define JSON_DATE_MAX        24      /* ISO8601 timestamp with 2
> decimal places */ -
>  #ifndef DEFAULT_GPSD_SOCKET
>  #define DEFAULT_GPSD_SOCKET  "/var/run/gpsd.sock"
>  #endif
> diff --git a/gpsdclient.h b/gpsdclient.h
> index ba1aabf..236d2b3 100644
> --- a/gpsdclient.h
> +++ b/gpsdclient.h
> @@ -41,7 +41,7 @@ extern void gpsd_source_spec(const char *fromstring,
>  
>  char *maidenhead(double n,double e);
>  
> -/* this needs to match JSON_DATE_MAX in gpsd.h */
> +/* this needs to match JSON_DATE_MAX in gpsd_config.h */
>  #define CLIENT_DATE_MAX      24
>  
>  #endif /* _GPSDCLIENT_H_ */
> diff --git a/shared_json.c b/shared_json.c
> index a158942..67ba2ea 100644
> --- a/shared_json.c
> +++ b/shared_json.c
> @@ -19,7 +19,7 @@ PERMISSIONS
>  #include <stdbool.h>
>  #include <time.h>    /* for time_t */
>  
> -#include "gpsd.h"
> +#include "libgps.h"
>  #ifdef SOCKET_EXPORT_ENABLE
>  #include "gps_json.h"
>  




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgp61EKVrXW9U.pgp
Description: OpenPGP digital signature


reply via email to

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