Revert "Merge pull request #2225 from tom-tan/trusted-stdio-LockingTextWriter-put"

It broke win32 build.

This reverts commit dc0b441bb1849ef9c69da7901b3eef0350ada47e, reversing
changes made to 285d027677fe8d340c57632b5ce89ef247714dc0.
Merge pull request #2255 from 9rnsr/rev_pull2225

Revert "Merge pull request #2225 from tom-tan/trusted-stdio-LockingTextWriter-put"