diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-08 00:08:23 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-08 00:08:23 +0000 |
commit | 8af72c13841ee51bca4f061a91c05e8fd366f586 (patch) | |
tree | 97a2406edd76c1b4c24265226bfe410963ddbb0e /source/lib/readline.c | |
parent | b54f6bf06c6a4032ba0d6c2a25699948685ccf6a (diff) | |
download | samba-8af72c13841ee51bca4f061a91c05e8fd366f586.tar.gz samba-8af72c13841ee51bca4f061a91c05e8fd366f586.tar.xz samba-8af72c13841ee51bca4f061a91c05e8fd366f586.zip |
Merge from HEAD - don't mix FILE and X_FILE - fixes debian bug
http://bugs.debian.org/178219 where the first 4096 bytes where being chewed
into the FILE buffer, and never available to X_FILE's read.
Andrew Bartlett
Diffstat (limited to 'source/lib/readline.c')
-rw-r--r-- | source/lib/readline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/lib/readline.c b/source/lib/readline.c index 58c4ecf482d..c0ccf44715d 100644 --- a/source/lib/readline.c +++ b/source/lib/readline.c @@ -56,7 +56,7 @@ static char *smb_readline_replacement(char *prompt, void (*callback)(void), fd_set fds; static pstring line; struct timeval timeout; - int fd = fileno(stdin); + int fd = x_fileno(x_stdin); char *ret; x_fprintf(dbf, "%s", prompt); @@ -70,7 +70,7 @@ static char *smb_readline_replacement(char *prompt, void (*callback)(void), FD_SET(fd,&fds); if (sys_select_intr(fd+1,&fds,NULL,NULL,&timeout) == 1) { - ret = fgets(line, sizeof(line), stdin); + ret = x_fgets(line, sizeof(line), x_stdin); return ret; } if (callback) @@ -86,7 +86,7 @@ char *smb_readline(char *prompt, void (*callback)(void), char **(completion_fn)(char *text, int start, int end)) { #if HAVE_LIBREADLINE - if (isatty(fileno(stdin))) { + if (isatty(fileno(x_stdin))) { char *ret; /* Aargh! Readline does bizzare things with the terminal width |