bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strings: ensure size_t


From: Bruno Haible
Subject: strings: ensure size_t
Date: Mon, 26 Sep 2011 02:37:06 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

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  <address@hidden>

        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 address@hidden@_STRINGS_H
 #define address@hidden@_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

[Prev in Thread] Current Thread [Next in Thread]