Pádraig Brady wrote:
> gnulib (CC'd) says it's assuming 'gets'
> is declared. Can you see why this isn't the case for you?

Newer glibcs don't declare gets() any more. The glibc ChangeLog has this:

2012-01-12  Marek Polacek  <[email protected]>

        * libio/bits/stdio2.h: Do not define gets for ISO C11, ISO C++11,
        and _GNU_SOURCE.

2012-01-07  Ulrich Drepper  <[email protected]>

        * libio/stdio.h: Do not declare gets at all for _GNU_SOURCE.

2011-12-23  Ulrich Drepper  <[email protected]>

        [BZ #13528]
        * libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE.

The comments in glibc/libio/stdio.h now say:

   The function has been officially removed in ISO C11.  This opportunity
   is used to also remove it from the GNU feature list.  It is now only
   available when explicitly using an old ISO C, Unix, or POSIX standard.

I think gnulib should
  1) not assume that the function is declared,
  2) have a deprecated module 'gets' that declares this function only if
     the declaration is missing.

Comments? Volunteers for this small change?

Bruno


Reply via email to