summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-30 22:22:24 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-30 22:22:24 (GMT)
commit8b2f6dbfa2ba0ebac7a538d97314577e7075968a (patch)
tree27c3c9af4bde70a4b11f049ca92a246a055432f9
parentc9235c0159a75b55aae3e14bce852dd92b90a0f9 (diff)
downloadCMake-8b2f6dbfa2ba0ebac7a538d97314577e7075968a.zip
CMake-8b2f6dbfa2ba0ebac7a538d97314577e7075968a.tar.gz
CMake-8b2f6dbfa2ba0ebac7a538d97314577e7075968a.tar.bz2
libarchive: Remove unused STDC_HEADERS try_run
This was the only try_run() in libarchive, and the result was not used in the source code. We remove it to allow cross-compiling to work.
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt2
-rw-r--r--Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.c20
-rw-r--r--Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.cmake65
-rw-r--r--Utilities/cmlibarchive/build/cmake/config.h.in3
-rw-r--r--Utilities/cmlibarchive/libarchive/config_freebsd.h1
-rw-r--r--Utilities/cmlibarchive/libarchive/config_windows.h3
-rw-r--r--Utilities/cmlibarchive/tar/config_freebsd.h1
7 files changed, 0 insertions, 95 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 982f968..9720a7d 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -62,7 +62,6 @@ INCLUDE(CheckCSourceRuns)
INCLUDE(CheckFileOffsetBits)
INCLUDE(CheckFuncs)
INCLUDE(CheckHeaderDirent)
-INCLUDE(CheckHeaderSTDC)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
@@ -207,7 +206,6 @@ ENDIF(LZMA_FOUND)
#
# Check headers
#
-CHECK_HEADER_STDC()
CHECK_HEADER_DIRENT()
SET(INCLUDES "")
diff --git a/Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.c b/Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.c
deleted file mode 100644
index cba0810..0000000
--- a/Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <ctype.h>
-
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-
-int
-main()
-{
- int i;
-
- for (i = 0; i < 256; i++) {
- if (XOR(islower(i), ISLOWER(i)) || toupper(i) != TOUPPER(i))
- return 2;
- }
- return 0;
-}
diff --git a/Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.cmake b/Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.cmake
deleted file mode 100644
index ca0698e..0000000
--- a/Utilities/cmlibarchive/build/cmake/CheckHeaderSTDC.cmake
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# - Check if the system has the ANSI C files
-# CHECK_HEADER_STDC
-#
-# The following variables may be set before calling this macro to
-# modify the way the check is run:
-#
-# CMAKE_REQUIRED_FLAGS = string of compile command line flags
-# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
-# CMAKE_REQUIRED_INCLUDES = list of include directories
-# Copyright (c) 2009, Michihiro NAKAJIMA
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-MACRO (CHECK_HEADER_STDC)
- IF(NOT DEFINED STDC_HEADERS)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_HEADER_STDC_C_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_HEADER_STDC_C_INCLUDE_DIRS)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- SET(MACRO_CHECK_HEADER_STDC_FLAGS ${CMAKE_REQUIRED_FLAGS})
-
- MESSAGE(STATUS "Cheking for ANSI C header files")
- TRY_RUN(CHECK_HEADER_STDC_result
- CHECK_HEADER_STDC_compile_result
- ${CMAKE_BINARY_DIR}
- ${libarchive_SOURCE_DIR}/build/cmake/CheckHeaderSTDC.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS
- -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_HEADER_STDC_FLAGS}
- "${CHECK_HEADER_STDC_C_INCLUDE_DIRS}"
- OUTPUT_VARIABLE OUTPUT)
-
- IF(CHECK_HEADER_STDC_compile_result AND CHECK_HEADER_STDC_result EQUAL 0)
- FIND_PATH(CHECK_HEADER_STDC_path "string.h")
- IF (CHECK_HEADER_STDC_path)
- FILE(STRINGS "${CHECK_HEADER_STDC_path}/string.h" CHECK_HEADER_STDC_result REGEX "[^a-zA-Z_]memchr[^a-zA-Z_]")
- IF (CHECK_HEADER_STDC_result)
- FILE(STRINGS "${CHECK_HEADER_STDC_path}/stdlib.h" CHECK_HEADER_STDC_result REGEX "[^a-zA-Z_]free[^a-zA-Z_]")
- ENDIF (CHECK_HEADER_STDC_result)
- ENDIF (CHECK_HEADER_STDC_path)
- ENDIF(CHECK_HEADER_STDC_compile_result AND CHECK_HEADER_STDC_result EQUAL 0)
-
- IF(CHECK_HEADER_STDC_result)
- MESSAGE(STATUS "Cheking for ANSI C header files - found")
- SET(STDC_HEADERS 1 CACHE INTERNAL "Have ANSI C headers")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the include file ${INCLUDE} "
- "exists passed with the following output:\n"
- "${OUTPUT}\n\n")
- ELSE(CHECK_HEADER_STDC_result)
- MESSAGE(STATUS "Cheking for ANSI C header files - not found")
- SET(STDC_HEADERS "" CACHE INTERNAL "Have ANSI C headers")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the include file ${INCLUDE} "
- "exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- ENDIF(CHECK_HEADER_STDC_result)
-
- ENDIF(NOT DEFINED STDC_HEADERS)
-ENDMACRO (CHECK_HEADER_STDC)
-
diff --git a/Utilities/cmlibarchive/build/cmake/config.h.in b/Utilities/cmlibarchive/build/cmake/config.h.in
index 2e3cc6c..1f5c66e 100644
--- a/Utilities/cmlibarchive/build/cmake/config.h.in
+++ b/Utilities/cmlibarchive/build/cmake/config.h.in
@@ -620,9 +620,6 @@
/* The size of `wchar_t', as computed by sizeof. */
#cmakedefine SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T}
-/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS 1
-
/* Define to 1 if strerror_r returns char *. */
#cmakedefine STRERROR_R_CHAR_P 1
diff --git a/Utilities/cmlibarchive/libarchive/config_freebsd.h b/Utilities/cmlibarchive/libarchive/config_freebsd.h
index edfc7bd..4f4646b 100644
--- a/Utilities/cmlibarchive/libarchive/config_freebsd.h
+++ b/Utilities/cmlibarchive/libarchive/config_freebsd.h
@@ -140,7 +140,6 @@
#define HAVE_WMEMCMP 1
#define HAVE_WMEMCPY 1
#define HAVE_ZLIB_H 1
-#define STDC_HEADERS 1
#define TIME_WITH_SYS_TIME 1
/* FreeBSD 4 and earlier lack intmax_t/uintmax_t */
diff --git a/Utilities/cmlibarchive/libarchive/config_windows.h b/Utilities/cmlibarchive/libarchive/config_windows.h
index f609d20..c50f64d 100644
--- a/Utilities/cmlibarchive/libarchive/config_windows.h
+++ b/Utilities/cmlibarchive/libarchive/config_windows.h
@@ -465,9 +465,6 @@
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
/* Define to 1 if strerror_r returns char *. */
/* #undef STRERROR_R_CHAR_P */
diff --git a/Utilities/cmlibarchive/tar/config_freebsd.h b/Utilities/cmlibarchive/tar/config_freebsd.h
index 585ee9f..c94c539 100644
--- a/Utilities/cmlibarchive/tar/config_freebsd.h
+++ b/Utilities/cmlibarchive/tar/config_freebsd.h
@@ -81,4 +81,3 @@
#define HAVE_WCTYPE_H 1
#define HAVE_ZLIB_H 1
#undef MAJOR_IN_MKDEV
-#define STDC_HEADERS 1