bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] [PATCH]: strptime module


From: Bruno Haible
Subject: Re: [bug-gnulib] [PATCH]: strptime module
Date: Mon, 29 Jan 2007 18:27:39 +0100
User-agent: KMail/1.9.1

Yoann Vandoorselaere wrote:
> Here is a GnuLib module providing the strptime function, merged from the
> glibc implementation. From my minor testing, the module seem to work.

Thanks. I added this to gnulib and made the following minor changes.


2007-01-29  Bruno Haible  <address@hidden>

        * 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.

*** MODULES.html.sh     29 Jan 2007 07:23:21 -0000      1.178
--- MODULES.html.sh     29 Jan 2007 17:30:20 -0000
***************
*** 1959,1964 ****
--- 1959,1965 ----
    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
*** lib/strptime.h      29 Jan 2007 17:21:16 -0000      1.1
--- lib/strptime.h      29 Jan 2007 17:30:20 -0000
***************
*** 1,5 ****
! /* Searching in a string.
!    Copyright (C) 2001-2003, 2005 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
--- 1,5 ----
! /* 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,27 ****
  #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
  
  #endif
--- 18,29 ----
  #ifndef GNULIB_STRPTIME_H_
  #define GNULIB_STRPTIME_H_
  
! #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_ */
*** modules/strptime    29 Jan 2007 17:21:16 -0000      1.1
--- modules/strptime    29 Jan 2007 17:30:20 -0000
***************
*** 1,15 ****
  Description:
! convert a string representation of time to a time tm structure
  
  Files:
- lib/strptime.c
  lib/strptime.h
  m4/strptime.m4
  
  Depends-on:
  sys_time
  string
  strcase
  
  configure.ac:
  gl_FUNC_STRPTIME
--- 1,16 ----
  Description:
! Convert a string representation of time to a tm structure.
  
  Files:
  lib/strptime.h
+ lib/strptime.c
  m4/strptime.m4
  
  Depends-on:
  sys_time
  string
  strcase
+ stdbool
  
  configure.ac:
  gl_FUNC_STRPTIME




reply via email to

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