[prev in list] [next in list] [prev in thread] [next in thread]
List: flac-dev
Subject: Re: [Flac-dev] MinGW Patch
From: "will surgent" <willeom () gmail ! com>
Date: 2008-08-13 15:50:42
Message-ID: c43b24a20808130850n608cf1f1i2ca2368d3261ed7 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Thanks Erik!
Yep works fine on MinGW - much more elegant too!
On Wed, Aug 13, 2008 at 12:33 AM, Erik de Castro Lopo
<mle+la@mega-nerd.com<mle%2Bla@mega-nerd.com>
> wrote:
> will surgent wrote:
>
> > Hello, I was trying to compile Flac on MinGW/Msys but got an error
> stating
> > SIZE_T_MAX is undefined.
> > To fix this error I edited the file "flac-1.2.1/include/share/alloc.h"
> and
> > made the following change:
>
> <snip>
>
> > #ifndef SIZE_MAX
> > # ifndef SIZE_T_MAX
> > # ifdef _MSC_VER
> > # define SIZE_T_MAX UINT_MAX
> > # elif defined(__MINGW_H)
> > # define SIZE_T_MAX UINT_MAX
> > # else
> > # error
> > # endif
> > # endif
> > # define SIZE_MAX SIZE_T_MAX
> > #endif
>
> Actually, there might be a better fix for this. How about:
>
> -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
> --- include/share/alloc.h 2008-06-29 21:43:05.000000000 +1000
> +++ include/share/alloc.h 2008-08-13 14:38:33.000000000 +1000
> @@ -28,7 +28,7 @@
> */
>
> #include <limits.h> /* for SIZE_MAX */
> -#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__
> +#if HAVE_STDINT_H
> #include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
> #endif
> #include <stdlib.h> /* for size_t, malloc(), etc */
> -------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
>
> Does that work for MinGW?
>
> > Hope I found the right place to submit this :~)
>
> Yes.
>
> Erik
> --
> -----------------------------------------------------------------
> Erik de Castro Lopo
> -----------------------------------------------------------------
> `If you want a vision of the future, it is a wireless broadband
> network feeding requests for foreign money-laundering assistance
> into a human temporal lobe, forever. With banner ads.'
> -- John M. Ford
> _______________________________________________
> Flac-dev mailing list
> Flac-dev@xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
>
[Attachment #5 (text/html)]
<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>
_______________________________________________
Flac-dev mailing list
Flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic