This is the mail archive of the
mailing list for the GCC project.
Re: Patch to add fputs->fwrite conversion
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Patch to add fputs->fwrite conversion
- From: Kamil Iskra <kamil at wins dot uva dot nl>
- Date: Thu, 21 Sep 2000 22:27:15 +0200 (MET DST)
- cc: gcc-patches at gcc dot gnu dot 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
Is it safe to convert to fwrite? Does fwrite obey the same buffering rules
as fputs? I'm thinking particularly about line-buffered streams, when the
data to be written contains "\n". Multiproc applications with processes
communicating via pipes could depend on such buffer flushes.
(this is ment as a real question, I don't know the answer, I'm simply
asking if you considered this issue when working on the patch).
/ Kamil Iskra firstname.lastname@example.org \
| Section Computational Science, Faculty FNWI, Universiteit van Amsterdam |
| tel. +31 20 525 75 35 fax. +31 20 525 74 90 |
\ Kruislaan 403 room F.202 1098 SJ Amsterdam (NL) /