gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On dropping -D_REENTRANT -D_THREAD_SAFE


From: Simon Josefsson
Subject: Re: On dropping -D_REENTRANT -D_THREAD_SAFE
Date: Sun, 06 Jan 2008 15:17:05 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Nikos Mavrogiannopoulos <address@hidden> writes:

> On Friday 04 January 2008, Simon Josefsson wrote:
>> For a long time configure.in has contained:
>>
>> dnl In order to use the reentrant libc functions.
>> dnl I hope it is portable enough.
>> CFLAGS="${CFLAGS} -D_REENTRANT -D_THREAD_SAFE"
>
> I believe these flags are used in solaris. Probably older systems
> require them too.

But does it have any effect for any functions we actually use?
libgnutls* uses very few POSIX/C89 functions that have thread-issues,
the only one I could find was that we use gmtime_r.

I checked on a solaris 5.10 machine, and the _REENTRANT symbol enables
prototypes for some functions like getlogin_r, ttyname_r, rand_r, and
actually also gmtime_r.  However, the gmtime_r prototype, and most other
prototypes, are also always declared if !_STRICT_STDC:

#if defined(__EXTENSIONS__) || \
        (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
        (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD,
                        struct tm *_RESTRICT_KYWD);

So I think we are safe.  To make sure, I'll build the latest daily
snapshot and build it on this machine now..

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]