Hash :
efbd8572
Author :
Date :
2020-08-14T19:51:56
strdup: Assume the function exists. * m4/strdup.m4 (gl_FUNC_STRDUP, gl_FUNC_STRDUP_POSIX): Don't test whether strdup exists. * modules/strdup (Files): Remove lib/strdup.c. (configure.ac): Don't compile strdup.c. * modules/strdup-posix (Depends-on, configure.ac): Don't test ac_cv_func_strdup. * doc/posix-functions/strdup.texi: Update. * lib/unistr/u8-strdup.c: Assume HAVE_STRDUP is 1. * modules/unistr/u8-strdup (Files): Remove lib/unistr/u-strdup.h. (Depends-on): Remove unistr/u8-strlen.
@node strdup
@section @code{strdup}
@findex strdup
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html}
Gnulib module: strdup or strdup-posix
Portability problems fixed by either Gnulib module @code{strdup} or @code{strdup-posix}:
@itemize
@item
This function has no prototype in @code{<string.h>} on some old platforms.
@end itemize
Portability problems fixed by Gnulib module @code{strdup-posix}:
@itemize
@item
Upon failure, the function does not set @code{errno} to @code{ENOMEM} on
some platforms:
mingw, MSVC 14.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize