]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Remove redundant inclusions of limits.h
[libserialport.git] / libserialport_internal.h
index 5db81e5ba4b0782c22e448e89288104099618be5..6ea5e5a2e57ebfa345357ed4acfdf4dd80f3d916 100644 (file)
 #ifndef LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
 #define LIBSERIALPORT_LIBSERIALPORT_INTERNAL_H
 
-#include <config.h>
 
 #ifdef __linux__
-#define _BSD_SOURCE /* 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
 
 #include <string.h>
@@ -51,7 +52,6 @@
 #include <termios.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
-#include <limits.h>
 #include <poll.h>
 #endif
 #ifdef __APPLE__
@@ -83,7 +83,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