handle_recursive: fix race condition if threads are used

Requires thread-local storage.

Another solution would be a mutex, but this is slower and more
complicated and might cause issues with some programs.
This commit is contained in:
Simon Ruderich
2014-04-08 14:38:01 +02:00
parent 93bd149d9f
commit b6d1dc09b6
5 changed files with 86 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ AC_TYPE_SSIZE_T
AC_C_INLINE
AX_C___ATTRIBUTE__
AX_TLS
AC_CHECK_MEMBER([struct _IO_FILE._fileno],
[AC_DEFINE([HAVE_STRUCT__IO_FILE__FILENO], 1,