Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -1186,10 +1186,11 @@ ;; *) AC_CHECK_TYPE(off64_t, [ AC_DEFINE(OF_HAVE_OFF64_T, 1, [Whether we have off64_t]) + AC_CHECK_FUNCS([lseek64 lstat64 open64 stat64]) ]) ;; esac AC_CHECK_HEADERS([pwd.h grp.h]) Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -221,11 +221,11 @@ flags |= O_BINARY | O_CLOEXEC; # if defined(OF_WINDOWS) if ((handle = _wopen(path.UTF16String, flags, _S_IREAD | _S_IWRITE)) == -1) -# elif defined(OF_HAVE_OFF64_T) +# elif defined(HAVE_OPEN64) if ((handle = open64([path cStringWithEncoding: [OFLocale encoding]], flags, 0666)) == -1) # else if ((handle = open([path cStringWithEncoding: [OFLocale encoding]], flags, 0666)) == -1) @@ -464,11 +464,11 @@ @throw [OFNotOpenException exceptionWithObject: self]; #ifndef OF_AMIGAOS # if defined(OF_WINDOWS) ret = _lseeki64(_handle, offset, whence); -# elif defined(OF_HAVE_OFF64_T) +# elif defined(HAVE_LSEEK64) ret = lseek64(_handle, offset, whence); # else ret = lseek(_handle, offset, whence); # endif Index: src/OFFileURLHandler.m ================================================================== --- src/OFFileURLHandler.m +++ src/OFFileURLHandler.m @@ -87,11 +87,11 @@ # define HAVE_STRUCT_STAT_ST_BIRTHTIME of_time_interval_t st_birthtime; DWORD fileAttributes; # endif } of_stat_t; -#elif defined(OF_HAVE_OFF64_T) +#elif defined(HAVE_STAT64) typedef struct stat64 of_stat_t; #else typedef struct stat of_stat_t; #endif @@ -272,11 +272,11 @@ # ifdef OF_AMIGAOS4 FreeDosObject(DOS_EXAMINEDATA, ed); # endif return 0; -#elif defined(OF_HAVE_OFF64_T) +#elif defined(HAVE_STAT64) return stat64([path cStringWithEncoding: [OFLocale encoding]], buffer); #else return stat([path cStringWithEncoding: [OFLocale encoding]], buffer); #endif } @@ -284,11 +284,11 @@ static int of_lstat(OFString *path, of_stat_t *buffer) { #if defined(HAVE_LSTAT) && !defined(OF_WINDOWS) && !defined(OF_AMIGAOS) && \ !defined(OF_NINTENDO_3DS) && !defined(OF_WII) -# ifdef OF_HAVE_OFF64_T +# ifdef HAVE_LSTAT64 return lstat64([path cStringWithEncoding: [OFLocale encoding]], buffer); # else return lstat([path cStringWithEncoding: [OFLocale encoding]], buffer); # endif #else