haiku/headers
Augustin Cavalier 8f03af00f8 Storage: Rework LongDirEntry to be a union.
Our dirent structure is "slim": it has a flexible-length array at the
end which must be allocated to whatever size the consumer wants. However,
we use [1] there and not [0] or [], which meant GCC thought it was not
a flexible-length array, and so it optimized various string accesses
that it assumed must be always false. Among these was BDirectory's
check for "." and "..", and so that resulted in infinite loops.

When changing our dirent structure to a proper FLA instead of [1],
GCC then throws errors on LongDirEntry as it has data "after" the
FLA; which is what we want, but there is no way to tell GCC that.
So now we use a union instead, which is the proper way to statically
allocate a FLA.

This is part of #17389, but the real fix requires changing our dirent
structure, which is coming in a separate commit.
2021-11-18 16:00:23 -05:00
..
build libbe_build: Fix build on non-Haiku platforms. 2021-11-18 15:42:17 -05:00
compatibility features.h: Define _DEFAULT_SOURCE when _GNU_SOURCE is defined. 2021-11-17 13:55:50 -05:00
config riscv: cleanup architecture macro checks 2021-09-01 18:04:59 +00:00
cpp
glibc
libs Mass updating of OpenBeOS text to Haiku 2021-11-07 10:00:35 +00:00
os BeBuild: Expand compatibility to GCC 12. 2021-11-16 15:12:58 -05:00
posix stdlib.h: Remove guards around aligned_alloc. 2021-11-16 15:13:29 -05:00
private Storage: Rework LongDirEntry to be a union. 2021-11-18 16:00:23 -05:00
tools