]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/curses.priv.h
ncurses 6.4 - patch 20230520
[ncurses.git] / ncurses / curses.priv.h
index 294ec594c8e2edf474b78db6b6b52fe36a32b570..5531c0640468aa689c735838be26cf806e1554b5 100644 (file)
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.664 2023/04/29 19:10:30 tom Exp $
+ * $Id: curses.priv.h,v 1.666 2023/05/20 18:20:39 tom Exp $
  *
  *     curses.priv.h
  *
@@ -141,8 +141,17 @@ extern int errno;
 # endif
 #endif
 
+#if (defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0) && (defined(__GNUC__) && (__GNUC__ < 12))
+# undef PRIxPTR                /* gcc bug fixed in 12.x */
+# define PRIxPTR       "lX"
+# define CASTxPTR(n)    (unsigned long)(intptr_t)(n)
+#else
+# define CASTxPTR(n)    (intptr_t)(n)
+#endif
+
 #ifndef PRIxPTR
 # define PRIxPTR       "lx"
+# define CASTxPTR(n)    (long)(n)
 #endif
 
 /* include signal.h before curses.h to work-around defect in glibc 2.1.3 */