]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use standard uint32_t type instead of uint32
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 13 Dec 2009 16:03:46 +0000 (17:03 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 5 Jan 2010 17:53:04 +0000 (18:53 +0100)
ccache.h
manifest.c
mdfour.c
mdfour.h

index a111c18fa9127e5ad090edf48c280b738847160f..ad2d9d448daff3bffdf07c8fae31f7af60aadab5 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -79,8 +79,6 @@ enum stats {
        STATS_END
 };
 
-typedef unsigned uint32;
-
 #include "mdfour.h"
 
 void hash_start(struct mdfour *md);
index c61a0fe221453a5bf13f0b1c15457402076d3bb6..9a17113341a705e8ff08eb9576e003d5f76f6fa1 100644 (file)
@@ -420,11 +420,11 @@ static uint32_t get_include_file_index(struct manifest *mf,
        return n;
 }
 
-static uint32 get_file_hash_index(struct manifest *mf,
-                                 char *path,
-                                 struct file_hash *file_hash,
-                                 struct hashtable *mf_files,
-                                 struct hashtable *mf_file_infos)
+static uint32_t get_file_hash_index(struct manifest *mf,
+                                   char *path,
+                                   struct file_hash *file_hash,
+                                   struct hashtable *mf_files,
+                                   struct hashtable *mf_file_infos)
 {
        struct file_info fi;
        uint32_t *fi_index;
index b54c5f66be0199302292e34c0e326d964d86478a..3091cc3aee6b5fed324154ec2fd0ba70262e0a03 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -38,10 +38,10 @@ static struct mdfour *m;
 #define ROUND3(a,b,c,d,k,s) a = lshift((a + H(b,c,d) + M[k] + 0x6ED9EBA1)&MASK32,s)
 
 /* this applies md4 to 64 byte chunks */
-static void mdfour64(uint32 *M)
+static void mdfour64(uint32_t *M)
 {
-       uint32 AA, BB, CC, DD;
-       uint32 A,B,C,D;
+       uint32_t AA, BB, CC, DD;
+       uint32_t A,B,C,D;
 
        A = m->A; B = m->B; C = m->C; D = m->D;
        AA = A; BB = B; CC = C; DD = D;
@@ -83,7 +83,7 @@ static void mdfour64(uint32 *M)
        m->A = A; m->B = B; m->C = C; m->D = D;
 }
 
-static void copy64(uint32 *M, const unsigned char *in)
+static void copy64(uint32_t *M, const unsigned char *in)
 {
        int i;
 
@@ -92,7 +92,7 @@ static void copy64(uint32 *M, const unsigned char *in)
                        (in[i*4+1]<<8) | (in[i*4+0]<<0);
 }
 
-static void copy4(unsigned char *out,uint32 x)
+static void copy4(unsigned char *out, uint32_t x)
 {
        out[0] = x&0xFF;
        out[1] = (x>>8)&0xFF;
@@ -114,8 +114,8 @@ void mdfour_begin(struct mdfour *md)
 static void mdfour_tail(const unsigned char *in, int n)
 {
        unsigned char buf[128];
-       uint32 M[16];
-       uint32 b;
+       uint32_t M[16];
+       uint32_t b;
 
        m->totalN += n;
 
@@ -140,7 +140,7 @@ static void mdfour_tail(const unsigned char *in, int n)
 
 void mdfour_update(struct mdfour *md, const unsigned char *in, int n)
 {
-       uint32 M[16];
+       uint32_t M[16];
 
        m = md;
 
index 17dc826059c19de9f33c9c41e20cecaa17e3a7a0..e31eeacd163f0dfa81c2e2a26cd46e9b19b2c499 100644 (file)
--- a/mdfour.h
+++ b/mdfour.h
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#ifndef MDFOUR_H
+#define MDFOUR_H
+
+#include <inttypes.h>
+
 struct mdfour {
-       uint32 A, B, C, D;
-       uint32 totalN;
+       uint32_t A, B, C, D;
+       uint32_t totalN;
        unsigned char tail[64];
        unsigned tail_len;
 };
@@ -30,3 +35,5 @@ void mdfour_begin(struct mdfour *md);
 void mdfour_update(struct mdfour *md, const unsigned char *in, int n);
 void mdfour_result(struct mdfour *md, unsigned char *out);
 void mdfour(unsigned char *out, const unsigned char *in, int n);
+
+#endif