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: Fri, 8 Jul 2005 23:52:29 +0200
User-agent: Mutt/1.4.2.1i

> No, those functions are never called with rpl_ prepended.  Instead,
> the usual pattern is something like this:
> 
> In config.h:
> 
> #define malloc rpl_malloc
> 
> In malloc.c:
> 
> #include <config.h>
> #undef malloc
> void *rpl_malloc (size_t n) { ... malloc (n) ... }
> 
> This way, only config.h and malloc.c need to know about the replacement;

But that's not how it's done for mktime. Indeed in m4/mktime.m4 there is
AC_DEFINE(mktime, rpl_mktime
while in lib/mktime.c there is

time_t
mktime (struct tm *tp)

and not
time_t
rpl_mktime (struct tm *tp)
 
Doesn't that cause an error with rpl_mktime not found?

Anyway I didn't said to rename mktime to rpl_mktime in the program, but in the 
gnulib lib/mktime.c file.

--
Pat




reply via email to

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