11.22 gets
¶
Removed in POSIX.1-2024.
POSIX.1-2017 specification:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/gets.html
Gnulib module: —
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
- This function is removed in POSIX.1-2024.
Use the function
fgets
instead.
- This function should never be used, because it can overflow any given buffer.
- This function is missing on some platforms:
OpenBSD 7.5, Solaris 11.4.
- When reading from a non-blocking pipe whose buffer is empty, this function
fails with
errno
being set to EINVAL
instead of EAGAIN
on
some platforms:
mingw, MSVC 14.
- On Windows platforms (excluding Cygwin), this function does not set
errno
upon failure.