> > One more that I hadn't paid attention to - for systems with O_BINARY, the > > macro SET_BINARY was using setmode() without a prototype, > > Which include file declares setmode()? Where is this documented? > I looked in the cygwin web site without much luck.
cygwin's headers are poorly documented; I often resort to grepping /usr/include. setmode() is in <io.h>, along with get_osfhandle and a redundant declaration of access(). > > > Should <stdio.h> be included in "system.h" > > I'd rather not. In fact, I'd rather system.h included less than it > already does. > > > should we redo this patch to just fix cksum.c to include <stdio.h> > > Sorry, I don't follow. cksum.c already includes <stdio.h>. Oh, it was because of the blind #define fileno _fileno, that I was getting the warning for an implicit definition. Cygwin properly declares fileno() in <stdio.h>, but does not declare _fileno. > > > -# ifndef __DJGPP__ > > +# if defined __CYGWIN__ > > +# include <io.h> > > +# include <stdio.h> > > +# elif !defined __DJGPP__ > > What is <io.h>? Why does both it and <stdio.h> need to be included? <stdio.h> is not needed, but <io.h> is needed for setmode(). -- Eric Blake _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils