Hi,
Wolfgang Lux wrote:
I had a look at the code in configure.ac that checks for the
pthread_setname_np/pthread_set_name_np function in configure.ac and that code
looks fairly confused to me. It first checks for a function pthread_set_name_np
and if present assumes that it has a single parameter. If not present, it
checks for a function pthread_setname_np and then further checks if it is a the
two parameter variant from glibc or the three parameter variant as used on
NetBSD. This looks wrong to me. The single parameter variant is used on Darwin,
however it is called pthread_setname_np (like the functions on glibc and
NetBSD). On the other hand, FreeBSD has a function called pthread_set_name_np
and it expects two parameters like the glibc function. So the configure checks
apparently get things right for Linux and NetBSD, but they get it wrong for
both FreeBSD and Darwin.
Since FreeBSD is still broken, I'm checking Wolfgang's suggestions more.
configure:13718: checking for pthread_set_name_np
configure:13774: clang -o conftest -g -O2 -I/Local/Library/Headers
-I/Local/Lib
rary/Headers -I/System/Library/Headers -I/usr/local/include
-L/Local/Library/Li
braries -L/Local/Library/Libraries -L/System/Library/Libraries
-L/usr/local/lib
conftest.c -lrt -lpthread >&5
configure:13781: $? = 0
configure:13803: result: yes
so this function gets found. However pthread_setname* exists in
configure, but not in config.log, this means it is not checked for on
FreeBSD.
Given the manpage, it is the 2 parameters function, there is no
one-parameter function.
Here a grep in my include dirs:
> grep pthread_set_name_np *
pthread_np.h:void pthread_set_name_np(pthread_t, const char *);
Riccardo
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev