[PATCH:xdm 4/4] Remove old Interactive Unix ("ISC") code from xdm
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Dec 26 21:56:10 PST 2012
Interactive Systems Corp (ISC) made a SVR3 port for i386 systems.
It was purchased by Sun in 1992 to beef up Solaris x86 support.
Sun ended sales of ISC Unix in 2001, and ended support in 2006.
Mostly performed via "unifdef -UISC" followed by imdent,
and then manual cleanup.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
chooser/chooser.c | 41 +++++------------------------------------
xdm/auth.c | 33 ++-------------------------------
xdm/dm.c | 3 ---
xdm/xdmcp.c | 10 ----------
4 files changed, 7 insertions(+), 80 deletions(-)
diff --git a/chooser/chooser.c b/chooser/chooser.c
index 53b8d90..df5a8b9 100644
--- a/chooser/chooser.c
+++ b/chooser/chooser.c
@@ -80,10 +80,6 @@ in this Software without prior written authorization from The Open Group.
#endif
#if defined(SYSV) && defined(i386)
# include <sys/stream.h>
-# ifdef ISC
-# include <sys/sioctl.h>
-# include <sys/stropts.h>
-# endif
#endif
#include "dm_socket.h"
@@ -197,7 +193,7 @@ static int pingTry;
static XdmcpBuffer directBuffer, broadcastBuffer;
static XdmcpBuffer buffer;
-#if ((defined(SVR4) && !defined(sun) && !defined(__sgi) && !defined(NCR)) || defined(ISC)) && defined(SIOCGIFCONF)
+#if (defined(SVR4) && !defined(sun) && !defined(__sgi) && !defined(NCR)) && defined(SIOCGIFCONF)
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
@@ -214,17 +210,6 @@ ifioctl (int fd, int cmd, char *arg)
{
ioc.ic_len = ((struct ifconf *) arg)->ifc_len;
ioc.ic_dp = ((struct ifconf *) arg)->ifc_buf;
-# ifdef ISC
- /* SIOCGIFCONF is somewhat brain damaged on ISC. The argument
- * buffer must contain the ifconf structure as header. Ifc_req
- * is also not a pointer but a one element array of ifreq
- * structures. On return this array is extended by enough
- * ifreq fields to hold all interfaces. The return buffer length
- * is placed in the buffer header.
- */
- ((struct ifconf *) ioc.ic_dp)->ifc_len =
- ioc.ic_len - sizeof(struct ifconf);
-# endif
}
else
{
@@ -233,22 +218,12 @@ ifioctl (int fd, int cmd, char *arg)
}
ret = ioctl(fd, I_STR, (char *) &ioc);
if (ret >= 0 && cmd == SIOCGIFCONF)
-# ifdef SVR4
((struct ifconf *) arg)->ifc_len = ioc.ic_len;
-# endif
-# ifdef ISC
- {
- ((struct ifconf *) arg)->ifc_len =
- ((struct ifconf *)ioc.ic_dp)->ifc_len;
- ((struct ifconf *) arg)->ifc_buf =
- (caddr_t)((struct ifconf *)ioc.ic_dp)->ifc_req;
- }
-# endif
return(ret);
}
-#else /* ((SVR4 && !sun && !NCR) || ISC) && SIOCGIFCONF */
+#else /* (SVR4 && !sun && !NCR) && SIOCGIFCONF */
# define ifioctl ioctl
-#endif /* ((SVR4 && !sun) || ISC) && SIOCGIFCONF */
+#endif /* (SVR4 && !sun && !NCR) && SIOCGIFCONF */
/* ARGSUSED */
@@ -589,15 +564,9 @@ RegisterHostname (char *name)
if (ifioctl (socketFD, (int) SIOCGIFCONF, (char *) &ifc) < 0)
return;
-#ifdef ISC
-# define IFC_IFC_REQ (struct ifreq *) ifc.ifc_buf
-#else
-# define IFC_IFC_REQ ifc.ifc_req
-#endif
-
- cplim = (char *) IFC_IFC_REQ + ifc.ifc_len;
+ cplim = (char *) ifc.ifc_req + ifc.ifc_len;
- for (cp = (char *) IFC_IFC_REQ; cp < cplim; cp += ifr_size (ifr))
+ for (cp = (char *) ifc.ifc_req; cp < cplim; cp += ifr_size (ifr))
{
ifr = (struct ifreq *) cp;
if (ifr->ifr_addr.sa_family != AF_INET)
diff --git a/xdm/auth.c b/xdm/auth.c
index b260d35..fd6bc7d 100644
--- a/xdm/auth.c
+++ b/xdm/auth.c
@@ -58,10 +58,6 @@ from The Open Group.
#if defined(SYSV) && defined(i386)
# include <sys/stream.h>
-# ifdef ISC
-# include <stropts.h>
-# include <sys/sioctl.h>
-# endif /* ISC */
#endif /* i386 */
#ifdef SVR4
@@ -90,7 +86,7 @@ from The Open Group.
# define USE_SIOCGLIFCONF
#endif
-#if ((defined(SVR4) && !defined(sun)) || defined(ISC)) && \
+#if (defined(SVR4) && !defined(sun)) && \
defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
# define SYSV_SIOCGIFCONF
#endif
@@ -869,17 +865,6 @@ ifioctl (int fd, int cmd, char *arg)
{
ioc.ic_len = ((struct ifconf *) arg)->ifc_len;
ioc.ic_dp = ((struct ifconf *) arg)->ifc_buf;
-# ifdef ISC
- /* SIOCGIFCONF is somewhat brain damaged on ISC. The argument
- * buffer must contain the ifconf structure as header. Ifc_req
- * is also not a pointer but a one element array of ifreq
- * structures. On return this array is extended by enough
- * ifreq fields to hold all interfaces. The return buffer length
- * is placed in the buffer header.
- */
- ((struct ifconf *) ioc.ic_dp)->ifc_len =
- ioc.ic_len - sizeof(struct ifconf);
-# endif
}
else
{
@@ -888,17 +873,7 @@ ifioctl (int fd, int cmd, char *arg)
}
ret = ioctl(fd, I_STR, (char *) &ioc);
if (ret >= 0 && cmd == SIOCGIFCONF)
-# ifdef SVR4
((struct ifconf *) arg)->ifc_len = ioc.ic_len;
-# endif
-# ifdef ISC
- {
- ((struct ifconf *) arg)->ifc_len =
- ((struct ifconf *)ioc.ic_dp)->ifc_len;
- ((struct ifconf *) arg)->ifc_buf =
- (caddr_t)((struct ifconf *)ioc.ic_dp)->ifc_req;
- }
-# endif
return(ret);
}
# else /* SYSV_SIOCGIFCONF */
@@ -974,11 +949,7 @@ DefineSelf (int fd, FILE *file, Xauth *auth)
ifc.ifc_buf = buf;
# define IFC_IOCTL_REQ SIOCGIFCONF
-# ifdef ISC
-# define IFC_IFC_REQ (struct ifreq *) ifc.ifc_buf
-# else
-# define IFC_IFC_REQ ifc.ifc_req
-# endif
+# define IFC_IFC_REQ ifc.ifc_req
# define IFC_IFC_LEN ifc.ifc_len
# define IFR_IFR_ADDR ifr->ifr_addr
# define IFR_IFR_NAME ifr->ifr_name
diff --git a/xdm/dm.c b/xdm/dm.c
index 7bc2605..9d79261 100644
--- a/xdm/dm.c
+++ b/xdm/dm.c
@@ -430,9 +430,6 @@ ChildNotify (int n)
int olderrno = errno;
ChildReady = 1;
-# ifdef ISC
- (void) Signal (SIGCHLD, ChildNotify);
-# endif
errno = olderrno;
}
#endif
diff --git a/xdm/xdmcp.c b/xdm/xdmcp.c
index 3c0c55c..14fb940 100644
--- a/xdm/xdmcp.c
+++ b/xdm/xdmcp.c
@@ -399,22 +399,12 @@ WaitForSomething (void)
{
if (chooserFd >= 0 && FD_ISSET (chooserFd, &reads))
{
-# ifdef ISC
- if (!ChildReady) {
- WaitForSomething ();
- } else
-# endif
ProcessChooserSocket (chooserFd);
FD_CLR(chooserFd, &reads);
}
# if defined(IPv6) && defined(AF_INET6)
if (chooserFd6 >= 0 && FD_ISSET (chooserFd6, &reads))
{
-# ifdef ISC
- if (!ChildReady) {
- WaitForSomething ();
- } else
-# endif
ProcessChooserSocket (chooserFd6);
FD_CLR(chooserFd6, &reads);
}
--
1.7.9.2
More information about the xorg-devel
mailing list