diff --git a/lib/wchar.in.h b/lib/wchar.in.h --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -152,7 +152,11 @@ _GL_EXTERN_C void free (void *); # define free rpl_free #endif +#ifndef _MSC_VER +/* On MSVC the CRT declares free with __declspec(dllimport) linkage. + A plain forward declaration here would conflict (C4273). */ _GL_EXTERN_C void free (void *); +#endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@