]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2003-09-08 Roland McGrath <roland@frob.com>
authorRoland McGrath <roland@gnu.org>
Tue, 9 Sep 2003 06:44:48 +0000 (06:44 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 9 Sep 2003 06:44:48 +0000 (06:44 +0000)
* sysdeps/unix/sysv/linux/speed.c
(cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED].
(cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED].
* sysdeps/unix/sysv/linux/bits/termios.h
(_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.

sysdeps/unix/sysv/linux/alpha/bits/termios.h
sysdeps/unix/sysv/linux/bits/termios.h
sysdeps/unix/sysv/linux/powerpc/bits/termios.h
sysdeps/unix/sysv/linux/speed.c

index 079073dd542b4cb105cd714068f3f61c92f6b348..0abe34f596e484649c817f7e8ca0a8d60cd5ebf6 100644 (file)
@@ -1,5 +1,6 @@
 /* termios type and macro definitions.  Linux version.
-   Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
+   Copyright (C) 1993,1994,1995,1996,1997,1999,2003
+       Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +37,8 @@ struct termios
     cc_t c_line;               /* line discipline (== c_cc[33]) */
     speed_t c_ispeed;          /* input speed */
     speed_t c_ospeed;          /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
   };
 
 /* c_cc characters */
index 887b309ad9ac592e7b67db981d82a40c9f5a2405..7eaf71aad659067c9aa69211eb12d9d6922d45d6 100644 (file)
@@ -1,5 +1,6 @@
 /* termios type and macro definitions.  Linux version.
-   Copyright (C) 1993, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+   Copyright (C) 1993,1994,1995,1996,1997,1998,1999,2003
+       Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +37,8 @@ struct termios
     cc_t c_cc[NCCS];           /* control characters */
     speed_t c_ispeed;          /* input speed */
     speed_t c_ospeed;          /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
   };
 
 /* c_cc characters */
index f7b89ae59482a59755a0e6007a0c9b541fdcf97b..58c9882a5e632cf96104b1e6f4161af7ba7742ba 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2001,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,6 +40,8 @@ struct termios {
        cc_t c_cc[NCCS];                /* control characters */
        speed_t c_ispeed;               /* input speed */
        speed_t c_ospeed;               /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
 };
 
 /* c_cc characters */
index 90104e5cc5b7ad4e94080e97eaafc0fd0dfc60a0..ba394cb05a73c0f4dfd09042ab20c4d5972c8589 100644 (file)
@@ -67,7 +67,9 @@ cfsetospeed  (termios_p, speed)
       return -1;
     }
 
+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
   termios_p->c_ospeed = speed;
+#endif
   termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
   termios_p->c_cflag |= speed;
 
@@ -92,7 +94,9 @@ cfsetispeed (termios_p, speed)
       return -1;
     }
 
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
   termios_p->c_ispeed = speed;
+#endif
   if (speed == 0)
     termios_p->c_iflag |= IBAUD0;
   else