# HG changeset patch # User Jan Nijtmans # Date 1254996000 -7200 # Node ID 82d33620bb8aa0411c0f351d6ec8f990d9a5a51c # Parent d79da2302625a3ca8e8fbe7f1b59e540462eb273 Compatibility with Microsoft Visual Studio; Make utf8proc usable in C++ programs - Patches for compatibility with Microsoft Visual Studio - Fixes to make utf8proc usable in C++ programs diff -r d79da2302625 -r 82d33620bb8a utf8proc.h --- a/utf8proc.h Thu Aug 20 12:00:00 2009 +0200 +++ b/utf8proc.h Thu Oct 08 12:00:00 2009 +0200 @@ -53,11 +53,30 @@ #include +#include +#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 +typedef unsigned char bool; +enum {false, true}; +#else #include -#include #include +#endif #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef SSIZE_MAX #define SSIZE_MAX ((size_t)SIZE_MAX/2) #endif @@ -358,6 +377,9 @@ * normalized version of the null-terminated string 'str'. */ +#ifdef __cplusplus +} +#endif #endif