From: Bruno Haible Date: Mon, 29 Jan 2007 17:33:12 +0000 (+0000) Subject: New module 'strptime'. Initial fixes. X-Git-Tag: cvs-readonly~1170 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=0730a6cdc74a97b1b5b507c0be6116cc0967c056;p=gnulib.git New module 'strptime'. Initial fixes. --- diff --git a/ChangeLog b/ChangeLog index 0fcc2db72..abb8b8bc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-01-29 Bruno Haible + + * MODULES.html.sh (Support for systems lacking POSIX:2001): Add + strptime. + * modules/strptime (Depends-on): Add stdbool. + * lib/strptime.h: Include always. Add comments. + 2007-01-29 Yoann Vandoorselaere * modules/strptime: New file. diff --git a/MODULES.html.sh b/MODULES.html.sh index cf83857b5..00119c288 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -1959,6 +1959,7 @@ func_all_modules () func_module rmdir func_module sigprocmask func_module ssize_t + func_module strptime func_module strtok_r func_module sys_stat func_module sys_time diff --git a/lib/strptime.h b/lib/strptime.h index ebd6c8205..7f0b118a9 100644 --- a/lib/strptime.h +++ b/lib/strptime.h @@ -1,5 +1,5 @@ -/* Searching in a string. - Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc. +/* Convert a string representation of time to a tm structure. + Copyright (C) 2001-2003, 2005, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,10 +18,12 @@ #ifndef GNULIB_STRPTIME_H_ #define GNULIB_STRPTIME_H_ -#if HAVE_STRPTIME -# include -#else -extern char *strptime(const char *s, const char *format, struct tm *tm); -#endif +#include +#if ! HAVE_STRPTIME +/* See the POSIX:2001 specification + . */ +extern char *strptime (const char *s, const char *format, struct tm *tm); #endif + +#endif /* GNULIB_STRPTIME_H_ */ diff --git a/modules/strptime b/modules/strptime index aecfd36dd..866562f51 100644 --- a/modules/strptime +++ b/modules/strptime @@ -1,15 +1,16 @@ Description: -convert a string representation of time to a time tm structure +Convert a string representation of time to a tm structure. Files: -lib/strptime.c lib/strptime.h +lib/strptime.c m4/strptime.m4 Depends-on: sys_time string strcase +stdbool configure.ac: gl_FUNC_STRPTIME