mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-06 08:46:40 +08:00
fix: FTBFS under MSVC
1. __declspec(deprecated) is okay for MSVC 2. strcasecmp is POSIX-only, _stricmp should be used for MSVC Co-authored-by: yyc12345 <yyc12321@outlook.com>
This commit is contained in:
parent
6e163c978a
commit
dff8906402
@ -59,7 +59,7 @@ extern "C" {
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define DEPRECATED(message) __attribute__ ((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define DEPRECATED(message) __declspec(deprecated) func
|
||||
#define DEPRECATED(message) __declspec(deprecated)
|
||||
#else
|
||||
#warning("DEPRECATED macro not available")
|
||||
#define DEPRECATED(message)
|
||||
|
||||
@ -46,6 +46,10 @@
|
||||
|
||||
#define BUFFER_SIZE 65536
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define realpath(filename,unused) _fullpath(NULL, filename, 0)
|
||||
#define SEP '\\'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user