nuttx/libs/libc/unistd
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
..
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig boars/spawn_proxy: remove all CONFIG_POSIX_SPAWN_PROXY_STACKSIZE 2023-04-27 17:35:58 +08:00
lib_access.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_alarm.c
lib_chdir.c libc: Don't duplicate string in chdir and lib_restoredir 2022-04-18 10:36:36 +03:00
lib_daemon.c Fix typos in comments and identifiers 2021-07-19 22:55:30 -03:00
lib_execl.c Fix various typos 2022-07-08 02:15:54 +08:00
lib_execle.c Fix various typos 2022-07-08 02:15:54 +08:00
lib_execv.c sched/task: Implement execle and execve 2022-04-22 10:40:31 +03:00
lib_fchdir.c fs/dir: support fchdir and dirfd 2022-08-09 23:30:01 +08:00
lib_fchownat.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_fstatvfs.c
lib_futimes.c libc: Implement futimes on top of futimens 2021-07-09 15:51:28 -03:00
lib_getcwd.c change strcpy to strlcpy 2023-02-24 12:15:40 +08:00
lib_getegid.c
lib_getentropy.c libc: implement getentropy function 2022-03-25 13:48:33 +02:00
lib_geteuid.c
lib_getgid.c
lib_gethostname.c Replace all strncpy with strlcpy for safety 2022-08-25 13:38:36 +08:00
lib_getopt_common.c libc/unistd: getopt: Use argc to end parsing 2021-12-15 12:02:59 -06:00
lib_getopt_long.c Implement getopt_long() and getopt_long_only() 2021-04-01 23:06:23 -05:00
lib_getopt_longonly.c Implement getopt_long() and getopt_long_only() 2021-04-01 23:06:23 -05:00
lib_getopt.c getopt(): Update comments about missing functionality 2021-04-04 22:31:47 +01:00
lib_getoptargp.c Move getopt() variables into TLS 2021-03-31 21:13:01 -05:00
lib_getopterrp.c Move getopt() variables into TLS 2021-03-31 21:13:01 -05:00
lib_getoptindp.c Move getopt() variables into TLS 2021-03-31 21:13:01 -05:00
lib_getoptoptp.c Move getopt() variables into TLS 2021-03-31 21:13:01 -05:00
lib_getoptvars.c sched/tls: Wrap up_info_size into tls_info_size 2022-06-08 19:07:33 +09:00
lib_getpgrp.c libs/libc/unistd: add getpgrp function 2023-06-26 01:03:36 +08:00
lib_getpriority.c sched/getpid: replace syscall getpid/tid/ppid() to kernel version 2023-02-02 10:33:01 +08:00
lib_getrlimit.c libc: unistd: lib_getrlimit: set cur/max value for RLIMIT_NOFILE to "OPEN_MAX". 2023-02-17 18:07:30 +08:00
lib_getrusage.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
lib_getuid.c
lib_linkat.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_lutimes.c fs: Add utimens and lutimens 2021-08-09 17:55:44 -03:00
lib_nice.c libc/sched: Implement nice API 2021-06-24 08:50:48 -03:00
lib_pathconf.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
lib_posix_fallocate.c Ensure the kernel component don't call userspace API 2021-03-01 09:23:09 +09:00
lib_readlinkat.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_restoredir.c semantic/parser: fix compile warning found by sparse 2023-05-30 23:00:00 +08:00
lib_setegid.c
lib_seteuid.c
lib_setgid.c
lib_sethostname.c nuttx: Use MIN/MAX definitions from "sys/param.h" 2023-02-01 23:47:44 +08:00
lib_setpriority.c semantic/parser: fix compile warning found by sparse 2023-05-30 23:00:00 +08:00
lib_setregid.c
lib_setreuid.c
lib_setrlimit.c Fix compiler warnings (-Wunused-parameter) in various functions 2022-07-12 11:42:34 +08:00
lib_setuid.c
lib_sleep.c
lib_statvfs.c
lib_swab.c Replace all strncpy with strlcpy 2023-05-08 09:57:01 +02:00
lib_symlinkat.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_sysconf.c sched/clock/clock_getres: add two CPUTIME_ID res support 2023-07-03 23:11:00 +03:00
lib_times.c libc: Implement times function 2021-07-21 13:11:54 -03:00
lib_truncate.c
lib_unlinkat.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_usleep.c
lib_utime.c libc: Implement utime on top of utimes 2021-07-09 15:51:28 -03:00
lib_utimes.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
Make.defs libs/libc/unistd: add getpgrp function 2023-06-26 01:03:36 +08:00
unistd.h include: fix double include pre-processor guards 2022-01-16 11:11:14 -03:00