bug-gnulib
[Top][All Lists]
Advanced

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

Re: no rpl_mktime in mktime.c


From: Patrice Dumas
Subject: Re: no rpl_mktime in mktime.c
Date: Mon, 11 Jul 2005 10:03:13 +0200
User-agent: Mutt/1.4.2.1i

> This problem has been fixed for localtime_r in a different way, and we
> could use the same method to fix it for mktime_r.  That is, we could
> change the role of time_r.h to mean "act like time.h, but replace
> functions that need to get fixed", and then have it "#define mktime
> rpl_mktime".  Would that work for you?  If so, perhaps we should do

It is likely that it fixes my issue (I cannot test myself). I think that in the
case of mktime it should be quite easy to do as it depends on time_r. So if
I'm not wrong what should be done is to replace

    AC_DEFINE(mktime, rpl_mktime,
      [Define to rpl_mktime if the replacement function should be used.])
 
by something like (could be in the autoconf macro as well)

    AC_DEFINE([HAVE_MKTIME_BUG], 1,
      [Define to 1 if the system mktime does not pass sanity tests.])

and then in time_r.h there could be

#if HAVE_MKTIME_BUG
#define mktime rpl_mktime
#endif    

> this sort of thing for all the rpl_* functions.

I don't think it is a good idea, as it imposes to replace the 
#include <system.h>
by 
#include "system_r.h"
so I think it should only be done whenever there is a report.

--
Pat




reply via email to

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