summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-08-16 15:23:25 -0700
committerGary E. Miller <gem@rellim.com>2016-08-16 15:24:22 -0700
commita7729b67c4135915c6787e08b34b28450848a35f (patch)
treeb3de36f138ce44211e14b336301dca06a7f996d2
parent8066c57a474c5b9ebdcdef5a6d3e4620dd197e87 (diff)
downloadgpsd-a7729b67c4135915c6787e08b34b28450848a35f.tar.gz
for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999
Sad, C99 did not actually standardize the defines to invoke the standard.
-rw-r--r--driver_nmea0183.c4
-rw-r--r--drivers.c4
-rw-r--r--gpsctl.c2
-rw-r--r--gpsd.c3
-rw-r--r--gpsd_json.c3
-rw-r--r--gpsmon.c4
-rw-r--r--gpspacket.c4
-rw-r--r--libgps_core.c4
-rw-r--r--monitor_nmea0183.c4
9 files changed, 32 insertions, 0 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 58c57ec9..337e90ca 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -2,6 +2,10 @@
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
+
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
diff --git a/drivers.c b/drivers.c
index ad480fa3..98a24854 100644
--- a/drivers.c
+++ b/drivers.c
@@ -2,6 +2,10 @@
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
+
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
diff --git a/gpsctl.c b/gpsctl.c
index d7f59e56..6f392f97 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -12,6 +12,8 @@
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
#include <stdio.h>
#include <stdlib.h>
diff --git a/gpsd.c b/gpsd.c
index d1b404b5..ee6e779c 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -15,6 +15,9 @@
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h> /* for select() */
diff --git a/gpsd_json.c b/gpsd_json.c
index 5e10cd08..c0893775 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -21,6 +21,9 @@ PERMISSIONS
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <stdio.h>
#include <math.h>
#include <assert.h>
diff --git a/gpsmon.c b/gpsmon.c
index f9475887..ea0991be 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -4,6 +4,10 @@
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
+
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
diff --git a/gpspacket.c b/gpspacket.c
index 0c9ade28..58ec5db2 100644
--- a/gpspacket.c
+++ b/gpspacket.c
@@ -5,6 +5,10 @@
* BSD terms apply: see the file COPYING in the distribution root for details.
*
*/
+
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <Python.h>
#include <stdio.h>
diff --git a/libgps_core.c b/libgps_core.c
index ca580bd1..644b96d4 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -5,6 +5,10 @@
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
+
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/monitor_nmea0183.c b/monitor_nmea0183.c
index 426d9b05..a150ac48 100644
--- a/monitor_nmea0183.c
+++ b/monitor_nmea0183.c
@@ -6,6 +6,10 @@
* This file is Copyright (c) 2010 by the GPSD project
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
+
+/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
+#define __ISO_C_VISIBLE 1999
+
#include <stdio.h>
#include <string.h>
#include <math.h>