diff options
| author | Jakob Kaivo <jkk@ung.org> | 2020-08-14 19:18:05 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2020-08-14 19:18:05 -0400 |
| commit | 3c56463d85bfbf3b249aaa41791eec521b86b230 (patch) | |
| tree | a71a6ec9ab18544a425889dc1a3cf20aeaf7b67f /src/stdio | |
| parent | b1b60bd8cb71f7010c0dca555f027e84ec657947 (diff) | |
move internal ctermid storage to __stdio struct
Diffstat (limited to 'src/stdio')
| -rw-r--r-- | src/stdio/__stdio.c | 6 | ||||
| -rw-r--r-- | src/stdio/_stdio.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/stdio/__stdio.c b/src/stdio/__stdio.c index 2360020f..7170ee63 100644 --- a/src/stdio/__stdio.c +++ b/src/stdio/__stdio.c @@ -1,6 +1,10 @@ #include "_stdio.h" -struct __stdio __stdio; +struct __stdio __stdio = +{ + { { 0 } }, + "/dev/tty", +}; /* STDC(0) diff --git a/src/stdio/_stdio.h b/src/stdio/_stdio.h index 43db57a0..f82edaa0 100644 --- a/src/stdio/_stdio.h +++ b/src/stdio/_stdio.h @@ -7,7 +7,7 @@ #ifdef _POSIX_C_SOURCE #include <sys/types.h> #else -#include "../sys/types/pid_t.c" +#include "sys/types/pid_t.c" #endif struct __FILE { @@ -56,6 +56,7 @@ int __scanf(struct io_options * restrict, const char * restrict, va_list); struct __stdio { struct __FILE FILES[FOPEN_MAX]; + char ctermid[L_ctermid + 1]; }; extern struct __stdio __stdio; |
