clang with -std=c99 generates warnings on typedef redefinition
likely unnoticed upstream as gcc does not do this
excessive amounts of warnings from vulkan driver headers pointed
out by deraadt@
The check here guards the read below.
For `XimType_XIMStyles`, these are `num` of `CARD32` and for
`XimType_XIMHotKeyTriggers` these are `num` of `XIMTRIGGERKEY` ref[1]
which is defined as 3 x `CARD32`. (There are data after the
`XIMTRIGGERKEY` according to the spec but they are not read by this
function and doesn't need to be checked.)
The old code here used the native datatype size instead of the wire
protocol size causing the check to always fail.
Also fix the size calculation for the header (size). It is 2 x CARD16
for both types despite the unused `CARD16` for `XimType_XIMStyles`.
This fixes a regression caused by previous commit.
On mips64, the compiler does not allow use of non-zero argument with
__builtin_frame_address(). However, the returned frame address is only
used when PIPE_ARCH_X86 is defined. The compile error can be avoided
by making #ifdef PIPE_ARCH_X86 cover the getting of frame address too.
The argument checking of __builtin_frame_address() has been present
as a debug assert in clang 8. In clang 10, there is a proper runtime
check for the argument. This is why the build has not failed before.
OK jsg@
instructions. Clang doesn't allow redeclaration (and therefore
redefinition) of the __sync_* builtins. Use #pragma redefine_extname
to work around that restriction. Clang also turns __sync_add_and_fetch
into __sync_fetch_and_add (and __sync_sub_and_fetch into
__sync_fetch_and_sub) in certain cases, so provide these functions as
well.
ok jsg@
When not in c++ or c11 mode:
- check for _Static_assert support in clang with __has_extension
- gcc implements _Static_assert starting with 4.6.0
- as a fallback, use a forward decl instead of ((void)0) so that
static_assert can be used at file scope (scope issue pointed out by
guenther@)
ok jsg@
This cause problems with pledged applications like xterm, as reported by
Benjamin Baier and also lacks support for IPv6 as shown in
Xorg bug #7611https://bugs.freedesktop.org/show_bug.cgi?id=7611
Discussed with jca@ and deraadt@ and submitted upstreams