diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-10 19:49:18 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-10 19:49:18 +0000 |
commit | 9331796b7fbd49e2168825705b373897e2b246dc (patch) | |
tree | 171640517a51656c49ee677dfed122e473fc47d4 /configure.ac | |
parent | 5601d4bbb5ea73ce5ecb9fd7425ca99834b85232 (diff) |
Merged revisions 246030 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r246030 | tilghman | 2010-02-10 10:01:28 -0600 (Wed, 10 Feb 2010) | 12 lines
Solaris doesn't like outputting a NULL to a %s in format strings.
Detect all platforms that don't like that, either, and ensure that when documentation is
missing, we pass a non-NULL pointer when outputting the corresponding documentation.
(closes issue #16689)
Reported by: bklang
Patches:
20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14)
Review: https://reviewboard.asterisk.org/r/497/
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@246199 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6c86c985b..d4a980dc1 100644 --- a/configure.ac +++ b/configure.ac @@ -589,6 +589,18 @@ AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides at AC_MSG_RESULT(no) ) +# glibc, AFAIK, is the only C library that makes printing a NULL to a string safe. +AC_MSG_CHECKING([if your system printf is NULL-safe.]) +AC_RUN_IFELSE( + AC_LANG_PROGRAM([#include <stdio.h>], + [printf("%s", NULL)]), + AC_DEFINE([HAVE_NULLSAFE_PRINTF], 1, [Define to 1 if your C library can safely print NULL to string formats.]) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no), + # It's unlikely an embedded system will have this. + AC_MSG_RESULT(unknown) +) + AST_GCC_ATTRIBUTE(pure) AST_GCC_ATTRIBUTE(malloc) AST_GCC_ATTRIBUTE(const) |