From f03ef8405b0c54ef0febc3fc91d511282e9928f4 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Tue, 10 May 2016 11:12:31 +0000 Subject: Rename getline with get_line to avoid collision with getline(3) When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard --- libexec/ftpd/extern.h | 2 +- libexec/ftpd/ftpcmd.y | 6 +++--- libexec/ftpd/ftpd.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'libexec/ftpd') diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h index 4f16f7b7d5d4..9d56cb235b4c 100644 --- a/libexec/ftpd/extern.h +++ b/libexec/ftpd/extern.h @@ -42,7 +42,7 @@ void fatalerror(char *); void ftpd_logwtmp(char *, char *, struct sockaddr *addr); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -int getline(char *, int, FILE *); +int get_line(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index 94475ece0d15..8d4e3bdeae2f 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -1158,10 +1158,10 @@ lookup(struct tab *p, char *cmd) #include /* - * getline - a hacked up version of fgets to ignore TELNET escape codes. + * get_line - a hacked up version of fgets to ignore TELNET escape codes. */ int -getline(char *s, int n, FILE *iop) +get_line(char *s, int n, FILE *iop) { int c; register char *cs; @@ -1280,7 +1280,7 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); (void) alarm(timeout); - n = getline(cbuf, sizeof(cbuf)-1, stdin); + n = get_line(cbuf, sizeof(cbuf)-1, stdin); if (n == -1) { reply(221, "You could at least say goodbye."); dologout(0); diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index b9c906975dc4..8928493cffdf 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2820,7 +2820,7 @@ myoob(void) return (0); } cp = tmpline; - ret = getline(cp, 7, stdin); + ret = get_line(cp, 7, stdin); if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); -- cgit v1.2.3