Commit graph

6 commits

Author SHA1 Message Date
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Luke
5fbb8f9c6a LibC: Add FIXME for vsscanf 2020-09-27 01:02:11 +02:00
Sergey Bugaev
1cdd798ac7 LibC: Replace some strncpy() calls with memcpy()
In case we know exactly how many bytes we're copying (and not copying a string
while limiting its length to that of a buffer), memcpy() is a more appropriate
function to call.

Also, fix null-terminating the %c pointer.
2020-08-30 17:35:27 +02:00
Ben Wiederhake
f7fe63c6b0 LibC: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code.
For example with the unused function malloc_good_size() :^)

I found these places by using -Wmissing-declarations.

The Kernel still shows these issues, which I think are false-positives,
but don't want to touch:
- Libraries/LibC/crt0.cpp:41:5: int _start(int, char**, char**)
	Not sure how to handle this.
- Libraries/LibC/cxxabi.cpp:48:5: int __cxa_atexit(AtExitFunction, void*, void*)
- Libraries/LibC/cxxabi.cpp:58:6: void __cxa_finalize(void*)
	Not sure how to tell the compiler that the compiler is already using them.
- Libraries/LibC/libcinit.cpp:36:6: void __libc_init()
- Libraries/LibC/libcinit.cpp:55:19: void __stack_chk_fail()
- Libraries/LibC/malloc.cpp:430:6: void __malloc_init()
- Libraries/LibC/stdio.cpp:562:6: void __stdio_init()
	These are ninja-imported by other LibC functions.
	Maybe we should have some kind of "internals.h" header.
2020-08-12 20:40:59 +02:00
Andreas Kling
6d7854919a LibC: Some build fixes for strange platforms
Patch from Anonymous.
2019-09-29 21:02:13 +02:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Renamed from LibC/scanf.cpp (Browse further)