fix getline conflict

This commit is contained in:
dholland 2011-10-02 03:18:39 +00:00
parent e8aec5ac41
commit e2ec65c076
2 changed files with 26 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.1.1.1 2005/10/01 18:27:37 agc Exp $
$NetBSD: distinfo,v 1.2 2011/10/02 03:18:39 dholland Exp $
SHA1 (fs-kit-0.4.tgz) = e2226e62b9ae552ec83fc0afeb30b7716040b88f
RMD160 (fs-kit-0.4.tgz) = 270e09ff438f3c7924476d7905a5458b3ee43fdd
Size (fs-kit-0.4.tgz) = 73603 bytes
SHA1 (patch-aa) = 2e7d0929ab2e0b69ec37dda8185b2b80501d3626
SHA1 (patch-fsh_c) = a68e7e212af589d11df07a0659aca03c6b4cc9bc

View file

@ -0,0 +1,24 @@
$NetBSD: patch-fsh_c,v 1.1 2011/10/02 03:18:39 dholland Exp $
- avoid conflict with POSIX getline
--- fsh.c~ 1998-12-03 21:15:47.000000000 +0000
+++ fsh.c
@@ -838,7 +838,7 @@ do_help(int argc, char **argv)
}
static char *
-getline(char *prompt, char *input, int len)
+get_line(char *prompt, char *input, int len)
{
printf("%s", prompt); fflush(stdout);
@@ -854,7 +854,7 @@ do_fsh(void)
char input[512], **argv;
cmd_entry *cmd;
- while(getline(prompt, input, sizeof(input)) != NULL) {
+ while(get_line(prompt, input, sizeof(input)) != NULL) {
argc = 0;
argv = build_argv(input, &argc);
if (argv == NULL || argc == 0) {