gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, cmake, updated. e88d7d831b34b84fd5d9f944


From: Juergen Kahrs
Subject: [gawk-diffs] [SCM] gawk branch, cmake, updated. e88d7d831b34b84fd5d9f944305e5409e7e01d94
Date: Thu, 07 Feb 2013 19:56:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, cmake has been updated
       via  e88d7d831b34b84fd5d9f944305e5409e7e01d94 (commit)
      from  6687cad78247baa628df4d140894fb3ae9eb5872 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=e88d7d831b34b84fd5d9f944305e5409e7e01d94

commit e88d7d831b34b84fd5d9f944305e5409e7e01d94
Author: Juergen Kahrs <address@hidden>
Date:   Thu Feb 7 20:55:55 2013 +0100

    New macro DefineStructHasMemberIfAvailable. Cleaned up a bit.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4b2628..9f91900 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,7 @@ include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckLibraryExists)
 include(CheckTypeSize)
+include(CheckStructHasMember)
 
 MACRO(DefineFunctionIfAvailable func feature)
   check_function_exists("${func}" "${feature}")
@@ -36,6 +37,13 @@ MACRO(DefineSymbolIfAvailable symbol hfile feature)
   ENDIF ()
 ENDMACRO(DefineSymbolIfAvailable)
 
+MACRO(DefineStructHasMemberIfAvailable struct member hfile feature)
+  check_struct_has_member("${struct}" "${member}" "${hfile}" "${feature}")
+  IF (${feature})
+    ADD_DEFINITIONS (-D ${feature})
+  ENDIF ()
+ENDMACRO(DefineStructHasMemberIfAvailable)
+
 MACRO(DefineLibraryIfAvailable lib func location feature)
   check_library_exists("${lib}" "${func}" "${location}" "${feature}")
   IF (${feature})
@@ -68,7 +76,7 @@ add_definitions(-D DEFLIBPATH=\\"${CMAKE_BINARY_DIR}/lib\\")
 #add_definitions(-D EXTLIB_SUFFIX=\\"lib\\")
 add_definitions(-D SHLIBEXT=\\".so\\")
 DefineTypeIfAvailable("unsigned int" SIZEOF_UNSIGNED_INT)
-add_definitions(-D SIZEOF_UNSIGNED_LONG=8)
+DefineTypeIfAvailable("unsigned long" SIZEOF_UNSIGNED_LONG)
 #/* Define to 1 if *printf supports %F format */
 add_definitions(-D PRINTF_HAS_F_FORMAT)
 #/* Define as the return type of signal handlers (`int' or `void'). */
@@ -114,18 +122,25 @@ DefineHFileIfAvailable(wchar.h HAVE_WCHAR_H)
 DefineHFileIfAvailable(wctype.h HAVE_WCTYPE_H)
 #DefineTypeIfAvailable("long long int"   HAVE_LONG_LONG_INT)
 #add_definitions(-D HAVE_UNSIGNED_LONG_LONG_INT)
-#add_definitions(-D HAVE_INTMAX_T)
-#CHECK_TYPE_SIZE(uintmax_t   UINTMAX_T)
+DefineTypeIfAvailable(intmax_t INTMAX_T)
+DefineTypeIfAvailable(uintmax_t UINTMAX_T)
 
 # These dont work, maybe CheckCSourceCompiles would be better.
 add_definitions(-D TIME_T_IN_SYS_TYPES_H)
 #DefineTypeIfAvailable("time_t" TIME_T_IN_SYS_TYPES_H)
-add_definitions(-D HAVE_WCTYPE_T)
-#DefineTypeIfAvailable("wctype_t" HAVE_WCTYPE_T)
-add_definitions(-D HAVE_WINT_T)
-#DefineTypeIfAvailable("wint_t" HAVE_WINT_T)
+DefineTypeIfAvailable("wctype_t" WCTYPE_T)
+add_definitions(-D WINT_T)
+#DefineTypeIfAvailable("wint_t" WINT_T)
 add_definitions(-D HAVE_SOCKADDR_STORAGE)
-#DefineTypeIfAvailable("struct sockaddr_storage" HAVE_SOCKADDR_STORAGE)
+#DefineTypeIfAvailable("struct sockaddr_storage" SOCKADDR_STORAGE)
+add_definitions(-D HAVE_STRUCT_STAT_ST_BLKSIZE)
+#DefineStructHasMemberIfAvailable("struct stat" st_blksize bits/stat.h 
HAVE_STRUCT_STAT_ST_BLKSIZE)
+add_definitions(-D HAVE_ST_BLKSIZE)
+#DefineStructHasMemberIfAvailable("struct stat" st_blksize bits/stat.h 
HAVE_ST_BLKSIZE)
+add_definitions(-D HAVE_TM_ZONE)
+#DefineStructHasMemberIfAvailable("struct tm" tm_zone time.h HAVE_TM_ZONE)
+add_definitions(-D HAVE_STRUCT_TM_TM_ZONE)
+#DefineStructHasMemberIfAvailable("struct tm" tm_zone time.h 
HAVE_STRUCT_TM_TM_ZONE)
 
 DefineHFileIfAvailable(sys/time.h HAVE_SYS_TIME_H)
 DefineFunctionIfAvailable(alarm HAVE_ALARM)
@@ -138,8 +153,9 @@ add_definitions(-D HAVE_FMOD)
 DefineFunctionIfAvailable(isinf HAVE_ISINF)
 DefineFunctionIfAvailable(ismod HAVE_ISMOD)
 DefineFunctionIfAvailable(getgrent HAVE_GETGRENT)
-#add_definitions(-D HAVE_GETGROUPS)
-DefineTypeIfAvailable("pid_t"   HAVE_PID_T)
+DefineFunctionIfAvailable(getgroups HAVE_GETGROUPS)
+add_definitions(-D GETGROUPS_T=gid_t)
+DefineTypeIfAvailable("pid_t"   PID_T)
 DefineFunctionIfAvailable(grantpt HAVE_GRANTPT)
 DefineFunctionIfAvailable(isascii HAVE_ISASCII)
 DefineFunctionIfAvailable(iswctype HAVE_ISWCTYPE)
@@ -172,10 +188,7 @@ DefineFunctionIfAvailable(wcrtomb HAVE_WCRTOMB)
 DefineFunctionIfAvailable(wcscoll HAVE_WCSCOLL)
 DefineFunctionIfAvailable(wctype HAVE_WCTYPE)
 DefineFunctionIfAvailable(mbrtowc HAVE_MBRTOWC)
-add_definitions(-D HAVE_STRUCT_STAT_ST_BLKSIZE)
-add_definitions(-D HAVE_ST_BLKSIZE)
-add_definitions(-D HAVE_STRUCT_TM_TM_ZONE)
-add_definitions(-D HAVE_TM_ZONE)
+
 add_definitions(-D HAVE_STRINGIZE)
 add_definitions(-D _Noreturn=)
 

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt |   41 +++++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]