summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/stub/e_fmodl.c11
-rw-r--r--sysdeps/stub/lockfile.c11
-rw-r--r--sysdeps/unix/sysv/linux/speed.c60
3 files changed, 27 insertions, 55 deletions
diff --git a/sysdeps/stub/e_fmodl.c b/sysdeps/stub/e_fmodl.c
new file mode 100644
index 0000000000..b47912581b
--- /dev/null
+++ b/sysdeps/stub/e_fmodl.c
@@ -0,0 +1,11 @@
+#include <math.h>
+#include <stdio.h>
+
+long double
+__ieee754_fmodl (long double x, long double y)
+{
+ fputs ("__ieee754_fmodl not implemented\n", stderr);
+ return 0.0;
+}
+
+stub_warning (__ieee754_fmodl)
diff --git a/sysdeps/stub/lockfile.c b/sysdeps/stub/lockfile.c
index 0942e04de0..61d03a7c72 100644
--- a/sysdeps/stub/lockfile.c
+++ b/sysdeps/stub/lockfile.c
@@ -17,7 +17,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <stdio.h>
+typedef FILE;
void
@@ -25,6 +25,9 @@ __flockfile (FILE *stream)
{
/* Do nothing. Using this version does not do any locking. */
}
+#ifdef USE_IN_LIBIO
+strong_alias (__flockfile, _IO_flockfile)
+#endif
weak_alias (__flockfile, flockfile);
@@ -33,6 +36,9 @@ __funlockfile (FILE *stream)
{
/* Do nothing. Using this version does not do any locking. */
}
+#ifdef USE_IN_LIBIO
+strong_alias (__funlockfile, _IO_funlockfile)
+#endif
weak_alias (__funlockfile, funlockfile);
@@ -42,4 +48,7 @@ __ftrylockfile (FILE *stream)
/* Do nothing. Using this version does not do any locking. */
return 1;
}
+#ifdef USE_IN_LIBIO
+strong_alias (__ftrylockfile, _IO_ftrylockfile)
+#endif
weak_alias (__ftrylockfile, ftrylockfile);
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index 9dd5e2f269..ba8b122f6c 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -21,48 +21,13 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
#include <termios.h>
-static const speed_t speeds[] =
- {
- 0,
- 50,
- 75,
- 110,
- 134,
- 150,
- 200,
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
-#ifndef __alpha__
- 38400, /* Mention this twice here is a trick. */
-#endif
- 57600,
- 115200,
- 230400,
- 460800,
- };
-
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
cfgetospeed (termios_p)
const struct termios *termios_p;
{
- speed_t retval = termios_p->c_cflag & (CBAUD | CBAUDEX);
-
- if (retval & CBAUDEX)
- {
- retval &= ~CBAUDEX;
- retval |= CBAUD + 1;
- }
-
- return retval;
+ return termios_p->c_cflag & (CBAUD | CBAUDEX);
}
/* Return the input baud rate stored in *TERMIOS_P.
@@ -75,30 +40,17 @@ cfsetospeed (termios_p, speed)
struct termios *termios_p;
speed_t speed;
{
- register unsigned int i;
-
- if (termios_p == NULL)
+ if ((speed & ~CBAUD) != 0
+ && (speed < B57600 || speed > B460800))
{
__set_errno (EINVAL);
return -1;
}
- /* This allows either B1200 or 1200 to work. XXX
- Do we really want to try to support this, given that
- fetching the speed must return one or the other? */
-
- for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
- if (i == speed || speeds[i] == speed)
- {
- termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
- termios_p->c_cflag |= (i & CBAUD);
- if (i & ~CBAUD)
- termios_p->c_cflag |= CBAUDEX;
- return 0;
- }
+ termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
+ termios_p->c_cflag |= speed;
- __set_errno (EINVAL);
- return -1;
+ return 0;
}
/* Set the input baud rate stored in *TERMIOS_P to SPEED.