This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to add fputs->fwrite conversion


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? 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).

Regards,

-- 
/ Kamil Iskra  kamil@wins.uva.nl                                          \
| 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)                       /


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]