lib/libc/strptime.h|c

David Hampton hampton-gnucash at rainbolthampton.net
Sun Aug 7 10:30:32 EDT 2005


On Sun, 2005-08-07 at 13:55 +0100, Neil Williams wrote:
> In sixtp-utils.c, we currently have:
> 
> #ifndef HAVE_STRPTIME
> #include "strptime.h"
> #endif
> #ifndef HAVE_LOCALTIME_R
> #include "localtime_r.h"
> #endif
> 
> and files in lib/libc:
> libc-missing-noop.c  localtime_r.c  localtime_r.h  Makefile.am  scm_strptime.c  
> strptime.c  strptime.h
> 
> instead of
> 
> #include <time.h>
> 
> What is the reason for this?

Its there to provide the strptime() and localtime_r() functions for any
system that don't provide them as part of libc.  This is an autotools
semi-standard for insuring that a required function exists on all
systems the program is compiled on.  The native function will be used
whereever it can be found, and the program private function will be used
only as a fallback.

> Do we still need it?

Don't know.  I don't know what system it was originally added for, and I
haven't run across a system where these functions had to be compiled.
Doesn't mean there still isn't one.

David




More information about the gnucash-devel mailing list