If we got interrupted (EINTR or EAGAIN) during select, just try again, rather
than shutting clients down on either of these errors.
(cherry picked from commit b7f3618f39)
If a client disappears in the middle of CheckConnections (presumably
because its appgroup leader disappears), then don't attempt to shut it down
a second time, when it's already vanished.
(cherry picked from commit d8b2cad377)
MAXBUFSIZE appears to be a leftover of some previous time. Instead, just
use maxBigRequestSize when bigreqs are available (limiting buffers to ~16MB).
When bigreqs are not available, needed won't be larger than the maximum
size of a non-bigreqs request (256kB).
(cherry picked from commit ca82d4bddf)
Before you complain, this code hasn't seen material change since at least
X11R6. It certainly does not build with any modern version of Kerberos.
Anybody wanting krb5 auth to their X server should probably be using
GSSAPI instead of internal krb5 API anyway.
Default core size limit for most environments is 0, which disables core
dumps. Add code in the -core option processing path to set the core limit to
the maximum value.
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
include/xkbsrv.h, and the world updated to look for it in the new place,
since it made no sense to define server API in an extension header. Any
further work along this line will need to do similar things with XKBgeom.h
and friends.
This keeps us from having to define _POSIX_C_SOURCE, _BSD_SOURCE, and
_XOPEN_SORUCE to get the C environment we want in different places. It also
fixes the build on linux due to RTLD_DEFAULT having not been defined.
automake will not stop whining about the *.O files not being in normal library
name format, so just tell automake they are PROGRAMS so it builds them without
bitching.
Solaris headers are very literal - if you ask for POSIX_C_SOURCE 199309L,
they limit to only the functions in that standard and no more, unless you
also specify __EXTENSIONS__ to allow functions beyond the standard base.
Only rewind time when we're more than (original delta + 250ms) away from
executing the timer.
When we're walking the timer list, use a goto to iterate all of them from
the start again, since timers may drop out of the list.
Don't bother trying to be smart in TimerSet, we'll pick it up in
WaitForSomething anyway.
We don't actually need to get the CPU clock ID, which means we don't need
the monotonic_usable test. Since there's now only one branch, the
compiler will treat that as likely, so we don't need xproto 7.0.9 anymore.
The fallthrough to gettimeofday() is preserved.
Add support for CLOCK_MONOTONIC from clock_gettime, and use that in
GetTimeInMillis() if available, falling back to the old gettimeofday()
implementation.
This is _slightly_ faster on some 64-bit architectures, and _slightly_
slower on others (though barely measurable).