diff options
Diffstat (limited to 'libc/misc/ttyent/getttyent.c')
-rw-r--r-- | libc/misc/ttyent/getttyent.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c index d7d77c1ba..c15228a24 100644 --- a/libc/misc/ttyent/getttyent.c +++ b/libc/misc/ttyent/getttyent.c @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#define __fsetlocking __libc_fsetlocking + #define _GNU_SOURCE #include <features.h> #include <ttyent.h> @@ -50,7 +52,7 @@ struct ttyent * getttynam(const char *tty) setttyent(); while ((t = getttyent())) - if (!strcmp(tty, t->ty_name)) + if (!__strcmp(tty, t->ty_name)) break; endttyent(); return (t); @@ -96,7 +98,7 @@ static char * skip(register char *p) static char * value(register char *p) { - return ((p = strchr(p, '=')) ? ++p : NULL); + return ((p = __strchr(p, '=')) ? ++p : NULL); } struct ttyent * getttyent(void) @@ -122,7 +124,7 @@ struct ttyent * getttyent(void) return (NULL); } /* skip lines that are too big */ - if (!strchr(p, '\n')) { + if (!__strchr(p, '\n')) { while ((c = getc_unlocked(tf)) != '\n' && c != EOF) ; continue; @@ -148,8 +150,8 @@ struct ttyent * getttyent(void) tty.ty_status = 0; tty.ty_window = NULL; -#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1]) -#define vcmp(e) !strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '=' +#define scmp(e) !__strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1]) +#define vcmp(e) !__strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '=' for (; *p; p = skip(p)) { if (scmp(_TTYS_OFF)) tty.ty_status &= ~TTY_ON; @@ -171,7 +173,7 @@ struct ttyent * getttyent(void) tty.ty_comment = p; if (*p == 0) tty.ty_comment = 0; - if ((p = strchr(p, '\n'))) + if ((p = __strchr(p, '\n'))) *p = '\0'; return (&tty); } |