summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--src/system.h4
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