<div dir="ltr"><span class="HcCDpe"><span class="JDpiNd">Thanks Erik!<br>Yep works fine on MinGW - much more elegant too!</span></span><br><br><div class="gmail_quote">On Wed, Aug 13, 2008 at 12:33 AM, Erik de Castro Lopo <span dir="ltr"><<a href="mailto:mle%2Bla@mega-nerd.com">mle+la@mega-nerd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">will surgent wrote:<br>
<br>
> Hello, I was trying to compile Flac on MinGW/Msys but got an error stating<br>
> SIZE_T_MAX is undefined.<br>
> To fix this error I edited the file "flac-1.2.1/include/share/alloc.h" and<br>
> made the following change:<br>
<br>
</div><snip><br>
<div class="Ih2E3d"><br>
> #ifndef SIZE_MAX<br>
> # ifndef SIZE_T_MAX<br>
> # ifdef _MSC_VER<br>
> # define SIZE_T_MAX UINT_MAX<br>
> # elif defined(__MINGW_H)<br>
> # define SIZE_T_MAX UINT_MAX<br>
> # else<br>
> # error<br>
> # endif<br>
> # endif<br>
> # define SIZE_MAX SIZE_T_MAX<br>
> #endif<br>
<br>
</div>Actually, there might be a better fix for this. How about:<br>
<br>
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------<br>
--- include/share/alloc.h 2008-06-29 21:43:05.000000000 +1000<br>
+++ include/share/alloc.h 2008-08-13 14:38:33.000000000 +1000<br>
@@ -28,7 +28,7 @@<br>
*/<br>
<br>
#include <limits.h> /* for SIZE_MAX */<br>
-#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__<br>
+#if HAVE_STDINT_H<br>
#include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */<br>
#endif<br>
#include <stdlib.h> /* for size_t, malloc(), etc */<br>
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------<br>
<br>
Does that work for MinGW?<br>
<div class="Ih2E3d"><br>
> Hope I found the right place to submit this :~)<br>
<br>
</div>Yes.<br>
<br>
Erik<br>
--<br>
-----------------------------------------------------------------<br>
Erik de Castro Lopo<br>
-----------------------------------------------------------------<br>
`If you want a vision of the future, it is a wireless broadband<br>
network feeding requests for foreign money-laundering assistance<br>
into a human temporal lobe, forever. With banner ads.'<br>
-- John M. Ford<br>
_______________________________________________<br>
Flac-dev mailing list<br>
<a href="mailto:Flac-dev@xiph.org">Flac-dev@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/flac-dev" target="_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><br>
</blockquote></div><br></div>