[xserver-commit] xserver/os io.c,3.40,3.41

Warren Turkal xserver-commit@pdx.freedesktop.org


Committed by: wt

Update of /cvs/xserver/xserver/os
In directory pdx:/tmp/cvs-serv2827/os

Modified Files:
	io.c 
Log Message:
Make the big request extension always get built


Index: io.c
===================================================================
RCS file: /cvs/xserver/xserver/os/io.c,v
retrieving revision 3.40
retrieving revision 3.41
diff -u -d -r3.40 -r3.41
--- io.c	2 Dec 2003 07:11:47 -0000	3.40
+++ io.c	12 Feb 2004 19:18:18 -0000	3.41
@@ -119,13 +119,11 @@
 #define get_req_len(req,cli) ((cli)->swapped ? \
 			      lswaps((req)->length) : (req)->length)
 
-#ifdef BIGREQS
 #include <X11/extensions/bigreqstr.h>
 
 #define get_big_req_len(req,cli) ((cli)->swapped ? \
 				  lswapl(((xBigReq *)(req))->length) : \
 				  ((xBigReq *)(req))->length)
-#endif
 
 #define MAX_TIMES_PER         10
 
@@ -222,9 +220,7 @@
     int result;
     register xReq *request;
     Bool need_header;
-#ifdef BIGREQS
     Bool move_header;
-#endif
 
     /* If an input buffer was empty, either free it if it is too big
      * or link it into our list of free input buffers.  This means that
@@ -273,9 +269,7 @@
     oci->bufptr += oci->lenLastReq;
 
     need_header = FALSE;
-#ifdef BIGREQS
     move_header = FALSE;
-#endif
     gotnow = oci->bufcnt + oci->buffer - oci->bufptr;
     if (gotnow < sizeof(xReq))
     {
@@ -292,7 +286,6 @@
 	 */
 	request = (xReq *)oci->bufptr;
 	needed = get_req_len(request, client);
-#ifdef BIGREQS
 	if (!needed && client->big_requests)
 	{
 	    /* It's a Big Request. */
@@ -306,7 +299,6 @@
 	    else
 		needed = get_big_req_len(request, client);
 	}
-#endif
 	client->req_len = needed;
 	needed <<= 2; /* needed is in bytes now */
     }
@@ -418,7 +410,6 @@
 	    /* We wanted an xReq, now we've gotten it. */
 	    request = (xReq *)oci->bufptr;
 	    needed = get_req_len(request, client);
-#ifdef BIGREQS
 	    if (!needed && client->big_requests)
 	    {
 		move_header = TRUE;
@@ -427,7 +418,6 @@
 		else
 		    needed = get_big_req_len(request, client);
 	    }
-#endif
 	    client->req_len = needed;
 	    needed <<= 2;
 	}
@@ -440,11 +430,9 @@
     }
     if (needed == 0)
     {
-#ifdef BIGREQS
 	if (client->big_requests)
 	    needed = sizeof(xBigReq);
 	else
-#endif
 	    needed = sizeof(xReq);
     }
     oci->lenLastReq = needed;
@@ -462,12 +450,10 @@
     {
 	request = (xReq *)(oci->bufptr + needed);
 	if (gotnow >= (result = (get_req_len(request, client) << 2))
-#ifdef BIGREQS
 	    && (result ||
 		(client->big_requests &&
 		 (gotnow >= sizeof(xBigReq) &&
 		  gotnow >= (get_big_req_len(request, client) << 2))))
-#endif
 	    )
 	    FD_SET(fd, &ClientsWithInput);
 	else
@@ -496,7 +482,6 @@
 #endif
     if (++timesThisConnection >= MAX_TIMES_PER)
 	YieldControl();
-#ifdef BIGREQS
     if (move_header)
     {
 	request = (xReq *)oci->bufptr;
@@ -505,7 +490,6 @@
 	oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq));
 	client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2;
     }
-#endif
     client->requestBuffer = (pointer)oci->bufptr;
 #ifdef DEBUG_COMMUNICATION
     {
@@ -629,7 +613,6 @@
     {
 	request = (xReq *)oci->bufptr;
 	needed = get_req_len(request, client);
-#ifdef BIGREQS
 	if (!needed && client->big_requests)
 	{
 	    oci->bufptr -= sizeof(xBigReq) - sizeof(xReq);
@@ -641,7 +624,6 @@
 		swapl(&((xBigReq *)oci->bufptr)->length, n);
 	    }
 	}
-#endif
 	if (gotnow >= (needed << 2))
 	{
 	    if (FD_ISSET(fd, &AllClients))
@@ -702,9 +684,7 @@
     {
 	/* caller wants the request after the one specified by req */
 	reqlen = get_req_len(req, client);
-#ifdef BIGREQS
 	if (!reqlen) reqlen = get_big_req_len(req, client);
-#endif
 	pnextreq = (xReqPtr)(((char *)req) + (reqlen << 2));
     }
 
@@ -716,7 +696,6 @@
 	return NULL;
 
     needed = get_req_len(pnextreq, client) << 2;
-#ifdef BIGREQS
     if (!needed)
     {
 	/* it's a big request */
@@ -724,7 +703,6 @@
 	    return NULL;
 	needed = get_big_req_len(pnextreq, client) << 2;
     }
-#endif
 
     /* if we have less than we need, return NULL */
 
@@ -769,9 +747,7 @@
     /* twiddle the oci to skip over the requests */
 
     reqlen = get_req_len(req, client);
-#ifdef BIGREQS
     if (!reqlen) reqlen = get_big_req_len(req, client);
-#endif
     reqlen <<= 2;
     oci->bufptr = (char *)req;
     oci->lenLastReq = reqlen;