]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Generate a config.h rather than passing defines on command line.
[libserialport.git] / libserialport_internal.h
index 9d582f8e72fbef5a1009b2f31d234ddedd737be1..9d8e41fe3cf7fe8402310c0173060c1c04ac00ab 100644 (file)
@@ -18,6 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #ifdef __linux__
 #define _BSD_SOURCE // for timeradd, timersub, timercmp
 #endif
 #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 +80,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