libc/time: add lib_strptime

The community deleted strptime due to license reasons, and we replaced it with musl.

Signed-off-by: chenjiahua1 <chenjiahua1@xiaomi.com>
This commit is contained in:
chenjiahua1
2024-09-11 16:55:59 +08:00
committed by GUIDINGLI
parent 8cfe8a0f3e
commit 64eecbfede
4 changed files with 626 additions and 23 deletions

24
LICENSE
View File

@@ -5897,6 +5897,7 @@ libs/libm/libm/scalbnf.c
libs/libm/libm/scalbn.c
libs/libm/libm/scalbnl.c
libs/libc/stdlib/lib_strtof.c
libs/libc/time/lib_strptime.c
======================
Copyright © 2005-2020 Rich Felker, et al.
@@ -6398,29 +6399,6 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
libs/libc/time/lib_strptime.c
=======================================
Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. All rights reserved.
This code was contributed to The NetBSD Foundation by Klaus Klein.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
4. Neither the name of The NetBSD Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
libs/libc/unistd/lib_gethostname.c
libs/libc/unistd/lib_sethostname.c
include/sys/uio.h