summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-07-01 16:52:55 +1000
committerDamien Miller <djm@mindrot.org>2000-07-01 16:52:55 +1000
commitcb170cb225e62f6deda4911f0fbab2d6cd6b8062 (patch)
tree003880eaf4ddfda40e01a1baee5f2d85f69e2704 /configure.in
parent28adeef966d890b5831d831b1f0e1100c9db5b0a (diff)
- (djm) Added check for broken snprintf() functions which do not correctly
terminate output string and attempt to use replacement.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 8e155f26b..dbc5a18ee 100644
--- a/configure.in
+++ b/configure.in
@@ -235,6 +235,23 @@ AC_CHECK_FUNC(getpagesize,
235 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] 235 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
236) 236)
237 237
238# Check for broken snprintf
239if test "x$ac_cv_func_snprintf" = "xyes" ; then
240 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
241 AC_TRY_RUN(
242 [
243#include <stdio.h>
244int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
245 ],
246 [AC_MSG_RESULT(yes)],
247 [
248 AC_MSG_RESULT(no)
249 AC_DEFINE(BROKEN_SNPRINTF)
250 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
251 ]
252 )
253fi
254
238PAM_MSG="no" 255PAM_MSG="no"
239AC_ARG_WITH(pam, 256AC_ARG_WITH(pam,
240 [ --without-pam Disable PAM support ], 257 [ --without-pam Disable PAM support ],