mirror of
https://github.com/mpv-player/mpv
synced 2025-03-31 15:59:34 +00:00
win32: remove an unneeded mechanism
Instead of relying on the macro-defined lseek(), just use _lseeki64 directly, and avoid a minor mess.
This commit is contained in:
parent
2458f0628e
commit
76af31b0eb
@ -17,8 +17,6 @@
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with mplayer2. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#define MP_HIDE_IO_REPLACEMENTS
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
@ -428,7 +426,7 @@ off_t mp_lseek(int fd, off_t offset, int whence)
|
||||
errno = ESPIPE;
|
||||
return (off_t)-1;
|
||||
}
|
||||
return lseek(fd, offset, whence);
|
||||
return _lseeki64(fd, offset, whence);
|
||||
}
|
||||
|
||||
#endif // __MINGW32__
|
||||
|
@ -124,15 +124,13 @@ void mp_globfree(mp_glob_t *pglob);
|
||||
#define tmpfile(...) mp_tmpfile(__VA_ARGS__)
|
||||
#define getenv(...) mp_getenv(__VA_ARGS__)
|
||||
|
||||
// Things MinGW defines as macros, and which we want to override only for the
|
||||
// user, and not io.c (which wants the original definition).
|
||||
#ifndef MP_HIDE_IO_REPLACEMENTS
|
||||
#undef lseek
|
||||
#define lseek(...) mp_lseek(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// Affects both "stat()" and "struct stat".
|
||||
#undef stat
|
||||
#define stat mp_stat
|
||||
|
||||
#undef fstat
|
||||
#define fstat(...) mp_fstat(__VA_ARGS__)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user