diff options
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 80daa0c23..df85e319f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.314 2005/12/13 09:44:13 djm Exp $ | 1 | # $Id: configure.ac,v 1.315 2005/12/17 11:32:03 dtucker Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -1343,6 +1343,20 @@ int main(void) | |||
1343 | ) | 1343 | ) |
1344 | fi | 1344 | fi |
1345 | 1345 | ||
1346 | # On systems where [v]snprintf is broken, but is declared in stdio, | ||
1347 | # check that the fmt argument is const char * or just char *. | ||
1348 | # This is only useful for when BROKEN_SNPRINTF | ||
1349 | AC_MSG_CHECKING([whether snprintf can declare const char *fmt]) | ||
1350 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> | ||
1351 | int snprintf(char *a, size_t b, const char *c, ...) { return 0; } | ||
1352 | int main(void) { snprintf(0, 0, 0); } | ||
1353 | ]])], | ||
1354 | [AC_MSG_RESULT(yes) | ||
1355 | AC_DEFINE(SNPRINTF_CONST, [const], | ||
1356 | [Define as const if snprintf() can declare const char *fmt])], | ||
1357 | [AC_MSG_RESULT(no) | ||
1358 | AC_DEFINE(SNPRINTF_CONST, [/* not const */])]) | ||
1359 | |||
1346 | # Check for missing getpeereid (or equiv) support | 1360 | # Check for missing getpeereid (or equiv) support |
1347 | NO_PEERCHECK="" | 1361 | NO_PEERCHECK="" |
1348 | if test "x$ac_cv_func_getpeereid" != "xyes" ; then | 1362 | if test "x$ac_cv_func_getpeereid" != "xyes" ; then |