New module 'strptime'. Initial fixes.
authorBruno Haible <bruno@clisp.org>
Mon, 29 Jan 2007 17:33:12 +0000 (17:33 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 29 Jan 2007 17:33:12 +0000 (17:33 +0000)
ChangeLog
MODULES.html.sh
lib/strptime.h
modules/strptime

index 0fcc2db..abb8b8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-29  Bruno Haible  <bruno@clisp.org>
+
+       * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
+       strptime.
+       * modules/strptime (Depends-on): Add stdbool.
+       * lib/strptime.h: Include <time.h> always. Add comments.
+
 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
 
        * modules/strptime: New file.
index cf83857..00119c2 100755 (executable)
@@ -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
index ebd6c82..7f0b118 100644 (file)
@@ -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
 #ifndef GNULIB_STRPTIME_H_
 #define GNULIB_STRPTIME_H_
 
-#if HAVE_STRPTIME
-# include <time.h>
-#else
-extern char *strptime(const char *s, const char *format, struct tm *tm);
-#endif
+#include <time.h>
 
+#if ! HAVE_STRPTIME
+/* See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
+extern char *strptime (const char *s, const char *format, struct tm *tm);
 #endif
+
+#endif /* GNULIB_STRPTIME_H_ */
index aecfd36..866562f 100644 (file)
@@ -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