openbsd-ports/devel/mygui/patches/patch-MyGUIEngine_include_MyGUI_Prerequest_h
naddy f7a37e95f7 For modern compilers, don't redefine nullptr to 0. It causes havoc
deep in the C++ standard library header files.  Patch taken from an
intermediate upstream version.
2018-09-15 23:12:23 +00:00

24 lines
723 B
Plaintext

$OpenBSD: patch-MyGUIEngine_include_MyGUI_Prerequest_h,v 1.1 2018/09/15 23:12:23 naddy Exp $
do not use nullptr define, if possible
https://github.com/MyGUI/mygui/commit/ced30da
Index: MyGUIEngine/include/MyGUI_Prerequest.h
--- MyGUIEngine/include/MyGUI_Prerequest.h.orig
+++ MyGUIEngine/include/MyGUI_Prerequest.h
@@ -19,13 +19,7 @@
#define MYGUI_DEFINE_VERSION(major, minor, patch) ((major << 16) | (minor << 8) | patch)
#ifndef MYGUI_DONT_REPLACE_NULLPTR
-# if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
-# ifndef _MANAGED
-# ifndef _NATIVE_NULLPTR_SUPPORTED
-# define nullptr 0
-# endif
-# endif
-# else
+# if __cplusplus < 201103L && !defined(_NATIVE_NULLPTR_SUPPORTED)
# define nullptr 0
# endif
#endif