From 53f12653621c97c84e2ca19e4315869b4ad5c96a Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 22 Apr 2019 20:52:24 +0200 Subject: [PATCH] Clean macros in platform.h * Remove unused macros ultoa, SIGNED. * Move macros NOMINMAX and WIN32_LEAN_AND_MEAN to host.h because they are used when including windows.h. Signed-off-by: Stefan Weil --- src/ccutil/host.h | 6 ++++++ src/ccutil/platform.h | 14 +------------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/ccutil/host.h b/src/ccutil/host.h index 821292df23..704205a778 100644 --- a/src/ccutil/host.h +++ b/src/ccutil/host.h @@ -22,6 +22,12 @@ #include "platform.h" /* _WIN32 */ #ifdef _WIN32 +# ifndef NOMINMAX +# define NOMINMAX +# endif /* NOMINMAX */ +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif #include #undef min #undef max diff --git a/src/ccutil/platform.h b/src/ccutil/platform.h index c6143f3695..0c7c300f65 100644 --- a/src/ccutil/platform.h +++ b/src/ccutil/platform.h @@ -19,18 +19,7 @@ #define TESSERACT_CCUTIL_PLATFORM_H_ #define DLLSYM -#ifdef _WIN32 -# ifndef NOMINMAX -# define NOMINMAX -# endif /* NOMINMAX */ -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# ifdef __GNUC__ -# define ultoa _ultoa -# endif /* __GNUC__ */ -# define SIGNED -#else +#ifndef _WIN32 # ifdef __cplusplus # include # else /* C compiler*/ @@ -41,7 +30,6 @@ # else # define MAX_PATH PATH_MAX # endif -# define SIGNED signed #endif #if defined(_WIN32) || defined(__CYGWIN__)