diff options
author | Ian Romanick <idr@freedesktop.org> | 2010-07-21 13:07:47 -0700 |
---|---|---|
committer | Ian Romanick <idr@freedesktop.org> | 2010-07-21 13:12:02 -0700 |
commit | 75d9bb54062505fd74dbb2c33a8a1a05eefd9dbf (patch) | |
tree | 512c8b65923da9352cbd4afa7b81c04875126a98 | |
parent | 8eb4a99275df6f3ae18720e32215f3fc0234b433 (diff) |
Check for existance of strtof
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/system.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d275d3e..c2fa37a 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_HEADER_STDC AC_CHECK_FUNCS(fopen_s) +AC_CHECK_FUNCS(strtof) AC_ARG_WITH([winsys], [AS_HELP_STRING([--with-winsys], diff --git a/src/system.h b/src/system.h index 39d20d4..15444fc 100644 --- a/src/system.h +++ b/src/system.h @@ -2,6 +2,10 @@ #include "config.h" #endif +#ifndef HAVE_STRTOF +#define strtof(_a, _b) ((float) strtod(_a, _b)) +#endif + #ifdef HAVE_STDBOOL_H # include <stdbool.h> #else |