taisei/src/vfs
Andrei Alexeyev fda8556a39
src: deprecate strdup(), use mem_strdup() explicitly
This fixes a nasty bug that manifests on windows when building without
precompiled headers. util/stringops.h used to silently replace strdup
with a macro that's compatible with mem_free(). This header would
typically be included everywhere due to PCH, but without it the strdup
from libc would sometimes be in scope. On most platforms mem_free() is
equivalent to free(), but not on windows, because we have to use
_aligned_free() there. Attempting to mem_free() the result of a libc
strdup() would segfault in such a configuration.

Avoid the footgun by banning strdup() entirely. Maybe redefining libc
names isn't such a great idea, who knew?
2024-09-10 14:31:55 +02:00
..
platform_paths src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
decompress_wrapper.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
decompress_wrapper.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
decompress_wrapper_public.h src: run upkeep 2024-05-17 04:58:47 +02:00
emscripten_fetch.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
emscripten_fetch.h src: run upkeep 2024-05-17 04:58:47 +02:00
emscripten_fetch_public.h src: run upkeep 2024-05-17 04:58:47 +02:00
error.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
loadpacks.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
loadpacks.h src: run upkeep 2024-05-17 04:58:47 +02:00
meson.build vfs,build,emscripten: new resource delivery system for Emscripten 2023-01-28 00:31:15 +01:00
nodeapi.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
pathutil.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
pathutil.h src: run upkeep 2024-05-17 04:58:47 +02:00
private.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
private.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
public.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
public.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
readonly_wrapper.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
readonly_wrapper.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
readonly_wrapper_public.h src: run upkeep 2024-05-17 04:58:47 +02:00
resindex.c src: run upkeep 2024-05-17 04:58:47 +02:00
resindex.h src: run upkeep 2024-05-17 04:58:47 +02:00
resindex_layered.c src: run upkeep 2024-05-17 04:58:47 +02:00
resindex_layered.h src: run upkeep 2024-05-17 04:58:47 +02:00
resindex_layered_public.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
setup.h memory: use custom memory allocation wrappers 2023-01-18 13:23:22 +01:00
setup_emscripten.c src: run upkeep 2024-05-17 04:58:47 +02:00
setup_generic.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
setup_switch.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
sync_emscripten.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
sync_noop.c src: run upkeep 2024-05-17 04:58:47 +02:00
syspath.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
syspath_posix.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
syspath_public.c src: run upkeep 2024-05-17 04:58:47 +02:00
syspath_public.h src: run upkeep 2024-05-17 04:58:47 +02:00
syspath_win32.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
union.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
union.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
union_public.h src: run upkeep 2024-05-17 04:58:47 +02:00
vdir.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
vdir.h src: run upkeep 2024-05-17 04:58:47 +02:00
zipfile.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
zipfile.h src: run upkeep 2024-05-17 04:58:47 +02:00
zipfile_impl.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
zipfile_null.c src: run upkeep 2024-05-17 04:58:47 +02:00
zipfile_public.c src: run upkeep 2024-05-17 04:58:47 +02:00
zipfile_public.h src: run upkeep 2024-05-17 04:58:47 +02:00
zippath.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
zippath_rwops.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00