newlib/winsup/mingw/samples/fmode
..
all.c
jamfile
readme.txt
test.c
test2.c

readme.txt

These two demos show how _fmode and _CRT_fmode can be used to modify the
default file opening mode (text vs. binary) and/or the mode of the standard
file handles.