mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
MS VS inline/extern fix from Ben Alison plus comments.
Add explicit extern to functions that are locally declared inline but which also have non-inline public prototypes. It seems MS VS does not quite meet the C99 spec (section 6.7.4).
This commit is contained in:
@@ -1047,3 +1047,16 @@ FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader *br, FLAC__uint64 *v
|
||||
*val = v;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* These functions a declared inline in this file but are also callable as
|
||||
* externs from elsewhere.
|
||||
* According to the C99 sepc, section 6.7.4, simply providing a function
|
||||
* prototype in a header file without 'inline' and making the function inline
|
||||
* in this file should be sufficient.
|
||||
* Unfortunately, the Microsoft VS compiler doesn't pick them up externally. To
|
||||
* fix that we add extern declarations here.
|
||||
*/
|
||||
extern FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br);
|
||||
extern unsigned FLAC__bitreader_bits_left_for_byte_alignment(const FLAC__BitReader *br);
|
||||
extern unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br);
|
||||
extern FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__uint32 *val);
|
||||
|
||||
Reference in New Issue
Block a user