Skip to content

Commit 8899ba1

Browse files
committed
Revert "Fixing up NEEDS_NULLPTR_DEFINED that got messed up when adding FreeBSD support. This caused build break on OS X and iOS."
This reverts commit d9b5c1a.
1 parent e8f77fb commit 8899ba1

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

Release/include/compat/SafeInt3.hpp

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,29 +100,32 @@ Version 3.0
100100

101101
// If the user made a choice, respect it #if !defined
102102
#if !defined NEEDS_NULLPTR_DEFINED
103-
104103
// Visual Studio 2010 and higher support this
105104
#if defined(_MSC_VER)
106-
# if (_MSC_VER < 1600)
107-
# define NEEDS_NULLPTR_DEFINED 1
108-
# else
109-
# define NEEDS_NULLPTR_DEFINED 0
110-
# endif
111-
#elif defined __has_feature
112-
# if __has_feature(cxx_nullptr)
113-
# define NEEDS_NULLPTR_DEFINED 0
114-
# else
115-
# define NEEDS_NULLPTR_DEFINED 1
116-
# endif
105+
#if (_MSC_VER < 1600)
106+
#define NEEDS_NULLPTR_DEFINED 1
107+
#else
108+
#define NEEDS_NULLPTR_DEFINED 0
109+
#endif
117110
#else
118111
// Let everything else trigger based on whether we have nullptr_t
119-
# if defined nullptr_t
120-
# define NEEDS_NULLPTR_DEFINED 0
121-
# else
122-
# define NEEDS_NULLPTR_DEFINED 1
123-
# endif
112+
#if defined nullptr_t
113+
#define NEEDS_NULLPTR_DEFINED 0
114+
#else
115+
#define NEEDS_NULLPTR_DEFINED 1
116+
#endif
117+
#endif
124118
#endif
125119

120+
#ifdef __has_feature
121+
#ifdef NEEDS_NULLPTR_DEFINED
122+
#undef NEEDS_NULLPTR_DEFINED
123+
#endif
124+
#if __has_feature(cxx_nullptr)
125+
#define NEEDS_NULLPTR_DEFINED 0
126+
#else
127+
#define NEEDS_NULLPTR_DEFINED 1
128+
#endif
126129
#endif
127130

128131
#if NEEDS_NULLPTR_DEFINED

0 commit comments

Comments
 (0)