Remove remnants of support for SVR4 systems other than Solaris & illumos

Most of the support for such OS'es was removed in 2010 for
xorg-server-1.10.0, but a few bits lingered on.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1667>
This commit is contained in:
Alan Coopersmith 2024-08-31 17:13:25 -07:00 committed by Marge Bot
parent f35951d83e
commit 62c9f52e41
3 changed files with 13 additions and 71 deletions

View File

@ -81,10 +81,9 @@
#include <stddef.h>
/**************************************************************************/
/* SVR4, including Solaris */
/* Solaris or illumos-based system */
/**************************************************************************/
#if (defined(SVR4)) && \
(defined(__sun) || defined(__i386__))
#if defined(__SVR4) && defined(__sun)
#include <sys/ioctl.h>
#include <signal.h>
#include <termio.h>
@ -92,30 +91,17 @@
#include <errno.h>
#if !defined(__sun) || defined(HAVE_SYS_VT_H)
#ifdef HAVE_SYS_VT_H
#define HAS_USL_VTS
#endif
#if !defined(__sun)
#include <sys/emap.h>
#endif
#if defined(HAS_USL_VTS)
#if !defined(__sun)
#include <sys/at_ansi.h>
#endif
#ifdef HAS_USL_VTS
#include <sys/kd.h>
#include <sys/vt.h>
#endif
#if !defined(VT_ACKACQ)
#define VT_ACKACQ 2
#endif /* !VT_ACKACQ */
#if !(defined(__sun) && defined (SVR4))
#define DEV_MEM "/dev/pmem"
#endif
#define CLEARDTR_SUPPORT
#endif /* SVR4 */
#endif /* SVR4 && __sun */
/**************************************************************************/
/* Linux or Glibc-based system */

View File

@ -156,20 +156,13 @@ SOFTWARE.
#ifdef HAVE_GETIFADDRS
#include <ifaddrs.h>
#endif
#else
/* Solaris provides an extended interface SIOCGLIFCONF. Other systems
* may have this as well, but the code has only been tested on Solaris
* so far, so we only enable it there. Other platforms may be added as
* needed.
*
* Test for Solaris commented out -- TSI @ UQV 2003.06.13
*/
/* Solaris provides an extended interface SIOCGLIFCONF. */
#ifdef SIOCGLIFCONF
/* #if defined(__sun) */
#define USE_SIOCGLIFCONF
/* #endif */
#endif
#endif /* HAVE_GETIFADDRS */
#include <arpa/inet.h>
@ -396,38 +389,6 @@ AccessUsingXdmcp(void)
LocalHostEnabled = FALSE;
}
#if defined(SVR4) && !defined(__sun) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
static int
ifioctl(int fd, int cmd, char *arg)
{
struct strioctl ioc;
int ret;
memset((char *) &ioc, 0, sizeof(ioc));
ioc.ic_cmd = cmd;
ioc.ic_timout = 0;
if (cmd == SIOCGIFCONF) {
ioc.ic_len = ((struct ifconf *) arg)->ifc_len;
ioc.ic_dp = ((struct ifconf *) arg)->ifc_buf;
}
else {
ioc.ic_len = sizeof(struct ifreq);
ioc.ic_dp = arg;
}
ret = ioctl(fd, I_STR, (char *) &ioc);
if (ret >= 0 && cmd == SIOCGIFCONF)
#ifdef SVR4
((struct ifconf *) arg)->ifc_len = ioc.ic_len;
#endif
return ret;
}
#else
#define ifioctl ioctl
#endif
/*
* DefineSelf (fd):
*
@ -656,7 +617,7 @@ DefineSelf(int fd)
#define IFR_IFR_NAME ifr->ifr_name
#endif
if (ifioctl(fd, IFC_IOCTL_REQ, (void *) &ifc) < 0)
if (ioctl(fd, IFC_IOCTL_REQ, (void *) &ifc) < 0)
ErrorF("Getting interface configuration (4): %s\n", strerror(errno));
cplim = (char *) IFC_IFC_REQ + IFC_IFC_LEN;
@ -760,12 +721,12 @@ DefineSelf(int fd)
struct ifreq broad_req;
broad_req = *ifr;
if (ifioctl(fd, SIOCGIFFLAGS, (void *) &broad_req) != -1 &&
if (ioctl(fd, SIOCGIFFLAGS, (void *) &broad_req) != -1 &&
(broad_req.ifr_flags & IFF_BROADCAST) &&
(broad_req.ifr_flags & IFF_UP)
) {
broad_req = *ifr;
if (ifioctl(fd, SIOCGIFBRDADDR, (void *) &broad_req) != -1)
if (ioctl(fd, SIOCGIFBRDADDR, (void *) &broad_req) != -1)
broad_addr = broad_req.ifr_addr;
else
continue;

View File

@ -359,13 +359,8 @@ ReadRequestFromClient(ClientPtr client)
if (result <= 0) {
if ((result < 0) && ETEST(errno)) {
mark_client_not_ready(client);
#if defined(SVR4) && defined(__i386__) && !defined(__sun)
if (0)
#endif
{
YieldControlNoInput(client);
return 0;
}
YieldControlNoInput(client);
return 0;
}
YieldControlDeath();
return -1;