summaryrefslogtreecommitdiff
path: root/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmcurl/CMake/CheckTypeSize.cmake15
-rw-r--r--Utilities/cmcurl/CMakeLists.txt9
-rw-r--r--Utilities/cmcurl/mprintf.c2
-rw-r--r--Utilities/cmtar/CMakeLists.txt1
-rw-r--r--Utilities/cmtar/append.c5
-rw-r--r--Utilities/cmtar/compat/fnmatch.c7
-rw-r--r--Utilities/cmtar/config.h.in3
-rw-r--r--Utilities/cmtar/extract.c10
-rw-r--r--Utilities/cmtar/handle.c2
-rw-r--r--Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake17
10 files changed, 44 insertions, 27 deletions
diff --git a/Utilities/cmcurl/CMake/CheckTypeSize.cmake b/Utilities/cmcurl/CMake/CheckTypeSize.cmake
index 700a54d78d..e573d5b640 100644
--- a/Utilities/cmcurl/CMake/CheckTypeSize.cmake
+++ b/Utilities/cmcurl/CMake/CheckTypeSize.cmake
@@ -22,9 +22,12 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
ENDFOREACH(def)
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
- "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
- FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
+ CONFIGURE_FILE(
+ "${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
+ IMMEDIATE @ONLY)
+ FILE(READ
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
CHECK_TYPE_SIZE_FILE_CONTENT)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
@@ -33,17 +36,17 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
- "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - done")
- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 6cec6712be..72c157d4f4 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -383,7 +383,7 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
ELSE(${CURL_TEST})
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}\n")
ENDIF(${CURL_TEST})
@@ -411,14 +411,15 @@ MACRO(CURL_INTERNAL_TEST_RUN CURL_TEST)
ELSE(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
- FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log"
+ FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}")
IF(${CURL_TEST}_COMPILE)
- FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log"
+ FILE(APPEND
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"There was a running problem of this test\n")
ENDIF(${CURL_TEST}_COMPILE)
- FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log"
+ FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"\n\n")
ENDIF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
ENDIF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
diff --git a/Utilities/cmcurl/mprintf.c b/Utilities/cmcurl/mprintf.c
index 12d12084d6..2bb973254e 100644
--- a/Utilities/cmcurl/mprintf.c
+++ b/Utilities/cmcurl/mprintf.c
@@ -1134,7 +1134,7 @@ int curl_msprintf(char *buffer, const char *format, ...)
return retcode;
}
-#if !defined( WIN32) || defined(__UCLIBC__) /* not needed on win32 */
+#if !(defined( WIN32) || defined(__UCLIBC__)) /* not needed on win32 */
extern int fputc(int, FILE *);
#endif
diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt
index 3ef4100619..1c3b470502 100644
--- a/Utilities/cmtar/CMakeLists.txt
+++ b/Utilities/cmtar/CMakeLists.txt
@@ -67,6 +67,7 @@ FOREACH(file
"ctype.h"
"fnmatch.h"
"inttypes.h"
+ "io.h"
"libgen.h"
"memory.h"
"sys/mkdev.h"
diff --git a/Utilities/cmtar/append.c b/Utilities/cmtar/append.c
index 6b746ea9a2..38e829451d 100644
--- a/Utilities/cmtar/append.c
+++ b/Utilities/cmtar/append.c
@@ -31,8 +31,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef _MSC_VER
-#include <io.h>
+
+#ifdef HAVE_IO_H
+# include <io.h>
#endif
struct tar_dev
diff --git a/Utilities/cmtar/compat/fnmatch.c b/Utilities/cmtar/compat/fnmatch.c
index d10e8a35e2..936f21ec18 100644
--- a/Utilities/cmtar/compat/fnmatch.c
+++ b/Utilities/cmtar/compat/fnmatch.c
@@ -70,11 +70,7 @@ static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.6 1998/03/19 00:29:59 millert Exp
#define RANGE_NOMATCH 0
#define RANGE_ERROR (-1)
-#ifdef NO_IBM_COMPILER_HORKAGE
static int rangematch (const char *, char, int, char **);
-#else
-static int rangematch ();
-#endif
int
fnmatch(pattern, string, flags)
@@ -195,7 +191,8 @@ rangematch(pattern, test, flags, newp)
* consistency with the regular expression syntax.
* J.T. Conklin (conklin@ngai.kaleida.com)
*/
- if ((negate = (*pattern == '!' || *pattern == '^')))
+ negate = (*pattern == '!' || *pattern == '^');
+ if (negate)
++pattern;
if (flags & FNM_CASEFOLD)
diff --git a/Utilities/cmtar/config.h.in b/Utilities/cmtar/config.h.in
index 948afde5aa..1ab4362e81 100644
--- a/Utilities/cmtar/config.h.in
+++ b/Utilities/cmtar/config.h.in
@@ -30,6 +30,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@
+/* Define to 1 if you have the <io.h> header file. */
+#cmakedefine HAVE_IO_H @HAVE_IO_H@
+
/* Define to 1 if you have the `lchown' function. */
#cmakedefine HAVE_LCHOWN @HAVE_LCHOWN@
diff --git a/Utilities/cmtar/extract.c b/Utilities/cmtar/extract.c
index 3ebdeeb273..cb1fab3c9c 100644
--- a/Utilities/cmtar/extract.c
+++ b/Utilities/cmtar/extract.c
@@ -470,11 +470,13 @@ tar_extract_hardlink(TAR * t, char *realname)
return -1;
}
+#ifndef WIN32
if (pathname)
{
free(pathname);
}
return 0;
+#endif
}
@@ -545,11 +547,13 @@ tar_extract_symlink(TAR *t, char *realname)
return -1;
}
+#ifndef WIN32
if (pathname)
{
free(pathname);
}
return 0;
+#endif
}
@@ -620,11 +624,13 @@ tar_extract_chardev(TAR *t, char *realname)
return -1;
}
+#ifndef WIN32
if (pathname)
{
free(pathname);
}
return 0;
+#endif
}
@@ -694,11 +700,13 @@ tar_extract_blockdev(TAR *t, char *realname)
return -1;
}
+#ifndef WIN32
if (pathname)
{
free(pathname);
}
return 0;
+#endif
}
@@ -867,9 +875,11 @@ tar_extract_fifo(TAR *t, char *realname)
return -1;
}
+#ifndef WIN32
if (pathname)
{
free(pathname);
}
return 0;
+#endif
}
diff --git a/Utilities/cmtar/handle.c b/Utilities/cmtar/handle.c
index 4f6dd10b64..a86bbc5d88 100644
--- a/Utilities/cmtar/handle.c
+++ b/Utilities/cmtar/handle.c
@@ -24,7 +24,7 @@
# include <stdlib.h>
#endif
-#if defined ( _MSC_VER) || defined(__WATCOMC__)
+#ifdef HAVE_IO_H
#include <io.h>
//Yogi: hack. this should work on windows where there is no O_ACCMODE defined
#ifndef O_ACCMODE
diff --git a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake
index 6cf5fac2df..1e1006b35c 100644
--- a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake
+++ b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake
@@ -15,31 +15,32 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR)
ENDFOREACH(inc)
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
- FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src2.c"
- "${src}")
- EXEC_PROGRAM("${CMAKE_COMMAND}" "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp"
+ FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src2.c"
+ "${src}\n")
+ EXEC_PROGRAM("${CMAKE_COMMAND}"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp"
ARGS -E copy src2.c src.c)
MESSAGE(STATUS "Performing Test ${VAR}")
TRY_COMPILE(${VAR}
${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
CMAKE_FLAGS
"${TRY_COMPILE_FROM_SOURCE_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(${VAR})
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
MESSAGE(STATUS "Performing Test ${VAR} - Success")
- FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
- "Source file was:\n${src}\n" APPEND)
+ "Source file was:\n${src}\n")
ELSE(${VAR})
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}")
- FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
- "Source file was:\n${src}\n" APPEND)
+ "Source file was:\n${src}\n")
ENDIF(${VAR})
ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
ENDMACRO(TRY_COMPILE_FROM_SOURCE)