aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-06-07 15:42:15 -0700
committerChris Robinson <[email protected]>2009-06-07 15:42:15 -0700
commit1454c46b5fed42dca9d509a66d4cefac2800289c (patch)
tree601fb44ba06b839d952c7ecda5fcbf154a7938dd /CMakeLists.txt
parent0fac1e911565791e50c0d23ce515042a64c40696 (diff)
Use a thread-safe static inline function for printing
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af68accb..451e3732 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -168,6 +168,16 @@ IF(NOT HAVE_SNPRINTF)
ADD_DEFINITIONS(-Dsnprintf=_snprintf)
ENDIF()
+CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
+IF(NOT HAVE_VSNPRINTF)
+ CHECK_FUNCTION_EXISTS(_vsnprintf HAVE__VSNPRINTF)
+ IF(NOT HAVE__VSNPRINTF)
+ MESSAGE(FATAL_ERROR "No vsnprintf function found, please report!")
+ ENDIF()
+
+ ADD_DEFINITIONS(-Dvsnprintf=_vsnprintf)
+ENDIF()
+
CHECK_SYMBOL_EXISTS(isnan math.h HAVE_ISNAN)
IF(NOT HAVE_ISNAN)
CHECK_FUNCTION_EXISTS(_isnan HAVE__ISNAN)