Fix up some signed char vs int issues that show up on powerpc.
authorEric Andersen <andersen@codepoet.org>
Thu, 24 May 2001 14:16:28 +0000 (14:16 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 24 May 2001 14:16:28 +0000 (14:16 -0000)
archival/dpkg.c
coreutils/dos2unix.c
coreutils/md5sum.c
dos2unix.c
dpkg.c
insmod.c
md5sum.c
modutils/insmod.c

index 18742e8f63ce1afff6c8a18464879948c3f7f7e0..0010df537f098dd75ce0a0ebb584daa5663b7ba4 100644 (file)
@@ -804,7 +804,7 @@ extern int dpkg_main(int argc, char **argv)
 
        package_t *p, *packages = NULL;
        void *status = NULL;
-       char opt = 0;
+       int opt = 0;
        int optflag = 0;
 
        while ((opt = getopt(argc, argv, "iruc")) != -1) {
index 4ca665841641aa9136bbddc0f9a3c0d54ce62a70..e97c3ba9aa90852a190f10f25d148bd85690d381 100644 (file)
@@ -33,7 +33,7 @@
 
 // if fn is NULL then input is stdin and output is stdout
 static int convert(char *fn, int ConvType) {
-       char c;
+       int c;
        char *tempFn = NULL;
        FILE *in = stdin, *out = stdout;
 
index a9bbdef369f1c0b3b344f112a3bdde72d41bc466..e5a2abe78ca19973754c243679fe2f3e1d97dc7f 100644 (file)
@@ -244,7 +244,7 @@ void *md5_finish_ctx(struct md5_ctx *ctx, void *resbuf)
   /* Put the 64-bit file length in *bits* at the end of the buffer.  */
   *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3);
   *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] =
-    SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+    SWAP( ((ctx->total[1] << 3) | (ctx->total[0] >> 29)) );
 
   /* Process last bytes.  */
   md5_process_block(ctx->buffer, bytes + pad + 8, ctx);
index 4ca665841641aa9136bbddc0f9a3c0d54ce62a70..e97c3ba9aa90852a190f10f25d148bd85690d381 100644 (file)
@@ -33,7 +33,7 @@
 
 // if fn is NULL then input is stdin and output is stdout
 static int convert(char *fn, int ConvType) {
-       char c;
+       int c;
        char *tempFn = NULL;
        FILE *in = stdin, *out = stdout;
 
diff --git a/dpkg.c b/dpkg.c
index 18742e8f63ce1afff6c8a18464879948c3f7f7e0..0010df537f098dd75ce0a0ebb584daa5663b7ba4 100644 (file)
--- a/dpkg.c
+++ b/dpkg.c
@@ -804,7 +804,7 @@ extern int dpkg_main(int argc, char **argv)
 
        package_t *p, *packages = NULL;
        void *status = NULL;
-       char opt = 0;
+       int opt = 0;
        int optflag = 0;
 
        while ((opt = getopt(argc, argv, "iruc")) != -1) {
index 5e51fcb709d3a163135d3732c1cbab781d425a23..4ca28bb863068e12277b4ffd383c1966c7790fef 100644 (file)
--- a/insmod.c
+++ b/insmod.c
 #ifndef MODUTILS_MODULE_H
 static const int MODUTILS_MODULE_H = 1;
 
-#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $"
+#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
 
 /* This file contains the structures used by the 2.0 and 2.1 kernels.
    We do not use the kernel headers directly because we do not wish
@@ -347,7 +347,7 @@ int delete_module(const char *);
 #ifndef MODUTILS_OBJ_H
 static const int MODUTILS_OBJ_H = 1;
 
-#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $"
+#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
 
 /* The relocatable object is manipulated using elfin types.  */
 
@@ -374,8 +374,6 @@ static const int MODUTILS_OBJ_H = 1;
 
 #if (defined(__m68k__))                                        
 #define ELFDATAM       ELFDATA2MSB
-#else
-#define ELFDATAM       ELFDATA2LSB
 #endif
 
 
@@ -399,7 +397,7 @@ static const int MODUTILS_OBJ_H = 1;
 #define MATCH_MACHINE(x) (x == EM_PPC)
 #define SHT_RELM       SHT_RELA
 #define Elf32_RelM     Elf32_Rela
-#define ELFDATAM        ELFDATA2MSB
+#define ELFDATAM    ELFDATA2MSB
 
 #elif defined(__mips__)
 
index a9bbdef369f1c0b3b344f112a3bdde72d41bc466..e5a2abe78ca19973754c243679fe2f3e1d97dc7f 100644 (file)
--- a/md5sum.c
+++ b/md5sum.c
@@ -244,7 +244,7 @@ void *md5_finish_ctx(struct md5_ctx *ctx, void *resbuf)
   /* Put the 64-bit file length in *bits* at the end of the buffer.  */
   *(md5_uint32 *) & ctx->buffer[bytes + pad] = SWAP(ctx->total[0] << 3);
   *(md5_uint32 *) & ctx->buffer[bytes + pad + 4] =
-    SWAP((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+    SWAP( ((ctx->total[1] << 3) | (ctx->total[0] >> 29)) );
 
   /* Process last bytes.  */
   md5_process_block(ctx->buffer, bytes + pad + 8, ctx);
index 5e51fcb709d3a163135d3732c1cbab781d425a23..4ca28bb863068e12277b4ffd383c1966c7790fef 100644 (file)
 #ifndef MODUTILS_MODULE_H
 static const int MODUTILS_MODULE_H = 1;
 
-#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $"
+#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
 
 /* This file contains the structures used by the 2.0 and 2.1 kernels.
    We do not use the kernel headers directly because we do not wish
@@ -347,7 +347,7 @@ int delete_module(const char *);
 #ifndef MODUTILS_OBJ_H
 static const int MODUTILS_OBJ_H = 1;
 
-#ident "$Id: insmod.c,v 1.64 2001/05/21 16:09:18 andersen Exp $"
+#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
 
 /* The relocatable object is manipulated using elfin types.  */
 
@@ -374,8 +374,6 @@ static const int MODUTILS_OBJ_H = 1;
 
 #if (defined(__m68k__))                                        
 #define ELFDATAM       ELFDATA2MSB
-#else
-#define ELFDATAM       ELFDATA2LSB
 #endif
 
 
@@ -399,7 +397,7 @@ static const int MODUTILS_OBJ_H = 1;
 #define MATCH_MACHINE(x) (x == EM_PPC)
 #define SHT_RELM       SHT_RELA
 #define Elf32_RelM     Elf32_Rela
-#define ELFDATAM        ELFDATA2MSB
+#define ELFDATAM    ELFDATA2MSB
 
 #elif defined(__mips__)