[23891] in Kerberos

home help back first fref pref prev next nref lref last post

Re: gmtime_r

daemon@ATHENA.MIT.EDU (Albert Chin)
Thu May 12 22:20:53 2005

Date: Thu, 12 May 2005 21:20:13 -0500
From: Albert Chin <kerberos@mlists.thewrittenword.com>
To: kerberos@mit.edu
Message-ID: <20050513022012.GB61725@mail1.thewrittenword.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5450ee403cafa582658b8efb95f3f7cc@mit.edu>
Reply-To: kerberos@mit.edu
Errors-To: kerberos-bounces@mit.edu

On Thu, May 12, 2005 at 10:08:32PM -0400, Ken Raeburn wrote:
> As for the reason it's failing to determine the return type, it looks 
> like gmtime_r is only declared if _REENTRANT is defined.  With our 
> current configuration framework, causing that to be defined would be 
> easy; causing it to happen without forcing the pthread library to be 
> linked into every Kerberos program may be hard.  But as a workaround, 
> you could try (in a fresh tree):
> 
>   configure --prefix=... CPPFLAGS=-D_REENTRANT

It's not too hard to determine if gmtime_r needs -D_REENTRANT and then
define GMTIME_R_NEEDS__REENTRANT and then:
  #ifdef GMTIME_R_NEEDS__REENTRANT
  #define _REENTRANT
  #endif
where needed in .c files.

We've done something similar in KDE's configure.ac for HP-UX which
needs _REENTRANT for some functions.

-- 
albert chin (china@thewrittenword.com)
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post