summaryrefslogtreecommitdiffstats
path: root/Tests/LoadCommand
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LoadCommand')
-rw-r--r--Tests/LoadCommand/CMakeLists.txt13
-rw-r--r--Tests/LoadCommand/LoadedCommand.cxx11
-rw-r--r--Tests/LoadCommand/LoadedCommand.h.in13
3 files changed, 13 insertions, 24 deletions
diff --git a/Tests/LoadCommand/CMakeLists.txt b/Tests/LoadCommand/CMakeLists.txt
index 64955cb..b20b414 100644
--- a/Tests/LoadCommand/CMakeLists.txt
+++ b/Tests/LoadCommand/CMakeLists.txt
@@ -5,24 +5,13 @@ SET (TEST_COMMAND_TEST1 1)
INCLUDE (${CMAKE_ROOT}/Modules/CheckSizeOf.cmake)
CHECK_TYPE_SIZE(char SIZEOF_CHAR)
-CHECK_TYPE_SIZE(short SIZEOF_SHORT)
-CHECK_TYPE_SIZE(int SIZEOF_INT)
-CHECK_TYPE_SIZE(long SIZEOF_LONG)
-CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
-CHECK_TYPE_SIZE(__int64 SIZEOF___INT64)
INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-CHECK_FUNCTION_EXISTS(vsprintf HAVE_VSPRINTF)
-CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
+CHECK_FUNCTION_EXISTS(printf HAVE_PRINTF)
CHECK_FUNCTION_EXISTS(vsblabla HAVE_VSBLABLA)
-CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME)
-CHECK_FUNCTION_EXISTS(connect HAVE_CONNECT)
-CHECK_FUNCTION_EXISTS(remove HAVE_REMOVE)
-CHECK_FUNCTION_EXISTS(shmat HAVE_SHMAT)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
CHECK_INCLUDE_FILE("sys/prctl.h" HAVE_SYS_PRCTL_H)
-CHECK_INCLUDE_FILE("sys/prafasdfctl.h" HAVE_SYS_PRAFASDFCTL_H)
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
CHECK_LIBRARY_EXISTS(m ceil "" HAVE_LIBM)
diff --git a/Tests/LoadCommand/LoadedCommand.cxx b/Tests/LoadCommand/LoadedCommand.cxx
index 65483c8..8f073d4 100644
--- a/Tests/LoadCommand/LoadedCommand.cxx
+++ b/Tests/LoadCommand/LoadedCommand.cxx
@@ -1,7 +1,18 @@
#include "LoadedCommand.h"
+#include <stdio.h>
int main ()
{
+#ifdef HAVE_VSBLABLA
+ printf("Should not be able to find vsblabla\n");
+ return 1;
+#endif
+
+#if !defined( HAVE_PRINTF )
+ printf("Should be able to find printf\n");
+ return 1;
+#endif
+
#ifdef CMAKE_IS_FUN
return SIZEOF_CHAR-1;
#else
diff --git a/Tests/LoadCommand/LoadedCommand.h.in b/Tests/LoadCommand/LoadedCommand.h.in
index 5b7a307..b910e49 100644
--- a/Tests/LoadCommand/LoadedCommand.h.in
+++ b/Tests/LoadCommand/LoadedCommand.h.in
@@ -1,23 +1,12 @@
/* Check for size of types */
#cmakedefine SIZEOF_CHAR ${SIZEOF_CHAR}
-#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT}
-#cmakedefine SIZEOF_INT ${SIZEOF_INT}
-#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
-#cmakedefine SIZEOF_LONG_LONG ${SIZEOF_LONG_LONG}
-#cmakedefine SIZEOF___INT64 ${SIZEOF___INT64}
/* Check for functions */
-#cmakedefine HAVE_VSPRINTF
-#cmakedefine HAVE_VSNPRINTF
+#cmakedefine HAVE_PRINTF
#cmakedefine HAVE_VSBLABLA
-#cmakedefine HAVE_GETHOSTBYNAME
-#cmakedefine HAVE_CONNECT
-#cmakedefine HAVE_REMOVE
-#cmakedefine HAVE_SHMAT
/* Check for headers */
#cmakedefine HAVE_SYS_PRCTL_H
-#cmakedefine HAVE_SYS_PRAFASDFCTL_H
/* Check for libraries */
#cmakedefine HAVE_LIBM \ No newline at end of file