[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] bug in cygwin <sys/termios.h>?
From: |
Eric Blake |
Subject: |
Re: [PATCH] bug in cygwin <sys/termios.h>? |
Date: |
Sat, 29 Jan 2005 21:17:27 -0700 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 1/20/2005 9:36 PM:
> When compiling coreutils/src/stty.c, I got a warning:
>
> 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
>
After further googling, it looks like there are several systems which have
VSWTC instead of VSWTCH, but still initialize mode->c_cc[VSWTC] with
CSWTCH [1]. The following patch fixes this situation for coreutils. It
also silences some annoyances from cvs updates.
2005-01-29 Eric Blake <address@hidden> (tiny change)
* .cvsignore: Ignore config.cache and config.status.lineno.
* src/stty.c [VSWTCH]: Some systems, like Cygwin, use VSWTC
instead of VSWTCH, for use with CSWTCH.
[1]http://mail.python.org/pipermail/python-checkins/2001-March/016197.html
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB/F/X84KuGfSFAYARApNlAJ9EMu0uuwcO+vtxNZcyoFI9wDz+RgCgwCwG
vFqsu85FoQRXrmg4O/cVPcw=
=kxhy
-----END PGP SIGNATURE-----
Index: .cvsignore
===================================================================
RCS file: /cvsroot/coreutils/coreutils/.cvsignore,v
retrieving revision 1.5
diff -u -p -r1.5 .cvsignore
--- .cvsignore 27 Sep 2004 07:23:23 -0000 1.5
+++ .cvsignore 30 Jan 2005 04:17:38 -0000
@@ -2,7 +2,9 @@
Makefile
THANKS-to-translators
autom4te.cache
+config.cache
config.h
config.log
config.status
+config.status.lineno
stamp-h1
Index: src/stty.c
===================================================================
RCS file: /cvsroot/coreutils/coreutils/src/stty.c,v
retrieving revision 1.129
diff -u -p -r1.129 stty.c
--- src/stty.c 3 Nov 2004 23:17:29 -0000 1.129
+++ src/stty.c 30 Jan 2005 04:17:38 -0000
@@ -1,5 +1,5 @@
/* stty -- change and print terminal line settings
- Copyright (C) 1990-2004 Free Software Foundation, Inc.
+ Copyright (C) 1990-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -100,10 +100,17 @@
#if defined(VEOL2) && !defined(CEOL2)
# define CEOL2 _POSIX_VDISABLE
#endif
+/* Some platforms have VSWTC, others VSWTCH. In both cases, this control
+ character is initialized by CSWTCH, if present. */
+#if defined(VSWTC) && !defined(VSWTCH)
+# define VSWTCH VSWTC
+#endif
/* ISC renamed swtch to susp for termios, but we'll accept either name. */
#if defined(VSUSP) && !defined(VSWTCH)
# define VSWTCH VSUSP
-# define CSWTCH CSUSP
+# if defined(CSUSP) && !defined(CSWTCH)
+# define CSWTCH CSUSP
+# endif
#endif
#if defined(VSWTCH) && !defined(CSWTCH)
# define CSWTCH _POSIX_VDISABLE