[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more gcc warnings
From: |
Eric Blake |
Subject: |
Re: more gcc warnings |
Date: |
Sat, 09 Jul 2005 22:57:57 +0000 |
> > 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
Re: more gcc warnings,
Eric Blake <=
- Re: more gcc warnings, Paul Eggert, 2005/07/11
- Re: more gcc warnings, Eric Blake, 2005/07/14
- Re: more gcc warnings, Paul Eggert, 2005/07/14
- Re: more gcc warnings, Eric Blake, 2005/07/15
- Re: more gcc warnings, Paul Eggert, 2005/07/15
- Re: more gcc warnings, Eric Blake, 2005/07/16
- Re: more gcc warnings, Paul Eggert, 2005/07/16