strdup
¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/strdup.html
Gnulib module: strdup or strdup-posix
Portability problems fixed by either Gnulib module strdup
or strdup-posix
:
<string.h>
on some old platforms.
Portability problems fixed by Gnulib module strdup-posix
:
errno
:
mingw, MSVC 14.
errno
to EAGAIN
instead of to ENOMEM
. Although POSIX allows
EAGAIN
, the strdup-posix
module insists on ENOMEM
which also conforms to POSIX and is GNU-compatible:
Solaris 11.4.
Portability problems not fixed by Gnulib: