Skip to content

Commit 53f1265

Browse files
committed
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>
1 parent 3bd61bf commit 53f1265

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

src/ccutil/host.h

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
#include "platform.h"
2323
/* _WIN32 */
2424
#ifdef _WIN32
25+
# ifndef NOMINMAX
26+
# define NOMINMAX
27+
# endif /* NOMINMAX */
28+
# ifndef WIN32_LEAN_AND_MEAN
29+
# define WIN32_LEAN_AND_MEAN
30+
# endif
2531
#include <windows.h>
2632
#undef min
2733
#undef max

src/ccutil/platform.h

+1-13
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,7 @@
1919
#define TESSERACT_CCUTIL_PLATFORM_H_
2020

2121
#define DLLSYM
22-
#ifdef _WIN32
23-
# ifndef NOMINMAX
24-
# define NOMINMAX
25-
# endif /* NOMINMAX */
26-
# ifndef WIN32_LEAN_AND_MEAN
27-
# define WIN32_LEAN_AND_MEAN
28-
# endif
29-
# ifdef __GNUC__
30-
# define ultoa _ultoa
31-
# endif /* __GNUC__ */
32-
# define SIGNED
33-
#else
22+
#ifndef _WIN32
3423
# ifdef __cplusplus
3524
# include <climits>
3625
# else /* C compiler*/
@@ -41,7 +30,6 @@
4130
# else
4231
# define MAX_PATH PATH_MAX
4332
# endif
44-
# define SIGNED signed
4533
#endif
4634

4735
#if defined(_WIN32) || defined(__CYGWIN__)

0 commit comments

Comments
 (0)