Revert "Update libFLAC - not portable enough"

This reverts commit b3219b2766.
This commit is contained in:
twinaphex 2017-09-05 22:13:05 +02:00
parent 2d9fd15236
commit 5dc25ce8e5
3 changed files with 3 additions and 10 deletions

View File

@ -50,6 +50,7 @@
/* Whatever other unix that has sys/param.h */
#elif defined(HAVE_SYS_PARAM_H)
#include <sys/param.h>
#define flac_max(a,b) MAX(a,b)
#define flac_min(a,b) MIN(a,b)

View File

@ -144,7 +144,7 @@
# endif
#endif /* defined _MSC_VER */
#ifdef _WIN32
#if defined(_WIN32) && defined(NEED_UTF8_SUPPORT)
/* All char* strings are in UTF-8 format. Added to support Unicode files on Windows */
#include "share/win_utf8_io.h"
@ -175,7 +175,7 @@
#endif
#ifdef _WIN32
#if defined _MSC_VER
#define flac_stat_s __stat64 /* stat struct */
#define flac_fstat _fstat64
#else

View File

@ -3356,11 +3356,7 @@ FLAC__StreamDecoderSeekStatus file_seek_callback_(const FLAC__StreamDecoder *dec
if(decoder->private_->file == stdin)
return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED;
#ifdef __CELLOS_LV2__
else if(fseek(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0)
#else
else if(fseeko(decoder->private_->file, (FLAC__off_t)absolute_byte_offset, SEEK_SET) < 0)
#endif
return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
else
return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
@ -3373,11 +3369,7 @@ FLAC__StreamDecoderTellStatus file_tell_callback_(const FLAC__StreamDecoder *dec
if(decoder->private_->file == stdin)
return FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED;
#ifdef __CELLOS_LV2__
else if((pos = ftell(decoder->private_->file)) < 0)
#else
else if((pos = ftello(decoder->private_->file)) < 0)
#endif
return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;
else {
*absolute_byte_offset = (FLAC__uint64)pos;