From: Rich Felker Date: Thu, 9 Jan 2014 00:20:55 +0000 (-0500) Subject: fix namespace violations in termios.h, at least mostly X-Git-Tag: v1.0.0~93 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a627eb35864d5c29a3c3300dfe83745ab1e7a00f;p=oweals%2Fmusl.git fix namespace violations in termios.h, at least mostly the fix should be complete on archs that use the generic definitions (i386, arm, x86_64, microblaze), but mips and powerpc have not been checked thoroughly and may need more fixes. --- diff --git a/arch/arm/bits/termios.h b/arch/arm/bits/termios.h index 61c888f4..e9494be0 100644 --- a/arch/arm/bits/termios.h +++ b/arch/arm/bits/termios.h @@ -75,9 +75,6 @@ struct termios #define VT0 0000000 #define VT1 0040000 -/* ?? */ -#define XTABS 0014000 - #define B0 0000000 #define B50 0000001 #define B75 0000002 @@ -125,8 +122,6 @@ struct termios #define HUPCL 0002000 #define CLOCAL 0004000 -#define CRTSCTS 020000000000 - #define ISIG 0000001 #define ICANON 0000002 #define ECHO 0000010 @@ -137,14 +132,11 @@ struct termios #define TOSTOP 0000400 #define IEXTEN 0100000 -/* Extensions? */ -#define CBAUDEX 0010000 #define ECHOCTL 0001000 #define ECHOPRT 0002000 #define ECHOKE 0004000 #define FLUSHO 0010000 #define PENDIN 0040000 -#define EXTPROC 0200000 #define TCOOFF 0 #define TCOON 1 @@ -158,3 +150,10 @@ struct termios #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define CBAUDEX 0010000 +#define CRTSCTS 020000000000 +#define EXTPROC 0200000 +#define XTABS 0014000 +#endif diff --git a/arch/i386/bits/termios.h b/arch/i386/bits/termios.h index 61c888f4..e9494be0 100644 --- a/arch/i386/bits/termios.h +++ b/arch/i386/bits/termios.h @@ -75,9 +75,6 @@ struct termios #define VT0 0000000 #define VT1 0040000 -/* ?? */ -#define XTABS 0014000 - #define B0 0000000 #define B50 0000001 #define B75 0000002 @@ -125,8 +122,6 @@ struct termios #define HUPCL 0002000 #define CLOCAL 0004000 -#define CRTSCTS 020000000000 - #define ISIG 0000001 #define ICANON 0000002 #define ECHO 0000010 @@ -137,14 +132,11 @@ struct termios #define TOSTOP 0000400 #define IEXTEN 0100000 -/* Extensions? */ -#define CBAUDEX 0010000 #define ECHOCTL 0001000 #define ECHOPRT 0002000 #define ECHOKE 0004000 #define FLUSHO 0010000 #define PENDIN 0040000 -#define EXTPROC 0200000 #define TCOOFF 0 #define TCOON 1 @@ -158,3 +150,10 @@ struct termios #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define CBAUDEX 0010000 +#define CRTSCTS 020000000000 +#define EXTPROC 0200000 +#define XTABS 0014000 +#endif diff --git a/arch/microblaze/bits/termios.h b/arch/microblaze/bits/termios.h index 61c888f4..e9494be0 100644 --- a/arch/microblaze/bits/termios.h +++ b/arch/microblaze/bits/termios.h @@ -75,9 +75,6 @@ struct termios #define VT0 0000000 #define VT1 0040000 -/* ?? */ -#define XTABS 0014000 - #define B0 0000000 #define B50 0000001 #define B75 0000002 @@ -125,8 +122,6 @@ struct termios #define HUPCL 0002000 #define CLOCAL 0004000 -#define CRTSCTS 020000000000 - #define ISIG 0000001 #define ICANON 0000002 #define ECHO 0000010 @@ -137,14 +132,11 @@ struct termios #define TOSTOP 0000400 #define IEXTEN 0100000 -/* Extensions? */ -#define CBAUDEX 0010000 #define ECHOCTL 0001000 #define ECHOPRT 0002000 #define ECHOKE 0004000 #define FLUSHO 0010000 #define PENDIN 0040000 -#define EXTPROC 0200000 #define TCOOFF 0 #define TCOON 1 @@ -158,3 +150,10 @@ struct termios #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define CBAUDEX 0010000 +#define CRTSCTS 020000000000 +#define EXTPROC 0200000 +#define XTABS 0014000 +#endif diff --git a/arch/mips/bits/termios.h b/arch/mips/bits/termios.h index 179af8e7..487c1d45 100644 --- a/arch/mips/bits/termios.h +++ b/arch/mips/bits/termios.h @@ -77,9 +77,6 @@ struct termios #define VT0 0000000 #define VT1 0040000 -/* ?? */ -#define XTABS 0014000 - #define B0 0000000 #define B50 0000001 #define B75 0000002 @@ -129,12 +126,6 @@ struct termios #define PARODD 0001000 #define HUPCL 0002000 #define CLOCAL 0004000 -#define CBAUDEX 0010000 - -#define CIBAUD 002003600000 -#define CMSPAR 010000000000 -#define CRTSCTS 020000000000 -#define IBSHIFT 16 #define ISIG 0000001 #define ICANON 0000002 @@ -152,9 +143,6 @@ struct termios #define PENDIN 0040000 #define TOSTOP 0100000 #define ITOSTOP 0100000 -#define EXTPROC 0200000 - -#define TIOCSER_TEMT 1 #define TCOOFF 0 #define TCOON 1 @@ -168,3 +156,14 @@ struct termios #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define CBAUDEX 0010000 +#define CIBAUD 002003600000 +#define IBSHIFT 16 +#define CMSPAR 010000000000 +#define CRTSCTS 020000000000 +#define EXTPROC 0200000 +#define XTABS 0014000 +#define TIOCSER_TEMT 1 +#endif diff --git a/arch/powerpc/bits/termios.h b/arch/powerpc/bits/termios.h index 30227593..9f8016c9 100644 --- a/arch/powerpc/bits/termios.h +++ b/arch/powerpc/bits/termios.h @@ -66,7 +66,6 @@ struct termios #define TAB1 00002000 #define TAB2 00004000 #define TAB3 00006000 -#define XTABS 00006000 #define CRDLY 00030000 #define CR0 00000000 #define CR1 00010000 @@ -101,7 +100,6 @@ struct termios #define B38400 0000017 #define EXTA B19200 #define EXTB B38400 -#define CBAUDEX 0000000 #define B57600 00020 #define B115200 00021 #define B230400 00022 @@ -120,9 +118,6 @@ struct termios #define B4000000 00036 #define BOTHER 00037 -#define CIBAUD 077600000 -#define IBSHIFT 16 - #define CSIZE 00001400 #define CS5 00000000 #define CS6 00000400 @@ -136,8 +131,6 @@ struct termios #define HUPCL 00040000 #define CLOCAL 00100000 -#define CMSPAR 010000000000 -#define CRTSCTS 020000000000 #define ISIG 0x00000080 #define ICANON 0x00000100 @@ -154,7 +147,6 @@ struct termios #define FLUSHO 0x00800000 #define PENDIN 0x20000000 #define IEXTEN 0x00000400 -#define EXTPROC 0x10000000 #define TCOOFF 0 #define TCOON 1 @@ -168,3 +160,13 @@ struct termios #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define CBAUDEX 0000000 +#define CIBAUD 077600000 +#define IBSHIFT 16 +#define CMSPAR 010000000000 +#define CRTSCTS 020000000000 +#define EXTPROC 0x10000000 +#define XTABS 00006000 +#endif diff --git a/arch/x86_64/bits/termios.h b/arch/x86_64/bits/termios.h index 61c888f4..e9494be0 100644 --- a/arch/x86_64/bits/termios.h +++ b/arch/x86_64/bits/termios.h @@ -75,9 +75,6 @@ struct termios #define VT0 0000000 #define VT1 0040000 -/* ?? */ -#define XTABS 0014000 - #define B0 0000000 #define B50 0000001 #define B75 0000002 @@ -125,8 +122,6 @@ struct termios #define HUPCL 0002000 #define CLOCAL 0004000 -#define CRTSCTS 020000000000 - #define ISIG 0000001 #define ICANON 0000002 #define ECHO 0000010 @@ -137,14 +132,11 @@ struct termios #define TOSTOP 0000400 #define IEXTEN 0100000 -/* Extensions? */ -#define CBAUDEX 0010000 #define ECHOCTL 0001000 #define ECHOPRT 0002000 #define ECHOKE 0004000 #define FLUSHO 0010000 #define PENDIN 0040000 -#define EXTPROC 0200000 #define TCOOFF 0 #define TCOON 1 @@ -158,3 +150,10 @@ struct termios #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define CBAUDEX 0010000 +#define CRTSCTS 020000000000 +#define EXTPROC 0200000 +#define XTABS 0014000 +#endif