iconv, unsetenv: Add support for MSVC compiler.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Sep 2011 20:30:20 +0000 (22:30 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 10 Sep 2011 20:30:20 +0000 (22:30 +0200)
* 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
m4/iconv.m4
m4/setenv.m4

index 2f853ce..304e696 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,38 @@
 2011-09-10  Bruno Haible  <bruno@clisp.org>
 
+       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  <bruno@clisp.org>
+
+       *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  <bruno@clisp.org>
+
        nocrash: Add support for native Windows.
        * m4/nocrash.m4 (GL_NOCRASH): Avoid a crash also on native Windows.
 
index 085cd06..98fcd64 100644 (file)
@@ -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();
index 8927a6c..bc215a6 100644 (file)
@@ -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'],