diff options
author | 2015-09-13 11:51:36 +0000 | |
---|---|---|
committer | 2015-09-13 11:51:36 +0000 | |
commit | a167d8c14a6eba52f5e4403a2f59dfd23b6955f5 (patch) | |
tree | 2b8ec5d30daac7c58ecea4ed17f3f494dd831cfc | |
parent | Check ECDH output buffer length and avoid truncation. (diff) | |
download | wireguard-openbsd-a167d8c14a6eba52f5e4403a2f59dfd23b6955f5.tar.xz wireguard-openbsd-a167d8c14a6eba52f5e4403a2f59dfd23b6955f5.zip |
Wrap <termios.h> so that calls go direct and the symbols are all weak.
-rw-r--r-- | lib/libc/hidden/termios.h | 37 | ||||
-rw-r--r-- | lib/libc/termios/tcgetattr.c | 3 | ||||
-rw-r--r-- | lib/libc/termios/tcsetattr.c | 3 |
3 files changed, 41 insertions, 2 deletions
diff --git a/lib/libc/hidden/termios.h b/lib/libc/hidden/termios.h new file mode 100644 index 00000000000..2c6420036eb --- /dev/null +++ b/lib/libc/hidden/termios.h @@ -0,0 +1,37 @@ +/* $OpenBSD: termios.h,v 1.1 2015/09/13 11:51:36 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_TERMIOS_H_ +#define _LIBC_TERMIOS_H_ + +#include_next <termios.h> + +PROTO_DEPRECATED(cfgetispeed); +PROTO_DEPRECATED(cfgetospeed); +PROTO_DEPRECATED(cfmakeraw); +PROTO_DEPRECATED(cfsetispeed); +PROTO_DEPRECATED(cfsetospeed); +PROTO_DEPRECATED(cfsetspeed); +/*PROTO_CANCEL(tcdrain);*/ +PROTO_DEPRECATED(tcflow); +PROTO_DEPRECATED(tcflush); +PROTO_NORMAL(tcgetattr); +PROTO_DEPRECATED(tcgetsid); +PROTO_DEPRECATED(tcsendbreak); +PROTO_NORMAL(tcsetattr); + +#endif /* !_LIBC_TERMIOS_H_ */ diff --git a/lib/libc/termios/tcgetattr.c b/lib/libc/termios/tcgetattr.c index 638cdba53bc..314df5e9337 100644 --- a/lib/libc/termios/tcgetattr.c +++ b/lib/libc/termios/tcgetattr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcgetattr.c,v 1.5 2005/08/05 13:03:00 espie Exp $ */ +/* $OpenBSD: tcgetattr.c,v 1.6 2015/09/13 11:51:36 guenther Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -36,3 +36,4 @@ tcgetattr(int fd, struct termios *t) { return (ioctl(fd, TIOCGETA, t)); } +DEF_WEAK(tcgetattr); diff --git a/lib/libc/termios/tcsetattr.c b/lib/libc/termios/tcsetattr.c index 9251a98bc23..da85fece5a3 100644 --- a/lib/libc/termios/tcsetattr.c +++ b/lib/libc/termios/tcsetattr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcsetattr.c,v 1.5 2005/08/05 13:03:00 espie Exp $ */ +/* $OpenBSD: tcsetattr.c,v 1.6 2015/09/13 11:51:36 guenther Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -54,3 +54,4 @@ tcsetattr(int fd, int opt, const struct termios *t) return (-1); } } +DEF_WEAK(tcsetattr); |