sdl2_frt/include
Jessica Clarke e4411505ab Don't pack SDL_AudioCVT on CHERI architectures
This is needed to support CHERI, and thus Arm's experimental Morello
prototype, where pointers are implemented using unforgeable capabilities
that include bounds and permissions metadata to provide fine-grained
spatial and referential memory safety, as well as revocation by sweeping
memory to provide heap temporal memory safety.

The referential safety is enforced through the use of tagged memory, and
there is only a single tag bit per capability-sized word, meaning it is
impossible to store capabilities at unaligned locations, either getting
a trap on load/store or the validity tag being stripped when
round-tripepd through memory.

Since this is a new ABI for which SDL has never been compiled before, we
do not need to be concerned with this compatibility measure, so just
don't pack the struct for CHERI architectures.

This code is inherently rather dubious anyway; if MSVC and GCC disagree
on struct layout when targeting Windows then that is a bug in GCC, but
likely extends from the bogus #pragma pack directives for MSVC in
begin_code.h, which will force types to be *underaligned* (and is
attempting to work around something that is fundamentally a broken idea
to be doing). In particular 8-byte-aligned types will be underaligned to
4 bytes, but only on MSVC.  Since that code is not used for GCC that is
probably the cause of the struct layout discrepancy, and there are
likely other instances of that throughout SDL. Moreover, the supposed
fix here is not in fact a fix, as now GCC will think SDL_AudioCVT is
only 1-byte-aligned but MSVC will think it's 4-byte or 8-byte-aligned,
meaning ABI incomatibility is introduced by this change. However,
removing it would break ABI compatibility for purely-GCC-compiled code
(as old binaries would see the struct as 1-byte-aligned and new binaries
would see the struct as 8-byte-aligned) so SDL is stuck with this until
it bumps its ABI.
2021-07-29 14:42:15 -07:00
..
begin_code.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
close_code.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert.h headers: a few minor documentation corrections. 2021-03-23 15:36:26 -04:00
SDL_atomic.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_audio.h Don't pack SDL_AudioCVT on CHERI architectures 2021-07-29 14:42:15 -07:00
SDL_bits.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_blendmode.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_clipboard.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_config_android.h AAudio: add compilation to Android.mk, but not activated in SDL_config_android.h 2021-04-15 21:03:10 +02:00
SDL_config_iphoneos.h Removed support for clock_gettime_nsec_np() 2021-02-10 10:22:19 -05:00
SDL_config_macosx.h tweak HAVE_IMMINTRIN_H in SDL_config_windows.h, add to SDL_config_macosx.h 2021-07-27 17:10:24 +03:00
SDL_config_minimal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_os2.h minor updates to libc function checks 2021-02-10 10:22:19 -05:00
SDL_config_pandora.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_psp.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_windows.h tweak HAVE_IMMINTRIN_H in SDL_config_windows.h, add to SDL_config_macosx.h 2021-07-27 17:10:24 +03:00
SDL_config_winrt.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_wiz.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config.h Vita port builds with cmake 2021-03-08 09:07:12 -08:00
SDL_config.h.cmake wayland: client-side decoration 2021-07-25 14:54:12 -07:00
SDL_config.h.in wayland: client-side decoration 2021-07-25 14:54:12 -07:00
SDL_copying.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_cpuinfo.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_egl.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_endian.h Use <sys/endian.h> for endian detection on NetBSD 2021-06-12 15:49:36 +03:00
SDL_error.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_events.h Fix SDL_Event definition to support systems with pointers larger than 8 bytes 2021-07-29 14:42:15 -07:00
SDL_filesystem.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_gamecontroller.h Sync wiki -> header 2021-07-29 13:46:05 +00:00
SDL_gesture.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_haptic.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_hints.h pulseaudio: Optionally add "monitor" sources to device list. 2021-07-27 13:12:57 -04:00
SDL_joystick.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_keyboard.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_keycode.h fix SDLK_DELETE after commit 2f5beac190 2021-03-06 11:28:04 +03:00
SDL_loadso.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_locale.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_log.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_main.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_messagebox.h headers: Fix up bullet lists, now that wikiheaders.pl can handle them. 2021-03-24 10:48:45 -04:00
SDL_metal.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_misc.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_mouse.h Sync wiki -> header 2021-07-24 17:32:05 +00:00
SDL_mutex.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_name.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengl_glext.h Don't have Windows headers define min/max, in case they're defined by application code 2019-09-11 15:08:37 -07:00
SDL_opengl.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengles2_gl2.h
SDL_opengles2_gl2ext.h
SDL_opengles2_gl2platform.h
SDL_opengles2_khrplatform.h
SDL_opengles2.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengles.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_pixels.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_platform.h SDL_platform.h: define TARGET_OS_SIMULATOR as 0 if not already defined. 2021-07-08 21:20:02 +03:00
SDL_power.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_quit.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_rect.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_render.h Sync wiki -> header 2021-07-27 00:08:05 +00:00
SDL_revision.h The revision defaults to the empty string 2021-02-12 08:54:08 -08:00
SDL_rwops.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_scancode.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_sensor.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_shape.h doxygen: Removed some cruft that accumulated during wiki migration. 2021-07-14 17:09:05 -04:00
SDL_stdinc.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_surface.h Sync wiki -> header 2021-07-28 17:13:05 +00:00
SDL_system.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_syswm.h Remove wl-shell and xdg-shell-unstable-v6 support (#4323) 2021-07-27 14:12:26 -07:00
SDL_test_assert.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_common.h Added a window flash operation to be explicit about window flash behavior 2021-07-24 13:42:19 -07:00
SDL_test_compare.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_crc32.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_font.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_fuzzer.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_harness.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test_images.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_log.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_md5.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_memory.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_random.h doxygen: Fix all the "\returns" so they work as part of complete sentences. 2021-07-14 14:15:30 -04:00
SDL_test.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_thread.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL_timer.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_touch.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_types.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_version.h First shot at merging the wiki documentation into the headers. 2021-03-21 14:19:53 -04:00
SDL_video.h Fixed the parameter documentation 2021-07-27 14:23:40 -07:00
SDL_vulkan.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00
SDL.h Sync wiki -> header. 2021-07-14 17:07:04 -04:00