|
|
1.1 ! root 1: Our setup: ! 2: ! 3: Sun 3/60 with cgfour ! 4: SunOS 4.0 (plus what Sun calls their "general hygiene" patch tape) ! 5: XV11R3 + MIT fixes 1 through 8 + "Purdue enhancements" + one local ! 6: "ANSIfication" fix (previously reported to MIT, ! 7: and attached below) ! 8: ! 9: I installed gcc 1.34 (plus the expr.c fix) and also ran the "fixincludes" ! 10: script. ! 11: ! 12: I built the X stuff with with the "CC" line in the "Sun.macros" file set to: ! 13: ! 14: CC = gcc -fcombine-regs -fstrength-reduce -finline-functions -fpcc-struct-return -DPURDUE -Dinline=INLINE -DNOSTDHDRS ! 15: ! 16: where -fcombine-regs, -fstrength-reduce, and -finline-functions specify desired ! 17: optimizations, -fpcc-struct-return makes things compatible with the dbm library, ! 18: -DPURDUE buys the Purdue speedups, -Dinline=INLINE avoids a problem with a ! 19: variable named "inline" in the X file "fonts/bdftosnf/fontutil.c", and ! 20: -DNOSTDHDRS avoids a problem with multiple (and conflicting) typedef'ing of ! 21: "size_t" in the gcc-provided STDDEF_H and Sun's "sys/types.h". ! 22: ! 23: The ANSIfication fix: ! 24: ! 25: > From ado Mon Dec 26 10:55:28 1988 ! 26: > To: [email protected] ! 27: > Subject: Xlibint and __STDC__ don't mix ! 28: > ! 29: > ! 30: > X Window System Bug Report ! 31: > [email protected] ! 32: > ! 33: > ! 34: > ! 35: > ! 36: > VERSION: ! 37: > R3 ! 38: > ! 39: > CLIENT MACHINE and OPERATING SYSTEM: ! 40: > Sun 3/60 running SunOS 4.0 ! 41: > ! 42: > DISPLAY: ! 43: > Sun CG4 ! 44: > ! 45: > WINDOW MANAGER: ! 46: > uwm ! 47: > ! 48: > AREA: ! 49: > Xlib ! 50: > ! 51: > SYNOPSIS: ! 52: > Xlibint.h and __STDC__ don't mix ! 53: > ! 54: > DESCRIPTION: ! 55: > If __STDC__ is defined (and UNIXCPP is not defined), ! 56: > code that uses the GetReqExtra macro defined in Xlibint.h ! 57: > is uncompilable. ! 58: > ! 59: > REPEAT BY: ! 60: > Script started on Mon Dec 26 10:52:58 1988 ! 61: > elsie$ cd lib/X ! 62: > elsie$ rm Xbackgnd.o ! 63: > rm: Xbackgnd.o: No such file or directory ! 64: > elsie$ rm XBackgnd.o ! 65: > elsie$ make XBackgnd.o CC=/usr/local/bin/gcc ! 66: > rm -f XBackgnd.o ! 67: > /usr/local/bin/gcc -c -O -I. -I../../. -I../.././X11 -DTCPCONN -DUNIXCONN XBackgnd.c ! 68: > XBackgnd.c: In function XSetWindowBackground: ! 69: > XBackgnd.c:16: undeclared variable `sz_' (first use here) ! 70: > *** Error code 1 ! 71: > make: Fatal error: Command failed for target `XBackgnd.o' ! 72: > elsie$ exit ! 73: > ! 74: > script done on Mon Dec 26 10:53:51 1988 ! 75: > ! 76: > SAMPLE FIX: ! 77: > *** 1.1/Xlibint.h Mon Dec 26 10:39:37 1988 ! 78: > --- 1.2/Xlibint.h Mon Dec 26 10:39:37 1988 ! 79: > *************** ! 80: > *** 122,133 **** ! 81: > #if defined(__STDC__) && !defined(UNIXCPP) ! 82: > #define GetReqExtra(name, n, req) \ ! 83: > WORD64ALIGN\ ! 84: > ! if ((dpy->bufptr + SIZEOF(*req) + n) > dpy->bufmax)\ ! 85: > _XFlush(dpy);\ ! 86: > req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ ! 87: > req->reqType = X_##name;\ ! 88: > ! req->length = (SIZEOF(*req) + n)>>2;\ ! 89: > ! dpy->bufptr += SIZEOF(*req) + n;\ ! 90: > dpy->request++ ! 91: > #else ! 92: > #define GetReqExtra(name, n, req) \ ! 93: > --- 122,133 ---- ! 94: > #if defined(__STDC__) && !defined(UNIXCPP) ! 95: > #define GetReqExtra(name, n, req) \ ! 96: > WORD64ALIGN\ ! 97: > ! if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ ! 98: > _XFlush(dpy);\ ! 99: > req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ ! 100: > req->reqType = X_##name;\ ! 101: > ! req->length = (SIZEOF(x##name##Req) + n)>>2;\ ! 102: > ! dpy->bufptr += SIZEOF(x##name##Req) + n;\ ! 103: > dpy->request++ ! 104: > #else ! 105: > #define GetReqExtra(name, n, req) \ ! 106: > -- ! 107: > Arthur David Olson [email protected] ADO is a trademark of Ampex. ! 108:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.