summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2007-01-06 20:26:47 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2007-01-06 20:26:47 +0000
commitca4918aa768b5ee0e5199374a5c87da4d64a2653 (patch)
tree40e2ef5b7f6691de67122d36f6f488fbcb9efc5a /gpsd.c
parent7b714674f5084697e6abbe48060083263293fef7 (diff)
downloadgpsd-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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index df056fd8..e39d7b6d 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -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