nuttx/libs/libc/stdio
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 stdio: Remove CONFIG_EOL_IS_XXX 2023-02-24 00:35:19 +08:00
lib_asprintf.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_clearerr.c stdio/lib_clearerr: Did not clear stream buffer flags in clearerr 2021-03-17 03:15:17 -07:00
lib_dprintf.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_dtoa_data.c libs/libc/stdio: replace double_t to double 2020-09-15 14:42:36 +08:00
lib_dtoa_engine.c nuttx: Use MIN/MAX definitions from "sys/param.h" 2023-02-01 23:47:44 +08:00
lib_dtoa_engine.h Remove the unnecessary math.h inclusion 2021-04-12 22:58:23 -04:00
lib_fclose.c libc/misc: add fdsan module 2023-05-17 10:24:42 +08:00
lib_feof.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_ferror.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_fflush.c fs/streams: Move the file streams from the group structure into TLS 2022-12-22 20:16:11 +08:00
lib_fgetc.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_fgetpos.c lib/stdio: Handle 64bits off_t correctly 2021-11-18 10:06:27 -05:00
lib_fgets.c libc/gets: Remove the unnecessary cast 2021-11-27 16:07:39 -03:00
lib_fileno.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_fopen.c libc/fdsan: add fdsan protection for all file pointers 2023-05-27 15:05:44 +08:00
lib_fprintf.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_fputc.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_fputs.c Fix -Werror=nonnull-compare and -Werror=format-truncation= 2022-03-02 15:55:38 +08:00
lib_fread.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_freopen.c freopen: Added flush of the read buffers. 2022-10-18 23:29:55 +08:00
lib_fscanf.c NuttX: Johannes Schock: update licenses to Apache 2021-04-01 12:13:12 -05:00
lib_fseek.c lib/stdio: Handle 64bits off_t correctly 2021-11-18 10:06:27 -05:00
lib_fseeko.c lib/stdio: Handle 64bits off_t correctly 2021-11-18 10:06:27 -05:00
lib_fsetpos.c lib/stdio: Handle 64bits off_t correctly 2021-11-18 10:06:27 -05:00
lib_ftell.c lib/stdio: Handle 64bits off_t correctly 2021-11-18 10:06:27 -05:00
lib_ftello.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_fwrite.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_getc.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_getchar.c libc: Make perror/putchar/getchar/puts work without CONFIG_FILE_STREAM 2021-11-18 06:29:09 -08:00
lib_getdelim.c stdio: Remove CONFIG_EOL_IS_XXX 2023-02-24 00:35:19 +08:00
lib_gets_s.c libc/stdio: Make gets/gets_s work without CONFIG_FILE_STREAM 2023-02-24 10:39:48 +08:00
lib_gets.c libc/stdio: Make gets/gets_s work without CONFIG_FILE_STREAM 2023-02-24 10:39:48 +08:00
lib_libdgets.c libc/stdio: Make gets/gets_s work without CONFIG_FILE_STREAM 2023-02-24 10:39:48 +08:00
lib_libdtoa.c nuttx: Use MIN/MAX definitions from "sys/param.h" 2023-02-01 23:47:44 +08:00
lib_libfflush.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_libfgets.c stdio: lib_fgets convert \r\n to \n 2023-02-24 10:39:48 +08:00
lib_libfilelock.c semantic/parser: fix compile warning found by sparse 2023-05-30 23:00:00 +08:00
lib_libflushall.c libc/stdio: Remove the one line mutex wrapper 2022-11-09 21:38:10 +01:00
lib_libfread.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_libfwrite.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_libgetstreams.c semantic/parser: fix compile warning found by sparse 2023-05-30 23:00:00 +08:00
lib_libsprintf.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_libstream.c fs/streams: Move the file streams from the group structure into TLS 2022-12-22 20:16:11 +08:00
lib_libvscanf.c libc/stream: Rename [lib_stream_](put|get) to [lib_stream_](putc|getc) 2022-12-05 14:27:55 +01:00
lib_libvsprintf.c libc/libvsprintf:fix vsnprintf bug with "%#.0f" 2023-07-04 10:36:31 -03:00
lib_perror.c Indent the define statement by two spaces 2023-05-21 09:52:08 -03:00
lib_printf.c libc/stdio: Allocate file_struct dynamically 2020-09-11 17:58:17 +08:00
lib_putc.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_putchar.c libc: Make perror/putchar/getchar/puts work without CONFIG_FILE_STREAM 2021-11-18 06:29:09 -08:00
lib_puts.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_rdflush.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_remove.c libc/lib_remove: fix TOCTOU race condition 2023-06-29 18:15:06 +08:00
lib_renameat.c libc: Add a new argument(size_t fulllen) to lib_getfullpath 2023-05-08 09:57:01 +02:00
lib_rewind.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_scanf.c NuttX: Johannes Schock: update licenses to Apache 2021-04-01 12:13:12 -05:00
lib_setbuf.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_setbuffer.c libc: Add setbuffer to stdio. 2023-05-01 11:24:41 +03:00
lib_setvbuf.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_snprintf.c libs: nxstyle fixes 2021-03-03 18:52:53 -08:00
lib_sprintf.c libc/stdio: Move source files to the right Makefile section 2021-11-19 08:21:27 -03:00
lib_sscanf.c NuttX: Johannes Schock: update licenses to Apache 2021-04-01 12:13:12 -05:00
lib_tempnam.c Fixes in asprintf usage. 2023-04-19 02:48:39 +08:00
lib_tmpfile.c libc: tmpfile shouldn't hardcode the folder to /tmp 2020-06-03 07:46:02 -06:00
lib_tmpnam.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_ultoa_invert.c Revert "libc/stdio: enable long long formating by CONFIG_HAVE_LONG_LONG" 2022-07-20 18:06:29 +03:00
lib_ultoa_invert.h Revert "libc/stdio: enable long long formating by CONFIG_HAVE_LONG_LONG" 2022-07-20 18:06:29 +03:00
lib_ungetc.c libs/libc/stdio: fix ungetc operation 2022-10-14 23:29:38 +08:00
lib_vasprintf.c asprintf: Fixed possible memory leak if print fails. 2023-03-28 14:46:07 -03:00
lib_vdprintf.c stdio: Implement simple buffered out stream for vdprintf 2023-03-01 13:08:59 +09:00
lib_vfprintf.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_vfscanf.c libc/stdio: Add stdio file locking functions 2022-10-22 23:34:45 +08:00
lib_vprintf.c libc/stdio: Allocate file_struct dynamically 2020-09-11 17:58:17 +08:00
lib_vscanf.c libc: Implement vscanf() function 2020-06-03 07:35:08 -06:00
lib_vsnprintf.c libs: Gregory Nutt: update licenses to Apache 2021-04-02 11:12:25 -05:00
lib_vsprintf.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
lib_vsscanf.c sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
lib_wrflush.c libs: Author Gregory Nutt: update licenses to Apache 2021-03-03 18:52:53 -08:00
Make.defs libc: Add setbuffer to stdio. 2023-05-01 11:24:41 +03:00