svn commit: trunk/busybox: libbb util-linux

landley at busybox.net landley at busybox.net
Fri May 5 16:54:44 UTC 2006


Author: landley
Date: 2006-05-05 09:54:40 -0700 (Fri, 05 May 2006)
New Revision: 15008

Log:
Migrate endianness macros.


Modified:
   trunk/busybox/libbb/sha1.c
   trunk/busybox/util-linux/fdisk.c


Changeset:
Modified: trunk/busybox/libbb/sha1.c
===================================================================
--- trunk/busybox/libbb/sha1.c	2006-05-05 16:52:28 UTC (rev 15007)
+++ trunk/busybox/libbb/sha1.c	2006-05-05 16:54:40 UTC (rev 15008)
@@ -153,7 +153,7 @@
 #else
 	static uint32_t mask[4] = { 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff };
 	static uint32_t bits[4] = { 0x00000080, 0x00008000, 0x00800000, 0x80000000 };
-#endif /* __BYTE_ORDER */
+#endif
 
 	uint8_t *hval = resbuf;
 	uint32_t i, cnt = (uint32_t) (ctx->count[0] & SHA1_MASK);

Modified: trunk/busybox/util-linux/fdisk.c
===================================================================
--- trunk/busybox/util-linux/fdisk.c	2006-05-05 16:52:28 UTC (rev 15007)
+++ trunk/busybox/util-linux/fdisk.c	2006-05-05 16:54:40 UTC (rev 15008)
@@ -2343,7 +2343,7 @@
 		"until you decide to write them. After that, of course, the previous\n"
 		"content will be unrecoverably lost.\n\n"));
 
-	sgi_other_endian = (BYTE_ORDER == LITTLE_ENDIAN);
+	sgi_other_endian = (BB_LITTLE_ENDIAN);
 	res = ioctl(fd, BLKGETSIZE, &longsectors);
 	if (!ioctl(fd, HDIO_GETGEO, &geometry)) {
 		heads = geometry.heads;
@@ -2681,11 +2681,7 @@
 		_("Building a new sun disklabel. Changes will remain in memory only,\n"
 		"until you decide to write them. After that, of course, the previous\n"
 		"content won't be recoverable.\n\n"));
-#if BYTE_ORDER == LITTLE_ENDIAN
-	sun_other_endian = 1;
-#else
-	sun_other_endian = 0;
-#endif
+	sun_other_endian = BB_LITTLE_ENDIAN;
 	memset(MBRbuffer, 0, sizeof(MBRbuffer));
 	sunlabel->magic = SUN_SSWAP16(SUN_LABEL_MAGIC);
 	if (!floppy) {




More information about the busybox-cvs mailing list