dbus must be compiled with -D_REENTRANT option to make errno thread-safety

Pavel Strashkin pavel.strashkin at gmail.com
Fri Dec 17 00:19:52 PST 2010


Any updates on this? Can i expect -D_REENTRANT flag will be used for Solaris?

2010/11/26 Pavel Strashkin <pavel.strashkin at gmail.com>:
> I'm on Solaris.
> My <errno.h> makes thread-safe errno only if _REENTRANT is defined.
>
> I see that you already have "some threads stuff" for Solaris in configure.in:
>  502 # Add -D_POSIX_PTHREAD_SEMANTICS if on olaris
>  503 #
>  504 case $host_os in
>  505     solaris*)
>  506        CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
>  507 esac
>
> So, may be it make sence add "-D_REENTRANT" there too?
>
> 2010/11/26 Simon McVittie <simon.mcvittie at collabora.co.uk>:
>> On Thu, 25 Nov 2010 at 22:58:23 +0300, Pavel Strashkin wrote:
>>> To fix that issue and make errno thread-safety you
>>> must compile dbus with -D_REENTRANT option (CFLAGS).
>>
>> What platform is this on? If you #include <errno.h>, recent versions of glibc
>> (where "recent" means the last several years) have a thread-safe errno.
>>
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475101 (recent removal of
>> the policy requirement to use -D_REENTRANT for libraries in Debian) suggests
>> that it's only needed for LinuxThreads (obsolete, superseded by NTPL),
>> OSF/1 and Solaris.
>>
>> Regards,
>>    Simon
>> _______________________________________________
>> dbus mailing list
>> dbus at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dbus
>>
>


More information about the dbus mailing list