mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Fix a couple of Windows 2Gig file size issues.
Patch submitted by Janne Hyvärinen <cse@sci.fi>.
This commit is contained in:
@@ -48,20 +48,13 @@
|
||||
|
||||
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#if !defined __MINGW32__ /* @@@ [2G limit] */
|
||||
#ifndef fseeko
|
||||
#define fseeko fseek
|
||||
#endif
|
||||
#ifndef ftello
|
||||
#define ftello ftell
|
||||
#define FLAC__off_t __int64 /* use this instead of off_t to fix the 2 GB limit */
|
||||
#if !defined __MINGW32__
|
||||
#define fseeko _fseeki64
|
||||
#define ftello _ftelli64
|
||||
#endif
|
||||
#else
|
||||
/* MinGW */
|
||||
#if !defined(HAVE_FSEEKO)
|
||||
# define fseeko fseeko64
|
||||
# define ftello ftello64
|
||||
#endif
|
||||
#endif
|
||||
#define FLAC__off_t off_t
|
||||
#endif
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
|
||||
@@ -31,13 +31,14 @@
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#include <stdio.h> /* for FILE */
|
||||
#include "FLAC/ordinals.h"
|
||||
#include "share/compat.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void grabbag__file_copy_metadata(const char *srcpath, const char *destpath);
|
||||
off_t grabbag__file_get_filesize(const char *srcpath);
|
||||
FLAC__off_t grabbag__file_get_filesize(const char *srcpath);
|
||||
const char *grabbag__file_get_basename(const char *srcpath);
|
||||
|
||||
/* read_only == false means "make file writable by user"
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
|
||||
#include "FLAC/format.h"
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#include "share/compat.h"
|
||||
|
||||
extern const long file_utils__ogg_serial_number;
|
||||
|
||||
FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_filename, off_t *output_filesize, unsigned length, const FLAC__StreamMetadata *streaminfo, FLAC__StreamMetadata **metadata, unsigned num_metadata);
|
||||
FLAC__bool file_utils__generate_flacfile(FLAC__bool is_ogg, const char *output_filename, FLAC__off_t *output_filesize, unsigned length, const FLAC__StreamMetadata *streaminfo, FLAC__StreamMetadata **metadata, unsigned num_metadata);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user