]> granicus.if.org Git - nethack/commitdiff
Qt on Win32: resolve conflict over boolean type
authorRay Chason <ray.chason@protonmail.com>
Thu, 24 May 2018 03:19:54 +0000 (23:19 -0400)
committerPasi Kallinen <paxed@alt.org>
Mon, 10 Sep 2018 18:13:14 +0000 (21:13 +0300)
include/global.h

index f92ce3cfc08360e2d32014b25a9b5061475d67a5..23183005dc48d8f3f5e89d9a0db83cf66db1baa6 100644 (file)
  * since otherwise comparisons with signed quantities are done incorrectly
  */
 typedef schar xchar;
+#if defined(__GNUC__) && defined(WIN32) && defined(__cplusplus)
+/* Resolve conflict with Qt 5 and MinGW-w32 */
+typedef uchar boolean; /* 0 or 1 */
+#else
 #ifndef SKIP_BOOLEAN
 typedef xchar boolean; /* 0 or 1 */
 #endif
+#endif
 
 #ifndef TRUE /* defined in some systems' native include files */
 #define TRUE ((boolean) 1)