diff options
Diffstat (limited to 'lib/string.in.h')
| -rw-r--r-- | lib/string.in.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index e56f6db0c9c..21356914e21 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -347,6 +347,23 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " | |||
| 347 | # endif | 347 | # endif |
| 348 | #endif | 348 | #endif |
| 349 | 349 | ||
| 350 | /* Overwrite a block of memory. The compiler will not optimize | ||
| 351 | effects away, even if the block is dead after the call. */ | ||
| 352 | #if @GNULIB_MEMSET_EXPLICIT@ | ||
| 353 | # if ! @HAVE_MEMSET_EXPLICIT@ | ||
| 354 | _GL_FUNCDECL_SYS (memset_explicit, void *, | ||
| 355 | (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); | ||
| 356 | # endif | ||
| 357 | _GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); | ||
| 358 | _GL_CXXALIASWARN (memset_explicit); | ||
| 359 | #elif defined GNULIB_POSIXCHECK | ||
| 360 | # undef memset_explicit | ||
| 361 | # if HAVE_RAW_DECL_MEMSET_EXPLICIT | ||
| 362 | _GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " | ||
| 363 | "use gnulib module memset_explicit for portability"); | ||
| 364 | # endif | ||
| 365 | #endif | ||
| 366 | |||
| 350 | /* Find the first occurrence of C in S. More efficient than | 367 | /* Find the first occurrence of C in S. More efficient than |
| 351 | memchr(S,C,N), at the expense of undefined behavior if C does not | 368 | memchr(S,C,N), at the expense of undefined behavior if C does not |
| 352 | occur within N bytes. */ | 369 | occur within N bytes. */ |