diff options
author | Fred Wright <fw@fwright.net> | 2017-01-22 00:11:34 -0800 |
---|---|---|
committer | Fred Wright <fw@fwright.net> | 2017-01-22 14:02:55 -0800 |
commit | cb1403d842a2fdbe6109eaf48acb7a494f30784d (patch) | |
tree | eacc95e6c39338950688aa5473c84619ebeeb555 /os_compat.c | |
parent | 0fbb94143ec4a5baf569b09937b28d4339cc8a00 (diff) | |
download | gpsd-cb1403d842a2fdbe6109eaf48acb7a494f30784d.tar.gz |
Initial creation of os_compat.h.
This creates a header for os_compat.c, and moves the related
prototypes into it from gpsd_config.h (as created by SConstruct),
after adding references to it to gpsd.h (via gpsd.h-tail) and a few
other sources that need it but don't include gpsd.h.
It also removes includes of <time.h> in the places where they were
only needed for the code now removed from gpsd_config.h.
TESTED:
Ran "scons build-all check" on OSX 10.9 (with strlcat/strlcpy but no
clock_gettime), OSX 10.12 (with strlcat/strlcpy and clock_gettime),
and Ubuntu 14 (with clock_gettime but no strlcat/strlcpy). Also
verified that fallback versions were not being included where
unnecessary.
Diffstat (limited to 'os_compat.c')
-rw-r--r-- | os_compat.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/os_compat.c b/os_compat.c index 6e11ee89..4ffefb08 100644 --- a/os_compat.c +++ b/os_compat.c @@ -13,9 +13,7 @@ * in the histories of those files. */ -/* Determine which of these functions we need */ -#include <time.h> /* For time_t (temp until we fix gpsd_config.h) */ -#include "gpsd_config.h" +#include "os_compat.h" /* Includes gpsd_config.h */ #ifndef HAVE_CLOCK_GETTIME |