diff options
author | costan <costan@google.com> | 2017-08-02 09:43:03 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2017-08-02 10:56:06 -0700 |
commit | 77c12adc192ac6620a0f0d340c99149ec56a97a3 (patch) | |
tree | 24bbf43f501f96cfa8db7ded9864950f5e416c41 /cmake/config.h.in | |
parent | c8049c58273d9dc02299bb441b75b4cbb3ea7917 (diff) | |
download | snappy-77c12adc192ac6620a0f0d340c99149ec56a97a3.tar.gz snappy-77c12adc192ac6620a0f0d340c99149ec56a97a3.tar.bz2 snappy-77c12adc192ac6620a0f0d340c99149ec56a97a3.zip |
Add unistd.h checks back to the CMake build.
getpagesize(), as well as its POSIX.2001 replacement
sysconf(_SC_PAGESIZE), is defined in <unistd.h>. On Linux and OS X,
including <sys/mman.h> is sufficient to get a definition for
getpagesize(). However, this is not true for the Android NDK. This CL
brings back the HAVE_UNISTD_H definition and its associated header
check.
This also adds a HAVE_FUNC_SYSCONF definition, which checks for the
presence of sysconf(). The definition can be used later to replace
getpagesize() with sysconf().
Diffstat (limited to 'cmake/config.h.in')
-rw-r--r-- | cmake/config.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/config.h.in b/cmake/config.h.in index a14c7ad..64f2648 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -13,6 +13,9 @@ /* Define to 1 if you have a definition for mmap() in <sys/mman.h>. */ #cmakedefine HAVE_FUNC_MMAP 1 +/* Define to 1 if you have a definition for sysconf() in <unistd.h>. */ +#cmakedefine HAVE_FUNC_SYSCONF 1 + /* Define to 1 to use the gflags package for command-line parsing. */ #cmakedefine HAVE_GFLAGS 1 @@ -46,6 +49,9 @@ /* Define to 1 if you have the <sys/uio.h> header file. */ #cmakedefine HAVE_SYS_UIO_H 1 +/* Define to 1 if you have the <unistd.h> header file. */ +#cmakedefine HAVE_UNISTD_H 1 + /* Define to 1 if you have the <windows.h> header file. */ #cmakedefine HAVE_WINDOWS_H 1 |