diff options
author | Bruno Haible <bruno@clisp.org> | 2007-03-09 01:24:32 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-03-09 01:24:32 +0000 |
commit | 5754af88053fdd150ce73b22e608ab2f00bf9006 (patch) | |
tree | fce19fb27acb3a87fd8668e710420be45dac0b32 /m4/snprintf-posix.m4 | |
parent | 7573ff58ab24b5f6cbcec41ef7a0e31de81c2135 (diff) | |
download | gnulib-5754af88053fdd150ce73b22e608ab2f00bf9006.tar.gz |
Use 'case' statements instead of 'expr' invocations.
Diffstat (limited to 'm4/snprintf-posix.m4')
-rw-r--r-- | m4/snprintf-posix.m4 | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/m4/snprintf-posix.m4 b/m4/snprintf-posix.m4 index 44c0dbf8ae..d1f889ed88 100644 --- a/m4/snprintf-posix.m4 +++ b/m4/snprintf-posix.m4 @@ -17,16 +17,37 @@ AC_DEFUN([gl_FUNC_SNPRINTF_POSIX], gl_SNPRINTF_TRUNCATION_C99 gl_SNPRINTF_RETVAL_C99 gl_SNPRINTF_DIRECTIVE_N - if expr "$gl_cv_func_printf_sizes_c99" : ".*yes" > /dev/null \ - && expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null \ - && expr "$gl_cv_func_printf_directive_n" : ".*yes" > /dev/null \ - && expr "$gl_cv_func_printf_positions" : ".*yes" > /dev/null \ - && expr "$gl_cv_func_snprintf_truncation_c99" : ".*yes" > /dev/null \ - && expr "$gl_cv_func_snprintf_retval_c99" : ".*yes" > /dev/null \ - && expr "$gl_cv_func_snprintf_directive_n" : ".*yes" > /dev/null; then - # snprintf exists and is already POSIX compliant. - gl_cv_func_snprintf_posix=yes - fi + case "$gl_cv_func_printf_sizes_c99" in + *yes) + case "$gl_cv_func_printf_directive_a" in + *yes) + case "$gl_cv_func_printf_directive_n" in + *yes) + case "$gl_cv_func_printf_positions" in + *yes) + case "$gl_cv_func_snprintf_truncation_c99" in + *yes) + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + case "$gl_cv_func_snprintf_directive_n" in + *yes) + # snprintf exists and is already POSIX + # compliant. + gl_cv_func_snprintf_posix=yes + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac fi if test $gl_cv_func_snprintf_posix = no; then if ! expr "$gl_cv_func_printf_directive_a" : ".*yes" > /dev/null; then |