pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/mutt



Module Name:    pkgsrc
Committed By:   otis
Date:           Wed Nov 11 18:57:15 UTC 2020

Modified Files:
        pkgsrc/mail/mutt: distinfo
Added Files:
        pkgsrc/mail/mutt/patches: patch-mutt__random.c

Log Message:
mutt: Fix build on platforms without u_int32_t


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 pkgsrc/mail/mutt/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/mutt/patches/patch-mutt__random.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/mutt/distinfo
diff -u pkgsrc/mail/mutt/distinfo:1.86 pkgsrc/mail/mutt/distinfo:1.87
--- pkgsrc/mail/mutt/distinfo:1.86      Sun Nov  8 17:42:45 2020
+++ pkgsrc/mail/mutt/distinfo   Wed Nov 11 18:57:15 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.86 2020/11/08 17:42:45 tron Exp $
+$NetBSD: distinfo,v 1.87 2020/11/11 18:57:15 otis Exp $
 
 SHA1 (mutt-2.0.0.tar.gz) = 2554e214f2f0e6ff148a33805af6b00bb57ee988
 RMD160 (mutt-2.0.0.tar.gz) = 778578909487e7182dd0418416e63a002832ca6b
@@ -9,3 +9,4 @@ SHA1 (patch-color.c) = 69964830c13d4113e
 SHA1 (patch-configure) = cbd7ff52b0b358fff41988d286267046f56ee8d5
 SHA1 (patch-doc_Makefile.in) = 8086887afeec554d0c78047a48ec3eb33d38f26c
 SHA1 (patch-lib.h) = f10c32fc891a3c70c7379e092159e207b6c27b8b
+SHA1 (patch-mutt__random.c) = 73a9a4fd24b8cf4f6354930d2c7dd91d29d46231

Added files:

Index: pkgsrc/mail/mutt/patches/patch-mutt__random.c
diff -u /dev/null pkgsrc/mail/mutt/patches/patch-mutt__random.c:1.1
--- /dev/null   Wed Nov 11 18:57:15 2020
+++ pkgsrc/mail/mutt/patches/patch-mutt__random.c       Wed Nov 11 18:57:15 2020
@@ -0,0 +1,29 @@
+$NetBSD: patch-mutt__random.c,v 1.1 2020/11/11 18:57:15 otis Exp $
+
+Cast to more portable C99 uint32_t
+
+--- mutt_random.c.orig 2020-11-03 17:50:37.000000000 +0000
++++ mutt_random.c
+@@ -29,7 +29,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ 
+-static u_int32_t z[4]; /* Keep state for LFRS113 PRNG */
++static uint32_t z[4]; /* Keep state for LFRS113 PRNG */
+ static int rand_bytes_produced = 0;
+ static time_t time_last_reseed = 0;
+ 
+@@ -92,11 +92,11 @@ void mutt_reseed (void)
+    * Use as many of the lower order bits from the current time of day as the seed.
+    * If the upper bound is truncated, that is fine.
+    *
+-   * tv_sec is integral of type integer or float.  Cast to 'u_int32_t' before
++   * tv_sec is integral of type integer or float.  Cast to 'uint32_t' before
+    * bitshift in case it is a float. */
+ 
+   /* Finally, set our seeds */
+-  z[0] ^= (((u_int32_t) tv.tv_sec << 20) | tv.tv_usec);
++  z[0] ^= (((uint32_t) tv.tv_sec << 20) | tv.tv_usec);
+   z[1] ^= getpid ()                             ^ z[0];
+   z[2] ^= getppid ()                            ^ z[0];
+   z[3] ^= (intptr_t) &z[3] ^ time_last_reseed   ^ z[0];



Home | Main Index | Thread Index | Old Index