diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-07-06 14:19:04 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-07-06 14:19:04 +0400 |
commit | 11645e7a3f482b24294f360985d60cd9b100f55f (patch) | |
tree | 25b6ed24423fa442460d02717fbebd056809f279 /source/blender/blenlib/BLI_winstuff.h | |
parent | 29f2cbdd8f9cd99b30b967af45304a64a317d05d (diff) |
Fix #27877: writing .avi files > 4 GB not working on windows.
Solution is to replace "long" by "int64_t" and "fseek" by "_fseeki64", because
long on 64 bit windows is still 32 bit.
Diffstat (limited to 'source/blender/blenlib/BLI_winstuff.h')
-rw-r--r-- | source/blender/blenlib/BLI_winstuff.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index d0eb3c7d67d..e0c819c2dba 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -98,6 +98,15 @@ extern "C" { typedef unsigned int mode_t; #endif +/* use functions that take a 64 bit offset for files larger than 4GB */ +#ifndef FREE_WINDOWS +#include <stdio.h> +#define fseek(stream, offset, origin) _fseeki64(stream, offset, origin) +#define ftell(stream) _ftelli64(stream) +#define lseek(fd, offset, origin) _lseeki64(fd, offset, origin) +#define tell(fd) _telli64(fd) +#endif + /* mingw using _SSIZE_T_ to declare ssize_t type */ #ifndef _SSIZE_T_ #define _SSIZE_T_ |