]> sigrok.org Git - libsigrok.git/commitdiff
Don't set _POSIX_C_SOURCE for VXI/RPC related files.
authorUwe Hermann <redacted>
Sat, 29 Aug 2015 12:50:44 +0000 (14:50 +0200)
committerUwe Hermann <redacted>
Sat, 29 Aug 2015 15:15:26 +0000 (17:15 +0200)
Make vxi.h the first #include in all affected files and #undef the
_POSIX_C_SOURCE macro in vxi.h.

This avoids various build issues on e.g. FreeBSD or Mac OS X where
setting _POSIX_C_SOURCE leads to the unavailability of certain types
such as u_long (as used in the VXI/RPC code).

src/scpi/scpi_vxi.c
src/scpi/vxi.h
src/scpi/vxi_clnt.c

index e28a77a3d857587c9d8620576e8583d59a1dc0f8..b2324b71be96b70646122627ca9e43aec9a73cc5 100644 (file)
@@ -20,9 +20,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "vxi.h"
 #include <rpc/rpc.h>
 #include <string.h>
 #include <rpc/rpc.h>
 #include <string.h>
-#include "vxi.h"
 #include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 #include "scpi.h"
 #include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 #include "scpi.h"
index 61a51f62237d96d4f848ad08be8a09a75d86298c..59ec4df32472dec295307a1f7258dc0077cc9270 100644 (file)
@@ -3,6 +3,8 @@
  * It was generated using rpcgen.
  */
 
  * It was generated using rpcgen.
  */
 
+#undef _POSIX_C_SOURCE
+
 #ifndef _VXI_H_RPCGEN
 #define _VXI_H_RPCGEN
 
 #ifndef _VXI_H_RPCGEN
 #define _VXI_H_RPCGEN
 
index 55a72dc2e3c44fdd25ca6ef5fd94958648e7a4bb..313bfd7fd70dc07660d9c283a5a50319abfb3ba6 100644 (file)
@@ -3,8 +3,8 @@
  * It was generated using rpcgen.
  */
 
  * It was generated using rpcgen.
  */
 
-#include <memory.h> /* for memset */
 #include "vxi.h"
 #include "vxi.h"
+#include <memory.h> /* for memset */
 
 /* Default timeout can be changed using clnt_control() */
 static struct timeval TIMEOUT = { 25, 0 };
 
 /* Default timeout can be changed using clnt_control() */
 static struct timeval TIMEOUT = { 25, 0 };