Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
f4c1a8e8
Commit
f4c1a8e8
authored
Jan 27, 2005
by
Josh Coalson
Browse files
fixes for compiling with SunPro
parent
7446e186
Changes
7
Hide whitespace changes
Inline
Side-by-side
include/FLAC++/decoder.h
View file @
f4c1a8e8
...
...
@@ -141,7 +141,7 @@ namespace FLAC {
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
virtual
void
error_callback
(
::
FLAC__StreamDecoderErrorStatus
status
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -236,7 +236,7 @@ namespace FLAC {
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
virtual
void
error_callback
(
::
FLAC__StreamDecoderErrorStatus
status
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -329,7 +329,7 @@ namespace FLAC {
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
virtual
void
error_callback
(
::
FLAC__StreamDecoderErrorStatus
status
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
include/FLAC++/encoder.h
View file @
f4c1a8e8
...
...
@@ -159,7 +159,7 @@ namespace FLAC {
virtual
::
FLAC__StreamEncoderWriteStatus
write_callback
(
const
FLAC__byte
buffer
[],
unsigned
bytes
,
unsigned
samples
,
unsigned
current_frame
)
=
0
;
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -259,7 +259,7 @@ namespace FLAC {
virtual
::
FLAC__SeekableStreamEncoderTellStatus
tell_callback
(
FLAC__uint64
*
absolute_byte_offset
)
=
0
;
virtual
::
FLAC__StreamEncoderWriteStatus
write_callback
(
const
FLAC__byte
buffer
[],
unsigned
bytes
,
unsigned
samples
,
unsigned
current_frame
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -360,7 +360,7 @@ namespace FLAC {
protected:
virtual
void
progress_callback
(
FLAC__uint64
bytes_written
,
FLAC__uint64
samples_written
,
unsigned
frames_written
,
unsigned
total_frames_estimate
);
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
include/OggFLAC++/decoder.h
View file @
f4c1a8e8
...
...
@@ -144,7 +144,7 @@ namespace OggFLAC {
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
virtual
void
error_callback
(
::
FLAC__StreamDecoderErrorStatus
status
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -240,7 +240,7 @@ namespace OggFLAC {
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
virtual
void
error_callback
(
::
FLAC__StreamDecoderErrorStatus
status
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -334,7 +334,7 @@ namespace OggFLAC {
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
virtual
void
error_callback
(
::
FLAC__StreamDecoderErrorStatus
status
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
include/OggFLAC++/encoder.h
View file @
f4c1a8e8
...
...
@@ -162,7 +162,7 @@ namespace OggFLAC {
virtual
::
FLAC__StreamEncoderWriteStatus
write_callback
(
const
FLAC__byte
buffer
[],
unsigned
bytes
,
unsigned
samples
,
unsigned
current_frame
)
=
0
;
virtual
void
metadata_callback
(
const
::
FLAC__StreamMetadata
*
metadata
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -263,7 +263,7 @@ namespace OggFLAC {
virtual
::
FLAC__SeekableStreamEncoderTellStatus
tell_callback
(
FLAC__uint64
*
absolute_byte_offset
)
=
0
;
virtual
::
FLAC__StreamEncoderWriteStatus
write_callback
(
const
FLAC__byte
buffer
[],
unsigned
bytes
,
unsigned
samples
,
unsigned
current_frame
)
=
0
;
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
@@ -365,7 +365,7 @@ namespace OggFLAC {
protected:
virtual
void
progress_callback
(
FLAC__uint64
bytes_written
,
FLAC__uint64
samples_written
,
unsigned
frames_written
,
unsigned
total_frames_estimate
);
#if (defined _MSC_VER) || (defined __GNUG__ && (__GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 96)))
#if (defined _MSC_VER) || (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
...
...
src/libFLAC++/file_encoder.cpp
View file @
f4c1a8e8
...
...
@@ -168,7 +168,7 @@ namespace FLAC {
bool
File
::
set_metadata
(
FLAC
::
Metadata
::
Prototype
**
metadata
,
unsigned
num_blocks
)
{
FLAC__ASSERT
(
is_valid
());
#ifdef _MSC_VER
#if
(
def
ined
_MSC_VER
) || (defined __SUNPRO_CC)
// MSVC++ can't handle:
// ::FLAC__StreamMetadata *m[num_blocks];
// so we do this ugly workaround
...
...
@@ -180,7 +180,7 @@ namespace FLAC {
// we can get away with this since we know the encoder will only correct the is_last flags
m
[
i
]
=
const_cast
<
::
FLAC__StreamMetadata
*>
((
::
FLAC__StreamMetadata
*
)
metadata
[
i
]);
}
#ifdef _MSC_VER
#if
(
def
ined
_MSC_VER
) || (defined __SUNPRO_CC)
// complete the hack
const
bool
ok
=
(
bool
)
::
FLAC__file_encoder_set_metadata
(
encoder_
,
m
,
num_blocks
);
delete
[]
m
;
...
...
src/libFLAC++/seekable_stream_encoder.cpp
View file @
f4c1a8e8
...
...
@@ -168,7 +168,7 @@ namespace FLAC {
bool
SeekableStream
::
set_metadata
(
FLAC
::
Metadata
::
Prototype
**
metadata
,
unsigned
num_blocks
)
{
FLAC__ASSERT
(
is_valid
());
#ifdef _MSC_VER
#if
(
def
ined
_MSC_VER
) || (defined __SUNPRO_CC)
// MSVC++ can't handle:
// ::FLAC__StreamMetadata *m[num_blocks];
// so we do this ugly workaround
...
...
@@ -180,7 +180,7 @@ namespace FLAC {
// we can get away with this since we know the encoder will only correct the is_last flags
m
[
i
]
=
const_cast
<
::
FLAC__StreamMetadata
*>
((
::
FLAC__StreamMetadata
*
)
metadata
[
i
]);
}
#ifdef _MSC_VER
#if
(
def
ined
_MSC_VER
) || (defined __SUNPRO_CC)
// complete the hack
const
bool
ok
=
(
bool
)
::
FLAC__seekable_stream_encoder_set_metadata
(
encoder_
,
m
,
num_blocks
);
delete
[]
m
;
...
...
src/libFLAC++/stream_encoder.cpp
View file @
f4c1a8e8
...
...
@@ -169,7 +169,7 @@ namespace FLAC {
bool
Stream
::
set_metadata
(
FLAC
::
Metadata
::
Prototype
**
metadata
,
unsigned
num_blocks
)
{
FLAC__ASSERT
(
is_valid
());
#ifdef _MSC_VER
#if
(
def
ined
_MSC_VER
) || (defined __SUNPRO_CC)
// MSVC++ can't handle:
// ::FLAC__StreamMetadata *m[num_blocks];
// so we do this ugly workaround
...
...
@@ -181,7 +181,7 @@ namespace FLAC {
// we can get away with this since we know the encoder will only correct the is_last flags
m
[
i
]
=
const_cast
<
::
FLAC__StreamMetadata
*>
((
::
FLAC__StreamMetadata
*
)
metadata
[
i
]);
}
#ifdef _MSC_VER
#if
(
def
ined
_MSC_VER
) || (defined __SUNPRO_CC)
// complete the hack
const
bool
ok
=
(
bool
)
::
FLAC__stream_encoder_set_metadata
(
encoder_
,
m
,
num_blocks
);
delete
[]
m
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment