diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2019-04-01 17:37:16 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2019-04-01 17:37:16 +0000 |
commit | 1181e9874237fdebb9ed6b71cc184fbc6b5a6f3d (patch) | |
tree | e00efd6bd7d0dbc4a00e3d8b061b62c909819905 /configure.in | |
parent | 0f91d2407bc634849ec3bb2e4f487655103ed873 (diff) | |
download | apr-1181e9874237fdebb9ed6b71cc184fbc6b5a6f3d.tar.gz |
Revert r1789258, r1856189, r1856191 following discussion on list, in favor
of a simpler path of avoiding dirread_r always, by default. This saves us
various additional detection logic, and follows advice of library maintainers
and our library's behavior, any apparent "thread safety" offered by the _r()
flavors of this function were not truly supported by APR's allocation or
dirread_r reentrancy of parallel threads attemping to access the same open
directory descriptor.
Retains r1856192, r1856196 to avoid wasteful allocation in the dirread() case.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856755 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/configure.in b/configure.in index 959a55846..a55106977 100644 --- a/configure.in +++ b/configure.in @@ -845,31 +845,8 @@ ac_cv_define_GETSERVBYNAME_IS_THREAD_SAFE=no if test "$threads" = "1"; then AC_MSG_NOTICE([APR will use threads]) AC_CHECK_LIB(c_r, readdir, - apr_readdir_is_thread_safe=yes) - if test "x$apr_readdir_is_thread_safe" = "x"; then - AC_CHECK_HEADERS(dirent.h) - AC_CHECK_FUNCS(readdir_r) - APR_IFALLYES(header:dirent.h func:readdir_r, - apr_has_readdir_r="1", apr_has_readdir_r="0") - if test "$apr_has_readdir_r" = "1"; then - dnl readdir_r() may exist but be deprecated, meaning - dnl the readdir() itself is thread-safe - APR_TRY_COMPILE_NO_WARNING([ - #include <sys/types.h> - #include <dirent.h> - ], - [ - DIR *dir = opendir("/tmp"); - struct dirent entry, *result; - return readdir_r(dir, &entry, &result) != 0; - ], apr_readdir_is_thread_safe=no, apr_readdir_is_thread_safe=yes) - fi - fi - if test "$apr_readdir_is_thread_safe" = "yes"; then - AC_MSG_NOTICE([APR will use thread-safe readdir()]) AC_DEFINE(READDIR_IS_THREAD_SAFE, 1, - [Define if readdir is thread safe]) - fi + [Define if readdir is thread safe])) if test "x$apr_gethostbyname_is_thread_safe" = "x"; then AC_CHECK_LIB(c_r, gethostbyname, apr_gethostbyname_is_thread_safe=yes) fi |