delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/20/23:38:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41F086E7.6010007@byu.net>
Date: Thu, 20 Jan 2005 21:36:55 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, bug-coreutils AT gnu DOT org
Subject: bug in cygwin <sys/termios.h>?
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When compiling coreutils/src/stty.c, I got a warning from this segment:

/* ISC renamed swtch to susp for termios, but we'll accept either name.  */
#if defined(VSUSP) && !defined(VSWTCH)
# define VSWTCH VSUSP
# define CSWTCH CSUSP
#endif
#if defined(VSWTCH) && !defined(CSWTCH)
# define CSWTCH _POSIX_VDISABLE
#endif

stty.c:106:1: warning: "CSWTCH" redefined
In file included from /usr/include/termios.h:4,
                 from stty.c:40:
/usr/include/sys/termios.h:85:1: warning: this is the location of the
previous definition

Investigation of sys/termios.h shows that cygwin has "#define CSWTCH 0x1a"
(ctrl-z), "#define CSUSP CTRL('z')" (where CTRL is ((ch)&0x1f), "#define
VSUSP 14", "#define VSWTC 15", but no VSWTCH anywhere!  Is VSWTC a typo
for the intended VSWTCH?  And why are VSUSP and VSWTC distinct, when
CSWTCH and CSUSP are the same and coreutils was trying to use VSUSP as an
alias to VSWTCH?

Obviously, coreutils should probably add a check for "#if defined(CSUSP)
&& !defined(CSWTCH)" before defining CSWTCH.  But in this particular case,
the coreutils bug was harmless because the redefinition still ended up
with the same value for CSWTCH, even though it was a different spelling of it.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB8Ibn84KuGfSFAYARAis6AJ9gTEdoh+O31zRRWM4WNK2BWLFwiACgjZGY
uObiL9slh4mV6l91XhuTqHI=
=JPr0
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019