]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
linux: Check for BOTHER macro at configure time.
[libserialport.git] / libserialport_internal.h
index 9d582f8e72fbef5a1009b2f31d234ddedd737be1..28c307602063032809a50c5402b877044736ff8e 100644 (file)
 #include <tchar.h>
 #include <setupapi.h>
 #include <cfgmgr32.h>
+#undef DEFINE_GUID
+#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
+       static const GUID name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
 #include <usbioctl.h>
+#include <usbiodef.h>
 #else
 #include <limits.h>
 #include <termios.h>
@@ -74,7 +78,7 @@
 #endif
 
 /* Non-standard baudrates are not available everywhere. */
-#if defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)
+#if (defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)) && defined(HAVE_BOTHER)
 #define USE_TERMIOS_SPEED
 #endif