-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01.04.2013 16:26, LRN wrote: > On 01.04.2013 14:40, Erik de Castro Lopo wrote: >> Hi all, > >> The latest pre-release is here: > >> http://downloads.xiph.org/releases/flac/beta/flac-1.3.0pre3.tar.xz > >> > flac-1.3.0pre3/include/share/compat.h:146:31: fatal error: > share/win_utf8_io.h: No such file or directory > OK, i downloaded that one from git, now i get a different problem: flac-1.3.0pre3/include/share/win_utf8_io.h:23:43: warning: 'struct _stat64' declared inside parameter list [enabled by default] flac-1.3.0pre3/include/share/win_utf8_io.h:23:43: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] flac-1.3.0pre3/src/share/grabbag/file.c: In function 'grabbag__file_copy_metadata': flac-1.3.0pre3/src/share/grabbag/file.c:53:21: error: storage size of 'srcstat' isn't known
AFAIU, mingw.org headers don't have _stat64 struct at all, they have __stat64 instead. _stat64 is from mingw-w64 headers (mingw-w64 has a #define __stat64 _stat64, so using __stat64 should work). You also need to define __MSVCRT_VERSION__=0x0601, because that is the condition on which mingw.org will define __stat64 structure and _stat64() function. Here are the patches. With these flac should compile with both mingw.org and mingw-w64 (tried both). I didn't run the testsuite though. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRWYkDAAoJEOs4Jb6SI2CwDL4H/1fKxEvO0Pd6X6FAGQPlKN+l UMoWNSAD+IaVzJ7G5j6Guh8LZPn56FuFLC83JeQfn88fdQu4qmQC3sxofJ2juxmM QIcqzyX6cxSIAkWnorAXNCBHN+nozC0WOU1LvY10DDLIyF/Wgslq7gklJmxRrSlh Aq5vrtMWJ6ClElgD8J3D75SJ626BLs2yYuTlbhBayOm6CdmQIl62IIQG1n4T52z5 8kxZxKdzQYjbZvYHKsdvrYXZv0mLk0WMgNgODbBN8U6sxwGKtWi7p3JmtUpfO9Ln oo727weN8kBW0jzg2RcsyZpvRbbQ4ww/58aR/X/1gW3t2dd4B0Kidg4HJB192pE= =YcvV -----END PGP SIGNATURE-----
--- flac-1.3.0pre3/configure.ac.orig 2013-04-01 17:09:45 +0400 +++ flac-1.3.0pre3/configure.ac 2013-04-01 17:10:21 +0400 @@ -129,6 +129,7 @@ *-*-cygwin|*mingw*|*emx*) # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2 LT_NO_UNDEFINED="-no-undefined" + CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS" os_is_windows=yes ;; *)
--- flac-1.3.0pre3/include/share/compat.h.orig 2013-04-01 16:24:18 +0400 +++ flac-1.3.0pre3/include/share/compat.h 2013-04-01 16:38:23 +0400 @@ -175,7 +175,7 @@ #endif #ifdef _WIN32 -#define flac_stat_s _stat64 /* stat struct */ +#define flac_stat_s __stat64 /* stat struct */ #define flac_fstat _fstat64 #else #define flac_stat_s stat /* stat struct */ --- flac-1.3.0pre3/include/share/win_utf8_io.h.orig 2013-04-01 16:32:02 +0400 +++ flac-1.3.0pre3/include/share/win_utf8_io.h 2013-04-01 16:39:09 +0400 @@ -20,7 +20,7 @@ FILE *fopen_utf8(const char *filename, const char *mode); int stat_utf8(const char *path, struct stat *buffer); -int _stat64_utf8(const char *path, struct _stat64 *buffer); +int _stat64_utf8(const char *path, struct __stat64 *buffer); int chmod_utf8(const char *filename, int pmode); int utime_utf8(const char *filename, struct utimbuf *times); int unlink_utf8(const char *filename); --- flac-1.3.0pre3/src/share/win_utf8_io/win_utf8_io.c.orig 2013-04-01 16:24:18 +0400 +++ flac-1.3.0pre3/src/share/win_utf8_io/win_utf8_io.c 2013-04-01 16:39:34 +0400 @@ -182,7 +182,7 @@ return f; } -int _stat64_utf8(const char *path, struct _stat64 *buffer) +int _stat64_utf8(const char *path, struct __stat64 *buffer) { wchar_t *wpath; int ret;
_______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev