Support for MSVC 9. Add a comment.
diff --git a/ChangeLog b/ChangeLog
index 9cdead3..8a3964f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-01-15  Bruno Haible  <bruno@clisp.org>
+
+	Support for MSVC 9.
+	* lib/config.h.in (inline, mode_t, ssize_t): Copy snippets from top
+	config.h.in.
+	* tests/genutf8.c: Include config.h.
+	* tests/gengb18030z.c: Likewise.
+	* woe32dll/export.h (VARIABLE): Define to empty if not using GCC.
+
+2011-01-28  Bruno Haible  <bruno@clisp.org>
+
+	Add a comment.
+	* woe32dll/export.h: Add a reference to the woe32dll writeup.
+
 2012-01-06  Bruno Haible  <bruno@clisp.org>
 
 	Update after gnulib changed.
diff --git a/lib/config.h.in b/lib/config.h.in
index 6db23e1..644b6ba 100644
--- a/lib/config.h.in
+++ b/lib/config.h.in
@@ -69,3 +69,15 @@
 /* Define to the value of ${prefix}, as a string. */
 #undef INSTALLPREFIX
 
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define as a signed type of the same size as size_t. */
+#undef ssize_t
+
diff --git a/tests/gengb18030z.c b/tests/gengb18030z.c
index 5123218..5c0aa75 100644
--- a/tests/gengb18030z.c
+++ b/tests/gengb18030z.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2012 Free Software Foundation, Inc.
    This file is part of the GNU LIBICONV Library.
 
    The GNU LIBICONV Library is free software; you can redistribute it
@@ -18,6 +18,8 @@
 
 /* Creates the beyond-BMP part of the GB18030.TXT reference table. */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 
diff --git a/tests/genutf8.c b/tests/genutf8.c
index 1e8b9bd..52a6b68 100644
--- a/tests/genutf8.c
+++ b/tests/genutf8.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004-2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004-2005, 2012 Free Software Foundation, Inc.
    This file is part of the GNU LIBICONV Library.
 
    The GNU LIBICONV Library is free software; you can redistribute it
@@ -18,6 +18,8 @@
 
 /* Creates the UTF-8.TXT reference table. */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 
diff --git a/woe32dll/export.h b/woe32dll/export.h
index 6404832..23eae9a 100644
--- a/woe32dll/export.h
+++ b/woe32dll/export.h
@@ -1,5 +1,5 @@
 /* Exporting symbols from Cygwin shared libraries.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2011-2012 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -87,14 +87,18 @@
    Note: --export-all-symbols is the default when no other symbol is explicitly
    exported.  This means, the use of an explicit export on the variables has
    the effect of no longer exporting the functions! - until the option
-   --export-all-symbols is used.  */
+   --export-all-symbols is used.
+
+   See <http://www.haible.de/bruno/woe32dll.html> for more details.  */
+
+#if defined __GNUC__ /* GCC compiler, GNU toolchain */
 
  /* IMP(x) is a symbol that contains the address of x.  */
-#define IMP(x) _imp__##x
+# define IMP(x) _imp__##x
 
  /* Ensure that the variable x is exported from the library, and that a
     pseudo-variable IMP(x) is available.  */
-#define VARIABLE(x) \
+# define VARIABLE(x) \
  /* Export x without redefining x.  This code was found by compiling a  \
     snippet:                                                            \
       extern __declspec(dllexport) int x; int x = 42;  */               \
@@ -104,3 +108,9 @@
  /* Allocate a pseudo-variable IMP(x).  */                              \
  extern int x;                                                          \
  void * IMP(x) = &x;
+
+#else /* non-GNU compiler, non-GNU toolchain */
+
+# define VARIABLE(x) /* nothing */
+
+#endif