From df365b5f89d7efc233e2af6df49ce63c75934b78 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 10 Sep 2011 22:30:20 +0200 Subject: [PATCH] iconv, unsetenv: Add support for MSVC compiler. * m4/iconv.m4 (AM_ICONV): Use ISO C declaration syntax on MSVC. * m4/setenv.m4 (gl_FUNC_UNSETENV): Drop support for K&R C compilers. --- ChangeLog | 33 +++++++++++++++++++++++++++++++++ m4/iconv.m4 | 4 ++-- m4/setenv.m4 | 6 +----- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f853ce27..304e6966d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,38 @@ 2011-09-10 Bruno Haible + iconv, unsetenv: Add support for MSVC compiler. + * m4/iconv.m4 (AM_ICONV): Use ISO C declaration syntax on MSVC. + * m4/setenv.m4 (gl_FUNC_UNSETENV): Drop support for K&R C compilers. + +2011-09-10 Bruno Haible + + *printf: Add support for MSVC compiler. + * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): On MSVC, install a handler that + handles the exception caused by the %n directive. When cross-compiling, + guess no on native Windows. + (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99, + gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): When snprintf is missing, + emulate it through vsnprintf. + * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Update comment. + * doc/posix-functions/dprintf.texi: Update documentation regarding + MSVC 9. + * doc/posix-functions/fprintf.texi: Likewise. + * doc/posix-functions/printf.texi: Likewise. + * doc/posix-functions/snprintf.texi: Likewise. + * doc/posix-functions/sprintf.texi: Likewise. + * doc/posix-functions/swprintf.texi: Likewise. + * doc/posix-functions/vdprintf.texi: Likewise. + * doc/posix-functions/vfprintf.texi: Likewise. + * doc/posix-functions/vprintf.texi: Likewise. + * doc/posix-functions/vsnprintf.texi: Likewise. + * doc/posix-functions/vsprintf.texi: Likewise. + * doc/glibc-functions/asprintf.texi: Likewise. + * doc/glibc-functions/obstack_printf.texi: Likewise. + * doc/glibc-functions/obstack_vprintf.texi: Likewise. + * doc/glibc-functions/vasprintf.texi: Likewise. + +2011-09-10 Bruno Haible + nocrash: Add support for native Windows. * m4/nocrash.m4 (GL_NOCRASH): Avoid a crash also on native Windows. diff --git a/m4/iconv.m4 b/m4/iconv.m4 index 085cd068f..98fcd64d3 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,4 +1,4 @@ -# iconv.m4 serial 17 (gettext-0.18.2) +# iconv.m4 serial 18 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -242,7 +242,7 @@ extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); diff --git a/m4/setenv.m4 b/m4/setenv.m4 index 8927a6cac..bc215a6d4 100644 --- a/m4/setenv.m4 +++ b/m4/setenv.m4 @@ -1,4 +1,4 @@ -# setenv.m4 serial 24 +# setenv.m4 serial 25 dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -77,11 +77,7 @@ extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) int unsetenv (const char *name); -#else -int unsetenv(); -#endif ]], [[]])], [gt_cv_func_unsetenv_ret='int'], -- 2.11.0