Page MenuHomeFreeBSD

libc: Complete C23 <stdio.h> conformance
ClosedPublic

Authored by kfv on Fri, Aug 14, 12:34 PM.
Tags
None
Referenced Files
F167753408: D58842.id184065.diff
Mon, Aug 24, 7:26 AM
F167752463: D58842.id.diff
Mon, Aug 24, 7:16 AM
F167709603: D58842.id184042.diff
Sun, Aug 23, 9:48 PM
F167682423: D58842.id184062.diff
Sun, Aug 23, 6:12 PM
F167662079: D58842.id184042.diff
Sun, Aug 23, 3:23 PM
Unknown Object (File)
Sat, Aug 22, 9:07 PM
Unknown Object (File)
Sat, Aug 22, 1:51 PM
Unknown Object (File)
Sat, Aug 22, 1:28 PM
Subscribers

Details

Summary
Author: Faraz Vahedi <kfv@FreeBSD.org>
Date:   Fri Aug 14 15:13:23 2026 +0330

    libc: Add _PRINTF_NAN_LEN_MAX per C23
    
    Reviewed by:    fuz
    Approved by:    fuz (mentor)
    Differential Revision: https://reviews.freebsd.org/D58842
Author: Faraz Vahedi <kfv@FreeBSD.org>
Date:   Fri Aug 14 15:52:00 2026 +0330

    libc: Add <stdio.h> C23 feature test macro
    
    Define the __STDC_VERSION_STDIO_H__ feature test macro now that
    the header fully conforms to C23.
    
    Reviewed by:    fuz
    Approved by:    fuz (mentor)
    Differential Revision: https://reviews.freebsd.org/D58842

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 75587
Build 72470: arc lint + arc unit

Event Timeline

kfv requested review of this revision.Fri, Aug 14, 12:34 PM

Please add the desired commit messages for reference.

Patch looks reasonable generally.

stand/libsa/geli/geliboot_internal.h
31

I'm not sure what this comment is getting at.

stand/libsa/geli/geliboot_internal.h
31

I've been thinking about moving these deliberate defines, which exist solely to avoid unnecessary includes, into the same _STANDALONE branch used in g_eli_hmac.c for g_eli.h. Based on my findings so far, g_eli.h appears to be the only concern here, although I need to dig a bit deeper.

This would have two advantages. First, we wouldn't need to define such guards just to prevent certain headers from being included. Second, we wouldn't need to revisit these defines whenever the value of a feature-test macro changes in the future.

I actually left this comment as a reminder for myself, as well as a brief explanation for anyone who might question the change made by this patch, to address it in a day or two in a separate DR. But I can do it here instead if you think that would be cleaner. Your call.

stand/libsa/geli/geliboot_internal.h
31

I think it's not a bad idea to have a comment, but it's hard to understand what this means to someone who is not you.

stand/libsa/geli/geliboot_internal.h
31

Makes sense. I'd reword it to something clearer.

Finalise commit messages and improve the geliboot_internal.h comment block

stand/libsa/geli/geliboot_internal.h
31

Does it look better now?

LGTM.

Approved for commit.
Do you wish to have these changes merged into stable/15? If yes, consider adding an MFC after tag. I recommend a wait of 1 month for new features, 1 week for bug fixes.
Same goes for your other C23 changes. You can MFC even if you did not add the relevant tag, but you'll only get a reminder if the tag is present.
If you wish to add "MFC after", just do it on commit. You do not need to ask for approval again.

This revision is now accepted and ready to land.Fri, Aug 14, 5:34 PM