You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/03/02 01:24:38 UTC

svn commit: r1663184 - /subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h

Author: rhuijben
Date: Mon Mar  2 00:24:38 2015
New Revision: 1663184

URL: http://svn.apache.org/r1663184
Log:
Fix compilation of utf8proc.c/h with Visual Studio 2015, which
cleans up a lot of standard system headers (and includes several new
headers).

Apr doesn't detect these headers yet, so we can't use its detection.
(These headers are really part of the compiler; not the SDK)

* libsvn_subr/utf8proc/utf8proc.h
  (defines): Use stdbool.h and stdint.h instead of local redefines that
    now conflict with those in other headers, such as those included by apr.

Modified:
    subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h

Modified: subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h?rev=1663184&r1=1663183&r2=1663184&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h (original)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h Mon Mar  2 00:24:38 2015
@@ -71,18 +71,23 @@
 #include <stdlib.h>
 #include <sys/types.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
-typedef unsigned char bool;
-enum {false, true};
+# if _MSC_VER >= 1900
+#   include <stdbool.h>
+#   include <stdint.h>
+# else
+    typedef signed char int8_t;
+    typedef unsigned char uint8_t;
+    typedef short int16_t;
+    typedef unsigned short uint16_t;
+    typedef int int32_t;
+    typedef unsigned char bool;
+    enum {false, true};
+# endif
+# ifdef _WIN64
+#   define ssize_t __int64
+# else
+#   define ssize_t int
+# endif
 #elif defined(HAVE_STDBOOL_H) && defined(HAVE_INTTYPES_H)
 #include <stdbool.h>
 #include <inttypes.h>