You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@wandisco.com> on 2014/03/27 20:00:50 UTC
Re: svn commit: r1582438 - /subversion/trunk/subversion/tests/svn_test_main.c
On 27.03.2014 19:42, rhuijben@apache.org wrote:
> Author: rhuijben
> Date: Thu Mar 27 18:42:30 2014
> New Revision: 1582438
>
> URL: http://svn.apache.org/r1582438
> Log:
> * subversion/tests/svn_test_main.c
> (thread_local): Remove __GNUC__ check in an attempt to fix compilation
> on OpenBSD.
>
> Modified:
> subversion/trunk/subversion/tests/svn_test_main.c
>
> Modified: subversion/trunk/subversion/tests/svn_test_main.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1582438&r1=1582437&r2=1582438&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/svn_test_main.c (original)
> +++ subversion/trunk/subversion/tests/svn_test_main.c Thu Mar 27 18:42:30 2014
> @@ -153,8 +153,14 @@ static svn_boolean_t skip_cleanup = FALS
> # define thread_local _Thread_local
> # elif defined(WIN32) && defined(_MSC_VER)
> # define thread_local __declspec(thread)
> -# elif defined(__GNUC__)
> +# elif defined(__thread)
> + /* ### Might work somewhere? */
> # define thread_local __thread
> +# else
> + /* gcc defines __thread in some versions, but not all.
> + ### Who knows how to check for this?
> + ### stackoverflow recommends __GNUC__ but that breaks on
> + ### openbsd. */
> # endif
> #endif
Now this makes me wonder why we're not just using the apr_threadkey_*
functions instead of making guesses about compiler support for
thread-local data.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com