xserver: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Sep 1 02:20:01 UTC 2024
hw/xfree86/common/xf86Init.c | 2 -
hw/xfree86/os-support/bsd/bsd_VTsw.c | 3 -
hw/xfree86/os-support/shared/VTsw_usl.c | 3 +
hw/xfree86/os-support/xf86_OSlib.h | 26 ++------------
hw/xwayland/xwayland.c | 2 -
os/access.c | 56 ++++----------------------------
os/io.c | 9 +----
os/osinit.c | 4 +-
os/utils.c | 2 -
9 files changed, 22 insertions(+), 85 deletions(-)
New commits:
commit 62c9f52e4158d5dc56cf6084f66f06aaeeead4bc
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 31 17:13:25 2024 -0700
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 at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1667>
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index c706f260b..0b8363faf 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -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 */
diff --git a/os/access.c b/os/access.c
index cbc4e96fd..bacdee432 100644
--- a/os/access.c
+++ b/os/access.c
@@ -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;
diff --git a/os/io.c b/os/io.c
index 43c4e5d30..d4c03f3a7 100644
--- a/os/io.c
+++ b/os/io.c
@@ -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;
commit f35951d83e818e09c3fa11705525651549655282
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sat Aug 31 16:43:05 2024 -0700
Remove remnants of support for SysV versions before SVR4
Most of the support for such OS'es was removed in 2010 for
xorg-server-1.10.0, but a few bits lingered on, and a few
comments were left out-of-date.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1667>
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 71e0a0a96..073a81bf3 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -798,7 +798,7 @@ OsVendorInit(void)
/*
* ddxGiveUp --
* Device dependent cleanup. Called by by dix before normal server death.
- * For SYSV386 we must switch the terminal back to normal mode. No error-
+ * On some OSes we must switch the terminal back to normal mode. No error-
* checking here, since there should be restored as much as possible.
*/
diff --git a/hw/xfree86/os-support/bsd/bsd_VTsw.c b/hw/xfree86/os-support/bsd/bsd_VTsw.c
index ed06d944a..f0e54ee5e 100644
--- a/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -34,8 +34,7 @@
#include "xf86_OSlib.h"
/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the bsd, sysv, sco, and linux subdirs).
+ * Handle the VT-switching interface for BSD OSs that use USL-style ioctl()s.
*/
/*
diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index a905cce24..ca083fcfd 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -36,7 +36,8 @@
/*
* Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the sysv, sco, and linux subdirs).
+ * (this used to include the sysv, sco, and linux subdirs, but only linux
+ * remains now).
*/
/*
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 11d3f1244..c706f260b 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -81,9 +81,9 @@
#include <stddef.h>
/**************************************************************************/
-/* SYSV386 (SVR3, SVR4), including Solaris */
+/* SVR4, including Solaris */
/**************************************************************************/
-#if (defined(SYSV) || defined(SVR4)) && \
+#if (defined(SVR4)) && \
(defined(__sun) || defined(__i386__))
#include <sys/ioctl.h>
#include <signal.h>
@@ -110,14 +110,12 @@
#define VT_ACKACQ 2
#endif /* !VT_ACKACQ */
-#if defined(SVR4)
#if !(defined(__sun) && defined (SVR4))
#define DEV_MEM "/dev/pmem"
#endif
#define CLEARDTR_SUPPORT
-#endif /* SVR4 */
-#endif /* (SYSV || SVR4) */
+#endif /* SVR4 */
/**************************************************************************/
/* Linux or Glibc-based system */
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 39392082d..a507b0e2f 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -25,7 +25,7 @@
#include <xwayland-config.h>
-#if !defined(SYSV) && !defined(WIN32)
+#if !defined(WIN32)
#include <sys/resource.h>
#endif
diff --git a/os/access.c b/os/access.c
index 8eadb3eda..cbc4e96fd 100644
--- a/os/access.c
+++ b/os/access.c
@@ -124,12 +124,9 @@ SOFTWARE.
#include <sys/un.h>
#endif
-#if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__)
+#if defined(SVR4) || defined(__GNU__)
#include <sys/utsname.h>
#endif
-#if defined(SYSV) && defined(__i386__)
-#include <sys/stream.h>
-#endif
#ifdef __GNU__
#undef SIOCGIFCONF
#include <netdb.h>
diff --git a/os/osinit.c b/os/osinit.c
index 9a4a5ee7e..d376be780 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -71,7 +71,7 @@ SOFTWARE.
#include "dixstruct.h"
#include "dixstruct_priv.h"
-#if !defined(SYSV) && !defined(WIN32)
+#if !defined(WIN32)
#include <sys/resource.h>
#endif
@@ -254,7 +254,7 @@ OsInit(void)
dup2(fileno(err), 2);
fclose(err);
}
-#if defined(SYSV) || defined(SVR4) || defined(WIN32) || defined(__CYGWIN__)
+#if defined(SVR4) || defined(WIN32) || defined(__CYGWIN__)
{
static char buf[BUFSIZ];
diff --git a/os/utils.c b/os/utils.c
index 6879e334d..ac18110cf 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -91,7 +91,7 @@ __stdcall unsigned long GetTickCount(void);
#ifndef WIN32
#include <sys/wait.h>
#endif
-#if !defined(SYSV) && !defined(WIN32)
+#if !defined(WIN32)
#include <sys/resource.h>
#endif
#include <sys/stat.h>
More information about the xorg-commit
mailing list