summaryrefslogtreecommitdiff
path: root/android
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 /android
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 'android')
-rw-r--r--android/config.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/android/config.h b/android/config.h
index 59c7544..341c01f 100644
--- a/android/config.h
+++ b/android/config.h
@@ -17,20 +17,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* Default visibility */
-#define DEFAULT_VISIBILITY __attribute__((visibility("default")))
+/* Define to the attribute for default visibility. */
+#define DEFAULT_VISIBILITY __attribute__ ((visibility ("default")))
-/* Start with debug message logging enabled */
+/* Define to 1 to start with debug message logging enabled. */
/* #undef ENABLE_DEBUG_LOGGING */
-/* Message logging */
-#define ENABLE_LOGGING
+/* Define to 1 to enable message logging. */
+#define ENABLE_LOGGING 1
/* Define to 1 if you have the <asm/types.h> header file. */
#define HAVE_ASM_TYPES_H 1
-/* Define to 1 if the compiler supports _Thread_local. */
-#define HAVE_CC_THREAD_LOCAL 1
+/* Define to 1 if you have the `clock_gettime' function. */
+#define HAVE_CLOCK_GETTIME 1
/* Define to 1 if the system has the type `nfds_t'. */
#define HAVE_NFDS_T 1
@@ -41,11 +41,14 @@
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
-/* Use POSIX poll() implementation */
+/* Define to 1 if using the POSIX poll() implementation. */
#define POLL_POSIX 1
-/* Use POSIX Threads */
+/* Define to 1 if using POSIX threads. */
#define THREADS_POSIX 1
-/* Enable output to system log */
+/* Define to 1 to output logging messages to the systemwide log. */
#define USE_SYSTEM_LOGGING_FACILITY 1
+
+/* Enable GNU extensions. */
+#define _GNU_SOURCE 1