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. 55775186a2fb7e4f61b57e29


From: Juergen Kahrs
Subject: [gawk-diffs] [SCM] gawk branch, cmake, updated. 55775186a2fb7e4f61b57e2923abe4e6e4728eb0
Date: Mon, 06 May 2013 19:18:19 +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  55775186a2fb7e4f61b57e2923abe4e6e4728eb0 (commit)
      from  263bd7ca867fdb26241a8681075f99d97c33c4d0 (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=55775186a2fb7e4f61b57e2923abe4e6e4728eb0

commit 55775186a2fb7e4f61b57e2923abe4e6e4728eb0
Author: Juergen Kahrs <address@hidden>
Date:   Mon May 6 21:18:05 2013 +0200

    Found better way to auto-detect GETGROUPS_T and GETPGRP_VOID.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 77fad10..c55321e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,7 @@ if(WIN32 OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
   #  - insert #include <windows.h> at the top of awk.h
   #  - remove function execvp from pc/gawkmisc.pc
   DefineConfigHValue(HAVE_SETENV 1)
+  DefineConfigHValue(HAVE_USLEEP 1)
   DefineConfigHValue(STDC_HEADERS 1)
   DefineConfigHValue(HAVE_STRINGIZE 1)
   # TODO: Eli Zaretskii remined me that the generated
diff --git a/cmake/configure.cmake b/cmake/configure.cmake
index ec4c4e5..c8ab206 100644
--- a/cmake/configure.cmake
+++ b/cmake/configure.cmake
@@ -44,6 +44,7 @@ include(CheckLibraryExists)
 include(CheckTypeSize)
 include(CheckStructHasMember)
 INCLUDE(CheckCSourceCompiles)
+include(CheckPrototypeDefinition)
 
 MACRO(DefineConfigH feature)
 #  message(STATUS feature=${feature}=${${feature}})
@@ -135,7 +136,8 @@ add_definitions(-D PRINTF_HAS_F_FORMAT)
 #/* Define as the return type of signal handlers (`int' or `void'). */
 add_definitions(-D RETSIGTYPE=void)
 #add_definitions(-D PIPES_SIMULATED)
-add_definitions(-D GETPGRP_VOID)
+check_prototype_definition(getpgrp "pid_t getpgrp(void)" "NULL" "unistd.h" 
GETPGRP_VOID)
+DefineConfigH(GETPGRP_VOID)
 #add_definitions(-D YYPARSE_PARAM)
 
 DefineFunctionIfAvailable(snprintf HAVE_SNPRINTF)
@@ -205,8 +207,16 @@ DefineFunctionIfAvailable(fmod HAVE_FMOD)
 DefineFunctionIfAvailable(isinf HAVE_ISINF)
 DefineFunctionIfAvailable(ismod HAVE_ISMOD)
 DefineFunctionIfAvailable(getgrent HAVE_GETGRENT)
-DefineFunctionIfAvailable(getgroups HAVE_GETGROUPS)
-add_definitions(-D GETGROUPS_T=gid_t)
+DefineSymbolIfAvailable("getgroups" "unistd.h" HAVE_GETGROUPS)
+if (${HAVE_GETGROUPS})
+  check_prototype_definition(getgroups "int getgroups(int size, gid_t list[])" 
"NULL" "unistd.h" GETGROUPS_T)
+  if (${GETGROUPS_T})
+    DefineConfigHValue(GETGROUPS_T gid_t)
+  else()
+    DefineConfigHValue(GETGROUPS_T int)
+  endif()
+endif()
+
 DefineTypeIfAvailable("pid_t"   PID_T)
 DefineTypeIfAvailable("intmax_t"   HAVE_INTMAX_T)
 DefineFunctionIfAvailable(grantpt HAVE_GRANTPT)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d92897d..564eb77 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -43,7 +43,6 @@ foreach(testgroup ${ALL_GROUPS} )
   # Some test cases are special, treat them accordingly.
   foreach(testcase ${ONE_GROUP} )
     set(options "")
-    set(file_suffix  "")
     if(${testcase} STREQUAL lintold)
       set(options "--lint-old")
     elseif(
@@ -55,12 +54,7 @@ foreach(testgroup ${ALL_GROUPS} )
        ${testcase} STREQUAL uninitialized)
       set(options "--lint")
     endif()
-
-    if ("${file_suffix}" STREQUAL "")
-      add_test("${testgroup}.${testcase}" ${SHELL_PREFIX} 
${CMAKE_SOURCE_DIR}/cmake/basictest ${CMAKE_BINARY_DIR}/gawk 
${testcase}${file_suffix}  ${options} )
-    else()
-      message(STATUS "Skipping test case ${testgroup}.${testcase}")
-    endif()
+    add_test("${testgroup}.${testcase}" ${SHELL_PREFIX} 
${CMAKE_SOURCE_DIR}/cmake/basictest ${CMAKE_BINARY_DIR}/gawk 
${testcase}${file_suffix}  ${options} )
   endforeach(testcase)
 
 endforeach(testgroup)

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

Summary of changes:
 CMakeLists.txt        |    1 +
 cmake/configure.cmake |   16 +++++++++++++---
 test/CMakeLists.txt   |    8 +-------
 3 files changed, 15 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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