[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flac-dev
Subject:    Re: [Flac-dev] MinGW Patch
From:       Jean-Baptiste Kempf <jb () videolan ! org>
Date:       2008-08-13 4:33:52
Message-ID: 20080813043352.GA2138 () via ! ecp ! fr
[Download RAW message or body]

Hello,

On Wed, Aug 13, 2008 at 12:23:18AM -0400, will surgent wrote :
> Hello, I was trying to compile Flac on MinGW/Msys but got an error stating
> SIZE_T_MAX is undefined.
We have the same issue here.

> To fix this error I edited the file "flac-1.2.1/include/share/alloc.h" and
> made the following change:
> 
> Starting at line #36 I changed:
> 
> #ifndef SIZE_MAX
> # ifndef SIZE_T_MAX
> #  ifdef _MSC_VER
> #   define SIZE_T_MAX UINT_MAX
> #  else
> #   error
> #  endif
> # endif
> # define SIZE_MAX SIZE_T_MAX
> #endif
> 
> To:
> 
> #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

I however use a different fix:
diff -ur flac-1.2.1/include/share/alloc.h flac/include/share/alloc.h
--- flac-1.2.1/include/share/alloc.h>---2007-09-12 06:32:21.000000000
+0100
+++ flac/include/share/alloc.h>-2007-09-25 20:54:09.000000000 +0100
@@ -28,7 +28,7 @@
*/
-
 #include <limits.h> /* for SIZE_MAX */
-#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__
+#if !defined _MSC_VER && !defined __EMX__
 #include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
 #endif
 #include <stdlib.h> /* for size_t, malloc(), etc */

Best regards,
-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/
_______________________________________________
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