[BusyBox-cvs] busybox/networking ftpgetput.c, 1.17, 1.18 nc.c, 1.23, 1.24 tftp.c, 1.26, 1.27 wget.c, 1.71, 1.72

Erik Andersen andersen at busybox.net
Sat Mar 27 10:02:45 UTC 2004


Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv8801/busybox/networking

Modified Files:
	ftpgetput.c nc.c tftp.c wget.c 
Log Message:
s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g


Index: nc.c
===================================================================
RCS file: /var/cvs/busybox/networking/nc.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- a/nc.c	15 Mar 2004 08:28:48 -0000	1.23
+++ b/nc.c	27 Mar 2004 10:02:43 -0000	1.24
@@ -79,7 +79,7 @@
 #ifdef GAPING_SECURITY_HOLE
 	if (pr00gie) {
 		/* won't need stdin */
-		close (fileno(stdin));      
+		close (STDIN_FILENO);      
 	}
 #endif /* GAPING_SECURITY_HOLE */
 

Index: tftp.c
===================================================================
RCS file: /var/cvs/busybox/networking/tftp.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- a/tftp.c	15 Mar 2004 08:28:53 -0000	1.26
+++ b/tftp.c	27 Mar 2004 10:02:43 -0000	1.27
@@ -576,7 +576,7 @@
 	result = tftp(cmd, host, remotefile, fd, port, blocksize);
 
 #ifdef CONFIG_FEATURE_CLEAN_UP
-	if (!(fd == fileno(stdout) || fd == fileno(stdin))) {
+	if (!(fd == STDOUT_FILENO || fd == STDIN_FILENO)) {
 	    close(fd);
 	}
 #endif

Index: ftpgetput.c
===================================================================
RCS file: /var/cvs/busybox/networking/ftpgetput.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- a/ftpgetput.c	15 Mar 2004 08:46:37 -0000	1.17
+++ b/ftpgetput.c	27 Mar 2004 10:02:43 -0000	1.18
@@ -154,7 +154,7 @@
 	}
 
 	if ((local_path[0] == '-') && (local_path[1] == '\0')) {
-		fd_local = fileno(stdout);
+		fd_local = STDOUT_FILENO;
 		do_continue = 0;
 	}
 
@@ -230,7 +230,7 @@
 
 	/* get the local file */
 	if ((local_path[0] == '-') && (local_path[1] == '\0')) {
-		fd_local = fileno(stdin);
+		fd_local = STDIN_FILENO;
 	} else {
 		fd_local = bb_xopen(local_path, O_RDONLY);
 		fstat(fd_local, &sbuf);

Index: wget.c
===================================================================
RCS file: /var/cvs/busybox/networking/wget.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- a/wget.c	15 Mar 2004 08:28:53 -0000	1.71
+++ b/wget.c	27 Mar 2004 10:02:43 -0000	1.72
@@ -794,7 +794,7 @@
 		snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
 			 "%02d:%02d ETA", i / 60, i % 60);
 	}
-	write(fileno(stderr), buf, strlen(buf));
+	write(STDERR_FILENO, buf, strlen(buf));
 
 	if (flag == -1) {
 		struct sigaction sa;




More information about the busybox-cvs mailing list