[Pcre-svn] [1250] code/trunk: Patch CMakeLists.txt to proper…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1250] code/trunk: Patch CMakeLists.txt to properly test for mkostemp.
Revision: 1250
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1250
Author:   ph10
Date:     2020-04-28 15:26:24 +0100 (Tue, 28 Apr 2020)
Log Message:
-----------
Patch CMakeLists.txt to properly test for mkostemp.


Modified Paths:
--------------
    code/trunk/CMakeLists.txt
    code/trunk/ChangeLog


Modified: code/trunk/CMakeLists.txt
===================================================================
--- code/trunk/CMakeLists.txt    2020-04-25 16:04:15 UTC (rev 1249)
+++ code/trunk/CMakeLists.txt    2020-04-28 14:26:24 UTC (rev 1250)
@@ -88,8 +88,9 @@
 # 2020-03-24 PH changed CMAKE_MODULE_PATH definition to add, not replace
 # 2020-04-08 Carlo added function check for secure_getenv, fixed strerror
 # 2020-04-16 enh added check for __attribute__((uninitialized))
-# 2020=04-25 PH applied patches from Uwe Korn to support pkg-config and
+# 2020-04-25 PH applied patches from Uwe Korn to support pkg-config and
 #            library versioning.
+# 2020-04-25 Carlo added function check for mkostemp used in ProtExecAllocator


PROJECT(PCRE2 C)

@@ -118,6 +119,7 @@

INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckFunctionExists)
+INCLUDE(CheckSymbolExists)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckTypeSize)

@@ -323,7 +325,15 @@
ENDIF(PCRE2_SUPPORT_JIT)

 IF(PCRE2_SUPPORT_JIT_SEALLOC)
-        SET(SLJIT_PROT_EXECUTABLE_ALLOCATOR 1)
+        SET(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+        CHECK_SYMBOL_EXISTS(mkostemp stdlib.h REQUIRED)    
+        UNSET(CMAKE_REQUIRED_DEFINITIONS)
+        IF(${REQUIRED})
+                ADD_DEFINITIONS(-D_GNU_SOURCE)
+                SET(SLJIT_PROT_EXECUTABLE_ALLOCATOR 1)
+        ELSE(${REQUIRED})
+                SET(PCRE2_SUPPORT_JIT_SEALLOC OFF)
+        ENDIF(${REQUIRED})
 ENDIF(PCRE2_SUPPORT_JIT_SEALLOC)


IF(PCRE2GREP_SUPPORT_JIT)

Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2020-04-25 16:04:15 UTC (rev 1249)
+++ code/trunk/ChangeLog    2020-04-28 14:26:24 UTC (rev 1250)
@@ -114,7 +114,10 @@
 pcre2-config, the libpcre*.pc files, SOVERSION, VERSION and the 
 MACHO_*_VERSIONS settings for CMake builds.


+28. Another patch to CMakeLists.txt to check for mkostemp (configure already
+does). Patch by Carlo Marcelo Arenas Belon.

+
Version 10.34 21-November-2019
------------------------------