Re: fpurge on z/OS

2009-04-19 Thread Chet Ramey
Bruno Haible wrote: > Thanks for explaining. I think an alternative for bash would be to > temporarily set the file descriptor to point to /dev/null and do a > second fflush. Like this (error checking omitted): > > FILE *fp = ... /* stdout or stderr */; > if (fflush (fp) < 0) > { > #if GN

Re: fpurge on z/OS

2009-04-18 Thread Bruno Haible
Chet Ramey wrote: > That's a dangerous assumption. You can't always assume that fflush will > succeed. And when it fails, newer versions of glibc leave data in the > stdio buffer. Now, the assumption is that when fflush fails, it fails > due to some problem with the underlying file descriptor, a

Re: fpurge on z/OS

2009-04-17 Thread Chet Ramey
Bruno Haible wrote: > Actually, the only places where bash-4.0 calls fpurge is directly after fflush > on the same stream, and only on output streams: > > fflush (stdout); > fpurge (stdout); > > Does someone understand the purpose of this code? IMO fpurge is a nop, > right after fflush (assu

Re: fpurge on z/OS

2009-04-17 Thread Bruno Haible
Juergen Weber wrote in : > I am a bit appalled of having to implement all those low-level non-portable > functions to get bash running. I can understand this feeling... > Or what about writing an generic implementation of the ci

Re: fpurge on z/OS

2009-04-16 Thread Juergen Weber
ended order of porting (from easy to harder) is: >     fbufmode, fseterr, freadable, fwritable, freading, fwriting, >     fpending, fpurge, freadptr, freadseek, freadahead. > > Bruno > > PS: Are you by chance the Old Wabble from Stuttgart? > > > > -- View this message in context: http://www.nabble.com/fpurge-on-z-OS-tp22905298p23078537.html Sent from the Gnulib mailing list archive at Nabble.com.

Re: fpurge on z/OS

2009-04-07 Thread Bruno Haible
Hello, Juergen Weber wrote: > ERROR CCN3205 ./fpurge.c:119 "Please port gnulib fpurge.c to your > platform! Look at the definitions of fflush, setvbuf and ungetc on your > system, then report this to bug-gnulib." > > So, I am doing this ;-) > The required definitions are linked from here: > htt

fpurge on z/OS

2009-04-07 Thread Juergen Weber
.zos.r9.bpxbd00/edclb1803426.htm Better readable is the pdf linked there, too. What would be the fpurge of z/OS ? Thanks, Juergen -- View this message in context: http://www.nabble.com/fpurge-on-z-OS-tp22905298p22905298.html Sent from the Gnulib mailing list archive at Nabble.com.