[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minor build fixes
From: |
Eli Zaretskii |
Subject: |
Re: Minor build fixes |
Date: |
Fri, 03 Oct 2014 09:14:21 +0300 |
> Date: Thu, 02 Oct 2014 18:24:49 -0400
> From: Ken Brown <address@hidden>
> Cc: Texinfo <address@hidden>
>
> > If I understand this right, O_BINARY is being checked to see if it is
> > a Posix-style system, right, but Cygwin has O_BINARY defined? O_BINARY
> > is not actually being set in system.h for the benefit of source code
> > including it? I noticed in info/filesys.c O_BINARY is used for opening
> > a file, so will it matter if this value is 0 under Cygwin?
>
> Cygwin *allows* files to be opened as "text" or "binary", but this is not
> necessary. Everything works fine if all files are viewed as "binary", as in
> GNU/Linux and other Posix systems. In particular, it's fine that O_BINARY is
> 0
> in info/filesys.c.
If O_BINARY is zero in filesys.c, it means Cygwin will display those
^M characters if the Info file was produced with CRLF end-of-line
format. If this is not something Cygwin users will be annoyed about,
then indeed Cygwin doesn't need O_BINARY.
> > The problem with setmode is that it is being redefined as "_setmode",
> > correct? Does anyone know what systems need to use _setmode instead of
> > setmode?
>
> I don't know about other systems, but on Cygwin, setmode is defined to be
> _setmode, as in system.h. That's why I was getting (harmless) compiler
> warnings
> about the redefinition of setmode.
I believe it's for MSVC and for MinGW when (for some reason I cannot
fathom) _NO_OLDNAMES is defined.
> >> --- info/termdep.h (revision 5852)
> >> +++ info/termdep.h (working copy)
> >> @@ -49,7 +49,7 @@
> >> # endif /* !HAVE_TERMIO_H */
> >> #endif /* !HAVE_TERMIOS_H */
> >>
> >> -#ifdef GWINSZ_IN_SYS_IOCTL
> >> +#ifndef __MINGW32__
> >> # include <sys/ioctl.h>
> >> #endif
> >>
> >
> > I see the same thing (conditional on __MINGW32__) is done when
> > including sys/ioctl.h in info/ioctl.h and info/man.h. It looks like
> > GWINSZ_IN_SYS_IOCTL is set by the AC_HEADER_TIOCGWINSZ macro in
> > configure.ac. However, your patch is probably what we want because
> > we're not just including <sys/ioctl.h> to get TIOCGWINSZ (although I
> > don't understand why you would want the definition of TIOCGWINSZ and
> > /not/ have the definition of ioctl, so maybe I'm missing something?)
>
> I don't understand that either. In any case, I think it's clear that we need
> to
> include <sys/ioctl.h> on most systems, regardless of the value of
> GWINSZ_IN_SYS_IOCTL.
These considerations omit the MSDOS case, which also doesn't want
sys/ioctl.h. Not sure about other Windows compilers, or whether they
are still supported.
Re: Minor build fixes, Gavin Smith, 2014/10/06