taisei/src/pixmap
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
..
fileformats src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
conversion.c src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
meson.build pixmap: refactor 2021-07-18 18:27:38 +03:00
pixmap.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
pixmap.h src: run upkeep 2024-05-17 04:58:47 +02:00
pixmap_conversion.inc.h src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00