mirror of
https://github.com/json-c/json-c.git
synced 2026-03-13 18:19:06 +08:00
fix compilation with clang-cl
Something in the configure stage goes wrong where it believe strncasecmp is present but the header defining it is not. Work around this. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#define jt_hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x)&7) + 9)
|
#define jt_hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x)&7) + 9)
|
||||||
|
|
||||||
#if !HAVE_STRNCASECMP && defined(_MSC_VER)
|
#if !HAVE_STRNCASECMP && defined(_WIN32)
|
||||||
/* MSC has the version as _strnicmp */
|
/* MSC has the version as _strnicmp */
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#elif !HAVE_STRNCASECMP
|
#elif !HAVE_STRNCASECMP
|
||||||
|
|||||||
@@ -74,14 +74,16 @@ funcs = [
|
|||||||
'vsyslog',
|
'vsyslog',
|
||||||
'getrandom',
|
'getrandom',
|
||||||
'getrusage',
|
'getrusage',
|
||||||
'strcasecmp',
|
|
||||||
'strncasecmp',
|
|
||||||
'strtoll',
|
'strtoll',
|
||||||
'strtoull',
|
'strtoull',
|
||||||
'arc4random',
|
'arc4random',
|
||||||
'vasprintf',
|
'vasprintf',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if conf_data.has('HAVE_STRINGS_H')
|
||||||
|
funcs += ['strcasecmp', 'strncasecmp']
|
||||||
|
endif
|
||||||
|
|
||||||
foreach f : funcs
|
foreach f : funcs
|
||||||
if cc.has_function(f)
|
if cc.has_function(f)
|
||||||
conf_data.set('HAVE_@0@'.format(f.to_upper()), 1, description : 'Define to 1 if you have the `@0@` function.'.format(f))
|
conf_data.set('HAVE_@0@'.format(f.to_upper()), 1, description : 'Define to 1 if you have the `@0@` function.'.format(f))
|
||||||
|
|||||||
Reference in New Issue
Block a user