]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/lib_trace.c
ncurses 6.4 - patch 20230520
[ncurses.git] / ncurses / trace / lib_trace.c
index effd3c1c158e2675dbdff506a750c9f4bc377265..4b7d39424ee48225b85737768974881a847cef30 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey                                *
+ * Copyright 2018-2022,2023 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -48,7 +48,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_trace.c,v 1.101 2022/09/17 14:57:02 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.102 2023/05/20 18:09:07 tom Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -267,11 +267,13 @@ _nc_va_tracef(const char *fmt, va_list ap)
 # if USE_WEAK_SYMBOLS
        if ((pthread_self))
 # endif
+           fprintf(fp, "%#" PRIxPTR ":",
 #ifdef _NC_WINDOWS
-           fprintf(fp, "%#lx:", (long) (intptr_t) pthread_self().p);
+                   CASTxPTR(pthread_self().p)
 #else
-           fprintf(fp, "%#lx:", (long) (intptr_t) pthread_self());
+                   CASTxPTR(pthread_self())
 #endif
+               );
 #endif
        if (before || after) {
            int n;