CUBRID/cubrid
CMakeLists.txt
:490
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
add_definitions(-DHAVE_SYS_STAT_H)
add_definitions(-DHAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file_cxx (sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
ADD_DEFINITIONS(
-DPACKAGE_NAME=\"FULL-PACKAGE-NAME\"
-DPACKAGE_TARNAME=\"full-package-name\"
-DPACKAGE_VERSION=\"VERSION\"
-DPACKAGE_STRING=\"FULL-PACKAGE-NAME_VERSION\"
-DDEFPACKAGE_BUGREPORT=\"BUG-REPORT-ADDRESS\"
-DPACKAGE=\"bison++\"
-DVERSION=\"2.21.5\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_ALLOCA_H=1 -DHAVE_MALLOC_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STDLIB_H=1
-DHAVE_MALLOC=1
-DXPFILE="${COVISEDIR}/src/tools/bison++/bison.cc"
-DXHFILE="${COVISEDIR}/src/tools/bison++/bison.h"
-DXPFILE1="${COVISEDIR}/src/tools/bison++/bison.hairy"
)
check_include_file (sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
check_include_file (sys/stat.h HAVE_SYS_STAT_H)
string(REGEX MATCHALL "[^\n]*\n" CONFIG
"${CONFIG}
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
")
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file ( sys/stat.h HAVE_SYS_STAT_H )
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file (sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE_CXX(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
add_definitions(-DHAVE_SYS_STAT_H)
target_compile_definitions(${PROJECT_NAME} PUBLIC
-DHAVE_INTTYPES_H
-DHAVE_UNISTD_H
-DHAVE_ERRNO_H
-DHAVE_NETINET_IN_H
-DHAVE_SYS_IOCTL_H
-DHAVE_SYS_MMAN_H
-DHAVE_SYS_MOUNT_H
-DHAVE_SYS_PRCTL_H
-DHAVE_SYS_RESOURCE_H
-DHAVE_SYS_SELECT_H
-DHAVE_SYS_STAT_H
-DHAVE_SYS_TYPES_H
-DHAVE_STDLIB_H
-DHAVE_STRDUP
-DHAVE_MMAP
-DHAVE_UTIME_H
-DHAVE_GETPAGESIZE
-DHAVE_LSEEK64
-DHAVE_LSEEK64_PROTOTYPE
-DHAVE_EXT2_IOCTLS
-DHAVE_LINUX_FD_H
-DHAVE_TYPE_SSIZE_T
-DHAVE_SYS_TIME_H
-DHAVE_SYS_PARAM_H
-DHAVE_SYSCONF
)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
check_include_file (sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
FOREACH(have
HAVE_GETPAGESIZE
HAVE_INTTYPES_H
HAVE_MEMORY_H
HAVE_STDINT_H
HAVE_STDLIB_H
HAVE_STRINGS_H
HAVE_STRING_H
HAVE_SYS_STAT_H
HAVE_SYS_TYPES_H
HAVE_SYS_PARAM_H
HAVE_UNISTD_H
)
TRY_COMPILE(${var}_COMPILED
${GCCCONFIG_BINARY_DIR}
${GCCCONFIG_SOURCE_DIR}/gcc_c_tests.c
OUTPUT_VARIABLE OUTPUT
COMPILE_DEFINITIONS
-DTEST_${var}
-DHAVE_GETPAGESIZE=${HAVE_GETPAGESIZE}
-DHAVE_INTTYPES_H=${HAVE_INTTYPES_H}
-DHAVE_MEMORY_H=${HAVE_MEMORY_H}
-DHAVE_STDINT_H=${HAVE_STDINT_H}
-DHAVE_STDLIB_H=${HAVE_STDLIB_H}
-DHAVE_STRINGS_H=${HAVE_STRINGS_H}
-DHAVE_STRING_H=${HAVE_STRING_H}
-DHAVE_SYS_STAT_H=${HAVE_SYS_STAT_H}
-DHAVE_SYS_TYPES_H=${HAVE_SYS_TYPES_H}
-DHAVE_SYS_PARAM_H=${HAVE_SYS_PARAM_H}
-DHAVE_UNISTD_H=${HAVE_UNISTD_H}
-DSTDC_HEADERS=${STDC_HEADERS}
)
TRY_RUN(${var}_RESULT ${var}_COMPILED
${GCCCONFIG_BINARY_DIR}
${GCCCONFIG_SOURCE_DIR}/gcc_c_tests.c
OUTPUT_VARIABLE OUTPUT
COMPILE_DEFINITIONS
-DTEST_${var}
-DHAVE_GETPAGESIZE=${HAVE_GETPAGESIZE}
-DHAVE_INTTYPES_H=${HAVE_INTTYPES_H}
-DHAVE_MEMORY_H=${HAVE_MEMORY_H}
-DHAVE_STDINT_H=${HAVE_STDINT_H}
-DHAVE_STDLIB_H=${HAVE_STDLIB_H}
-DHAVE_STRINGS_H=${HAVE_STRINGS_H}
-DHAVE_STRING_H=${HAVE_STRING_H}
-DHAVE_SYS_STAT_H=${HAVE_SYS_STAT_H}
-DHAVE_SYS_TYPES_H=${HAVE_SYS_TYPES_H}
-DHAVE_SYS_PARAM_H=${HAVE_SYS_PARAM_H}
-DHAVE_UNISTD_H=${HAVE_UNISTD_H}
-DSTDC_HEADERS=${STDC_HEADERS}
)
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
check_c_source_compiles("
#define __EXTENSIONS__ 1
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_STRING_H
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
int main() { return 0; }"
DODEFINE_EXTENSIONS)
check_include_file ( sys/stat.h HAVE_SYS_STAT_H )
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file ( sys/stat.h HAVE_SYS_STAT_H )
target_compile_definitions(togl PRIVATE -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=0 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
check_c_source_compiles(
"
#include <unistd.h>
#include <stdlib.h>
#include <sys/mman.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include <fcntl.h>
#define ERR(e) do { status = e; goto done; } while(0)
int main(void)
{
char *data = NULL, *data2 = MAP_FAILED, *data3 = NULL;
size_t i, datasize = 1024;
int fd = -1, status = 0;
/* First, make a file with some known garbage in it. */
data = (char*) malloc(datasize);
if(!data)
ERR(1);
for(i=0;i<datasize;i++)
*(data + i) = rand();
umask(0);
fd = creat(\"conftest.mmap\", 0600);
if(fd < 0)
ERR(1);
if(write (fd, data, datasize) != datasize)
ERR(1);
close(fd);
fd = open(\"conftest.mmap\", O_RDWR);
if (fd < 0)
ERR(1);
/* Next, try to create a private map of the file. If we can, also make sure that
we see the same garbage. */
data2 = mmap(NULL, datasize, PROT_READ | PROT_WRITE,
MAP_PRIVATE, fd, 0L);
if(data2 == MAP_FAILED)
ERR(2);
for(i=0;i<datasize;i++)
if(*(data + i) != *(data2+ i))
ERR(3);
/* Finally, make sure that changes to the mapped area do not
percolate back to the file as seen by read().
(This is a bug on some variants of i386 svr4.0.) */
for (i = 0; i < datasize; ++i)
*(data2 + i) = *(data2 + i) + 1;
data3 = (char*) malloc(datasize);
if(!data3)
ERR(1);
if(read (fd, data3, datasize) != datasize)
ERR(1);
for(i=0;i<datasize;i++)
if(*(data + i) != *(data3 + i))
ERR(3);
done:
if(fd >= 0)
close(fd);
if(data3)
free(data3);
if(data2 != MAP_FAILED)
munmap(data2, datasize);
if(data)
free(data);
return status;
}
"
HAVE_MMAP
)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
check_include_files (sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_files ( sys/stat.h HAVE_SYS_STAT_H )
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES("sys/stat.h" HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
target_compile_definitions(${PROJECT_NAME} PRIVATE
$<$<BOOL:${HAVE_CONFIG_H}>:HAVE_CONFIG_H>
$<$<BOOL:${HAVE_UNISTD_H}>:HAVE_UNISTD_H>
$<$<BOOL:${HAVE_GETOPT_H}>:HAVE_GETOPT_H>
$<$<BOOL:${HAVE_STRING_H}>:HAVE_STRING_H>
$<$<BOOL:${HAVE_LIBGEN_H}>:HAVE_LIBGEN_H>
$<$<BOOL:${HAVE_MATH_H}>:HAVE_MATH_H>
$<$<BOOL:${HAVE_FCNTL_H}>:HAVE_FCNTL_H>
$<$<BOOL:${HAVE_DIRENT_H}>:HAVE_DIRENT_H>
$<$<BOOL:${HAVE_SYS_STAT_H}>:HAVE_SYS_STAT_H>
$<$<BOOL:${HAVE_SYS_TYPES_H}>:HAVE_SYS_TYPES_H>
$<$<BOOL:${HAVE_SYS_WAIT_H}>:HAVE_SYS_WAIT_H>
$<$<BOOL:${HAVE_MKSTEMPS}>:HAVE_MKSTEMPS>
$<$<BOOL:${HAVE_LABS}>:HAVE_LABS>
$<$<BOOL:${HAVE_FILENO}>:HAVE_FILENO>
$<$<BOOL:${HAVE_UTIMENSAT}>:HAVE_UTIMENSAT>
$<$<BOOL:${HAVE_FORK}>:HAVE_FORK>
$<$<BOOL:${HAVE_WAIT}>:HAVE_WAIT>
$<$<BOOL:${HAVE_GETOPT}>:HAVE_GETOPT>
$<$<BOOL:${HAVE_GETOPT_LONG}>:HAVE_GETOPT_LONG>
$<$<BOOL:${HAVE_STRUCT_STAT_ST_MTIM}>:HAVE_STRUCT_STAT_ST_MTIM>
)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)