git: libc: Add gets_s(3) from ISO/IEC TR 24731-1.

Sascha Wildner swildner at crater.dragonflybsd.org
Mon Sep 9 10:46:00 PDT 2019


commit 086b156cdf18f6fbb398ffa6f62a25f4f158853e
Author: Sascha Wildner <saw at online.de>
Date:   Mon Sep 9 19:44:47 2019 +0200

    libc: Add gets_s(3) from ISO/IEC TR 24731-1.
    
    For more information see the Technical Report (drafts of it are on
    the web) or e.g. http://en.cppreference.com/w/c/io/gets.
    
    This also adds set_constraint_handler_s(), abort_handler_s(),
    ignore_handler_s(), the RSIZE_MAX define, and the types rsize_t,
    errno_t and constraint_handler_t.
    
    Visibility is restricted to our default environment by default, but
    can be enabled by defining __STDC_WANT_LIB_EXT1__ to 1, per the TR.
    
    While here, put gets()'s documentation into a manual page of its own
    with a note that it is depracated. We'll likely remove it from libc
    too at a later point in time.
    
    Requested-by: zrj
    Taken-from:   FreeBSD (with some adjustments)

Summary of changes:
 include/stdint.h                           |   5 +
 include/stdio.h                            |  10 ++
 include/stdlib.h                           |  20 ++++
 lib/libc/Versions.def                      |   6 +-
 lib/libc/include/libc_private.h            |   2 +
 lib/libc/stdio/Makefile.inc                |   8 +-
 lib/libc/stdio/Symbol.map                  |   4 +
 lib/libc/stdio/fgets.3                     |  52 ++++------
 lib/libc/stdio/{fgets.3 => gets.3}         |  76 +++++----------
 lib/libc/stdio/{gets.c => gets_s.c}        |  75 +++++++++++----
 lib/libc/stdlib/Makefile.inc               |   7 +-
 lib/libc/stdlib/Symbol.map                 |   6 ++
 lib/libc/stdlib/set_constraint_handler_s.3 | 149 +++++++++++++++++++++++++++++
 lib/libc/stdlib/set_constraint_handler_s.c | 100 +++++++++++++++++++
 14 files changed, 408 insertions(+), 112 deletions(-)
 copy lib/libc/stdio/{fgets.3 => gets.3} (76%)
 copy lib/libc/stdio/{gets.c => gets_s.c} (62%)
 create mode 100644 lib/libc/stdlib/set_constraint_handler_s.3
 create mode 100644 lib/libc/stdlib/set_constraint_handler_s.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/086b156cdf18f6fbb398ffa6f62a25f4f158853e


-- 
DragonFly BSD source repository


More information about the Commits mailing list