svn commit: trunk/busybox: networking scripts

vda at busybox.net vda at busybox.net
Sat Jan 20 01:47:46 UTC 2007


Author: vda
Date: 2007-01-19 17:47:44 -0800 (Fri, 19 Jan 2007)
New Revision: 17394

Log:
fixes for amd64 compilation


Modified:
   trunk/busybox/networking/dnsd.c
   trunk/busybox/networking/isrv.c
   trunk/busybox/scripts/objsizes


Changeset:
Modified: trunk/busybox/networking/dnsd.c
===================================================================
--- trunk/busybox/networking/dnsd.c	2007-01-19 22:03:06 UTC (rev 17393)
+++ trunk/busybox/networking/dnsd.c	2007-01-20 01:47:44 UTC (rev 17394)
@@ -184,23 +184,24 @@
 	struct dns_entry *d=dnsentry;
 
 	do {
-#ifdef DEBUG
+#if DEBUG
 		char *p,*q;
 		q = (char *)&(qs[1]);
 		p = &(d->name[1]);
 		fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d",
-			__FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q));
+			__FUNCTION__, (int)strlen(p), (int)(d->name[0]),
+			p, q, (int)strlen(q));
 #endif
 		if (type == REQ_A) { /* search by host name */
 			for (i = 1; i <= (int)(d->name[0]); i++)
 				if (tolower(qs[i]) != d->name[i])
 					break;
 			if (i > (int)(d->name[0])) {
-#ifdef DEBUG
+#if DEBUG
 				fprintf(stderr, " OK");
 #endif
 				strcpy((char *)as, d->ip);
-#ifdef DEBUG
+#if DEBUG
 				fprintf(stderr, " as:%s\n", as);
 #endif
 					return 0;

Modified: trunk/busybox/networking/isrv.c
===================================================================
--- trunk/busybox/networking/isrv.c	2007-01-19 22:03:06 UTC (rev 17393)
+++ trunk/busybox/networking/isrv.c	2007-01-20 01:47:44 UTC (rev 17394)
@@ -190,9 +190,10 @@
 {
 	int n, newfd;
 
-	fcntl(fd, F_SETFL, (int)(PARAM_TBL[0]) | O_NONBLOCK);
+	/* suppress gcc warning "cast from ptr to int of different size" */
+	fcntl(fd, F_SETFL, (int)(ptrdiff_t)(PARAM_TBL[0]) | O_NONBLOCK);
 	newfd = accept(fd, NULL, 0);
-	fcntl(fd, F_SETFL, (int)(PARAM_TBL[0]));
+	fcntl(fd, F_SETFL, (int)(ptrdiff_t)(PARAM_TBL[0]));
 	if (newfd < 0) {
 		if (errno == EAGAIN) return;
 		/* Most probably someone gave us wrong fd type
@@ -299,7 +300,8 @@
 	isrv_register_fd(state, /*peer:*/ 0, listen_fd);
 	isrv_want_rd(state, listen_fd);
 	/* remember flags to make blocking<->nonblocking switch faster */
-	PARAM_TBL[0] = (void*) (fcntl(listen_fd, F_GETFL, 0));
+	/* (suppress gcc warning "cast from ptr to int of different size") */
+	PARAM_TBL[0] = (void*)(ptrdiff_t)(fcntl(listen_fd, F_GETFL, 0));
 
 	while (1) {
 		struct timeval tv;

Modified: trunk/busybox/scripts/objsizes
===================================================================
--- trunk/busybox/scripts/objsizes	2007-01-19 22:03:06 UTC (rev 17393)
+++ trunk/busybox/scripts/objsizes	2007-01-20 01:47:44 UTC (rev 17394)
@@ -2,7 +2,7 @@
 
 printf "%9s %11s %9s %9s %s\n" "text+data" text+rodata rwdata bss filename
 find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \
-| sed 's:^\./::' | xargs size | grep '^ *[0-9]' \
+| sed 's:^\./::' | xargs "${CROSS_COMPILE}size" | grep '^ *[0-9]' \
 | while read text data bss dec hex filename; do
     printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename"
 done | sort -r




More information about the busybox-cvs mailing list