diff options
author | Bruno Haible <bruno@clisp.org> | 2016-12-17 16:44:51 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2016-12-17 23:09:00 +0100 |
commit | 0f5a9a947267987458a82e7fc64140313c023640 (patch) | |
tree | d04167551464002eca207c4784e1caa57e37dd73 /m4/vsnprintf.m4 | |
parent | 5b60c835c42c2444a62076d430a038f836f1aa42 (diff) | |
download | gnulib-0f5a9a947267987458a82e7fc64140313c023640.tar.gz |
Avoid redefinition errors on MSVC.
* m4/snprintf.m4 (gl_REPLACE_SNPRINTF): Set REPLACE_SNPRINTF to 1 if
the function may be defined as an inline function.
* m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): Set REPLACE_VSNPRINTF to 1 if
the function may be defined as an inline function.
Diffstat (limited to 'm4/vsnprintf.m4')
-rw-r--r-- | m4/vsnprintf.m4 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/vsnprintf.m4 b/m4/vsnprintf.m4 index e056f05cd5..02da30834c 100644 --- a/m4/vsnprintf.m4 +++ b/m4/vsnprintf.m4 @@ -1,4 +1,4 @@ -# vsnprintf.m4 serial 6 +# vsnprintf.m4 serial 7 dnl Copyright (C) 2002-2004, 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -46,6 +46,14 @@ AC_DEFUN([gl_REPLACE_VSNPRINTF], AC_LIBOBJ([vsnprintf]) if test $ac_cv_func_vsnprintf = yes; then REPLACE_VSNPRINTF=1 + else + AC_CHECK_DECLS_ONCE([vsnprintf]) + if test $ac_cv_have_decl_vsnprintf = yes; then + dnl If the function is declared but does not appear to exist, it may be + dnl defined as an inline function. In order to avoid a conflict, we have + dnl to define rpl_vsnprintf, not vsnprintf. + REPLACE_VSNPRINTF=1 + fi fi gl_PREREQ_VSNPRINTF ]) |