mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
try to limit the #defines (of fseeko to fseek and ftello to ftell) to just the versions of MSVC that appear not to have fseeko()/ftello()
This commit is contained in:
@@ -28,10 +28,11 @@
|
||||
#endif
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#include <sys/types.h> /* for off_t */
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <math.h> /* for floor() */
|
||||
#include <stdio.h> /* for FILE etc. */
|
||||
@@ -647,7 +648,7 @@ FLAC__bool write_iff_headers(FILE *f, DecoderSession *decoder_session, FLAC__uin
|
||||
if(!write_little_endian_uint32(f, decoder_session->sample_rate))
|
||||
return false;
|
||||
|
||||
if(!write_little_endian_uint32(f, decoder_session->sample_rate * decoder_session->channels * ((decoder_session->bps+7) / 8))) /* @@@ or is it (sample_rate*channels*bps) / 8 ??? */
|
||||
if(!write_little_endian_uint32(f, decoder_session->sample_rate * decoder_session->channels * ((decoder_session->bps+7) / 8)))
|
||||
return false;
|
||||
|
||||
if(!write_little_endian_uint16(f, (FLAC__uint16)(decoder_session->channels * ((decoder_session->bps+7) / 8)))) /* block align */
|
||||
|
||||
@@ -28,10 +28,11 @@
|
||||
#endif
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#include <sys/types.h> /* for off_t */
|
||||
//@@@@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <limits.h> /* for LONG_MAX */
|
||||
#include <math.h> /* for floor() */
|
||||
|
||||
@@ -42,9 +42,10 @@
|
||||
#include <sys/utime.h> /* for utime() */
|
||||
#include <io.h> /* for chmod() */
|
||||
#include <sys/types.h> /* for off_t */
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#else
|
||||
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
|
||||
#include <utime.h> /* for utime() */
|
||||
|
||||
@@ -47,10 +47,11 @@
|
||||
#include <sys/stat.h> /* for stat() */
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
/*@@@ [2G limit] hacks for MSVC6 */
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "FLAC/assert.h"
|
||||
#include "protected/stream_decoder.h"
|
||||
#include "private/bitbuffer.h"
|
||||
|
||||
@@ -50,10 +50,11 @@
|
||||
#include <string.h> /* for memcpy() */
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
/*@@@ [2G limit] hacks for MSVC6 */
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "FLAC/assert.h"
|
||||
#include "FLAC/stream_decoder.h"
|
||||
#include "protected/stream_encoder.h"
|
||||
|
||||
@@ -46,10 +46,11 @@
|
||||
#include <sys/stat.h> /* for stat() */
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
/*@@@ [2G limit] hacks for MSVC6 */
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "FLAC/assert.h"
|
||||
#include "protected/stream_decoder.h"
|
||||
#include "../libFLAC/include/private/float.h" /* @@@ ugly hack, but how else to do? we need to reuse the float formats but don't want to expose it */
|
||||
|
||||
@@ -46,10 +46,11 @@
|
||||
#include <string.h> /* for memcpy() */
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
/*@@@@@@ [2G limit] hacks for MSVC6 */
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "FLAC/assert.h"
|
||||
#include "OggFLAC/stream_encoder.h"
|
||||
#include "protected/stream_encoder.h"
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "decoders.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "FLAC/metadata.h" // for ::FLAC__metadata_object_is_equal()
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#include <sys/utime.h> /* for utime() */
|
||||
#include <io.h> /* for chmod() */
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#else
|
||||
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
|
||||
#include <utime.h> /* for utime() */
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "decoders.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "FLAC/stream_decoder.h"
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
#include <sys/utime.h> /* for utime() */
|
||||
#include <io.h> /* for chmod() */
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#else
|
||||
#include <sys/types.h> /* some flavors of BSD (like OS X) require this to get time_t */
|
||||
#include <utime.h> /* for utime() */
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "decoders.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "FLAC/metadata.h" // for ::FLAC__metadata_object_is_equal()
|
||||
|
||||
@@ -25,10 +25,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined _MSC_VER || defined __MINGW32__
|
||||
//@@@ [2G limit] hacks for MSVC6
|
||||
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
|
||||
#define fseeko fseek
|
||||
#define ftello ftell
|
||||
#endif
|
||||
#endif
|
||||
#include "decoders.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "OggFLAC/stream_decoder.h"
|
||||
@@ -36,7 +37,7 @@
|
||||
#include "test_libs_common/file_utils_oggflac.h"
|
||||
#include "test_libs_common/metadata_utils.h"
|
||||
|
||||
//@@@@@@ this is almost exactly like test_libFLAC/decoders.c, maybe should consolidate some stuff liek client data and callbacks
|
||||
//@@@@@@ this is almost exactly like test_libFLAC/decoders.c, maybe should consolidate some stuff like client data and callbacks
|
||||
typedef enum {
|
||||
LAYER_STREAM = 0, /* FLAC__stream_decoder_init_stream() without seeking */
|
||||
LAYER_SEEKABLE_STREAM, /* FLAC__stream_decoder_init_stream() with seeking */
|
||||
|
||||
Reference in New Issue
Block a user