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/unistd/ctermid.c | |
parent | b1b60bd8cb71f7010c0dca555f027e84ec657947 (diff) |
move internal ctermid storage to __stdio struct
Diffstat (limited to 'src/unistd/ctermid.c')
-rw-r--r-- | src/unistd/ctermid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/unistd/ctermid.c b/src/unistd/ctermid.c index 32a47b64..122bed8a 100644 --- a/src/unistd/ctermid.c +++ b/src/unistd/ctermid.c @@ -2,16 +2,16 @@ #include "sys/types.h" #include <unistd.h> #include "stdio.h" +#include "stdio/_stdio.h" #include "string.h" char * ctermid(char * s) { - static char termid[L_ctermid] = "/dev/tty"; - + /* TODO: return the empty string if there is no controlling terminal */ if (s == NULL) { - s = termid; + s = __stdio.ctermid; } else { - strcpy(s, termid); + strcpy(s, __stdio.ctermid); } return s; |