haiku/headers/private
Augustin Cavalier 7db2616c44 dirent: Use an actual flexible-length array for d_name.
GCC 11 treats [1] as a fixed-length array and not a flexible-length
array, and so some things that used direct strcmp("..", ent->d_name),
for instance, would be optimized out as being always unequal,
which was the cause of #17389. Using a real FLA informs GCC that
there is going to be more than one byte of data, and thus this
fixes that bug.

BeOS used [1] and not [0], possibly because it had to deal with
compilers (MetroWerks? Early GCC2?) that did not support FLAs.
GCC 2.95 does, using [0], and GCC 4 does, using [], so we can go
with that here.

(I did try using [0] for both, which seems to be OK with GCC 11,
but GCC 8 throws errors when d_name is dereferenced directly
as being-out-of-bounds. So, we have to use the #if here and give
newer GCC the [] syntax and not [0] to avoid that problem.)

The real question probably is whether or not we should backport
some variant of these changes to R1/beta3, as software at HaikuPorts
very well may run in to the same issue. (The alternative workaround
is to compile with -O1 and not -O2 for any affected software.) But
maybe this is an argument for keeping with the beta4 schedule of
this coming January...
2021-11-18 16:34:03 -05:00
..
app BCursor: add a constructor with bitmap and point 2020-10-08 08:23:31 +00:00
audio audio: Move hmulti_audio driver API to private audio headers 2018-10-23 16:33:19 +02:00
binary_compatibility BControl: Add icon support 2013-12-22 02:48:25 +01:00
bluetooth Bluetooth Pref: Inactiveate button and things that don't do anything. 2021-04-10 20:28:43 +00:00
debug Move comment to correct function. 2013-05-01 19:52:00 -04:00
debugger Add (void*) casts to memcpy/memset invocations to appease GCC 8. 2019-05-24 14:21:37 -04:00
device acpi_battery: support for _BIX method. 2020-03-10 13:14:09 +00:00
drivers Improve SCSI and SATA trim support 2021-07-16 18:35:57 +00:00
file_systems file_systems & Tracker: Do not assume sizeof(dirent) contains 1 byte for the name. 2021-11-18 16:24:04 -05:00
firewire Minor tweaks to fix the build after the last commit. 2019-03-26 20:06:09 -04:00
fs_shell dirent: Use an actual flexible-length array for d_name. 2021-11-18 16:34:03 -05:00
graphics intel_extreme: skylake/DDI. all displays can set resolution now, no refresh on digital panels yet (DPLL still missing) 2021-11-16 00:39:49 +00:00
i2c i2c: add acquire_bus/release_bus hooks 2020-04-12 16:55:52 +00:00
index_server Add a CLucene full-text add-on. 2010-10-28 15:22:52 +00:00
input virtio_input: add new virtio input driver 2021-08-20 12:43:16 +00:00
interface Decorator: Introduce Scroll bar size call 2021-05-03 16:42:32 +00:00
kernel Mass updating of OpenBeOS text to Haiku 2021-11-07 10:00:35 +00:00
libroot Implement stack protection support 2021-05-03 17:52:31 +00:00
locale locale kit: allow creating a catalog without entry_ref 2020-09-01 18:14:57 +00:00
mail build: Cleanup of libgnuregex usage. 2018-03-07 18:04:31 -05:00
media media_kit: Dynamic allocation of ChunkCache based on media 2021-01-03 20:51:37 +00:00
midi Midi: Remove some duplicated code 2015-08-27 11:51:57 +02:00
mount * Removed now obsolete notification (this was not even used in Tracker 2009-10-07 19:31:57 +00:00
net libnetapi.so: make headers of deprecated classes private 2021-01-27 19:53:11 +00:00
netservices BUrlRequest: reintroduce Pause/Resume API in the deprecated version 2021-08-15 11:47:17 +02:00
notification Notification_Server: Added ability to choose position of notifications 2017-12-24 12:02:38 +01:00
package Package Kit: Proper Installation for First Boot Packages 2021-03-14 09:10:18 +00:00
preferences Fix glitch in Screen prefs when changing background color. 2017-04-30 10:29:39 +02:00
print Game & Print Kits: Fix GCC 11 warnings. 2021-11-17 18:45:58 -05:00
runtime_loader runtime_loader: dlopen() should respect RPATH of the loading module 2021-03-18 08:19:55 +00:00
screen_saver ScreenSaver: Rename BuildScreenSaverDefaultSettingsView 2016-04-13 15:50:30 -07:00
shared AutoDeleter: add VMAddressSpacePutter, DeviceNodePutter 2021-08-06 21:11:04 +00:00
storage Storage: Rework LongDirEntry to be a union. 2021-11-18 16:00:23 -05:00
support ZstdCompressionAlgorithm: 22 is now "best" in libzstd. 2021-10-26 16:47:50 -04:00
syslog_daemon syslog_daemon: Converted to BServer. 2015-07-22 20:40:47 +02:00
system kernel/arch/riscv64: fix crash on userland thread exit 2021-10-11 17:38:20 +00:00
textencoding missing comment tokens 2007-06-20 21:20:11 +00:00
tracker Tracker FindPanel: Make a copy of fDeviceIcon 2016-07-31 19:42:39 -07:00
usb_vision some copyright headers clean up 2010-04-12 21:02:09 +00:00
userlandfs Relicense all of Ingo's BSD/MIT+advertising clause'd code as plain MIT. 2019-08-30 18:27:35 -04:00
virtio virtio: add interrupt declarations 2021-06-06 19:03:30 +00:00
vmdk Moved vmdkimage.h to a shareable place, cleaned it up a bit, and renamed it to 2009-10-01 03:08:46 +00:00
wmi wmi: add ACPI WMI implementation 2020-04-20 14:56:59 +00:00