On MSVC 9, <strings.h> does not pre-exist, gnulib defines it. I get a syntax
error in the declaration of strncasecmp(), because size_t is not defined.
This fixes it:


2011-09-25  Bruno Haible  <br...@clisp.org>

        strings: Fix compilation error on MSVC.
        * lib/strings.in.h: Include <stddef.h> for size_t.

--- lib/strings.in.h.orig       Mon Sep 26 02:34:08 2011
+++ lib/strings.in.h    Mon Sep 26 02:33:56 2011
@@ -37,6 +37,11 @@
 #ifndef _@GUARD_PREFIX@_STRINGS_H
 #define _@GUARD_PREFIX@_STRINGS_H
 
+#if ! @HAVE_DECL_STRNCASECMP@
+/* Get size_t.  */
+# include <stddef.h>
+#endif
+
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 

-- 
In memoriam Safia Ahmed-jan <http://en.wikipedia.org/wiki/Safia_Ahmed-jan>

Reply via email to