Re: Comparing binary files with Diff 3.2 compiled with MinGW

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs,gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
> From: Bruno Haible <[email protected]>
> Cc: [email protected], [email protected]
> Date: Sat, 12 May 2012 20:58:46 +0200
> 
> Eli Zaretskii wrote:
> > > Eli Zaretskii wrote:
> > > > -# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
> > > > +# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ || defined __MINGW32__
> > > >  #  include <io.h> /* declares setmode() */
> > > >  # else
> > > >  #  define setmode _setmode
> > > 
> > > What is the rationale/benefit for this proposed change?
> > 
> > MinGW provides 'setmode' whose declaration is in io.h.
> 
> But mingw's declaration of 'fileno' in stdio.h is not always enabled
> (only if !defined _NO_OLDNAMES).

_NO_OLDNAMES is undefined by default.

> Therefore the #else branch is needed on mingw.

That's okay, but then io.h should be included anyway, because it
provides the prototype of _setmode as well.  According to MSDN, the
same is true for MSVC.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.