diff options
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | examples/fxload.c | 4 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index d2d5b6f..2aaa9e6 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,7 @@ LT_LDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age} -no-undefined" m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +EXTRA_CPPFLAGS= EXTRA_CFLAGS= dnl check for -std=gnu11 compiler support (optional) @@ -192,6 +193,9 @@ sunos) windows) AC_CHECK_TYPES([struct timespec], [], [], [[#include <time.h>]]) AC_DEFINE([_WIN32_WINNT], [_WIN32_WINNT_VISTA], [Define to the oldest supported Windows version.]) + dnl Cygwin and MSYS compilers do not define _WIN32 as MinGW and MSVC do + dnl simplify checks for Windows compilation by ensuring it is always defined + EXTRA_CPPFLAGS="-D_WIN32" LT_LDFLAGS="${LT_LDFLAGS} -avoid-version -Wl,--add-stdcall-alias" ;; *) @@ -328,6 +332,9 @@ fi SHARED_CFLAGS="-Wall -Wextra -Wshadow -Wunused -Wwrite-strings -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=init-self -Werror=missing-prototypes -Werror=strict-prototypes -Werror=undef -Werror=uninitialized" +AM_CPPFLAGS="${EXTRA_CPPFLAGS}" +AC_SUBST(AM_CPPFLAGS) + AM_CFLAGS="-std=${c_dialect}11 ${EXTRA_CFLAGS} ${SHARED_CFLAGS}" AC_SUBST(AM_CFLAGS) diff --git a/examples/fxload.c b/examples/fxload.c index 1cea9c3..114b19b 100644 --- a/examples/fxload.c +++ b/examples/fxload.c @@ -32,7 +32,7 @@ #include "libusb.h" #include "ezusb.h" -#if !defined(_WIN32) || defined(__CYGWIN__ ) +#if !defined(_WIN32) || defined(__CYGWIN__) #include <syslog.h> static bool dosyslog = false; #include <strings.h> @@ -55,7 +55,7 @@ void logerror(const char *format, ...) va_list ap; va_start(ap, format); -#if !defined(_WIN32) || defined(__CYGWIN__ ) +#if !defined(_WIN32) || defined(__CYGWIN__) if (dosyslog) vsyslog(LOG_ERR, format, ap); else diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 232a43c..07b0839 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11487 +#define LIBUSB_NANO 11488 |