Define more termios.h macros unconditionally for alpha (bug 21277)
Commit Message
termios.h should define IUCLC for UNIX98 and older XSI standards. The
sysdeps/unix/sysv/linux/alpha version defines it only if __USE_MISC,
so causing some conform/ tests to fail.
Other versions define it unconditionally (I* being a reserved
namespace for this header); the API should be consistent between
architectures in the absence of a clear reason for it to differ (and
given that a symbol is part of the API on two architectures, I don't
see any reason for the feature test macros required ever to differ
between those architectures), so this patch makes the alpha version
define it unconditionally as well. Two non-POSIX macros alongside it,
IMAXBEL and IUTF8, are also defined unconditionally on other
architectures, so this patch makes them consistent by defining them
unconditionally on alpha as well.
Tested (compilation only) with build-many-glibcs.py.
2017-03-20 Joseph Myers <joseph@codesourcery.com>
[BZ #21277]
* sysdeps/unix/sysv/linux/alpha/bits/termios.h (IUCLC): Define
unconditionally.
(IMAXBEL): Likewise.
(IUTF8): Likewise.
Comments
Ping. This patch
<https://sourceware.org/ml/libc-alpha/2017-03/msg00445.html> is pending
review.
LGTM. I guess the 'POSIX.1 ...' comment is out the place then?
On 20/03/2017 17:48, Joseph Myers wrote:
> termios.h should define IUCLC for UNIX98 and older XSI standards. The
> sysdeps/unix/sysv/linux/alpha version defines it only if __USE_MISC,
> so causing some conform/ tests to fail.
>
> Other versions define it unconditionally (I* being a reserved
> namespace for this header); the API should be consistent between
> architectures in the absence of a clear reason for it to differ (and
> given that a symbol is part of the API on two architectures, I don't
> see any reason for the feature test macros required ever to differ
> between those architectures), so this patch makes the alpha version
> define it unconditionally as well. Two non-POSIX macros alongside it,
> IMAXBEL and IUTF8, are also defined unconditionally on other
> architectures, so this patch makes them consistent by defining them
> unconditionally on alpha as well.
>
> Tested (compilation only) with build-many-glibcs.py.
>
> 2017-03-20 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #21277]
> * sysdeps/unix/sysv/linux/alpha/bits/termios.h (IUCLC): Define
> unconditionally.
> (IMAXBEL): Likewise.
> (IUTF8): Likewise.
>
> diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
> index b560484..19f717b 100644
> --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
> +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
> @@ -71,12 +71,9 @@ struct termios
> #define IXON 0001000
> #define IXOFF 0002000
> #define IXANY 0004000
> -#ifdef __USE_MISC
> - /* POSIX.1 doesn't want these... */
> -# define IUCLC 0010000
> -# define IMAXBEL 0020000
> -# define IUTF8 0040000
> -#endif
> +#define IUCLC 0010000
> +#define IMAXBEL 0020000
> +#define IUTF8 0040000
>
> /* c_oflag bits */
> #define OPOST 0000001
>
On Mon, 27 Mar 2017, Adhemerval Zanella wrote:
> LGTM. I guess the 'POSIX.1 ...' comment is out the place then?
The comment is not wrong, but it seems inappropriate in a single
architecture-specific file when the point of the comment seems to be to
relate to the removed #ifdef.
On 27/03/2017 12:06, Joseph Myers wrote:
> On Mon, 27 Mar 2017, Adhemerval Zanella wrote:
>
>> LGTM. I guess the 'POSIX.1 ...' comment is out the place then?
>
> The comment is not wrong, but it seems inappropriate in a single
> architecture-specific file when the point of the comment seems to be to
> relate to the removed #ifdef.
>
Fair enough.
@@ -71,12 +71,9 @@ struct termios
#define IXON 0001000
#define IXOFF 0002000
#define IXANY 0004000
-#ifdef __USE_MISC
- /* POSIX.1 doesn't want these... */
-# define IUCLC 0010000
-# define IMAXBEL 0020000
-# define IUTF8 0040000
-#endif
+#define IUCLC 0010000
+#define IMAXBEL 0020000
+#define IUTF8 0040000
/* c_oflag bits */
#define OPOST 0000001