]> Zhao Yanbai Git Server - minix.git/commitdiff
strptime() for minix.
authorBen Gras <ben@minix3.org>
Tue, 22 Jun 2010 21:42:49 +0000 (21:42 +0000)
committerBen Gras <ben@minix3.org>
Tue, 22 Jun 2010 21:42:49 +0000 (21:42 +0000)
include/time.h
lib/libc/stdtime/Makefile.inc
lib/libc/stdtime/strptime.c

index fe2970dd93a7361f43b07fb2eaa3218ee3128397..7dc7de4596d1b7e8ef7cbbfae5a853c6e198dd06 100644 (file)
@@ -66,6 +66,8 @@ _PROTOTYPE( struct tm *localtime_r, (const time_t *const timep,
                                        struct tm *tmp)                 );
 _PROTOTYPE( size_t strftime, (char *_s, size_t _max, const char *_fmt,
                                const struct tm *_timep)                );
+_PROTOTYPE(char *strptime, (const char *buf, const char *format,
+                               struct tm *timeptr)                     );
 
 #ifdef _POSIX_SOURCE
 _PROTOTYPE( void tzset, (void)                                         );
index 518de68f91f057af2e15cf46881c351ecb9b937b..7588617d7090c6f2330832780ae32a88cdfa2409 100644 (file)
@@ -5,4 +5,5 @@ SRCS+=  \
        ftime.c \
        asctime.c \
        localtime.c \
-       strftime.c
+       strftime.c \
+       strptime.c
index 59eacbcc77aa11447ad5acf851a0382453c6cf30..968283a7e1e0d66923936e54ef096dd368a7bea0 100644 (file)
 #include <config.h>
 #endif
 #include <ctype.h>
+#ifdef __minix
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+#endif
+
+#ifndef __minix
 #include "roken.h"
 
 __RCSID("$Heimdal: strptime.c,v 1.2 1999/11/12 15:29:55 assar Exp $"
         "$NetBSD: strptime.c,v 1.1.1.3 2002/09/12 12:41:42 joda Exp $");
+#endif
 
 static const char *abb_weekdays[] = {
     "Sun",