[PATCH 1/2] Remove 'Readv' interface
Mark Kettenis
mark.kettenis at xs4all.nl
Fri Nov 1 21:12:13 CET 2013
> From: Keith Packard <keithp at keithp.com>
> Date: Fri, 01 Nov 2013 11:58:57 -0700
>
> --=-=-=
> Content-Transfer-Encoding: quoted-printable
>
> Mark Kettenis <mark.kettenis at xs4all.nl> writes:
>
> >> From: Keith Packard <keithp at keithp.com>
> >> Date: Fri, 01 Nov 2013 01:50:21 -0700
> >>=20
> >> Mark Kettenis <mark.kettenis at xs4all.nl> writes:
> >>=20
> >> >> From: Keith Packard <keithp at keithp.com>
> >> >> Date: Thu, 31 Oct 2013 13:10:24 -0700
> >> >>=3D20
> >> >> No-one uses this, so there's no reason for it to be in the library
> >> >
> >> > I don't really think it makes sense to remove Readv but keep Writev.
> >> > It's not that you're removing a significant amount of code...
> >>=20
> >> I removed it because I didn't want to have to add fd passing support to
> >> that function. However, writev is still being used, so I did fix that
> >> interface.
> >
> > Unfortunately your statement that Readv isn't used seems to be false.
> > There is a call to _FSTransReadv in libFS/src/FSlibInt.c.
>
> Always forgetting the horrid font server library. I guess I could just
> stick the non-FD passing Readv back into xtrans, but that seems wrong
> too. Or just create a fake Readv that calls the regular read.
That should be relatively easy to do with something like the diff
below. Makes me feel a little bit dirty though.
diff --git a/Xtrans.c b/Xtrans.c
index 7c7967f..9f1753e 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -1253,8 +1253,6 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
*/
-#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
-
/*
* emulate readv
*/
@@ -1283,7 +1281,6 @@ static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt)
return total;
}
-#endif /* SYSV && __i386__ || WIN32 || __sxg__ */
#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
diff --git a/Xtransint.h b/Xtransint.h
index dd886db..d994cd0 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -349,8 +349,6 @@ typedef struct _Xtransport_table {
* systems, so they may be emulated.
*/
-#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
-
#define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt)
static int TRANS(ReadV)(
@@ -359,12 +357,6 @@ static int TRANS(ReadV)(
int /* iovcnt */
);
-#else
-
-#define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt)
-
-#endif /* CRAY || (SYSV && __i386__) || WIN32 || __sxg__ || */
-
#if defined(SYSV) && defined(__i386__) && !defined(__SCO__) && !defined(sun) || defined(WIN32)
More information about the xorg-devel
mailing list