This is the mail archive of the
mailing list for the GCC project.
Re: Patch to add fputs->fwrite conversion
- To: kamil at wins dot uva dot nl
- Subject: Re: Patch to add fputs->fwrite conversion
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 21 Sep 2000 17:18:31 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org
> From: Kamil Iskra <firstname.lastname@example.org>
> On Wed, 20 Sep 2000, Kaveh R. Ghazi wrote:
> > The following patch extends the exiting builtin_fputs to handle
> > lengths other than 1 for constant strings. (Currently length 1
> > becomes fputc.) Now length==0 gets deleted and length > 1 becomes
> > fwrite.
> Is it safe to convert to fwrite? Does fwrite obey the same buffering rules
> as fputs?
Yes it is safe, because the buffering mode is set on the stream, not
on the stdio function you manipulate it with.
Kaveh R. Ghazi Engagement Manager / Project Services
email@example.com Qwest Internet Solutions