]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Use clock_gettime(CLOCK_MONOTONIC) if available.
[libserialport.git] / libserialport_internal.h
index 669152b675339927e5b0dda0e993230c637fbe7c..ec15f58fecd359625e11727ce32507009bd2e559 100644 (file)
@@ -23,7 +23,7 @@
 
 
 #ifdef __linux__
-/* For timeradd, timersub, timercmp. */
+/* For timeradd, timersub, timercmp, realpath. */
 #define _BSD_SOURCE 1 /* for glibc < 2.19 */
 #define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */
 #endif
@@ -37,7 +37,6 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdarg.h>
-#include <limits.h>
 #ifdef _WIN32
 #include <windows.h>
 #include <tchar.h>
        static const GUID name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
 #include <usbioctl.h>
 #include <usbiodef.h>
+#include "windows_ddk.h"
 #else
 #include <limits.h>
 #include <termios.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <limits.h>
+#include <time.h>
 #include <poll.h>
 #endif
 #ifdef __APPLE__
@@ -85,7 +85,7 @@
 #endif
 
 /* Non-standard baudrates are not available everywhere. */
-#if (defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)) && defined(HAVE_DECL_BOTHER)
+#if (defined(HAVE_TERMIOS_SPEED) || defined(HAVE_TERMIOS2_SPEED)) && HAVE_DECL_BOTHER
 #define USE_TERMIOS_SPEED
 #endif
 
@@ -109,7 +109,8 @@ struct sp_port {
        OVERLAPPED read_ovl;
        OVERLAPPED wait_ovl;
        DWORD events;
-       BYTE pending_byte;
+       BYTE *write_buf;
+       DWORD write_buf_size;
        BOOL writing;
        BOOL wait_running;
 #else