summaryrefslogtreecommitdiff
path: root/msvc
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-03-30 12:28:11 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-03-30 12:28:11 -0700
commit9a1bc8cafb904c20a869c74ad6d657686a1c4bb1 (patch)
tree1c6a0b258c047f83a45aa383337f63b4e85b6682 /msvc
parent0c6c072733a5a2177ffc24d2614ee1151a39f02f (diff)
downloadlibusb-9a1bc8cafb904c20a869c74ad6d657686a1c4bb1.tar.gz
build: Require C11 to build and clean up autoconfig/automake files
C11 compiler support has been available for many years now. It is not unreasonable to require this now, and doing so allows some cleanup to the configure script. It is no longer necessary to check for compiler support of the '-fvibility' flag because any compiler that supports C11 will support this flag as well. Fix up the way that compiler and linker flags are passed down to the various makefiles. The compiler flags should be shared by all, but the linker flags and libraries should be separated between the library and the examples/tests. The visibility flag is only relevant for the library and the thread flags are only relevant for sources using thread constructs, so provide them as needed. Rearrange configure.ac to group similar functionality and consolidate where possible. Based on these changes, update the Travis configuration file to include newer versions of test platforms to ensure proper C11 compiler support. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'msvc')
-rw-r--r--msvc/config.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/msvc/config.h b/msvc/config.h
index b2ab24b..58d1ed7 100644
--- a/msvc/config.h
+++ b/msvc/config.h
@@ -10,6 +10,11 @@
#error "Visual Studio 2013 or later is required."
#endif
+/* Visual Studio 2013 does not support __func__ */
+#if (_MSC_VER < 1900)
+#define __func__ __FUNCTION__
+#endif
+
/* Visual Studio 2015 and later defines timespec */
#if (_MSC_VER >= 1900)
#define _TIMESPEC_DEFINED 1
@@ -33,20 +38,20 @@
#pragma warning(disable:28125)
#endif
-/* Default visibility */
+/* Define to the attribute for default visibility. */
#define DEFAULT_VISIBILITY /**/
-/* Uncomment to start with debug message logging enabled */
-// #define ENABLE_DEBUG_LOGGING 1
+/* Define to 1 to start with debug message logging enabled. */
+/* #undef ENABLE_DEBUG_LOGGING */
-/* Message logging */
+/* Define to 1 to enable message logging. */
#define ENABLE_LOGGING 1
-/* Use Windows poll() implementation */
+/* Define to 1 if using the Windows poll() implementation. */
#define POLL_WINDOWS 1
-/* Use Windows Threads */
+/* Define to 1 if using Windows threads. */
#define THREADS_WINDOWS 1
-/* Uncomment to enabling output to system log */
-// #define USE_SYSTEM_LOGGING_FACILITY
+/* Define to 1 to output logging messages to the systemwide log. */
+/* #undef USE_SYSTEM_LOGGING_FACILITY */