X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftrace%2Flib_trace.c;h=743b1f64f1aeaf39476190b7a89f1e08bb7fc4cd;hp=da4e5dce0cd3f500e5fe4c025aa82d960b2ca966;hb=1f21085964c1dcb515970035e43b7f25ac2cfdf6;hpb=8f527f87c0b979d9c2598ef5c3394463af288468;ds=sidebyside diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c index da4e5dce..743b1f64 100644 --- a/ncurses/trace/lib_trace.c +++ b/ncurses/trace/lib_trace.c @@ -46,7 +46,7 @@ #include -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;