Avoid some warnings in MSVC build.
diff --git a/ChangeLog b/ChangeLog
index 78afc65..571368d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2018-09-22  Bruno Haible  <bruno@clisp.org>
 
+	Avoid some warnings in MSVC build.
+	* include/export.h: Handle MSVC compiler as well.
+
+2018-09-22  Bruno Haible  <bruno@clisp.org>
+
 	Update from gnulib. Move mapping tables into the code.
 	* autogen.sh: Don't create libcharset/m4/relocatable-lib.m4.
 	* Makefile.in (mostlyclean, clean, distclean, maintainer-clean): Don't
diff --git a/include/export.h b/include/export.h
index 62fb77b..e9fb806 100644
--- a/include/export.h
+++ b/include/export.h
@@ -1,6 +1,8 @@
 
 #if @HAVE_VISIBILITY@ && BUILDING_LIBICONV
 #define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default")))
+#elif defined _MSC_VER && BUILDING_LIBICONV
+#define LIBICONV_DLL_EXPORTED __declspec(dllexport)
 #else
 #define LIBICONV_DLL_EXPORTED
 #endif
diff --git a/libcharset/ChangeLog b/libcharset/ChangeLog
index 06fd88d..63c6837 100644
--- a/libcharset/ChangeLog
+++ b/libcharset/ChangeLog
@@ -1,5 +1,10 @@
 2018-09-22  Bruno Haible  <bruno@clisp.org>
 
+	Avoid some warnings in MSVC build.
+	* include/export.h: Handle MSVC compiler as well.
+
+2018-09-22  Bruno Haible  <bruno@clisp.org>
+
 	Update from gnulib. Move mapping tables into the code.
 	* include/localcharset.h.in: Update from gnulib.
 	2018-05-19  Bruno Haible  <bruno@clisp.org>
diff --git a/libcharset/include/export.h b/libcharset/include/export.h
index 84e74aa..413f3ae 100644
--- a/libcharset/include/export.h
+++ b/libcharset/include/export.h
@@ -1,6 +1,8 @@
 
 #if @HAVE_VISIBILITY@ && BUILDING_LIBCHARSET
 #define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default")))
+#elif defined _MSC_VER && BUILDING_LIBCHARSET
+#define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
 #else
 #define LIBCHARSET_DLL_EXPORTED
 #endif