Core: Use HAVE_SYS_TYPES_H and HAVE_SIGNAL_H
authorPete Batard <pete@akeo.ie>
Tue, 15 Jan 2013 22:24:32 +0000 (22:24 +0000)
committerToby Gray <toby.gray@realvnc.com>
Wed, 23 Jan 2013 00:39:47 +0000 (00:39 +0000)
* These files may not be available on all platforms (eg. WinCE)

configure.ac
libusb/core.c
libusb/io.c
libusb/version_nano.h
msvc/config.h

index ac41218..ec07937 100644 (file)
@@ -219,6 +219,7 @@ AM_CONDITIONAL([HAVE_SIGACTION], [test "x$have_sigaction" = "xyes"])
 # headers not available on all platforms but required on others
 AC_CHECK_HEADERS([sys/time.h])
 AC_CHECK_FUNCS(gettimeofday)
+AC_CHECK_HEADERS([signal.h])
 
 AM_CFLAGS="${AM_CFLAGS} -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration $nopointersign_cflags -Wshadow ${THREAD_CFLAGS} ${VISIBILITY_CFLAGS}"
 
index 729bce3..77e21bf 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
 
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
index 1338981..c222451 100644 (file)
 
 #include <config.h>
 #include <errno.h>
-#include <signal.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
index 4a236d7..fec778d 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10592
+#define LIBUSB_NANO 10593
index e221bab..730d091 100644 (file)
@@ -28,3 +28,9 @@
 
 /* type of second poll() argument */
 #define POLL_NFDS_TYPE unsigned int
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1