Subject: Re: xterm jump scrolling on sparc64
To: Matthias Scheler <tron@zhadum.de>
From: john heasley <heas@shrubbery.net>
List: tech-x11
Date: 06/01/2004 07:54:19
Tue, Jun 01, 2004 at 01:28:33PM +0200, Matthias Scheler:
> But if SUS indeed says that FIONREAD expects an "int" argument you
> should better write like this:
> 
> #if defined(FIONREAD)
> #ifdef SGIArchitecture
>    long arg = 0;
>    ioctl(fd, FIONREAD, (char *) &arg);
>    return (int) arg;
> #else
>    int arg = 0;
>    ioctl(fd, FIONREAD, &arg);
>    return arg;
> #endif
> #elif defined(__CYGWIN__)

Does that do it for windows + x86_64?

There are a few other instances in the tree which use the LONG64 macro to
choose int/long, but there are a few cases within those which are
inconsistent.  for example,

Index: xfree/xc/lib/dps/csconndi.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/lib/dps/csconndi.c,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 csconndi.c
--- xfree/xc/lib/dps/csconndi.c 5 Mar 2004 14:24:31 -0000       1.1.1.5
+++ xfree/xc/lib/dps/csconndi.c 1 Jun 2004 14:46:41 -0000
@@ -743,7 +743,7 @@

        if (_XANYSET(r_mask)) {
            char buf[BUFSIZE];
-           long pend_not_register;
+           BytesReadable_t pend_not_register;
            register long pend;
            register xEvent *ev;