diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2007-01-06 20:26:47 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2007-01-06 20:26:47 +0000 |
commit | ca4918aa768b5ee0e5199374a5c87da4d64a2653 (patch) | |
tree | 40e2ef5b7f6691de67122d36f6f488fbcb9efc5a /gpsd.c | |
parent | 7b714674f5084697e6abbe48060083263293fef7 (diff) | |
download | gpsd-ca4918aa768b5ee0e5199374a5c87da4d64a2653.tar.gz |
set numbers to always be rendered in the C locale...
...irrespective of the user's environment. this makes sense given that
gpsd is a wire protocol that just happens to be somewhat
human-readable too. from discussion on gpsd-users by Andreas Volz and
Greg Troxel
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -37,6 +37,9 @@ #if defined(HAVE_SYS_TIME_H) #include <sys/time.h> #endif +#ifdef HAVE_SETLOCALE +#include <locale.h> +#endif #ifdef DBUS_ENABLE #include <gpsd_dbus.h> @@ -1246,6 +1249,9 @@ int main(int argc, char *argv[]) pthread_mutex_init(&report_mutex, NULL); #endif /* PPS_ENABLE */ +#ifdef HAVE_SETLOCALE + setlocale(LC_NUMERIC, "C"); +#endif debuglevel = 0; while ((option = getopt(argc, argv, "F:D:S:dfhNnpP:V" #ifdef RTCM104_SERVICE |