diff --git a/CMakeLists.txt b/CMakeLists.txt index 8768bdf..08f1dd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,7 @@ # 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 +# 2020-04-28 PH added function check for memfd_create based on Carlo's patch PROJECT(PCRE2 C) @@ -132,9 +133,10 @@ CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) +CHECK_FUNCTION_EXISTS(memfd_create HAVE_MEMFD_CREATE) CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) -CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) CHECK_FUNCTION_EXISTS(secure_getenv HAVE_SECURE_GETENV) +CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror") @@ -326,7 +328,7 @@ ENDIF(PCRE2_SUPPORT_JIT) IF(PCRE2_SUPPORT_JIT_SEALLOC) SET(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) - CHECK_SYMBOL_EXISTS(mkostemp stdlib.h REQUIRED) + CHECK_SYMBOL_EXISTS(mkostemp stdlib.h REQUIRED) UNSET(CMAKE_REQUIRED_DEFINITIONS) IF(${REQUIRED}) ADD_DEFINITIONS(-D_GNU_SOURCE) diff --git a/ChangeLog b/ChangeLog index 6ca023f..04a0623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -117,6 +117,9 @@ 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. +29. Check for the existence of memfd_create in both CMake and configure +configurations. Patch by Carlo Marcelo Arenas Belon. + Version 10.34 21-November-2019 ------------------------------ diff --git a/config-cmake.h.in b/config-cmake.h.in index 3c5e0d3..7766dd7 100644 --- a/config-cmake.h.in +++ b/config-cmake.h.in @@ -11,9 +11,10 @@ #cmakedefine HAVE_WINDOWS_H 1 #cmakedefine HAVE_BCOPY 1 +#cmakedefine HAVE_MEMFD_CREATE 1 #cmakedefine HAVE_MEMMOVE 1 -#cmakedefine HAVE_STRERROR 1 #cmakedefine HAVE_SECURE_GETENV 1 +#cmakedefine HAVE_STRERROR 1 #cmakedefine PCRE2_STATIC 1 diff --git a/configure.ac b/configure.ac index fa7290f..7e33807 100644 --- a/configure.ac +++ b/configure.ac @@ -507,7 +507,7 @@ AC_TYPE_SIZE_T # Checks for library functions. -AC_CHECK_FUNCS(bcopy memmove strerror mkostemp secure_getenv) +AC_CHECK_FUNCS(bcopy memfd_create memmove mkostemp secure_getenv strerror) # Check for the availability of libz (aka zlib) diff --git a/src/config.h.generic b/src/config.h.generic index e29b843..e460f44 100644 --- a/src/config.h.generic +++ b/src/config.h.generic @@ -52,6 +52,9 @@ sure both macros are undefined; an emulation function will then be used. */ LF does in an ASCII/Unicode environment. */ /* #undef EBCDIC_NL25 */ +/* Define this if your compiler supports __attribute__((uninitialized)) */ +/* #undef HAVE_ATTRIBUTE_UNINITIALIZED */ + /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ @@ -76,6 +79,9 @@ sure both macros are undefined; an emulation function will then be used. */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIMITS_H */ +/* Define to 1 if you have the `memfd_create' function. */ +/* #undef HAVE_MEMFD_CREATE */ + /* Define to 1 if you have the `memmove' function. */ /* #undef HAVE_MEMMOVE */ @@ -218,7 +224,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_NAME "PCRE2" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE2 10.35-RC1" +#define PACKAGE_STRING "PCRE2 10.35-RC2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre2" @@ -227,7 +233,7 @@ sure both macros are undefined; an emulation function will then be used. */ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "10.35-RC1" +#define PACKAGE_VERSION "10.35-RC2" /* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested parentheses (of any kind) in a pattern. This limits the amount of system @@ -352,7 +358,7 @@ sure both macros are undefined; an emulation function will then be used. */ #endif /* Version number of package */ -#define VERSION "10.35-RC1" +#define VERSION "10.35-RC2" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ diff --git a/src/config.h.in b/src/config.h.in index 5406da0..d42cc00 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -79,6 +79,9 @@ sure both macros are undefined; an emulation function will then be used. */ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H +/* Define to 1 if you have the `memfd_create' function. */ +#undef HAVE_MEMFD_CREATE + /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE