# HG changeset patch # User Bruno Haible # Date 1170091992 0 # Node ID 005cc63d6763a66369e6c9e30203416758de5a46 # Parent 4926328afe92529a16278bd76c74fb7aaf13be7a New module 'strptime'. Initial fixes. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -1959,6 +1959,7 @@ 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 --- 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); +#include + +#if ! HAVE_STRPTIME +/* See the POSIX:2001 specification + . */ +extern char *strptime (const char *s, const char *format, struct tm *tm); #endif -#endif +#endif /* GNULIB_STRPTIME_H_ */ diff --git a/modules/strptime b/modules/strptime --- 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.h lib/strptime.c -lib/strptime.h m4/strptime.m4 Depends-on: sys_time string strcase +stdbool configure.ac: gl_FUNC_STRPTIME