This however is busted. The parameters should not be swapped.
The same problem exists for the fputc() function as well. I've attached my
attempt at correcting all the mistakes I found. Core Perl still builds
fine on Windows and OS X; but I haven't tried building any extensions that
use fputs() or fputc().
Note that is would be _possible_ to make a much smaller patch than the
one I supplied by just swapping the parameters in
(and also in the corresponding PerlSIO_fputc() #define). It would
however be rather confusing longer term, as that works only
accidentally: perlsdio.h doesn't swap the parameter order when it
should, and iperlsys.h then compensates for that by swapping when it
shouldn't. So I would much prefer to use the comprehensive patch
provided in my previous message to reduce the amount of brain-pain when
somebody looks at these again in the future.