[PATCH] Don't bother checking for O_ASYNC, glibc's had it since '98.

Matt Turner mattst88 at gmail.com
Thu Mar 11 22:50:46 PST 2010


No, seriously. 1998.

Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
 hw/xfree86/os-support/shared/sigio.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index aed5654..88f1d49 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -67,14 +67,6 @@
 # include <stropts.h>
 #endif
 
-/*
- * Linux libc5 defines FASYNC, but not O_ASYNC.  Don't know if it is
- * functional or not.
- */
-#if defined(FASYNC) && !defined(O_ASYNC)
-#  define O_ASYNC FASYNC
-#endif
-
 #ifdef MAXDEVICES
 /* MAXDEVICES represents the maximimum number of input devices usable
  * at the same time plus one entry for DRM support.
@@ -155,7 +147,6 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
 	    if (xf86IsPipe (fd))
 		return 0;
 	    blocked = xf86BlockSIGIO();
-#ifdef O_ASYNC
 	    if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) {
 		xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n",
 			fd, strerror(errno));
@@ -167,7 +158,6 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
 		    installed = TRUE;
 		}
 	    }
-#endif
 #ifdef I_SETSIG /* System V Streams - used on Solaris for input devices */
 	    if (!installed && isastream(fd)) {
 		if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) {
@@ -247,9 +237,7 @@ xf86RemoveSIGIOHandler(int fd)
     }
     if (ret)
     {
-#ifdef O_ASYNC
 	fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC);
-#endif
 #ifdef I_SETSIG
 	if (isastream(fd)) {
 	    if (ioctl(fd, I_SETSIG, 0) == -1) {
-- 
1.6.4.4



More information about the xorg-devel mailing list