summaryrefslogtreecommitdiff
path: root/gpsdclient.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-14 18:35:12 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-14 18:35:12 -0500
commit5d629ca37207b04a78ea444e1bd0a96daa7bfaff (patch)
tree6315466b537ddb753ac6af87e83c025d0af7158b /gpsdclient.c
parent0f8907e2b4e21db77c479350521326f3a48317bf (diff)
downloadgpsd-5d629ca37207b04a78ea444e1bd0a96daa7bfaff.tar.gz
Not having setlocale(3) is so ten years ago...
Diffstat (limited to 'gpsdclient.c')
-rw-r--r--gpsdclient.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gpsdclient.c b/gpsdclient.c
index 2dd75e63..832a9217 100644
--- a/gpsdclient.c
+++ b/gpsdclient.c
@@ -4,22 +4,19 @@
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
-#ifndef S_SPLINT_S
-#include <unistd.h>
-#endif /* S_SPLINT_S */
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
+#include <locale.h>
+#ifndef S_SPLINT_S
+#include <unistd.h>
+#endif /* S_SPLINT_S */
#include "gpsd_config.h"
#include "gps.h"
#include "gpsdclient.h"
-#ifdef HAVE_SETLOCALE
-#include <locale.h>
-#endif
-
/* convert double degrees to a static string and return a pointer to it
*
* deg_str_type:
@@ -101,9 +98,7 @@ enum unit gpsd_units(void)
{
char *envu = NULL;
-#ifdef HAVE_SETLOCALE
(void)setlocale(LC_NUMERIC, "C");
-#endif
if ((envu = getenv("GPSD_UNITS")) != NULL && *envu != '\0') {
if (0 == strcasecmp(envu, "imperial")) {
return imperial;