diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-02-01 18:08:24 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-02-03 13:17:25 -0500 |
commit | b1fccd03798da1930755557cb4516526cc09bb15 (patch) | |
tree | 1e55b79bd9f8858d229e6194d714bf784a375a67 /configure.ac | |
parent | a93f1969c780b831d5c4cb5bde938320f2ffd763 (diff) | |
download | dimension-b1fccd03798da1930755557cb4516526cc09bb15.tar.xz |
Use strerror_r if available instead of sys_errlist.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1141ac8..3942984 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl Copyright (C) 2009-2012 Tavian Barnes <tavianator@tavianator.com> +dnl Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> dnl dnl This file is part of The Dimension Build Suite. dnl @@ -110,6 +110,20 @@ dnl Platform feature tests m4_include(ax_pthread.m4) AX_PTHREAD([], [AC_MSG_ERROR([pthread support not detected])]) +AC_MSG_CHECKING([for strerror_r]) +AC_RUN_IFELSE([ + AC_LANG_PROGRAM( + [ #include <string.h> + #include <errno.h> ], + [ char buf@<:@256@:>@; + return strerror_r(ENOMEM, buf, 256); ] + )], + [AC_DEFINE([DMNSN_STRERROR_R], [1]) + AC_MSG_RESULT([yes])], + [AC_DEFINE([DMNSN_STRERROR_R], [0]) + AC_MSG_RESULT([no])] +) + AC_MSG_CHECKING([for sys_errlist]) AC_LINK_IFELSE([ AC_LANG_PROGRAM( |