summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2011-04-23 17:17:27 +0000
committerFabian Groffen <grobian@gentoo.org>2011-04-23 17:17:27 +0000
commita030c413bd81696a5cb7808ffb31aaa5000fc77c (patch)
treee242b330966634566acf5b8c14155e77818559b4 /mail-mta/ssmtp/files
parentalpha/ia64/sh/sparc/x86 stable wrt #361093 (diff)
downloadhistorical-a030c413bd81696a5cb7808ffb31aaa5000fc77c.tar.gz
historical-a030c413bd81696a5cb7808ffb31aaa5000fc77c.tar.bz2
historical-a030c413bd81696a5cb7808ffb31aaa5000fc77c.zip
Fix compilation on Solaris, fix installation on Prefix
Package-Manager: portage-2.2.01.18252-prefix/cvs/Darwin powerpc
Diffstat (limited to 'mail-mta/ssmtp/files')
-rw-r--r--mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch129
1 files changed, 129 insertions, 0 deletions
diff --git a/mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch b/mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch
new file mode 100644
index 000000000000..cc4ab466e6f0
--- /dev/null
+++ b/mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch
@@ -0,0 +1,129 @@
+Use C99 standard's uint32_t
+
+--- md5auth/md5.h
++++ md5auth/md5.h
+@@ -23,10 +23,12 @@
+ documentation and/or software.
+ */
+
++#include <stdint.h>
++
+ /* 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;
+
+--- md5auth/md5c.c
++++ md5auth/md5c.c
+@@ -46,11 +46,11 @@
+ #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 @@
+ 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 @@
+ index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+
+ /* Update number of bits */
+- if ((context->count[0] += ((u_int32_t)inputLen << 3))
+- < ((u_int32_t)inputLen << 3))
++ if ((context->count[0] += ((uint32_t)inputLen << 3))
++ < ((uint32_t)inputLen << 3))
+ context->count[1]++;
+- context->count[1] += ((u_int32_t)inputLen >> 29);
++ context->count[1] += ((uint32_t)inputLen >> 29);
+
+ partLen = 64 - index;
+
+@@ -184,10 +184,10 @@
+ /* 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 @@
+ 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 @@
+ }
+ }
+
+-/* 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 < len; i++, j += 4)
+- output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
+- (((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
++ output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
++ (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
+ }
+
+ /* Note: Replace "for loop" with standard memcpy if possible.