Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
UndefSysMacros.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_UTIL_UNDEF_SYS_MACROS_H
6#define ICE_UTIL_UNDEF_SYS_MACROS_H
7
8//
9// This header includes macros that can end up being dragged into
10// the generated code from system headers, such as major() or NDEBUG.
11// If a Slice symbol has the same name as a macro, the generated
12// code most likely won't compile (but, depending how the macro is
13// defined, may even compile).
14//
15// Here, we undefine symbols that cause such problems.
16//
17// The #ifdef ... #endif protection is necessary to prevent
18// warnings on some platforms.
19//
20
21#ifdef major
22#undef major
23#endif
24
25#ifdef minor
26#undef minor
27#endif
28
29#ifdef min
30#undef min
31#endif
32
33#ifdef max
34#undef max
35#endif
36
37#endif