ladybird/Userland/Libraries/LibC
Ben Wiederhake 6b7ce19161 Everywhere: Remove unused includes of LibC/stdlib.h
These instances were detected by searching for files that include
stdlib.h, but don't match the regex:

\\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_
uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex
it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs|
ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble
n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o
penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo
c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete
nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou
l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use anything from the stdlib.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
..
arch LibC: Remove i686 support 2022-12-28 11:53:41 +01:00
arpa Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
bits AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
net LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
netinet LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
sys LibC: Include aarch64 regs.h for AK_ARCH_AARCH64 2022-12-31 23:21:06 +01:00
alloca.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
assert.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
assert.h Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
byteswap.h Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
CMakeLists.txt LibC: Remove i686 support 2022-12-28 11:53:41 +01:00
complex.cpp LibC: Add barebones <complex.h> 2022-05-23 00:13:26 +02:00
complex.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
crt0.cpp LibC: Use uintptr_t for __stack_chk_guard 2022-11-29 11:04:21 +01:00
crt0_shared.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
ctype.cpp LibC: Align _ctype_ to newlib's implementation 2022-06-30 12:34:16 +01:00
ctype.h LibC: Align _ctype_ to newlib's implementation 2022-06-30 12:34:16 +01:00
cxxabi.cpp LibC: Remove a bunch of weak pthread_* symbols 2022-07-19 20:58:51 -07:00
dirent.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
dirent.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
dlfcn.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
dlfcn.h LibDl: Move the dlfcn implementation to LibC 2022-09-05 10:12:02 +01:00
elf.h Kernel+Userland: Remove uses of the __i386__ compiler macro 2022-12-28 11:53:41 +01:00
endian.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
errno.h LibC: Implement errno via a __errno_location() function 2022-04-21 11:49:48 +02:00
errno_codes.h LibC: Add missing macro definitions for errno codes 2022-05-08 13:04:32 -07:00
fcntl.cpp LibC: Negate kernel errors before returning them in posix_fallocate() 2022-11-29 11:09:19 +01:00
fcntl.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
fd_set.h LibC: Remove semicolon in definition of FD_ZERO 2022-03-06 13:00:42 +01:00
fenv.cpp LibC: Mark fenv-family function arguments as used on aarch64 2022-12-30 08:32:46 -07:00
fenv.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
float.h LibC+LibDl: Declare functions taking no arguments as taking void 2022-01-08 19:22:00 +01:00
fnmatch.cpp Everywhere: Fix more Copyright header inconsistencies 2021-10-04 11:10:09 +01:00
fnmatch.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
getopt.cpp LibC: Treat argument "-" the same as arguments that don't start with "-" 2022-11-29 13:59:47 +00:00
getopt.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
getsubopt.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
glob.cpp LibC: Add stubs for glob and globfree 2022-07-08 22:27:38 +00:00
glob.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
grp.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
grp.h LibC: Implement getgrent_r 2022-11-25 23:13:16 +01:00
iconv.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ifaddrs.cpp Kernel+LibC: Stub out getifaddrs() and freeifaddrs() 2021-12-22 00:02:36 -08:00
ifaddrs.h Kernel+LibC: Stub out getifaddrs() and freeifaddrs() 2021-12-22 00:02:36 -08:00
inttypes.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
inttypes.h Kernel+Userland: Remove uses of the __i386__ compiler macro 2022-12-28 11:53:41 +01:00
ioctl.cpp LibC: Don't truncate arguments for ioctl() on x86_64 2021-07-22 04:18:39 +04:30
langinfo.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
langinfo.h Everywhere: Fix more Copyright header inconsistencies 2021-10-04 11:10:09 +01:00
libcinit.cpp LibC: Implement errno via a __errno_location() function 2022-04-21 11:49:48 +02:00
libgen.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
libgen.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
limits.h Kernel+LibC+LibELF: Set stack size based on PT_GNU_STACK during execve 2022-12-11 19:55:37 -07:00
link.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
link.h Userland: Remove unecessary uses of __serenity__ macro 2022-10-10 12:23:12 +02:00
locale.cpp LibC: Allow detection of supported locales through setlocale 2022-09-29 09:02:17 -04:00
locale.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
malloc.cpp LibC: Remove _aligned_malloc and _aligned_free 2022-09-16 05:39:28 +00:00
mallocdefs.h LibC: Increase alignment for malloc() BigAllocationBlocks to 16 bytes 2022-03-02 11:40:37 +01:00
math.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
math.h LibM: Move the math standard library to LibC 2022-09-16 16:09:19 +00:00
memory.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
mntent.cpp LibC: Remove TODO() macros to not break mc port 2022-01-13 18:46:22 +01:00
mntent.h LibC: Add mntent stub functions 2022-01-07 18:38:32 +01:00
net.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
netdb.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
netdb.h LibC: Add herror() and hstrerror() 2022-05-12 15:01:32 +02:00
nl_types.h Everywhere: Fix more Copyright header inconsistencies 2021-10-04 11:10:09 +01:00
paths.h Ports: Add dosfstools port 2022-10-15 13:16:24 +02:00
poll.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
poll.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
priority.cpp LibC: Add getpriority() and setpriority() stubs 2021-09-23 18:51:21 +02:00
pthread.cpp Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
pthread.h LibC: Make 'attributes' parameter for pthread_create const 2022-10-24 15:49:39 +02:00
pthread_cond.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
pthread_integration.cpp Kernel: Clean up sys$futex and add support for cross-process futexes 2022-07-21 16:39:22 +02:00
pthread_once.cpp Kernel: Clean up sys$futex and add support for cross-process futexes 2022-07-21 16:39:22 +02:00
pthread_tls.cpp LibC: Remove a bunch of weak pthread_* symbols 2022-07-19 20:58:51 -07:00
pty.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
pty.h LibC: Remove 'int* aslave' parameter from forkpty() 2021-05-06 13:52:46 +01:00
pwd.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
pwd.h LibC: Implement getpwent_r 2022-11-08 11:51:19 +01:00
qsort.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
regex.cpp LibC: Reduce reliance on the dlfcn internals for regex functions 2022-09-05 10:12:02 +01:00
regex.h LibC+LibRegex: Move central regex definitions into LibC/bits 2022-09-20 12:57:21 +01:00
resolv.cpp Everywhere: Fix more Copyright header inconsistencies 2021-10-04 11:10:09 +01:00
resolv.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
scanf.cpp Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
sched.cpp Kernel+LibC: Report correct scheduling priority limits 2022-10-27 11:30:19 +01:00
sched.h LibC: Remove duplicate definition of sched_param from sched.h 2022-10-27 11:30:19 +01:00
search.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
search.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
semaphore.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
semaphore.h LibPthread: Implement named semaphores 2022-07-21 16:39:22 +02:00
serenity.cpp Kernel+LibC: Implement readlinkat(2) 2022-12-11 19:55:37 -07:00
serenity.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
setjmp.h Kernel+Userland: Remove uses of the __i386__ compiler macro 2022-12-28 11:53:41 +01:00
shadow.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
shadow.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
signal.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
signal.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
signal_numbers.h LibC: Implement pthread_cancel 2022-07-22 10:07:15 -07:00
spawn.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
spawn.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ssp.cpp LibELF: Add stack guard hardening 2022-11-29 11:04:21 +01:00
ssp_nonshared.cpp LibC: Properly implement stack protectors 2022-11-01 14:49:09 +00:00
stat.cpp Kernel+LibC+LibCore: Implement mkdirat(2) 2022-12-11 19:55:37 -07:00
stdarg.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
stddef.h LibC: Define offsetof in stddef.h instead of sys/cdefs.h 2022-02-28 20:28:01 -08:00
stdint.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
stdio.cpp Kernel+LibC+LibCore: Implement renameat(2) 2022-12-11 19:55:37 -07:00
stdio.h Kernel+LibC+LibCore: Implement renameat(2) 2022-12-11 19:55:37 -07:00
stdio_ext.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
stdlib.cpp LibC: Make strtod use the new exact number parser 2022-10-23 15:48:45 +02:00
stdlib.h LibC: Implement mkstemps() in stdlib and add a test 2022-10-06 16:14:40 +01:00
string.cpp LibC: Remove i686 support 2022-12-28 11:53:41 +01:00
string.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
strings.cpp LibC: Add ffs{,l,ll} 2022-10-14 13:37:29 +02:00
strings.h LibC: Add ffs{,l,ll} 2022-10-14 13:37:29 +02:00
stubs.cpp Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
sysexits.h LibC: Use EX_IOERR instead of EX_IOER 2021-06-10 20:21:08 +01:00
syslog.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
syslog.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
termcap.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
termcap.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
termios.cpp LibC: Mark a bunch of functions as cancellation points 2022-07-22 10:07:15 -07:00
termios.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
time.cpp Everywhere: Remove unused includes of LibC/stdlib.h 2023-01-02 20:27:20 -05:00
time.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
times.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ucontext.h LibC: Add public and independent ucontext.h header 2022-06-12 00:28:26 +01:00
ulimit.cpp LibC: Add a wrapper for the getrusage syscall 2022-02-28 20:09:37 +01:00
ulimit.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
unistd.cpp Kernel+LibC: Implement setregid(2) 2022-12-11 19:55:37 -07:00
unistd.h Kernel+LibC: Implement setregid(2) 2022-12-11 19:55:37 -07:00
utime.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
utime.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
utmp.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
utsname.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
wchar.cpp LibC: Implement wcswidth 2022-06-30 11:57:49 +02:00
wchar.h LibC: Implement wcswidth 2022-06-30 11:57:49 +02:00
wctype.cpp Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
wctype.h LibC: Add missing sys/cdefs.h include 2022-08-23 19:07:12 +01:00
wstdio.cpp LibC: Automatically append null terminator in vswprintf 2022-03-20 08:40:36 -04:00