fix build issue on i686-pc-mingw (struct __timeb64 is missing)
authornu774 <honeycomb77@gmail.com>
Sun, 17 Feb 2013 17:05:07 +0000 (02:05 +0900)
committernu774 <honeycomb77@gmail.com>
Sun, 17 Feb 2013 17:05:07 +0000 (02:05 +0900)
configure.ac
src/compat_win32.c

index 9d0ef2e5a8af47d139bf86e463bcf7716d1d9a78..fa9d58796b699a1f52951334eed82d229452e1dc 100644 (file)
@@ -31,6 +31,7 @@ AC_TYPE_UINT8_T
 AC_CHECK_TYPES([ptrdiff_t])
 
 AC_SYS_LARGEFILE
+AC_CHECK_TYPES([struct __timeb64],[],[],[[#include <sys/timeb.h>]])
 AC_FUNC_FSEEKO
 AC_CHECK_FUNCS([sigaction gettimeofday nl_langinfo strdup _vscprintf])
 AC_CHECK_FUNC(getopt_long)
index d65ea5032bd0b7ffd1c0a7a8b4a8abecc8b55d7f..684998e131e1e6fcc3f3fffd8131ca1577cdc9ba 100644 (file)
@@ -31,8 +31,13 @@ int __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, _startupinfo *);
 
 int64_t aacenc_timer(void)
 {
+#if _MSC_VER || HAVE_STRUCT___TIMEB64
     struct __timeb64 tv;
     _ftime64(&tv);
+#else
+    struct timeb tv;
+    ftime(&tv);
+#endif
     return (int64_t)tv.time * 1000 + tv.millitm;
 }
 
This page took 0.011538 seconds and 4 git commands to generate.