From a858efec74fc2a1bf528fc4fc025f47fde381309 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Mon, 15 Jun 2015 09:45:17 +0200 Subject: [PATCH] code for Windows App Store do not have access to the ANSI calls used in Debug.cpp so we disable debug for these targets --- configure.ac | 1 + ebml/EbmlConfig.h | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index c64aa93..58c8227 100644 --- a/configure.ac +++ b/configure.ac @@ -10,4 +10,5 @@ AC_ARG_ENABLE([debug], [enable_debug="$withval"], [enable_debug=no]) AM_CONDITIONAL([ENABLE_DEBUG], [test "$enable_debug" = yes]) AC_CONFIG_FILES([Makefile libebml.pc]) +AC_CHECK_HEADERS([winapifamily.h]) AC_OUTPUT diff --git a/ebml/EbmlConfig.h b/ebml/EbmlConfig.h index b7ecc32..ce9c49a 100644 --- a/ebml/EbmlConfig.h +++ b/ebml/EbmlConfig.h @@ -36,6 +36,10 @@ #ifndef LIBEBML_CONFIG_H #define LIBEBML_CONFIG_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(__linux__) #include #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -100,6 +104,13 @@ #define LIBEBML_DEBUG #endif +#ifdef HAVE_WINAPIFAMILY_H +# include +# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# undef LIBEBML_DEBUG +# endif +#endif + // For compilers that don't define __TIMESTAMP__ (e.g. gcc 2.95, gcc 3.2) #ifndef __TIMESTAMP__ #define __TIMESTAMP__ __DATE__ " " __TIME__