mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix problem with strncasecmp on windows
This commit is contained in:
@@ -24,9 +24,14 @@
|
|||||||
|
|
||||||
static int local__vcentry_matches(const char *field_name, const FLAC__StreamMetadata_VorbisComment_Entry *entry)
|
static int local__vcentry_matches(const char *field_name, const FLAC__StreamMetadata_VorbisComment_Entry *entry)
|
||||||
{
|
{
|
||||||
|
#if defined _MSC_VER || defined __MINGW32__
|
||||||
|
#define FLAC__STRNCASECMP strnicmp
|
||||||
|
#else
|
||||||
|
#define FLAC__STRNCASECMP strncasecmp
|
||||||
|
#endif
|
||||||
const FLAC__byte *eq = memchr(entry->entry, '=', entry->length);
|
const FLAC__byte *eq = memchr(entry->entry, '=', entry->length);
|
||||||
const unsigned field_name_length = strlen(field_name);
|
const unsigned field_name_length = strlen(field_name);
|
||||||
return (0 != eq && (unsigned)(eq-entry->entry) == field_name_length && 0 == strncasecmp(field_name, entry->entry, field_name_length));
|
return (0 != eq && (unsigned)(eq-entry->entry) == field_name_length && 0 == FLAC__STRNCASECMP(field_name, entry->entry, field_name_length));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void local__vcentry_parse_value(const FLAC__StreamMetadata_VorbisComment_Entry *entry, char **dest)
|
static void local__vcentry_parse_value(const FLAC__StreamMetadata_VorbisComment_Entry *entry, char **dest)
|
||||||
|
|||||||
Reference in New Issue
Block a user