summaryrefslogtreecommitdiffstats
path: root/gl/string.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/string.in.h')
-rw-r--r--gl/string.in.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/gl/string.in.h b/gl/string.in.h
index eb8d7588..13c0f095 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -372,12 +372,23 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
372 MAXLEN bytes. If no '\0' terminator is found in that many bytes, 372 MAXLEN bytes. If no '\0' terminator is found in that many bytes,
373 return MAXLEN. */ 373 return MAXLEN. */
374#if @GNULIB_STRNLEN@ 374#if @GNULIB_STRNLEN@
375# if ! @HAVE_DECL_STRNLEN@ 375# if @REPLACE_STRNLEN@
376# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
377# undef strnlen
378# define strnlen rpl_strnlen
379# endif
380_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
381 __attribute__ ((__pure__))
382 _GL_ARG_NONNULL ((1)));
383_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
384# else
385# if ! @HAVE_DECL_STRNLEN@
376_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) 386_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
377 __attribute__ ((__pure__)) 387 __attribute__ ((__pure__))
378 _GL_ARG_NONNULL ((1))); 388 _GL_ARG_NONNULL ((1)));
379# endif 389# endif
380_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); 390_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
391# endif
381_GL_CXXALIASWARN (strnlen); 392_GL_CXXALIASWARN (strnlen);
382#elif defined GNULIB_POSIXCHECK 393#elif defined GNULIB_POSIXCHECK
383# undef strnlen 394# undef strnlen