[Flac-dev] Patch : Fix cross-compiling from Linux to windows
Erik de Castro Lopo
mle+la at mega-nerd.com
Fri May 9 21:27:54 PDT 2008
Hi all,
The following patch fixes cross compiling from Linux to windows.
The existing code was doing:
#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__
#include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
#endif
when it seems to make much more sense to just test for the presence
of <stdint.h> and do:
#ifdef HAVE_STDINT_H
#include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
#endif
It is not possible to cross compile from Linux to windows, but the
tests don't currently work. Josh, are you interested in fixing
this? It should be possible to run the tests under Wine.
Cheers,
Erik
cvs diff -u configure.in include/share/alloc.h
Index: configure.in
===================================================================
RCS file: /cvsroot/flac/flac/configure.in,v
retrieving revision 1.151
diff -u -r1.151 configure.in
--- configure.in 28 Feb 2008 05:34:21 -0000 1.151
+++ configure.in 10 May 2008 04:24:21 -0000
@@ -48,6 +48,8 @@
AC_C_BIGENDIAN
+AC_CHECK_HEADERS(stdint.h)
+
AC_CHECK_TYPES(socklen_t, [], [])
dnl check for getopt in standard library
Index: include/share/alloc.h
===================================================================
RCS file: /cvsroot/flac/flac/include/share/alloc.h,v
retrieving revision 1.5
diff -u -r1.5 alloc.h
--- include/share/alloc.h 28 Feb 2008 05:34:25 -0000 1.5
+++ include/share/alloc.h 10 May 2008 04:24:22 -0000
@@ -28,7 +28,7 @@
*/
#include <limits.h> /* for SIZE_MAX */
-#if !defined _MSC_VER && !defined __MINGW32__ && !defined __EMX__
+#ifdef 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 */
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
The Earth is around 70% water. Fish rule the seas.
Humans are over 90% water. It's only a matter of time.
More information about the Flac-dev
mailing list