bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] deprecated functions


From: Bruno Haible
Subject: Re: [bug-gnulib] deprecated functions
Date: Tue, 25 Apr 2006 14:11:38 +0200
User-agent: KMail/1.5

Paul Eggert wrote:
> The next POSIX will allow the current Solaris behavior, along with
> worse behaviors, so I think it's better if we wash our hands of these
> functions entirely.  asctime and ctime are only historical curiosities
> now, and asctime_r and ctime_r are well-intentioned mistakes.

OK, so where is the list of C functions containing pitfalls?
For shell utilities we have the chapter "Shellology" in the autoconf manual.
(The knowledge applies also outside autoconf, but it's good to have this
reference somewhere.) Where is the corresponding doc for C functions?

gets() is marked as deprecated
  - in the glibc manual
       @deftypefn {Deprecated function} {char *} gets (char address@hidden)
  - in the Linux manpages
     BUGS
       Never use gets().  Because it is impossible to tell  with-
       out knowing the data in advance how many characters gets()
       will read, and because gets() will continue to store char-
       acters past the end of the buffer, it is extremely danger-
       ous to use.  It has been used to break computer  security.
       Use fgets() instead.

If you are serious about deprecating asctime, ctime, asctime_r, ctime_r, I think
this should be reflected in both the glibc manual and the Linux manpages.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]