aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-24 14:16:28 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-24 14:16:28 +0000
commit5a9d441b2cfb4f3614971f918bb69b5e7a5ea2c9 (patch)
treeb6b30a570093f5a6a57b5bd8317687b5ee9ee0b3
parent1c1f5d30477e9c845c1d08b2390bd889f6b1d018 (diff)
downloadbusybox-w32-5a9d441b2cfb4f3614971f918bb69b5e7a5ea2c9.tar.gz
busybox-w32-5a9d441b2cfb4f3614971f918bb69b5e7a5ea2c9.tar.bz2
busybox-w32-5a9d441b2cfb4f3614971f918bb69b5e7a5ea2c9.zip
Fix up some signed char vs int issues that show up on powerpc.
-rw-r--r--archival/dpkg.c2
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/md5sum.c2
-rw-r--r--dos2unix.c2
-rw-r--r--dpkg.c2
-rw-r--r--insmod.c8
-rw-r--r--md5sum.c2
-rw-r--r--modutils/insmod.c8
8 files changed, 12 insertions, 16 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 18742e8f6..0010df537 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -804,7 +804,7 @@ extern int dpkg_main(int argc, char **argv)
804 804
805 package_t *p, *packages = NULL; 805 package_t *p, *packages = NULL;
806 void *status = NULL; 806 void *status = NULL;
807 char opt = 0; 807 int opt = 0;
808 int optflag = 0; 808 int optflag = 0;
809 809
810 while ((opt = getopt(argc, argv, "iruc")) != -1) { 810 while ((opt = getopt(argc, argv, "iruc")) != -1) {
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 4ca665841..e97c3ba9a 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -33,7 +33,7 @@
33 33
34// if fn is NULL then input is stdin and output is stdout 34// if fn is NULL then input is stdin and output is stdout
35static int convert(char *fn, int ConvType) { 35static int convert(char *fn, int ConvType) {
36 char c; 36 int c;
37 char *tempFn = NULL; 37 char *tempFn = NULL;
38 FILE *in = stdin, *out = stdout; 38 FILE *in = stdin, *out = stdout;
39 39
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index a9bbdef36..e5a2abe78 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -244,7 +244,7 @@ void *md5_finish_ctx(struct md5_ctx *ctx, void *resbuf)
244 /* Put the 64-bit file length in *bits* at the end of the buffer. */ 244 /* Put the 64-bit file length in *bits* at the end of the buffer. */
245 *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3); 245 *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3);
246 *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] = 246 *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] =
247 SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29)); 247 SWAP( ((ctx->total[1] << 3) | (ctx->total[0] >> 29)) );
248 248
249 /* Process last bytes. */ 249 /* Process last bytes. */
250 md5_process_block(ctx->buffer, bytes + pad + 8, ctx); 250 md5_process_block(ctx->buffer, bytes + pad + 8, ctx);
diff --git a/dos2unix.c b/dos2unix.c
index 4ca665841..e97c3ba9a 100644
--- a/dos2unix.c
+++ b/dos2unix.c
@@ -33,7 +33,7 @@
33 33
34// if fn is NULL then input is stdin and output is stdout 34// if fn is NULL then input is stdin and output is stdout
35static int convert(char *fn, int ConvType) { 35static int convert(char *fn, int ConvType) {
36 char c; 36 int c;
37 char *tempFn = NULL; 37 char *tempFn = NULL;
38 FILE *in = stdin, *out = stdout; 38 FILE *in = stdin, *out = stdout;
39 39
diff --git a/dpkg.c b/dpkg.c
index 18742e8f6..0010df537 100644
--- a/dpkg.c
+++ b/dpkg.c
@@ -804,7 +804,7 @@ extern int dpkg_main(int argc, char **argv)
804 804
805 package_t *p, *packages = NULL; 805 package_t *p, *packages = NULL;
806 void *status = NULL; 806 void *status = NULL;
807 char opt = 0; 807 int opt = 0;
808 int optflag = 0; 808 int optflag = 0;
809 809
810 while ((opt = getopt(argc, argv, "iruc")) != -1) { 810 while ((opt = getopt(argc, argv, "iruc")) != -1) {
diff --git a/insmod.c b/insmod.c
index 5e51fcb70..4ca28bb86 100644
--- a/insmod.c
+++ b/insmod.c
@@ -130,7 +130,7 @@
130#ifndef MODUTILS_MODULE_H 130#ifndef MODUTILS_MODULE_H
131static const int MODUTILS_MODULE_H = 1; 131static const int MODUTILS_MODULE_H = 1;
132 132
133#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $" 133#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
134 134
135/* This file contains the structures used by the 2.0 and 2.1 kernels. 135/* This file contains the structures used by the 2.0 and 2.1 kernels.
136 We do not use the kernel headers directly because we do not wish 136 We do not use the kernel headers directly because we do not wish
@@ -347,7 +347,7 @@ int delete_module(const char *);
347#ifndef MODUTILS_OBJ_H 347#ifndef MODUTILS_OBJ_H
348static const int MODUTILS_OBJ_H = 1; 348static const int MODUTILS_OBJ_H = 1;
349 349
350#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $" 350#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
351 351
352/* The relocatable object is manipulated using elfin types. */ 352/* The relocatable object is manipulated using elfin types. */
353 353
@@ -374,8 +374,6 @@ static const int MODUTILS_OBJ_H = 1;
374 374
375#if (defined(__m68k__)) 375#if (defined(__m68k__))
376#define ELFDATAM ELFDATA2MSB 376#define ELFDATAM ELFDATA2MSB
377#else
378#define ELFDATAM ELFDATA2LSB
379#endif 377#endif
380 378
381 379
@@ -399,7 +397,7 @@ static const int MODUTILS_OBJ_H = 1;
399#define MATCH_MACHINE(x) (x == EM_PPC) 397#define MATCH_MACHINE(x) (x == EM_PPC)
400#define SHT_RELM SHT_RELA 398#define SHT_RELM SHT_RELA
401#define Elf32_RelM Elf32_Rela 399#define Elf32_RelM Elf32_Rela
402#define ELFDATAM ELFDATA2MSB 400#define ELFDATAM ELFDATA2MSB
403 401
404#elif defined(__mips__) 402#elif defined(__mips__)
405 403
diff --git a/md5sum.c b/md5sum.c
index a9bbdef36..e5a2abe78 100644
--- a/md5sum.c
+++ b/md5sum.c
@@ -244,7 +244,7 @@ void *md5_finish_ctx(struct md5_ctx *ctx, void *resbuf)
244 /* Put the 64-bit file length in *bits* at the end of the buffer. */ 244 /* Put the 64-bit file length in *bits* at the end of the buffer. */
245 *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3); 245 *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3);
246 *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] = 246 *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] =
247 SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29)); 247 SWAP( ((ctx->total[1] << 3) | (ctx->total[0] >> 29)) );
248 248
249 /* Process last bytes. */ 249 /* Process last bytes. */
250 md5_process_block(ctx->buffer, bytes + pad + 8, ctx); 250 md5_process_block(ctx->buffer, bytes + pad + 8, ctx);
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 5e51fcb70..4ca28bb86 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -130,7 +130,7 @@
130#ifndef MODUTILS_MODULE_H 130#ifndef MODUTILS_MODULE_H
131static const int MODUTILS_MODULE_H = 1; 131static const int MODUTILS_MODULE_H = 1;
132 132
133#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $" 133#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
134 134
135/* This file contains the structures used by the 2.0 and 2.1 kernels. 135/* This file contains the structures used by the 2.0 and 2.1 kernels.
136 We do not use the kernel headers directly because we do not wish 136 We do not use the kernel headers directly because we do not wish
@@ -347,7 +347,7 @@ int delete_module(const char *);
347#ifndef MODUTILS_OBJ_H 347#ifndef MODUTILS_OBJ_H
348static const int MODUTILS_OBJ_H = 1; 348static const int MODUTILS_OBJ_H = 1;
349 349
350#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $" 350#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
351 351
352/* The relocatable object is manipulated using elfin types. */ 352/* The relocatable object is manipulated using elfin types. */
353 353
@@ -374,8 +374,6 @@ static const int MODUTILS_OBJ_H = 1;
374 374
375#if (defined(__m68k__)) 375#if (defined(__m68k__))
376#define ELFDATAM ELFDATA2MSB 376#define ELFDATAM ELFDATA2MSB
377#else
378#define ELFDATAM ELFDATA2LSB
379#endif 377#endif
380 378
381 379
@@ -399,7 +397,7 @@ static const int MODUTILS_OBJ_H = 1;
399#define MATCH_MACHINE(x) (x == EM_PPC) 397#define MATCH_MACHINE(x) (x == EM_PPC)
400#define SHT_RELM SHT_RELA 398#define SHT_RELM SHT_RELA
401#define Elf32_RelM Elf32_Rela 399#define Elf32_RelM Elf32_Rela
402#define ELFDATAM ELFDATA2MSB 400#define ELFDATAM ELFDATA2MSB
403 401
404#elif defined(__mips__) 402#elif defined(__mips__)
405 403