I think it would be better to use intptr_t from stdint.h instead of defining your own. And even Visual C++ has stdint.h.



On Thu, Aug 21, 2014 at 8:02 AM, Copy Liu <copyliu@gmail.com> wrote:
hello all,
in mingw-w64_x86_64 gcc , will not define _AMD64_ but WIN64 and __amd64__
so if timidity compile with mingw-w64 x86_x64, may need this patch,

diff --git a/timidity/sysdep.h b/timidity/sysdep.h
--- a/timidity/sysdep.h
+++ b/timidity/sysdep.h
@@ -148,7 +148,7 @@ typedef UInt64 uint64;
 #endif /* C99 */
 
 /*  pointer size is not long in   WIN64 */
-#if defined(WIN32)  && defined(_AMD64_)
+#if defined(WIN32)  && (defined(_AMD64_) || defined(WIN64) || defined(__amd64__))
 typedef long long  ptr_size_t;
 typedef unsigned long long  u_ptr_size_t;
 #else


if load a huge soundfont eg: http://sonimusicae.free.fr/matshelgesson-maestro-en.html (gig format,convert to sf2 with extreme Sample Converter  ), it may cause a Segmentation fault,
in playmidi.c:note_on_prescan and playmidi.c:note_on function:
int vlist[32] is not enough and cause overflow in select_play_sample()


thanks
--
My GPG public key : 0xB186FF6D

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Timidity-devel mailing list
Timidity-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/timidity-devel