Drop the -reset flag, so Xserver now either simply continues (w/o going
through internal reset) when last client disconnected or terminates
when -terminate is given.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
They're only used inside os/connection.c, so no need to have them
in some header and expose them to other areas.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move this to a little function (which also has a better name now)
inside the already platform specific ossock.c
Also removing the EMSGSIZE check: we're using TCP or local unix
socket, so EMSGSIZE is never returned.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Yet another very internal function that the proprietary Nvidia driver
is using for unknown reasons.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not needed by drivers (there aren't any on win32), so no need to
have it in public SDK header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not used by any drivers, no no need to keep it in public SDK.
Since it's not used by drivers, it's effectively not an ABI change,
so can be done within ABI-25.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Only used inside OS layer and xfree86 os-support, so no need to keep
it in public SDK.
Since never used by any drivers, it's not an actual ABI change, so
we can safely do it within ABI-25.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
arc4random_buf() is a pretty standard libc function on Unix'oid platforms,
but not all our targets have it, thus we need a fallback there. Currently we
have GenerateRandomData(), which either just wraps arc4random_buf() or provides
some fallback implementation.
For those cases it's easier to just implement missing functions directly
instead of having custom wrapper functions. So, drop GenerateRandomData()
in favor of arc4random_buf() and provide fallback implementation for where
it is missing.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We need to undef this win32 symbol, otherwise it's conflicting with our
`CreateWindow` fields.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Adding helper safe_strlen() that's also checking for NULL pointer
and returning 0 in this case.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since nothing on WIN32 (mingw) targets is calling uname() anymore,
this compat code is now obsolete.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since nobody's passing in extra data here anymore, this function
can be radically simplified now.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Both are potentially tunable variables, and MAXCLIENTS is (still) used by
intel-driver, but also by os specific parts that must not include misc.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xdmcp.h is using types from <X11/Xdmcp.h>, but forgot to include it.
This just popped up with building w/ -Dxdmcp=false, because that file was
included in the wrong place (osdep.h) and only conditionally.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
usage:
__size_assert(typename, size);
if the type's size (calculated by sizeof) doesn't match the asserted size,
an illegal dummy type will be constructed, thus compilation fails.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This symbol is always defined, and the header is always present,
so no need to check for it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.
Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.
Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not used by any external modules, and an implementation
detail anyways, so no need to keep it in public header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's only rarely used and can be easily achieved by generic means,
eg. via ulimit or supervisor settings.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
If the compiler knows of a better algorithm for counting the number of
bits set in a word for the target CPU, let it use that, instead of the
classic algorithm optimized for PDP-6.
Based on xorg/lib/libxext@490a25e6f8a4d2482af4364c700b68ad11a4d10b
v2: make old version static inline, stop exporting after !1695
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1674>
These functions are just used for reading auth file or calling xkbcomp while
dropping privileges, in case the Xserver is started as unprivileged user
with suid-root. Thus, shouldn't be used (and aren't used) by drivers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1370>
osdep.h needs Bool type, which is defined X11/Xdefs.h.
For now it works, since Xdefs usually is already included somewhere
else, but that's an unreliable programming styles which quickly hits
us when changing include order.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1366>