summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-11 11:02:38 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-11 11:49:07 -0800
commit7e8a581cda4aaac7e1d6af3d0000a0d03816adc3 (patch)
treea5d28d3577788f350b84a0473d36f33ea0c28551
parent387bcf8bad11196967943a3352b9eb0d0f1f897e (diff)
Remove support for SVR4 systems other than Solaris/illumos
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--chooser/chooser.c39
-rw-r--r--greeter/verify.c5
-rw-r--r--xdm/auth.c41
-rw-r--r--xdm/dm.c4
4 files changed, 5 insertions, 84 deletions
diff --git a/chooser/chooser.c b/chooser/chooser.c
index c5742f7..3494cde 100644
--- a/chooser/chooser.c
+++ b/chooser/chooser.c
@@ -175,39 +175,6 @@ static int pingTry;
static XdmcpBuffer directBuffer, broadcastBuffer;
static XdmcpBuffer buffer;
-#if (defined(SVR4) && !defined(sun) && !defined(__sgi) && !defined(NCR)) && defined(SIOCGIFCONF)
-
-/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
-
-static int
-ifioctl (int fd, int cmd, char *arg)
-{
- struct strioctl ioc;
- int ret;
-
- bzero((char *) &ioc, 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)
- ((struct ifconf *) arg)->ifc_len = ioc.ic_len;
- return(ret);
-}
-#else /* (SVR4 && !sun && !NCR) && SIOCGIFCONF */
-# define ifioctl ioctl
-#endif /* (SVR4 && !sun && !NCR) && SIOCGIFCONF */
-
-
/* ARGSUSED */
static void
PingHosts (XtPointer closure, XtIntervalId *id)
@@ -520,7 +487,7 @@ RegisterHostname (char *name)
{
ifc.ifc_len = sizeof (buf);
ifc.ifc_buf = buf;
- if (ifioctl (socketFD, (int) SIOCGIFCONF, (char *) &ifc) < 0)
+ if (ioctl (socketFD, (int) SIOCGIFCONF, (char *) &ifc) < 0)
return;
cplim = (char *) ifc.ifc_req + ifc.ifc_len;
@@ -539,13 +506,13 @@ RegisterHostname (char *name)
struct ifreq broad_req;
broad_req = *ifr;
- if (ifioctl (socketFD, SIOCGIFFLAGS, (char *) &broad_req) != -1 &&
+ if (ioctl (socketFD, SIOCGIFFLAGS, (char *) &broad_req) != -1 &&
(broad_req.ifr_flags & IFF_BROADCAST) &&
(broad_req.ifr_flags & IFF_UP)
)
{
broad_req = *ifr;
- if (ifioctl (socketFD, SIOCGIFBRDADDR, &broad_req) != -1)
+ if (ioctl (socketFD, SIOCGIFBRDADDR, &broad_req) != -1)
broad_addr = broad_req.ifr_addr;
else
continue;
diff --git a/greeter/verify.c b/greeter/verify.c
index 600fb1d..69eb67e 100644
--- a/greeter/verify.c
+++ b/greeter/verify.c
@@ -55,10 +55,7 @@ from The Open Group.
static const char *envvars[] = {
- "TZ", /* SYSV and SVR4, but never hurts */
-#if (defined(SVR4) || defined(SYSV)) && defined(i386) && !defined(sun)
- "XLOCAL",
-#endif
+ "TZ",
NULL
};
diff --git a/xdm/auth.c b/xdm/auth.c
index f1ae85c..552bf96 100644
--- a/xdm/auth.c
+++ b/xdm/auth.c
@@ -76,11 +76,6 @@ from The Open Group.
# define USE_SIOCGLIFCONF
#endif
-#if (defined(SVR4) && !defined(sun)) && \
- defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
-# define SYSV_SIOCGIFCONF
-#endif
-
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef BSD
@@ -817,40 +812,6 @@ DefineSelf(int fd, FILE *file, Xauth *auth)
}
#else /* GETIFADDRS */
-# ifdef SYSV_SIOCGIFCONF
-
-/* Deal with different SIOCGIFCONF ioctl semantics on SYSV, SVR4 */
-
-static int
-ifioctl (int fd, int cmd, char *arg)
-{
- struct strioctl ioc;
- int ret;
-
- bzero((char *) &ioc, 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)
- ((struct ifconf *) arg)->ifc_len = ioc.ic_len;
- return(ret);
-}
-# else /* SYSV_SIOCGIFCONF */
-# define ifioctl ioctl
-# endif /* SYSV_SIOCGIFCONF */
-
-
-
# if defined(SIOCGIFCONF) || defined (USE_SIOCGLIFCONF)
# ifdef USE_SIOCGLIFCONF
@@ -924,7 +885,7 @@ DefineSelf (int fd, FILE *file, Xauth *auth)
# define IFR_IFR_NAME ifr->ifr_name
# endif
- if (ifioctl (fd, IFC_IOCTL_REQ, (char *) &ifc) < 0) {
+ if (ioctl (fd, IFC_IOCTL_REQ, (char *) &ifc) < 0) {
LogError ("Trouble getting network interface configuration");
# ifdef USE_SIOCGLIFCONF
diff --git a/xdm/dm.c b/xdm/dm.c
index 52c13e6..73280b2 100644
--- a/xdm/dm.c
+++ b/xdm/dm.c
@@ -83,10 +83,6 @@ from The Open Group.
# endif
#endif
-#if defined(SVR4) && !defined(sun)
-extern FILE *fdopen();
-#endif
-
static void StopAll (int n), RescanNotify (int n);
static void RescanServers (void);
static void RestartDisplay (struct display *d, int forceReserver);