<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Use C99 standard's uint32_t

Index: ssmtp-2.64/md5auth/md5.h
===================================================================
--- ssmtp-2.64.orig/md5auth/md5.h
+++ ssmtp-2.64/md5auth/md5.h
@@ -23,10 +23,12 @@ These notices must be retained in any co
 documentation and/or software.
  */
 
+#include &lt;stdint.h&gt;
+
 /* MD5 context. */
 typedef struct {
-  u_int32_t state[4];                                   /* state (ABCD) */
-  u_int32_t count[2];        /* number of bits, modulo 2^64 (lsb first) */
+  uint32_t state[4];                                   /* state (ABCD) */
+  uint32_t count[2];        /* number of bits, modulo 2^64 (lsb first) */
   unsigned char buffer[64];                         /* input buffer */
 } MD5_CTX;
 
Index: ssmtp-2.64/md5auth/md5c.c
===================================================================
--- ssmtp-2.64.orig/md5auth/md5c.c
+++ ssmtp-2.64/md5auth/md5c.c
@@ -46,11 +46,11 @@ documentation and/or software.
 #define S43 15
 #define S44 21
 
-static void MD5Transform PROTO_LIST ((u_int32_t [4], unsigned char [64]));
+static void MD5Transform PROTO_LIST ((uint32_t [4], unsigned char [64]));
 static void Encode PROTO_LIST
-  ((unsigned char *, u_int32_t *, unsigned int));
+  ((unsigned char *, uint32_t *, unsigned int));
 static void Decode PROTO_LIST
-  ((u_int32_t *, unsigned char *, unsigned int));
+  ((uint32_t *, unsigned char *, unsigned int));
 static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
 static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
 
@@ -75,22 +75,22 @@ static unsigned char PADDING[64] = {
 Rotation is separate from addition to prevent recomputation.
  */
 #define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += F ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
 #define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += G ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
 #define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += H ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
 #define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
+ (a) += I ((b), (c), (d)) + (x) + (uint32_t)(ac); \
  (a) = ROTATE_LEFT ((a), (s)); \
  (a) += (b); \
   }
@@ -124,10 +124,10 @@ unsigned int inputLen;
   index = (unsigned int)((context-&gt;count[0] &gt;&gt; 3) &amp; 0x3F);
 
   /* Update number of bits */
-  if ((context-&gt;count[0] += ((u_int32_t)inputLen &lt;&lt; 3))
-   &lt; ((u_int32_t)inputLen &lt;&lt; 3))
+  if ((context-&gt;count[0] += ((uint32_t)inputLen &lt;&lt; 3))
+   &lt; ((uint32_t)inputLen &lt;&lt; 3))
  context-&gt;count[1]++;
-  context-&gt;count[1] += ((u_int32_t)inputLen &gt;&gt; 29);
+  context-&gt;count[1] += ((uint32_t)inputLen &gt;&gt; 29);
 
   partLen = 64 - index;
 
@@ -184,10 +184,10 @@ MD5_CTX *context;
 /* MD5 basic transformation. Transforms state based on block.
  */
 static void MD5Transform (state, block)
-u_int32_t state[4];
+uint32_t state[4];
 unsigned char block[64];
 {
-  u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+  uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
 
   Decode (x, block, 64);
 
@@ -273,12 +273,12 @@ unsigned char block[64];
   MD5_memset ((POINTER)x, 0, sizeof (x));
 }
 
-/* Encodes input (u_int32_t) into output (unsigned char). Assumes len is
+/* Encodes input (uint32_t) into output (unsigned char). Assumes len is
   a multiple of 4.
  */
 static void Encode (output, input, len)
 unsigned char *output;
-u_int32_t *input;
+uint32_t *input;
 unsigned int len;
 {
   unsigned int i, j;
@@ -291,19 +291,19 @@ unsigned int len;
   }
 }
 
-/* Decodes input (unsigned char) into output (u_int32_t). Assumes len is
+/* Decodes input (unsigned char) into output (uint32_t). Assumes len is
   a multiple of 4.
  */
 static void Decode (output, input, len)
-u_int32_t *output;
+uint32_t *output;
 unsigned char *input;
 unsigned int len;
 {
   unsigned int i, j;
 
   for (i = 0, j = 0; j &lt; len; i++, j += 4)
- output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) &lt;&lt; 8) |
-   (((u_int32_t)input[j+2]) &lt;&lt; 16) | (((u_int32_t)input[j+3]) &lt;&lt; 24);
+ output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) &lt;&lt; 8) |
+   (((uint32_t)input[j+2]) &lt;&lt; 16) | (((uint32_t)input[j+3]) &lt;&lt; 24);
 }
 
 /* Note: Replace "for loop" with standard memcpy if possible.
</pre></body></html>