Page MenuHomeFreeBSD

Add missing stdio functions to libc
Needs ReviewPublic

Authored by benni_stuerz.xyz on Jun 1 2025, 9:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 4:06 AM
Unknown Object (File)
Sat, Oct 11, 2:54 AM
Unknown Object (File)
Mon, Sep 22, 8:30 PM
Unknown Object (File)
Wed, Sep 17, 4:54 AM
Unknown Object (File)
Sep 14 2025, 12:45 AM
Unknown Object (File)
Sep 12 2025, 10:30 PM
Unknown Object (File)
Sep 12 2025, 1:26 PM
Unknown Object (File)
Sep 8 2025, 8:41 AM
Subscribers

Details

Reviewers
fuz
getz
obiwac
Summary

These are some very important libc functions that have been missing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I think this is unlikely to land - I suggest you attempt to get this included into POSIX first.

lib/libc/stdio/sgetc.c
6

You wrote this, not the University of California. Put your own name and email in. License text can be omitted if SPDX identifier is used.

38

Needs to account for empty strings.
Also, the strcspn bit doesn't make any sense.

lib/libc/stdio/sgets.c
39–41
lib/libc/stdio/sgetz.c
40

The condition ((j >> 8) & 3) != 5 always holds.

fuz requested changes to this revision.Jun 1 2025, 11:56 PM
This revision now requires changes to proceed.Jun 1 2025, 11:56 PM

fix declaration of sgetc(3) in stdio.h

fuz@ when is this gonna land in POSIX :)