llvm-project/libc
Raman Tenneti a72499e475 [libc] Introduce asctime, asctime_r to LLVM libc
[libc] Introduce asctime, asctime_r to LLVM libc

asctime and asctime_r share the same common code. They call asctime_internal
a static inline function.

asctime uses snprintf to return the string representation in a buffer.
It uses the following format (26 characters is the buffer size) as per
7.27.3.1 section in http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2478.pdf.
The buf parameter for asctime_r shall point to a buffer of at least 26 bytes.

snprintf(buf, 26, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",...)

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D99686
2021-05-03 17:15:00 -07:00
..
AOR_v20.02 Harmonize Python shebang 2020-07-16 21:53:45 +02:00
benchmarks Fix errors in distributions 2021-02-11 21:53:50 +00:00
cmake/modules [libc][NFC] Add an alias named "check-llvmlibc" for "check-libc". 2021-03-22 16:55:34 +00:00
config [libc] Introduce asctime, asctime_r to LLVM libc 2021-05-03 17:15:00 -07:00
docs [libc] Add documentation for clang-tidy checks. 2020-07-06 18:15:35 -07:00
fuzzing [libc] Make FPBits a union. 2021-04-13 09:21:35 -07:00
include [libc][NFC][Obvious] Add a missing dep. 2021-01-18 22:04:20 -08:00
lib [libc] Add a target "install-llvmlibc" to install LLVM libc static archive. 2021-03-22 04:45:14 +00:00
loader [libc] Setup TLS in x86_64 loader. 2020-08-07 23:19:03 -07:00
spec [libc] Introduce asctime, asctime_r to LLVM libc 2021-05-03 17:15:00 -07:00
src [libc] Introduce asctime, asctime_r to LLVM libc 2021-05-03 17:15:00 -07:00
test [libc] Introduce asctime, asctime_r to LLVM libc 2021-05-03 17:15:00 -07:00
utils [libc] Add differential quality and perf analysis targets for sinf and cosf. 2021-04-26 19:39:33 +00:00
CMakeLists.txt [libc] warns about missing linting only in full build mode 2021-05-03 08:39:26 +00:00
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README.txt

README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.