md5.h of libiberty assumes unsigned long to be of equal size to the size of a pointer, but that isn't true for all sys tems (ie. win64). this patch is a workaround for that, probably ugly, but md5.h should include stdint.h not for _LIBC only.. here is the generated warning: ../../../gcc-svn/libiberty/md5.c: In function 'md5_process_bytes': ../../../gcc-svn/libiberty/md5.c:234: warning: cast from pointer to integer of different size (the patch should also be applied to binutils and gdb, or whoever else uses libiberty)
Created attachment 17223 [details] libiberty md5.h win64 patch
http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00638.html
The discussion thread at http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00778.html still haven't provide a solution for this one even after the recent build system changes.. Will md5.h, splay-tree.h and sha1.h be modified to use autotools support, or, should the suggested patch be applied to md5.h?
*** Bug 46464 has been marked as a duplicate of this bug. ***
Author: ktietz Date: Wed Jan 30 16:50:49 2013 New Revision: 195579 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195579 Log: 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. Modified: trunk/include/ChangeLog trunk/include/md5.h trunk/include/sha1.h
Author: ktietz Date: Wed Jan 30 16:56:36 2013 New Revision: 195580 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195580 Log: 2013-01-30 Kai Tietz <ktietz@redhat.com> 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. Modified: branches/gcc-4_7-branch/include/ChangeLog branches/gcc-4_7-branch/include/md5.h branches/gcc-4_7-branch/include/sha1.h
Author: ktietz Date: Wed Jan 30 16:58:10 2013 New Revision: 195581 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195581 Log: 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. Modified: branches/gcc-4_6-branch/include/ChangeLog branches/gcc-4_6-branch/include/md5.h branches/gcc-4_6-branch/include/sha1.h
Fixed