[TUHS] FreeBSD retires gets()!

Dave Horsfall dave at horsfall.org
Wed Nov 27 07:10:50 AEST 2019


Seen in the FreeBSD Quarterly Report:

gets(3) retirement

    Contact: Ed Maste <emaste at FreeBSD.org>

    gets is an obsolete C library routine for reading a string from
    standard input. It was removed from the C standard as of C11 because
    there was no way to use it safely. Prompted by a comment during Paul
    Vixie's talk at vBSDCon 2017 I started investigating what it would take
    to remove gets from libc.

    The patch was posted to Phabricator and refined several times, and the
    portmgr team performed several exp-runs to identify ports broken by the
    removal. Symbol versioning is used to preserve binary compatibility for
    existing software that uses gets.

    The change was committed in September, and will be in FreeBSD 13.0.

    This project was sponsored by The FreeBSD Foundation.

And the world is a slightly safer place...

-- Dave


More information about the TUHS mailing list