/*int clearerr __P((register FILE *iop));*/
/* stdio/doprnt.c */
-int _doprnt __P((u_char *fmt0, va_list argp, register FILE *fp));
+int _doprnt __P((char *fmt, va_list argp, register FILE *fp));
/* stdio/doscan.c */
int _doscan __P((FILE *iop, register char *fmt, register va_list argp));
SRCS= chmod.c chown.c close.c dup2.c dup.c _exit.c fchmod.c fchown.c \
fstat.c ftruncate.c getdtablesize.c getegid.c geteuid.c getgid.c \
getpagesize.c getpgrp.c getpid.c getppid.c gettimeofday.c getuid.c \
- ioctl.c isatty.c link.c linux.c lseek.c lstat.c read.c readv.c sbrk.c \
+ ioctl.c link.c linux.c lseek.c lstat.c read.c readv.c sbrk.c \
setpgrp.c setregid.c setreuid.c settimeofday.c sigvec.c stat.c \
symlink.c sync.c truncate.c umask.c unlink.c vopen.c write.c writev.c
OBJS= chmod.o chown.o close.o dup2.o dup.o _exit.o fchmod.o fchown.o \
fstat.o ftruncate.o getdtablesize.o getegid.o geteuid.o getgid.o \
getpagesize.o getpgrp.o getpid.o getppid.o gettimeofday.o getuid.o \
- ioctl.o isatty.o link.o linux.o lseek.o lstat.o read.o readv.o sbrk.o \
+ ioctl.o link.o linux.o lseek.o lstat.o read.o readv.o sbrk.o \
setpgrp.o setregid.o setreuid.o settimeofday.o sigvec.o stat.o \
symlink.o sync.o truncate.o umask.o unlink.o vopen.o write.o writev.o
TAGSFILE=tags
#include <nox_errno.h>
#include <sys/nox_ioctl.h>
#include <sys/nox_types.h>
+#include <nox_unistd.h>
+#include <string.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
int ioctl(d, r, p) int d; u_long r; void *p; {
switch (r) {
+ case TIOCGETP:
+ if (!nox_isatty((nox_int)d)) {
+ errno = ENOTTY;
+ return -1;
+ }
+ /* just fake success for now */
+ bzero(p, sizeof(struct sgttyb));
+ return 0;
case TIOCGWINSZ: {
struct nox_winsize ws;
if (nox_ioctl((nox_int)d, nox_TIOCGWINSZ, &ws)) {
+++ /dev/null
-#include <nox_errno.h>
-#include <nox_unistd.h>
-
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include "linux.h"
-
-int isatty(f) int f; {
- nox_int res;
-
- res = nox_isatty(f);
- if (res == (nox_int)-1)
- errno = htot_errno(nox_errno);
- return (int)res;
-}