shithub: sox

Download patch

ref: b110c3bea3ecf032acc4e710e6683b2e5738dfd8
parent: 12bfcf2d4a0bee61b1b1dc3ebdc0fb38db30e325
author: cbagwell <cbagwell>
date: Wed Dec 16 23:22:17 EST 2009

Detect fseeko replacement on mingw.

--- a/configure.ac
+++ b/configure.ac
@@ -180,6 +180,9 @@
   AC_DEFINE(_LARGEFILE_SOURCE, 1)
 fi
 
+dnl Check for mingw's _fseeki64
+AC_CHECK_FUNCS(fseeko64)
+
 dnl Allow libtool to be silenced
 AC_MSG_CHECKING([whether libtool should be silenced])
 AC_ARG_ENABLE(silent-libtool,
--- a/src/util.h
+++ b/src/util.h
@@ -73,6 +73,12 @@
 
 #endif
 
+#if defined(HAVE_FSEEKO64) && !defined(HAVE_FSEEKO)
+#define fseeko fseeko64
+#define ftello ftello64
+#define HAVE_FSEEKO 1
+#endif
+
 #if defined(DOS) || defined(WIN32) || defined(__NT__) || defined(__DJGPP__) || defined(__OS2__)
   #define LAST_SLASH(path) max(strrchr(path, '/'), strrchr(path, '\\'))
   #define IS_ABSOLUTE(path) ((path)[0] == '/' || (path)[0] == '\\' || (path)[1] == ':')