Include cfish_platform.h from utf8proc.h utf8proc.h unconditionally redefined std types under MSVC. This breaks when compiling as C under MSVC 12.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/db667942 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/db667942 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/db667942 Branch: refs/heads/master Commit: db667942e3669e50a8729cf643c385035e73abf7 Parents: a15a9d7 Author: Nick Wellnhofer <[email protected]> Authored: Tue Jun 2 21:49:19 2015 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Jul 27 18:43:40 2015 +0200 ---------------------------------------------------------------------- modules/unicode/utf8proc/utf8proc.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/db667942/modules/unicode/utf8proc/utf8proc.h ---------------------------------------------------------------------- diff --git a/modules/unicode/utf8proc/utf8proc.h b/modules/unicode/utf8proc/utf8proc.h index d96f89e..6817e84 100644 --- a/modules/unicode/utf8proc/utf8proc.h +++ b/modules/unicode/utf8proc/utf8proc.h @@ -54,24 +54,14 @@ #include <stdlib.h> #include <sys/types.h> +/* Clownfish has better detection of stdbool.h and stdint.h. */ +#include "cfish_platform.h" #ifdef _MSC_VER -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; #ifdef _WIN64 #define ssize_t __int64 #else #define ssize_t int #endif -#ifndef __cplusplus -typedef unsigned char bool; -enum {false, true}; -#endif -#else -#include <stdbool.h> -#include <inttypes.h> #endif #include <limits.h>
