]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/lib_trace.c
ncurses 5.7 - patch 20090117
[ncurses.git] / ncurses / trace / lib_trace.c
index da4e5dce0cd3f500e5fe4c025aa82d960b2ca966..743b1f64f1aeaf39476190b7a89f1e08bb7fc4cd 100644 (file)
@@ -46,7 +46,7 @@
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_trace.c,v 1.68 2008/08/03 22:22:57 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.71 2008/08/23 18:04:29 tom Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -180,7 +180,10 @@ _nc_va_tracef(const char *fmt, va_list ap)
         * Rather than add the complication of a per-thread stack, just
         * show the thread-id in each line of the trace.
         */
-       fprintf(TraceFP, "%#lx:", (long) pthread_self());
+# if USE_WEAK_SYMBOLS
+       if ((pthread_self))
+# endif
+           fprintf(TraceFP, "%#lx:", (long) (void *) pthread_self());
 #endif
        if (before || after) {
            int n;