Skip to content

Commit

Permalink
KWSys: Pass ptrdiff_t check result to System.c
Browse files Browse the repository at this point in the history
Since commit "Provide unix-sytle command line parsing" (2009-07-13) the
reference to KWSYS_C_HAS_PTRDIFF_T in System.c has been meaningless
because the macro was never passed to the compiler!
  • Loading branch information
bradking committed Jun 29, 2010
1 parent 00b45e0 commit d0cf3eb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Utilities/kwsys/CMakeLists.txt
Expand Up @@ -601,6 +601,14 @@ ENDIF(KWSYS_BUILD_SHARED)
#-----------------------------------------------------------------------------
# Configure some implementation details.

KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_PTRDIFF_T
"Checking whether C compiler has ptrdiff_t in stddef.h" DIRECT)
KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_SSIZE_T
"Checking whether C compiler has ssize_t in unistd.h" DIRECT)
SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c System.c PROPERTIES
COMPILE_FLAGS "-DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T}"
)

IF(KWSYS_DO_NOT_CLEAN_PUTENV)
# Disable cleanup of putenv memory for issues with GCOV.
SET_SOURCE_FILES_PROPERTIES(SystemTools.cxx PROPERTIES
Expand Down Expand Up @@ -785,15 +793,6 @@ IF(KWSYS_USE_Process)
ELSE(NOT UNIX)
# Use the UNIX implementation.
SET(KWSYS_C_SRCS ${KWSYS_C_SRCS} ProcessUNIX.c)

# Help ProcessUNIX.c compile properly on all platforms.
KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_PTRDIFF_T
"Checking whether C compiler has ptrdiff_t in stddef.h" DIRECT)
KWSYS_PLATFORM_C_TEST(KWSYS_C_HAS_SSIZE_T
"Checking whether C compiler has ssize_t in unistd.h" DIRECT)
SET_SOURCE_FILES_PROPERTIES(ProcessUNIX.c PROPERTIES
COMPILE_FLAGS "-DKWSYS_C_HAS_PTRDIFF_T=${KWSYS_C_HAS_PTRDIFF_T} -DKWSYS_C_HAS_SSIZE_T=${KWSYS_C_HAS_SSIZE_T}"
)
ENDIF(NOT UNIX)
ENDIF(KWSYS_USE_Process)

Expand Down

0 comments on commit d0cf3eb

Please sign in to comment.