mailing list of musl libc
 help / color / mirror / code / Atom feed
3d5213c65d3edf32818cffafac37da2cfd0f6833 blob 277 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
#include <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
#include "syscall.h"

int isatty(int fd)
{
	struct winsize wsz;
	unsigned long r = __syscall_ret(__syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz));
	if (r == 0) return 1;
	if (errno != EBADF) errno = ENOTTY;
	return 0;
}
debug log:

solving 3d5213c6 ...
found 3d5213c6 in https://inbox.vuxu.org/musl/20180913162755.18911-1-benjamin@python.org/
found c8badaf5 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 c8badaf55edd7d6c4e692e5d238e093848cc7290	src/unistd/isatty.c

applying [1/1] https://inbox.vuxu.org/musl/20180913162755.18911-1-benjamin@python.org/
diff --git a/src/unistd/isatty.c b/src/unistd/isatty.c
index c8badaf5..3d5213c6 100644

Checking patch src/unistd/isatty.c...
Applied patch src/unistd/isatty.c cleanly.

index at:
100644 3d5213c65d3edf32818cffafac37da2cfd0f6833	src/unistd/isatty.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).