Dave Korn wrote: >> I've got some code, written for ELF platforms, that detects whether the >> pthread library (often a separate library from libc) is linked, by doing >> >> #pragma weak pthread_cancel >> bool pthread_in_use = (pthread_cancel != NULL); > > And you really need to determine this dynamically at runtime rather than > statically at configure time?
Sure. I want the same library (libintl) to be usable. on Unix, 1) by multithreaded programs, without bugs due to simultaneous access to data by multiple threads, 2) by single-threaded programs, without putting on them the performance price of linking with -lpthread. "#pragma weak pthread_cancel" does exactly that. Bruno -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple