Author: rhuijben Date: Tue Sep 15 15:56:14 2015 New Revision: 1703238 URL: http://svn.apache.org/r1703238 Log: Use similar detection for a few system headers on Windows and other platforms, to avoid problems whenever we want to reuse this code and to make it easier to fix Windows specifics in one place.
* configure.ac Check for stdint.h instead of the less likely to exist inttypes.h, where we use the include of stdint.h of. * subversion/libsvn_subr/utf8proc/utf8proc.h Use standard defines for the headers we need. * subversion/svn_private_config.hw Declare defines for Visual Studio. Modified: subversion/trunk/configure.ac subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h subversion/trunk/subversion/svn_private_config.hw Modified: subversion/trunk/configure.ac URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1703238&r1=1703237&r2=1703238&view=diff ============================================================================== --- subversion/trunk/configure.ac (original) +++ subversion/trunk/configure.ac Tue Sep 15 15:56:14 2015 @@ -1506,7 +1506,7 @@ AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET) # ==== Miscellaneous bits ==================================================== -AC_CHECK_HEADERS([stdbool.h inttypes.h]) +AC_CHECK_HEADERS([stdbool.h stdint.h]) # Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler ### I think we get this flag from APR, so the fix probably belongs there Modified: subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h?rev=1703238&r1=1703237&r2=1703238&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h (original) +++ subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h Tue Sep 15 15:56:14 2015 @@ -91,34 +91,26 @@ #include <stdlib.h> #include <sys/types.h> + +#ifdef HAVE_STDINT_H +#include <stdint.h> +#else +#include <apr.h> +#endif + +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> +#elif !defined(__cplusplus) +typedef uint8_t bool; +enum { false, true }; +#endif + #ifdef _MSC_VER -# if _MSC_VER >= 1600 -# 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; -# endif -# if _MSC_VER >= 1800 -# include <stdbool.h> -# else -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> -#else -#include <apr.h> -typedef uint8_t bool; -enum {false, true}; #endif #include <limits.h> Modified: subversion/trunk/subversion/svn_private_config.hw URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn_private_config.hw?rev=1703238&r1=1703237&r2=1703238&view=diff ============================================================================== --- subversion/trunk/subversion/svn_private_config.hw (original) +++ subversion/trunk/subversion/svn_private_config.hw Tue Sep 15 15:56:14 2015 @@ -122,6 +122,14 @@ Supresses compiler warnings about the variable being unused. */ #define SVN_UNUSED(v) ( (void)(v) ) +#if defined(_MSC_VER) && _MSC_VER >= 1600 +#define HAVE_STDINT_H +#endif + +#if defined(_MSC_VER) && _MSC_VER >= 1800 +#define HAVE_STDBOOL_H +#endif + #endif /* SVN_PRIVATE_CONFIG_HW */ /* Inclusion of Berkeley DB header */