From c9ec058657f9f8b3fd39a16f1a9e993b4a1e982e Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 28 May 2024 15:50:03 -0400 Subject: abstract out "forced" implementations of functions from future specifications --- src/stdio/freopen.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/stdio/freopen.c') diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index f23d53af..60394ca6 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -1,25 +1,9 @@ -#ifndef _POSIX_SOURCE -#define _POSIX_SOURCE -#define POSIX_FORCED -#endif - #include #include #include #include "_stdio.h" - -#ifdef POSIX_FORCED -#include "_syscall.h" -#define open(_p, _f, _m) __scall3(open, _p, _f, _m) -#define isatty(_fd) (-1) /*ioctl(_fd, TCFLSH, 0) */ -#define TCFLSH 0x540B -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_CREAT 0100 -#define O_TRUNC 01000 -#define O_APPEND 02000 -#define O_RDWR 02 -#endif +#include "_forced/open.h" +#include "_forced/isatty.h" /** reopen a file stream with a new file **/ -- cgit v1.2.1