Stdio(3) change: FILE is now opaque (OpenBSD)

Jul 20, 2025 - 20:15
 0  0

Contributed by rueda on from the more-opacity,-igor dept.

In -current, the struct underlying stdio(3)'s FILE type has been made opaque, with library versions bumps across the board:

CVSROOT:	/cvs
Module name:	src
Changes by:	[email protected]	2025/07/16 09:33:05

Modified files:
	lib/libc       : Symbols.list shlib_version 
	lib/libc/hidden: stdio.h wchar.h 
	lib/libc/stdio : Makefile.inc fclose.3 fclose.c findfp.c 
	lib/libcrypto  : shlib_version 
	lib/libcurses  : shlib_version 
	lib/libedit    : shlib_version 
	lib/libexpat   : shlib_version 
	lib/libfido2   : shlib_version 
	lib/libfuse    : shlib_version 
	lib/libkvm     : shlib_version 
	lib/libpcap    : shlib_version 
	lib/librthread : shlib_version 
	lib/libskey    : shlib_version 
	lib/libsndio   : shlib_version 
	lib/libutil    : shlib_version 
	include        : stdio.h wchar.h 
	gnu/lib/libcxx : shlib_version 
	gnu/lib/libcxxabi: shlib_version 
	gnu/lib/libexecinfo: shlib_version 
	gnu/lib/libiberty: shlib_version 
	gnu/lib/libreadline: shlib_version 
	gnu/lib/libstdc++: shlib_version 
	gnu/lib/libstdc++-v3: shlib_version 
	gnu/usr.bin/perl: shlib_version 
Added files:
	lib/libc/hidden: _stdio.h 
	lib/libc/stdio : fdclose.c 

Log message:
Make the FILE object opaque.  Move the __sFILE definition into
libc/hidden/_stdio.h.  All programs that refer to the internal
structure of the FILE object can't be compiled from now on.
std{in,out,err} doesn't refer __sF[] now, but the hidden __sF along
with __srget and __swbuf symbols are kept temporarily to make our
transition easier.  But those symbols will be deleted soon.  The shared
library versions are bumped for libc and all the other libraries that
refer to std{in,out,err}.

diff from guenther, tweak by me, tested by many
ok sthen tb

Make no mistake, this is a major change, which touches a lot of components across the base system. The fallout can be seen in a lot of places, including libcrypto (which is itself subject to a major, sepearate cleanup), libtls, libssl, and includes touches to the profiling subsystem we mentioned earlier.

Those who normally build from source are strongly encouraged to use a snapshot upgrade to cross the bumps.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0