aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-05 16:54:40 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-05 16:54:40 +0000
commit0ab393eb14971029af9cffaf2eaba17b4cfd775a (patch)
treea91900db1e5342000f5de4e1d41be802663ee4bb
parent1d2214df180bbc5c46a0ac0cd315f10a00e6133d (diff)
downloadbusybox-w32-0ab393eb14971029af9cffaf2eaba17b4cfd775a.tar.gz
busybox-w32-0ab393eb14971029af9cffaf2eaba17b4cfd775a.tar.bz2
busybox-w32-0ab393eb14971029af9cffaf2eaba17b4cfd775a.zip
Migrate endianness macros.
git-svn-id: svn://busybox.net/trunk/busybox@15008 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--libbb/sha1.c2
-rw-r--r--util-linux/fdisk.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/libbb/sha1.c b/libbb/sha1.c
index 4b28266af..dd4009834 100644
--- a/libbb/sha1.c
+++ b/libbb/sha1.c
@@ -153,7 +153,7 @@ void *sha1_end(void *resbuf, sha1_ctx_t *ctx)
153#else 153#else
154 static uint32_t mask[4] = { 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff }; 154 static uint32_t mask[4] = { 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff };
155 static uint32_t bits[4] = { 0x00000080, 0x00008000, 0x00800000, 0x80000000 }; 155 static uint32_t bits[4] = { 0x00000080, 0x00008000, 0x00800000, 0x80000000 };
156#endif /* __BYTE_ORDER */ 156#endif
157 157
158 uint8_t *hval = resbuf; 158 uint8_t *hval = resbuf;
159 uint32_t i, cnt = (uint32_t) (ctx->count[0] & SHA1_MASK); 159 uint32_t i, cnt = (uint32_t) (ctx->count[0] & SHA1_MASK);
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 9701c467b..2042951d9 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2343,7 +2343,7 @@ create_sgilabel(void)
2343 "until you decide to write them. After that, of course, the previous\n" 2343 "until you decide to write them. After that, of course, the previous\n"
2344 "content will be unrecoverably lost.\n\n")); 2344 "content will be unrecoverably lost.\n\n"));
2345 2345
2346 sgi_other_endian = (BYTE_ORDER == LITTLE_ENDIAN); 2346 sgi_other_endian = (BB_LITTLE_ENDIAN);
2347 res = ioctl(fd, BLKGETSIZE, &longsectors); 2347 res = ioctl(fd, BLKGETSIZE, &longsectors);
2348 if (!ioctl(fd, HDIO_GETGEO, &geometry)) { 2348 if (!ioctl(fd, HDIO_GETGEO, &geometry)) {
2349 heads = geometry.heads; 2349 heads = geometry.heads;
@@ -2681,11 +2681,7 @@ create_sunlabel(void)
2681 _("Building a new sun disklabel. Changes will remain in memory only,\n" 2681 _("Building a new sun disklabel. Changes will remain in memory only,\n"
2682 "until you decide to write them. After that, of course, the previous\n" 2682 "until you decide to write them. After that, of course, the previous\n"
2683 "content won't be recoverable.\n\n")); 2683 "content won't be recoverable.\n\n"));
2684#if BYTE_ORDER == LITTLE_ENDIAN 2684 sun_other_endian = BB_LITTLE_ENDIAN;
2685 sun_other_endian = 1;
2686#else
2687 sun_other_endian = 0;
2688#endif
2689 memset(MBRbuffer, 0, sizeof(MBRbuffer)); 2685 memset(MBRbuffer, 0, sizeof(MBRbuffer));
2690 sunlabel->magic = SUN_SSWAP16(SUN_LABEL_MAGIC); 2686 sunlabel->magic = SUN_SSWAP16(SUN_LABEL_MAGIC);
2691 if (!floppy) { 2687 if (!floppy) {