* m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
[pspp] / lib / string_.h
index 483c9fc3ff67a3f3819d87a289168a2f95b27e5f..bfb22b0ebc40948d16d92c036ba05cadce39f204 100644 (file)
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifndef _GL_STRING_H
-#define _GL_STRING_H
 
-/* This #pragma avoids a warning with "gcc -Wmissing-prototypes" on some
-   mingw systems.  */
-#ifdef __GNUC__
-# pragma GCC system_header
-#endif
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
 
-#include @ABSOLUTE_STRING_H@
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
 
 
 /* The definition of GL_LINK_WARNING is copied here.  */
@@ -192,9 +189,9 @@ extern char *strdup (char const *__s);
 # if ! @HAVE_STRNDUP@
 #  undef strndup
 #  define strndup rpl_strndup
-#  if ! @HAVE_DECL_STRNDUP@
+# endif
+# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
 extern char *strndup (char const *__string, size_t __n);
-#  endif
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef strndup
@@ -400,6 +397,12 @@ extern char *strtok_r (char *restrict s, char const *restrict delim,
 extern size_t mbslen (const char *string);
 #endif
 
+#if @GNULIB_MBSNLEN@
+/* Return the number of multibyte characters in the character string starting
+   at STRING and ending at STRING + LEN.  */
+extern size_t mbsnlen (const char *string, size_t len);
+#endif
+
 #if @GNULIB_MBSCHR@
 /* Locate the first single-byte character C in the character string STRING,
    and return a pointer to it.  Return NULL if C is not found in STRING.
@@ -541,4 +544,5 @@ extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
 }
 #endif
 
-#endif
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */