[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32870 - in libmicrohttpd: . src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32870 - in libmicrohttpd: . src/microhttpd |
Date: |
Tue, 1 Apr 2014 08:22:45 +0200 |
Author: Karlson2k
Date: 2014-04-01 08:22:45 +0200 (Tue, 01 Apr 2014)
New Revision: 32870
Modified:
libmicrohttpd/configure.ac
libmicrohttpd/src/microhttpd/daemon.c
Log:
Really check for presence of pthread_setname_np() instead of guessing
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2014-04-01 06:22:37 UTC (rev 32869)
+++ libmicrohttpd/configure.ac 2014-04-01 06:22:45 UTC (rev 32870)
@@ -212,6 +212,14 @@
fi
fi
+# Check for pthread_setname_np()
+AC_MSG_CHECKING([[for pthread_setname_np]])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <pthread.h>]], [[
pthread_setname_np(pthread_self(), "name")]])],
+ [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP]], [[1]], [Define if you have
pthread_setname_np function.])
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])] )
+
# Check for headers that are ALWAYS required
AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h
sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard
UNIX headers files]))
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2014-04-01 06:22:37 UTC (rev
32869)
+++ libmicrohttpd/src/microhttpd/daemon.c 2014-04-01 06:22:45 UTC (rev
32870)
@@ -1073,11 +1073,9 @@
}
ret = pthread_create (thread, pattr,
start_routine, arg);
-#if (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12)
-#if LINUX
+#ifdef HAVE_PTHREAD_SETNAME_NP
(void) pthread_setname_np (*thread, "libmicrohttpd");
-#endif
-#endif
+#endif /* HAVE_PTHREAD_SETNAME_NP */
if (0 != daemon->thread_stack_size)
pthread_attr_destroy (&attr);
return ret;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32870 - in libmicrohttpd: . src/microhttpd,
gnunet <=