diff options
author | Robert Pluim <rpluim@gmail.com> | 2020-01-31 10:22:59 +0100 |
---|---|---|
committer | Robert Pluim <rpluim@gmail.com> | 2020-02-03 16:40:25 +0100 |
commit | 831508422e26e6d88dd5d8960e2569c489604c85 (patch) | |
tree | d1cb4f413b41c6e7ae570dda44bcfde1a991061d /configure.ac | |
parent | f27187f963e9e36435b508e29256e048799e0ff2 (diff) | |
download | emacs-831508422e26e6d88dd5d8960e2569c489604c85.tar.gz |
Cater for 3-argument version of pthread_setname_np
Fixes Bug#39363.
* configure.ac: Add check for 3-argument version of
pthread_setname_np.
* src/systhread.c (sys_thread_set_name)
[HAVE_PTHREAD_SETNAME_NP_3ARG]: Call pthread_setname_np with
3 arguments.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3c47da6dcb4..aa2d9ef745f 100644 --- a/configure.ac +++ b/configure.ac @@ -4197,6 +4197,21 @@ if test "$ac_cv_func_pthread_setname_np" = "yes"; then AC_DEFINE( HAVE_PTHREAD_SETNAME_NP_1ARG, 1, [Define to 1 if pthread_setname_np takes a single argument.]) + else + AC_CACHE_CHECK( + [whether pthread_setname_np takes three arguments], + [emacs_cv_pthread_setname_np_3arg], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <pthread.h>]], + [[pthread_setname_np (0, "%s", "a");]])], + [emacs_cv_pthread_setname_np_3arg=yes], + [emacs_cv_pthread_setname_np_3arg=no])]) + if test "$emacs_cv_pthread_setname_np_3arg" = "yes"; then + AC_DEFINE( + HAVE_PTHREAD_SETNAME_NP_3ARG, 1, + [Define to 1 if pthread_setname_np takes three arguments.]) + fi fi fi |