taisei/src/filewatch
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
..
filewatch.h src: run upkeep 2024-05-17 04:58:47 +02:00
filewatch_inotify.c src: deprecate strdup(), use mem_strdup() explicitly 2024-09-10 14:31:55 +02:00
filewatch_null.c src: run upkeep 2024-05-17 04:58:47 +02:00
meson.build build: enable filewatch for developer builds only 2022-01-02 08:39:09 +02:00