]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR other/54620 (sha1.c has incorrect math if sizeof(size_t) is 8)
authorKai Tietz <ktietz@redhat.com>
Wed, 30 Jan 2013 16:58:10 +0000 (17:58 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Wed, 30 Jan 2013 16:58:10 +0000 (17:58 +0100)
PR other/54620
PR target/39064
* md5.h (md5_uintptr, md5_uint32): Define as uintptr_t/uint32_t if
stdint.h and sys/types.h headers are present.
* sha1.h (sha1_uintptr, sha1_uint32): Likewise.

From-SVN: r195581

include/ChangeLog
include/md5.h
include/sha1.h

index 3c1d408c13e40ad14f3e6e6d5026901e1f9e1c08..27841522631ce36f473dd5a8f400c5eec4a6ec99 100644 (file)
@@ -1,3 +1,13 @@
+2013-01-30  Kai Tietz  <ktietz@redhat.com>
+
+       Merged from trunk.
+
+       PR other/54620
+       PR target/39064
+       * md5.h (md5_uintptr, md5_uint32): Define as uintptr_t/uint32_t if
+       stdint.h and sys/types.h headers are present.
+       * sha1.h (sha1_uintptr, sha1_uint32): Likewise.
+
 2012-03-01  Release Manager
 
        * GCC 4.6.3 released.
index b3ff4e14538dc67c3a07d16db7ff057c6359553e..6da2fefe16111371306705a6e71a3abfadafced2 100644 (file)
 # include <sys/types.h>
 typedef u_int32_t md5_uint32;
 typedef uintptr_t md5_uintptr;
+#elif defined (HAVE_SYS_TYPES_H) && defined (HAVE_STDINT_H)
+#include <stdint.h>
+#include <sys/types.h>
+typedef uint32_t md5_uint32;
+typedef uintptr_t md5_uintptr;
 #else
 #  define INT_MAX_32_BITS 2147483647
 
index 5473f91f412b9a6fc0bfc2e9af3dbfef90012640..4da5c37f38674a392dbe84627a6c2908ec851ae6 100644 (file)
 # include <sys/types.h>
 typedef u_int32_t sha1_uint32;
 typedef uintptr_t sha1_uintptr;
+#elif defined (HAVE_SYS_TYPES_H) && defined (HAVE_STDINT_H)
+#include <stdint.h>
+#include <sys/types.h>
+typedef uint32_t sha1_uint32;
+typedef uintptr_t sha1_uintptr;
 #else
 #  define INT_MAX_32_BITS 2147483647