]> granicus.if.org Git - libevent/commitdiff
Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usage
authorAzat Khuzhin <azat@libevent.org>
Sat, 9 Jul 2022 11:22:38 +0000 (14:22 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 9 Jul 2022 14:16:56 +0000 (17:16 +0300)
Note, autotools already supports it.

CMakeLists.txt
event-config.h.cmake

index 5ee0df2f7066488f4fbbc503febe1dd1d72aac21..9237252c777051fea6f38a9cb45665ab7d81c030 100644 (file)
@@ -295,6 +295,7 @@ if (${GNUC})
 
     list(APPEND __FLAGS
          -Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
+         -Wundef
 
          -fno-strict-aliasing # gcc 2.9.5+
          -Wmissing-prototypes
index 9fff3487753e201f758fc910022f5545312a462d..4a6267017c958926b6de55a094fae9a1e7363d36 100644 (file)
 /* The size of 'void *', as computer by sizeof */
 #define EVENT__SIZEOF_VOID_P @EVENT__SIZEOF_VOID_P@
 
+/* The size of 'time_t', as computer by sizeof */
+#define EVENT__SIZEOF_TIME_T @EVENT__SIZEOF_TIME_T@
+
 /* Define to `__inline__' or `__inline' if that's what the C compiler
    calls it, or to nothing if 'inline' is not supported under any name.  */
 #ifndef __cplusplus