zephyr/lib/posix/options
Yong Cong Sin fe94d4354a libc: common: implement multiple time functions
Implemented the following:
- `asctime_r()`
- `asctime()`
- `localtime()`
- `localtime_r()`
- `ctime()`
- `ctime_r()`

Specifically:
- the implementation of `localtime()` & `localtime_r()` simply
  wraps around the gmtime() & gmtime_r() functions, the
  results are always expressed as UTC.
- `ctime()` is equivalent to `asctime(localtime(clock))`, it
  inherits the limitation of `localtime()` as well, which only
  supports UTC results currently.

Added tests for these newly implemented functions.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-21 16:59:15 -04:00
..
getopt posix: deprecate POSIX_FNMATCH GETOPT GETENTROPY 2024-06-04 16:27:12 -05:00
CMakeLists.txt lib: posix: add stubs for thread-safe grp & pwd functions 2024-08-05 10:17:27 +02:00
Kconfig libc: common: implement multiple time functions 2024-08-21 16:59:15 -04:00
Kconfig.aio posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.barrier posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.c_lang_r libc: common: implement multiple time functions 2024-08-21 16:59:15 -04:00
Kconfig.c_lib_ext posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.compat posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.deprecated posix: deprecated: remove new options without deprecation 2024-07-18 16:28:02 -04:00
Kconfig.device_io Revert "posix: device_io: require a full libc for c89 functions" 2024-07-03 15:03:05 -04:00
Kconfig.fd_mgmt Revert "posix: kconfig: remove select y from non-user-selectable help" 2024-07-03 15:03:05 -04:00
Kconfig.fs lib: posix: update option group of `readdir_r()` 2024-08-21 16:59:15 -04:00
Kconfig.mem posix: implement mprotect() 2024-06-14 14:01:05 -04:00
Kconfig.mqueue kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
Kconfig.net posix: net: update for POSIX_NETWORKING 2024-06-04 16:27:12 -05:00
Kconfig.proc1 posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.procN posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.profile posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.pthread libc: common: implement multiple time functions 2024-08-21 16:59:15 -04:00
Kconfig.rwlock posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.sched posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.semaphore kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
Kconfig.signal Revert "posix: add stubs for signal.h functions that need process support" 2024-07-03 15:03:05 -04:00
Kconfig.spinlock posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.sync_io posix: deprecate POSIX_FS for POSIX_FILE_SYSTEM 2024-06-04 16:27:12 -05:00
Kconfig.timer posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
Kconfig.toolchain posix: allow for external implementation of option groups 2024-06-26 13:08:21 -04:00
Kconfig.xsi posix: create kconfig options for pse51, pse52, pse53 2024-06-04 16:27:12 -05:00
aio.c posix: add stubs for asynchronous io 2024-04-29 11:02:11 +02:00
barrier.c
clock.c lib/posix: Get uptime in ticks instead of cycles 2024-06-28 21:01:54 -04:00
cond.c
confstr.c posix: unistd: support for confstr() 2024-03-22 08:57:44 +01:00
device_io.c Revert "posix: device_io: implement pread() and pwrite()" 2024-07-03 15:03:05 -04:00
env.c posix: env: Fix 2 build warnings 2024-05-14 13:25:33 +02:00
eventfd.c posix: eventfd: fix dependency cycle between net and posix 2024-06-04 16:27:12 -05:00
fd_mgmt.c Revert "posix: fd_mgmt: implement dup(), dup2(), fseeko(), and ftello()" 2024-07-03 15:03:05 -04:00
fnmatch.c
fs.c lib: posix: update option group of `readdir_r()` 2024-08-21 16:59:15 -04:00
fsync.c posix: fs: implement `fdatasync()` 2024-07-29 14:14:33 +02:00
getentropy.c posix: deprecate POSIX_FNMATCH GETOPT GETENTROPY 2024-06-04 16:27:12 -05:00
grp.c lib: posix: add stubs for thread-safe grp & pwd functions 2024-08-05 10:17:27 +02:00
key.c posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY 2024-06-04 16:27:12 -05:00
mlock.c posix: add support for mlock() and munlock() 2024-06-14 14:01:05 -04:00
mlockall.c posix: add support for mlockall() and munlockall() 2024-06-14 14:01:05 -04:00
mmap.c posix: add implementation of mmap(), msync(), and munmap() 2024-06-14 14:01:05 -04:00
mprotect.c posix: implement mprotect() 2024-06-14 14:01:05 -04:00
mqueue.c posix: deprecate POSIX_MQUEUE in favour of POSIX_MESSAGE_PASSING 2024-06-04 16:27:12 -05:00
multi_process.c Revert "posix: procN: add missing alias for getpid()" 2024-07-03 15:03:05 -04:00
mutex.c lib: posix: mutex: stubs remaining of _POSIX_THREAD_PRIO_PROTECT 2024-08-05 11:32:43 +02:00
net.c posix: net: update for POSIX_NETWORKING 2024-06-04 16:27:12 -05:00
perror.c
posix_clock.h build: namespace the generated headers with `zephyr/` 2024-05-28 22:03:55 +02:00
posix_internal.h posix: Implement set and get inheritsched APIs for pthread attr 2024-04-01 11:04:35 +01:00
pthread.c posix: pthread: correct log info of new stack address 2024-06-26 13:06:28 -04:00
pthread_sched.h posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY 2024-06-04 16:27:12 -05:00
pwd.c lib: posix: add stubs for thread-safe grp & pwd functions 2024-08-05 10:17:27 +02:00
rwlock.c posix: re-introduce PTHREAD_RWLOCK_INITIALIZER 2024-06-05 19:31:59 -04:00
sched.c posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY 2024-06-04 16:27:12 -05:00
semaphore.c posix: deprecate SEM_VALUE_MAX and SEM_NAMELEN_MAX 2024-06-04 16:27:12 -05:00
shm.c posix: shm: fix build error with minimal libc 2024-07-10 14:40:48 +02:00
signal.c Revert "posix: add stubs for signal.h functions that need process support" 2024-07-03 15:03:05 -04:00
sleep.c posix: timers: deprecate CONFIG_POSIX_CLOCK and TIMER 2024-06-04 16:27:12 -05:00
spinlock.c
stropts.c posix: move ioctl() from fdtable to posix 2024-06-14 14:01:05 -04:00
sysconf.c posix: sysconf: define z sysconf macros with COND_CODE_1 2024-06-04 16:27:12 -05:00
syslog.c posix: syslog: Fix uninitialized variable error 2024-03-10 07:44:03 -04:00
timer.c posix: timers: deprecate CONFIG_POSIX_CLOCK and TIMER 2024-06-04 16:27:12 -05:00
timespec_to_timeout.c posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY 2024-06-04 16:27:12 -05:00
uname.c build: namespace the generated headers with `zephyr/` 2024-05-28 22:03:55 +02:00