from text version of glibc manual, section 12.3 :
int __fwriting( FILE* STREAM )
determines whether stream STREAM was last written to or whether it is opened
In this case return value is nonzero, otherwise it is zero.
This function is declared in `stdio_ext.h'.
this is a bit confusing.
description of __freading is similar, despite it providing some clue.
Not sure what the confusion is there? Perhaps you could clarify.
My reading is that, if you last wrote to a read/write (RW) file or if you've opened it write-only (whether you've written to it or not), you get back a true (non-zero) value.
All other cases give you false (0), including a RW file where you've neither read nor written yet.
Some may prefer to consider that a SchrodingerCat mode but the doco makes it quite clear here that __fwriting() returns false in that case.
I agree that the quoted wording is clear enough, so closing.