svn commit: trunk/busybox: archival coreutils include libbb scripts

vda at busybox.net vda at busybox.net
Tue Aug 14 16:43:07 UTC 2007


Author: vda
Date: 2007-08-14 09:43:01 -0700 (Tue, 14 Aug 2007)
New Revision: 19506

Log:
trylink: automatically use custom link script if user provides one
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes



Removed:
   trunk/busybox/libbb/vinfo_msg.c

Modified:
   trunk/busybox/archival/bbunzip.c
   trunk/busybox/archival/dpkg.c
   trunk/busybox/coreutils/wc.c
   trunk/busybox/include/libbb.h
   trunk/busybox/libbb/Kbuild
   trunk/busybox/libbb/info_msg.c
   trunk/busybox/scripts/trylink


Changeset:
Modified: trunk/busybox/archival/bbunzip.c
===================================================================
--- trunk/busybox/archival/bbunzip.c	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/archival/bbunzip.c	2007-08-14 16:43:01 UTC (rev 19506)
@@ -212,7 +212,7 @@
 
 	extension++;
 	if (strcmp(extension, "tgz" + 1) == 0
-#if  ENABLE_FEATURE_GUNZIP_UNCOMPRESS
+#if ENABLE_FEATURE_GUNZIP_UNCOMPRESS
 	 || strcmp(extension, "Z") == 0
 #endif
 	) {

Modified: trunk/busybox/archival/dpkg.c
===================================================================
--- trunk/busybox/archival/dpkg.c	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/archival/dpkg.c	2007-08-14 16:43:01 UTC (rev 19506)
@@ -1412,10 +1412,10 @@
 	tar_handle->src_fd = ar_handle->src_fd;
 
 	/* We don't care about data.tar.* or debian-binary, just control.tar.* */
-#if  ENABLE_FEATURE_DEB_TAR_GZ
+#if ENABLE_FEATURE_DEB_TAR_GZ
 	llist_add_to(&(ar_handle->accept), (char*)"control.tar.gz");
 #endif
-#if  ENABLE_FEATURE_DEB_TAR_BZ2
+#if ENABLE_FEATURE_DEB_TAR_BZ2
 	llist_add_to(&(ar_handle->accept), (char*)"control.tar.bz2");
 #endif
 
@@ -1432,10 +1432,10 @@
 	tar_handle->src_fd = ar_handle->src_fd;
 
 	/* We don't care about control.tar.* or debian-binary, just data.tar.* */
-#if  ENABLE_FEATURE_DEB_TAR_GZ
+#if ENABLE_FEATURE_DEB_TAR_GZ
 	llist_add_to(&(ar_handle->accept), (char*)"data.tar.gz");
 #endif
-#if  ENABLE_FEATURE_DEB_TAR_BZ2
+#if ENABLE_FEATURE_DEB_TAR_BZ2
 	llist_add_to(&(ar_handle->accept), (char*)"data.tar.bz2");
 #endif
 

Modified: trunk/busybox/coreutils/wc.c
===================================================================
--- trunk/busybox/coreutils/wc.c	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/coreutils/wc.c	2007-08-14 16:43:01 UTC (rev 19506)
@@ -43,7 +43,7 @@
 
 #include "libbb.h"
 
-#if  ENABLE_LOCALE_SUPPORT
+#if ENABLE_LOCALE_SUPPORT
 #define isspace_given_isprint(c) isspace(c)
 #else
 #undef isspace

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/include/libbb.h	2007-08-14 16:43:01 UTC (rev 19506)
@@ -280,7 +280,7 @@
 void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);
 void xlisten(int s, int backlog);
 void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen);
-ssize_t xsendto(int s, const  void *buf, size_t len, const struct sockaddr *to,
+ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to,
 				socklen_t tolen);
 int setsockopt_reuseaddr(int fd);
 int setsockopt_broadcast(int fd);
@@ -656,7 +656,6 @@
 /* These are used internally -- you shouldn't need to use them */
 extern void bb_verror_msg(const char *s, va_list p, const char *strerr);
 extern void bb_vperror_msg(const char *s, va_list p);
-extern void bb_vinfo_msg(const char *s, va_list p);
 
 
 /* applets which are useful from another applets */

Modified: trunk/busybox/libbb/Kbuild
===================================================================
--- trunk/busybox/libbb/Kbuild	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/libbb/Kbuild	2007-08-14 16:43:01 UTC (rev 19506)
@@ -88,7 +88,6 @@
 lib-y += verror_msg.o
 lib-y += vfork_daemon_rexec.o
 lib-y += vherror_msg.o
-lib-y += vinfo_msg.o
 lib-y += vperror_msg.o
 lib-y += warn_ignoring_args.o
 lib-y += wfopen.o

Modified: trunk/busybox/libbb/info_msg.c
===================================================================
--- trunk/busybox/libbb/info_msg.c	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/libbb/info_msg.c	2007-08-14 16:43:01 UTC (rev 19506)
@@ -7,13 +7,24 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
+#include <syslog.h>
 #include "libbb.h"
 
 void bb_info_msg(const char *s, ...)
 {
 	va_list p;
+	/* va_copy is used because it is not portable
+	 * to use va_list p twice */
+	va_list p2;
 
 	va_start(p, s);
-	bb_vinfo_msg(s, p);
+	va_copy(p2, p);
+	if (logmode & LOGMODE_STDIO) {
+		vprintf(s, p);
+		fputs(msg_eol, stdout);
+	}
+	if (ENABLE_FEATURE_SYSLOG && (logmode & LOGMODE_SYSLOG))
+		vsyslog(LOG_INFO, s, p2);
+	va_end(p2);
 	va_end(p);
 }

Deleted: trunk/busybox/libbb/vinfo_msg.c
===================================================================
--- trunk/busybox/libbb/vinfo_msg.c	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/libbb/vinfo_msg.c	2007-08-14 16:43:01 UTC (rev 19506)
@@ -1,26 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Utility routines.
- *
- * Copyright (C) 1999-2004 by Erik Andersen <andersen at codepoet.org>
- *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
- */
-
-#include "libbb.h"
-#include <syslog.h>
-
-void bb_vinfo_msg(const char *s, va_list p)
-{
-	/* va_copy is used because it is not portable
-	 * to use va_list p twice */
-	va_list p2;
-	va_copy(p2, p);
-	if (logmode & LOGMODE_STDIO) {
-		vprintf(s, p);
-		fputs(msg_eol, stdout);
-	}
-	if (ENABLE_FEATURE_SYSLOG && (logmode & LOGMODE_SYSLOG))
-		vsyslog(LOG_INFO, s, p2);
-	va_end(p2);
-}

Modified: trunk/busybox/scripts/trylink
===================================================================
--- trunk/busybox/scripts/trylink	2007-08-14 11:59:46 UTC (rev 19505)
+++ trunk/busybox/scripts/trylink	2007-08-14 16:43:01 UTC (rev 19506)
@@ -64,16 +64,18 @@
     echo "Final link with: $BBOX_LIB_LIST"
     l_list=`echo "$BBOX_LIB_LIST" | sed -e 's/ / -l/g' -e 's/^/-l/'`
     # --verbose gives us gobs of info to stdout (e.g. linker script used)
-    try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose" "$@" >busybox_ld.out ####|| exit 1
-    #
-    # Add SORT_BY_ALIGNMENT to linker script (found in busybox_ld.out):
-    #  .rodata         : { *(.rodata SORT_BY_ALIGNMENT(.rodata.*) .gnu.linkonce.r.*) }
-    #  *(.data SORT_BY_ALIGNMENT(.data.*) .gnu.linkonce.d.*)
-    #  *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*)
-    # This will eliminate most of the data padding. Use linker script
-    # by commenting "try" above and uncommenting this one (tested on i386):
-    #try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose -Wl,-T -Wl,busybox_ldscript" "$@" >busybox_ld.out
-    #
+    if ! test -f busybox_ldscript; then
+	try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose" "$@" >busybox_ld.out ####|| exit 1
+    else
+	echo "Custom linker script 'busybox_ldscript' found, using it"
+	# Add SORT_BY_ALIGNMENT to linker script (found in busybox_ld.out):
+	#  .rodata         : { *(.rodata SORT_BY_ALIGNMENT(.rodata.*) .gnu.linkonce.r.*) }
+	#  *(.data SORT_BY_ALIGNMENT(.data.*) .gnu.linkonce.d.*)
+	#  *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*)
+	# This will eliminate most of the data padding. Use linker script
+	# by commenting "try" above and uncommenting this one (tested on i386):
+	try "-Wl,--start-group $l_list -Wl,--end-group -Wl,--verbose -Wl,-T -Wl,busybox_ldscript" "$@" >busybox_ld.out
+    fi
 ####}
 ####rm busybox_ld.err
 ####exit 0  # Ensure "success" exit code




More information about the busybox-cvs mailing list