1 --- termios.c.orig 2007-03-16 00:36:09.000000000 -0700
2 +++ termios.c 2007-03-16 00:45:15.000000000 -0700
5 __FBSDID("$FreeBSD: src/lib/libc/gen/termios.c,v 1.13 2002/05/28 16:59:39 alfred Exp $");
8 +#ifdef VARIANT_CANCELABLE
11 +extern void _pthread_testcancel(pthread_t thread, int isconforming);
12 +#endif /* VARIANT_CANCELABLE */
13 +#endif /* __DARWIN_UNIX03 */
15 #include "namespace.h"
16 #include <sys/types.h>
17 #include <sys/fcntl.h>
20 #include "un-namespace.h"
22 +#ifndef BUILDING_VARIANT
30 + if (isatty(fd) == 0)
34 return (_ioctl(fd, TIOCSPGRP, &s));
40 + if (isatty(fd) == 0)
43 if (_ioctl(fd, TIOCGPGRP, &s) < 0)
50 +#endif /* BUILDING_VARIANT */
57 +#ifdef VARIANT_CANCELABLE
58 + _pthread_testcancel(pthread_self(), 1);
59 +#endif /* VARIANT_CANCELABLE */
60 +#endif /* __DARWIN_UNIX03 */
61 return (_ioctl(fd, TIOCDRAIN, 0));
64 __weak_reference(__tcdrain, tcdrain);
65 __weak_reference(__tcdrain, _tcdrain);
67 +#ifndef BUILDING_VARIANT
73 return (_ioctl(fd, TIOCSTART, 0));
75 + return (_ioctl(fd, TIOCIXON, 0));
77 - if (tcgetattr(fd, &term) == -1)
79 - c = term.c_cc[action == TCIOFF ? VSTOP : VSTART];
80 - if (c != _POSIX_VDISABLE && _write(fd, &c, sizeof(c)) == -1)
83 + return (_ioctl(fd, TIOCIXOFF, 0));
90 +#endif /* BUILDING_VARIANT */