Please sign in to comment.
Add support to configure.ac for checking thread local support
and also check IPADDR_LOOPBACK is defined. In test use loopback if we can to prevent firewall issues and use correct thread local qualifier in sever. Plus ensure server.h qualifies calls to std::bind to prevent clash with C socket API.
- Loading branch information...
Showing with 60 additions and 2 deletions.
|@@ -0,0 +1,37 @@|
|dnl Checks for thread-local storage support.|
|dnl Taken from the openvswitch config code (Apache 2.0 License)|
|dnl with some local modifications. Does not include <threads.h>|
|dnl as this does not currently exist on GCC.|
|dnl Checks whether the compiler and linker support the C11|
|dnl thread_local macro from <threads.h>, and if so defines|
|dnl HAVE_THREAD_LOCAL. If not, checks whether the compiler and linker|
|dnl support the GCC __thread extension, and if so defines|
|[whether $CC has <threads.h> that supports thread_local],|
|[AC_LANG_PROGRAM([ static thread_local int var;], [return var;])],|
|if test $ct_cv_thread_local = yes; then|
|[Define to 1 if the C compiler and linker supports the C11|
|thread_local macro defined in <threads.h>.])|
|[whether $CC supports __thread],|
|[AC_LANG_PROGRAM([static __thread int var;], [return var;])],|
|if test $ct_cv___thread = yes; then|
|[Define to 1 if the C compiler and linker supports the|
|GCC __thread extensions.])|