Path: utzoo!attcan!uunet!lll-winken!lll-crg.llnl.gov!casey From: casey@lll-crg.llnl.gov (Casey Leedom) Newsgroups: comp.windows.x Subject: ANSI C lib/X/Xlibint.h bug + FIX Message-ID: <14505@lll-winken.llnl.gov> Date: 9 Dec 88 06:17:26 GMT Sender: usenet@lll-winken.llnl.gov Reply-To: casey@lll-crg.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 36 There's a simple bug in lib/X/Xlibint.h that surfaces when you try to compile Xlibint.h with an ANSI C compiler. It looks like no one's tried that for some time ... Casey *** lib/X/Xlibint.h-dist Tue Sep 6 13:09:17 1988 --- lib/X/Xlibint.h Thu Dec 8 20:58:59 1988 *************** *** 122,133 **** #if defined(__STDC__) && !defined(UNIXCPP) #define GetReqExtra(name, n, req) \ WORD64ALIGN\ ! if ((dpy->bufptr + SIZEOF(*req) + n) > dpy->bufmax)\ _XFlush(dpy);\ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ req->reqType = X_##name;\ ! req->length = (SIZEOF(*req) + n)>>2;\ ! dpy->bufptr += SIZEOF(*req) + n;\ dpy->request++ #else #define GetReqExtra(name, n, req) \ --- 122,134 ---- #if defined(__STDC__) && !defined(UNIXCPP) #define GetReqExtra(name, n, req) \ WORD64ALIGN\ ! WORD64ALIGN\ ! if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ _XFlush(dpy);\ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ req->reqType = X_##name;\ ! req->length = (SIZEOF(x##name##Req) + n)>>2;\ ! dpy->bufptr += SIZEOF(x##name##Req) + n;\ dpy->request++ #else #define GetReqExtra(name, n, req) \