This commit is contained in:
Josh Coalson 2006-11-21 01:51:58 +00:00
parent 1572378f65
commit 2beca73003
7 changed files with 15 additions and 11 deletions

View File

@ -179,7 +179,7 @@ namespace FLAC {
/// see FLAC__StreamDecoderErrorCallback
virtual void error_callback(::FLAC__StreamDecoderErrorStatus status) = 0;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96))) || (defined __SUNPRO_CC)
#if (defined _MSC_VER) || (defined __BORLANDC__) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96))) || (defined __SUNPRO_CC)
// lame hack: some MSVC/GCC versions can't see a protected decoder_ from nested State::resolved_as_cstring()
friend State;
#endif

View File

@ -192,7 +192,7 @@ namespace FLAC {
/// See FLAC__StreamEncoderTellCallback
virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96))) || (defined __SUNPRO_CC)
#if (defined _MSC_VER) || (defined __BORLANDC__) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96))) || (defined __SUNPRO_CC)
// lame hack: some MSVC/GCC versions can't see a protected encoder_ from nested State::resolved_as_cstring()
friend State;
#endif

View File

@ -193,7 +193,7 @@ namespace FLAC {
bool Stream::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
{
FLAC__ASSERT(is_valid());
#if (defined _MSC_VER) || (defined __SUNPRO_CC)
#if (defined _MSC_VER) || (defined __BORLANDC__) || (defined __SUNPRO_CC)
// MSVC++ can't handle:
// ::FLAC__StreamMetadata *m[num_blocks];
// so we do this ugly workaround
@ -205,7 +205,7 @@ namespace FLAC {
// we can get away with the const_cast since we know the encoder will only correct the is_last flags
m[i] = const_cast< ::FLAC__StreamMetadata*>((const ::FLAC__StreamMetadata*)metadata[i]);
}
#if (defined _MSC_VER) || (defined __SUNPRO_CC)
#if (defined _MSC_VER) || (defined __BORLANDC__) || (defined __SUNPRO_CC)
// complete the hack
const bool ok = (bool)::FLAC__stream_encoder_set_metadata(encoder_, m, num_blocks);
delete [] m;

View File

@ -38,11 +38,15 @@
#include <stdlib.h>
#include <string.h>
#if defined _MSC_VER || defined __MINGW32__
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
#if defined __BORLANDC__
#include <utime.h> /* for utime() */
#else
#include <sys/utime.h> /* for utime() */
#endif
#include <io.h> /* for chmod() */
#include <sys/types.h> /* for off_t */
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
#if _MSC_VER <= 1200 || defined __BORLANDC__ /* @@@ [2G limit] */
#define fseeko fseek
#define ftello ftell
#endif

View File

@ -1353,7 +1353,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_matches(const FLAC
FLAC__ASSERT(0 != entry.entry && entry.length > 0);
{
const FLAC__byte *eq = (FLAC__byte*)memchr(entry.entry, '=', entry.length);
#if defined _MSC_VER || defined __MINGW32__ || defined __EMX__
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ || defined __EMX__
#define FLAC__STRNCASECMP strnicmp
#else
#define FLAC__STRNCASECMP strncasecmp

View File

@ -46,8 +46,8 @@
#include <string.h> /* for memset/memcpy() */
#include <sys/stat.h> /* for stat() */
#include <sys/types.h> /* for off_t */
#if defined _MSC_VER || defined __MINGW32__
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
#if _MSC_VER <= 1200 || defined __BORLANDC__ /* @@@ [2G limit] */
#define fseeko fseek
#define ftello ftell
#endif

View File

@ -46,8 +46,8 @@
#include <stdlib.h> /* for malloc() */
#include <string.h> /* for memcpy() */
#include <sys/types.h> /* for off_t */
#if defined _MSC_VER || defined __MINGW32__
#if _MSC_VER <= 1200 /* @@@ [2G limit] */
#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__
#if _MSC_VER <= 1200 || defined __BORLANDC__ /* @@@ [2G limit] */
#define fseeko fseek
#define ftello ftell
#endif