# HG changeset patch # User Bruno Haible # Date 1315686620 -7200 # Node ID e36ea7b17143bcc380ec8a9e7859941527b2d7ae # Parent 2171e9d2231b1a69171d336cf6f745df2b107c5e 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +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. diff --git a/m4/iconv.m4 b/m4/iconv.m4 --- 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 @@ #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 --- 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 @@ #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) int unsetenv (const char *name); -#else -int unsetenv(); -#endif ]], [[]])], [gt_cv_func_unsetenv_ret='int'],