[PATCH 6/7] os: Minor header cleanup

Adam Jackson ajax at redhat.com
Fri Jun 17 11:36:36 PDT 2011


Move some constants near their only users, and remove some
getdtablesize() logic that's second-guessing configure.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 os/connection.c |    2 ++
 os/io.c         |    2 ++
 os/osdep.h      |   10 ----------
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/os/connection.c b/os/connection.c
index 527d4e4..d7fc11c 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -874,6 +874,8 @@ EstablishNewConnections(ClientPtr clientUnused, pointer closure)
  *     Fail a connection due to lack of client or file descriptor space
  ************/
 
+#define BOTIMEOUT 200 /* in milliseconds */
+
 static void
 ErrorConnMax(XtransConnInfo trans_conn)
 {
diff --git a/os/io.c b/os/io.c
index 1c161da..a6219b0 100644
--- a/os/io.c
+++ b/os/io.c
@@ -129,6 +129,8 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
 				  ((xBigReq *)(req))->length)
 
 #define MAX_TIMES_PER         10
+#define BUFSIZE 4096
+#define BUFWATERMARK 8192
 
 /*
  *   A lot of the code in this file manipulates a ConnectionInputPtr:
diff --git a/os/osdep.h b/os/osdep.h
index d148959..19dee0e 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -52,10 +52,6 @@ SOFTWARE.
 #ifndef _OSDEP_H_
 #define _OSDEP_H_ 1
 
-#define BOTIMEOUT 200 /* in milliseconds */
-#define BUFSIZE 4096
-#define BUFWATERMARK 8192
-
 #if defined(XDMCP) || defined(HASXDMAUTH)
 #include <X11/Xdmcp.h>
 #endif
@@ -103,12 +99,6 @@ SOFTWARE.
 /* MAXSELECT is the number of fds that select() can handle */
 #define MAXSELECT (sizeof(fd_set) * NBBY)
 
-#ifndef HAS_GETDTABLESIZE
-#if !defined(SVR4) && !defined(SYSV)
-#define HAS_GETDTABLESIZE
-#endif
-#endif
-
 #include <stddef.h>
 
 #if defined(XDMCP) || defined(HASXDMAUTH)
-- 
1.7.5.4



More information about the xorg-devel mailing list