[BusyBox] multiple cin patch

Matt Kraai kraai at alumni.carnegiemellon.edu
Fri Jan 26 04:44:38 UTC 2001


On Thu, Jan 25, 2001 at 08:14:43PM -0800, Bryan Rittmeyer wrote:
> The current CVS version of busybox generates a linker warning, since
> "FILE *cin" is used in both ls.c and more.c (presumably for the new
> termios stuff that was just added):

A better solution is to make both instances static.  That is,

diff -u -r1.54 ls.c
--- ls.c	2001/01/26 01:52:43	1.54
+++ ls.c	2001/01/26 04:45:35
@@ -198,7 +198,7 @@
 #		define getTermSettings(fd,argp) tcgetattr(fd, argp);
 #	endif
 
-FILE *cin;
+static FILE *cin;
 
 static struct termios initial_settings, new_settings;
 
diff -u -r1.35 more.c
--- more.c	2001/01/18 02:57:08	1.35
+++ more.c	2001/01/26 04:45:36
@@ -47,7 +47,7 @@
 #		define getTermSettings(fd,argp) tcgetattr(fd, argp);
 #	endif
 
-FILE *cin;
+static FILE *cin;
 
 static struct termios initial_settings, new_settings;
 
Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20010125/30dcd42d/attachment.pgp 


More information about the busybox mailing list