diff options
author | Pete Batard <pete@akeo.ie> | 2013-01-15 22:24:32 +0000 |
---|---|---|
committer | Toby Gray <toby.gray@realvnc.com> | 2013-01-23 00:39:47 +0000 |
commit | 1e6928ccab25f933950ab67f9dba30cdc8822056 (patch) | |
tree | 8f940e03bb5ef28c35f6ae75466eadb8750ff552 | |
parent | 33ba1231a1b07425eaa83935f84b2e4b7f904f35 (diff) | |
download | libusb-1e6928ccab25f933950ab67f9dba30cdc8822056.tar.gz |
Core: Use HAVE_SYS_TYPES_H and HAVE_SIGNAL_H
* These files may not be available on all platforms (eg. WinCE)
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | libusb/core.c | 3 | ||||
-rw-r--r-- | libusb/io.c | 5 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 | ||||
-rw-r--r-- | msvc/config.h | 6 |
5 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index ac41218..ec07937 100644 --- a/configure.ac +++ b/configure.ac @@ -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}" diff --git a/libusb/core.c b/libusb/core.c index 729bce3..77e21bf 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -25,7 +25,10 @@ #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> diff --git a/libusb/io.c b/libusb/io.c index 1338981..c222451 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -20,12 +20,15 @@ #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 diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 4a236d7..fec778d 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10592 +#define LIBUSB_NANO 10593 diff --git a/msvc/config.h b/msvc/config.h index e221bab..730d091 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -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 |