Skip to content

Commit

Permalink
Clean macros in platform.h
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
stweil committed Apr 22, 2019
1 parent 3bd61bf commit 53f1265
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
6 changes: 6 additions & 0 deletions src/ccutil/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 1 addition & 13 deletions src/ccutil/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand All @@ -41,7 +30,6 @@
# else
# define MAX_PATH PATH_MAX
# endif
# define SIGNED signed
#endif

#if defined(_WIN32) || defined(__CYGWIN__)
Expand Down

0 comments on commit 53f1265

Please sign in to comment.