diff options
author | marha <marha@users.sourceforge.net> | 2009-10-18 12:07:02 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-18 12:07:02 +0000 |
commit | b567a3027bceabc0f1f42dd162268f06f15e8149 (patch) | |
tree | 30e9dda79caf9b5fb6e375c352282ca5845c699c /libX11/src/OpenDis.c | |
parent | 0c5e1ab504b4e8c56974a234bd440e9fa2f1f941 (diff) | |
download | vcxsrv-b567a3027bceabc0f1f42dd162268f06f15e8149.tar.gz vcxsrv-b567a3027bceabc0f1f42dd162268f06f15e8149.tar.bz2 vcxsrv-b567a3027bceabc0f1f42dd162268f06f15e8149.zip |
Updated following packages:
libX11-1.3.1
xtrans-1.2.5
Diffstat (limited to 'libX11/src/OpenDis.c')
-rw-r--r-- | libX11/src/OpenDis.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/libX11/src/OpenDis.c b/libX11/src/OpenDis.c index 230ae561f..d6c7b80d5 100644 --- a/libX11/src/OpenDis.c +++ b/libX11/src/OpenDis.c @@ -273,21 +273,28 @@ XOpenDisplay ( #ifndef XLIBMINBUFSIZE #define XLIBMINBUFSIZE BUFSIZE /* old default buffer size */ #endif - if ((xlib_buffer_size = getenv("XLIBBUFFERSIZE")) == NULL) - conn_buf_size = XLIBDEFAULTBUFSIZE; - else - conn_buf_size = 1024 * strtol(xlib_buffer_size, NULL, 10); - if (conn_buf_size < XLIBMINBUFSIZE) - conn_buf_size = XLIBMINBUFSIZE; - - if ((dpy->bufptr = dpy->buffer = Xcalloc(1, conn_buf_size)) == NULL) { - OutOfMemory (dpy, setup); - return(NULL); - } - dpy->bufmax = dpy->buffer + conn_buf_size; + xlib_buffer_size = getenv("XLIBBUFFERSIZE"); + +#ifdef __sun /* Backwards compatibility for old Solaris libX11 name */ + if (xlib_buffer_size == NULL) + xlib_buffer_size = getenv("XSUNBUFFERSIZE"); +#endif + + if (xlib_buffer_size == NULL) + conn_buf_size = XLIBDEFAULTBUFSIZE; + else + conn_buf_size = 1024 * strtol(xlib_buffer_size, NULL, 10); + if (conn_buf_size < XLIBMINBUFSIZE) + conn_buf_size = XLIBMINBUFSIZE; + + if ((dpy->bufptr = dpy->buffer = Xcalloc(1, conn_buf_size)) == NULL) { + OutOfMemory (dpy, setup); + return(NULL); + } + dpy->bufmax = dpy->buffer + conn_buf_size; #if USE_XCB - dpy->xcb->real_bufmax = dpy->bufmax; - dpy->bufmax = dpy->buffer; + dpy->xcb->real_bufmax = dpy->bufmax; + dpy->bufmax = dpy->buffer; #endif /* Set up the input event queue and input event queue parameters. */ |