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 <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-04-22 20:52:24 +02:00
parent 3bd61bfae4
commit 53f1265362
2 changed files with 7 additions and 13 deletions

View File

@ -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 <windows.h>
#undef min
#undef max

View File

@ -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 <climits>
# else /* C compiler*/
@ -41,7 +30,6 @@
# else
# define MAX_PATH PATH_MAX
# endif
# define SIGNED signed
#endif
#if defined(_WIN32) || defined(__CYGWIN__)