On Friday 04 March 2005 2:24 pm, Philipp Thomas wrote:
I understand what you're trying to achieve, but it isn't really feasible. The only way to do what you want would be to dynamically load libpthread via dlopen(3) and then using dlsym(3) to check if NPTL specific symbols (functions,variables etc.) are available. But then you would need to access *every* symbol in libpthread through pointers that your code would have to set up. Ok, thanks for the hints. I don't think that it's worth it to do. While this is not exactly what I was looking for, it might accomplish most of what I was looking for: Using the confstr(3) function, pass _CS_GNU_LIBPTHREAD_VERSION as an argument. This is analogous to the command line: getconf GNU_LIBPTHREAD_VERSION if it returns successfully, then it will return a string that contains something like NPTL 0.61 if nptl is installed on the system. -- Jerry Feldman
Partner Technology Access Center (contractor) (PTAC-MA) Hewlett-Packard Co. 550 King Street LKG2a-X2 Littleton, Ma. 01460 (978)506-5243