svn commit: trunk/busybox/miscutils

vda at busybox.net vda at busybox.net
Mon Jan 28 09:39:31 UTC 2008


Author: vda
Date: 2008-01-28 01:39:30 -0800 (Mon, 28 Jan 2008)
New Revision: 20914

Log:
microcom: undo #define trick, gcc fails to take advantage of it



Modified:
   trunk/busybox/miscutils/microcom.c


Changeset:
Modified: trunk/busybox/miscutils/microcom.c
===================================================================
--- trunk/busybox/miscutils/microcom.c	2008-01-27 23:41:34 UTC (rev 20913)
+++ trunk/busybox/miscutils/microcom.c	2008-01-28 09:39:30 UTC (rev 20914)
@@ -45,8 +45,8 @@
 {
 	struct pollfd pfd[2];
 	int nfd;
-	//int sfd;
-#define sfd (pfd[0].fd)
+	int sfd;
+/* #define sfd (pfd[0].fd) - gcc 4.2.1 is still not smart enough */
 	char *device_lock_file;
 	const char *opt_s = "9600";
 	speed_t speed;
@@ -123,7 +123,7 @@
 		goto restore0_close_unlock_and_exit;
 
 	// main loop: check with poll(), then read/write bytes across
-	/* pfd[0].fd = sfd; - they are the same */
+	pfd[0].fd = sfd;
 	pfd[0].events = POLLIN;
 	pfd[1].fd = STDIN_FILENO;
 	pfd[1].events = POLLIN;




More information about the busybox-cvs mailing list