blob: 43e915a04073bcef5866b86a3f10624e51f2a639 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$NetBSD: patch-ap,v 1.1 2004/11/16 12:05:54 sketch Exp $
--- ./src/libFLAC++/stream_encoder.cpp.orig 2004-11-16 11:05:01.874049000 +0000
+++ ./src/libFLAC++/stream_encoder.cpp 2004-11-16 11:05:29.674481000 +0000
@@ -169,7 +169,7 @@
bool Stream::set_metadata(FLAC::Metadata::Prototype **metadata, unsigned num_blocks)
{
FLAC__ASSERT(is_valid());
-#ifdef _MSC_VER
+#if (defined _MSC_VER) || (defined __SUNPRO_CC)
// MSVC++ can't handle:
// ::FLAC__StreamMetadata *m[num_blocks];
// so we do this ugly workaround
@@ -181,7 +181,7 @@
// 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 (defined _MSC_VER) || (defined __SUNPRO_CC)
// complete the hack
const bool ok = (bool)::FLAC__stream_encoder_set_metadata(encoder_, m, num_blocks);
delete [] m;
@@ -356,5 +356,5 @@
instance->metadata_callback(metadata);
}
- };
+ }
};
|