patch: support for borland c++ compile (SF#1599018: http://sourceforge.net/tracker/index.php?func=detail&aid=1599018&group_id=13478&atid=313478)
This commit is contained in:
parent
1572378f65
commit
2beca73003
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user