Do not rely on the shebang line and the executable bit; we should use
find_program(), instead, which lets Meson run a script in the
appropriate environment, portably.
Needed to allow functions outside the original XPG3 standard to be
visible in the Solaris headers when _XOPEN_SOURCE is defined and
not set to a particular value.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Saves 7k of text from the binary. You can already tell what kind of
extension it is from the prefix on the extension name anyway.
1121212 56800 160 1178172 11fa3c master.so
1114236 56800 160 1171196 11defc providernames.so
The X11 support in the Autotools build is missing the definition of the
ENABLE_X11 pre-processor symbol. Without it, we're missing the X11
platform definitions for EGL.
Fixes#188
The strdup() function is available on uClibc if _XOPEN_SOURCE_EXTENDED
is defined; since we're using _GNU_SOURCE elsewhere to enable extended
libc features, and uClibc will set _XOPEN_SOURCE_EXTENDED if _GNU_SOURCE
is set, let's use that.
Closes#181
When building on macOS we don't have access to EGL, and GLX support is
conditional.
We should ensure we're using the appropriate paths depending on the
platform, and protect our use of macros to avoid undefined symbols.
Closes: #176
Our caller may load (eg) epoxy_glAlphaFunc, which is a function pointer,
and then call through that value multiple times. Until the caller
re-examines the value of that function pointer, which is a copy
relocation in the executable, repeated calls mean repeated work
resolving the GL function.
We can't make the caller reinspect the variable, but the resolver
function can avoid doing redundant work.
Fixes: anholt/libepoxy#171
Signed-off-by: Adam Jackson <ajax@redhat.com>
Epoxy updates the function pointers in order to avoid calling the
resolver multiple times, but with -Bsymbolic we're going to update the
copy inside libepoxy, instead of the relocated copy in the code using
libepoxy. This leads to libepoxy constantly querying the function
resolver code instead of just once.
We still want to avoid intra-library relocations for our functions,
but we need to live with them for our global function pointers.
See issue #171
We want to consistently handle exceptions for the internal state checks;
calling `exit()` does not allow us to attach a debugger and get a proper
trace.
FreeBSD hides declarations of non-POSIX functions when POSIX macros,
such as _POSIX_C_SOURCE or _XOPEN_SOURCE, is defined. This causes
test/dlwrap.c to fail to compile because it uses dlvsym and asprintf.
Fixes: #169
Now that we're being conservative about probing libraries, these
entrypoints would not succeed unless the caller had already dlopened
stuff themselves, or had explicitly linked against the provider library.
Both of those are exactly not what we want.
Signed-off-by: Adam Jackson <ajax@redhat.com>