From: CSRG Date: Sun, 15 Oct 1989 03:53:38 +0000 (-0800) Subject: BSD 4_3_Net_2 development X-Git-Tag: BSD-4_3_Net_2~891 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/783ec64ca743ea68ce2db2627d9e90611f13153b BSD 4_3_Net_2 development Work on file usr/src/usr.bin/gcc/cc1/grot/README-X11 Synthesized-from: CSRG/cd2/net.2 --- diff --git a/usr/src/usr.bin/gcc/cc1/grot/README-X11 b/usr/src/usr.bin/gcc/cc1/grot/README-X11 new file mode 100644 index 0000000000..e4c6ff0d58 --- /dev/null +++ b/usr/src/usr.bin/gcc/cc1/grot/README-X11 @@ -0,0 +1,111 @@ +Our setup: + + Sun 3/60 with cgfour + SunOS 4.0 (plus what Sun calls their "general hygiene" patch tape) + XV11R3 + MIT fixes 1 through 8 + "Purdue enhancements" + one local + "ANSIfication" fix (previously reported to MIT, + and attached below) + +I installed gcc 1.34 (plus the expr.c fix) and also ran the "fixincludes" +script. + +I built the X stuff with with the "CC" line in the "Sun.macros" file set to: + + CC = gcc -fcombine-regs -fstrength-reduce -finline-functions -fpcc-struct-return -DPURDUE -Dinline=INLINE -DNOSTDHDRS + +where -fcombine-regs, -fstrength-reduce, and -finline-functions +specify desired optimizations, -fpcc-struct-return makes things +compatible with the dbm library, -DPURDUE buys the Purdue speedups, +-Dinline=INLINE avoids a problem with a variable named "inline" in the +X file "fonts/bdftosnf/fontutil.c", and -DNOSTDHDRS avoids a problem +with multiple (and conflicting) typedef'ing of "size_t" in the +gcc-provided STDDEF_H and Sun's "sys/types.h". + +Some clients may need -fwritable-strings. twm is said to need it. + +The ANSIfication fix: + +> From ado Mon Dec 26 10:55:28 1988 +> To: xbugs@expo.lcs.mit.edu +> Subject: Xlibint and __STDC__ don't mix +> +> +> X Window System Bug Report +> xbugs@expo.lcs.mit.edu +> +> +> +> +> VERSION: +> R3 +> +> CLIENT MACHINE and OPERATING SYSTEM: +> Sun 3/60 running SunOS 4.0 +> +> DISPLAY: +> Sun CG4 +> +> WINDOW MANAGER: +> uwm +> +> AREA: +> Xlib +> +> SYNOPSIS: +> Xlibint.h and __STDC__ don't mix +> +> DESCRIPTION: +> If __STDC__ is defined (and UNIXCPP is not defined), +> code that uses the GetReqExtra macro defined in Xlibint.h +> is uncompilable. +> +> REPEAT BY: +> Script started on Mon Dec 26 10:52:58 1988 +> elsie$ cd lib/X +> elsie$ rm Xbackgnd.o +> rm: Xbackgnd.o: No such file or directory +> elsie$ rm XBackgnd.o +> elsie$ make XBackgnd.o CC=/usr/local/bin/gcc +> rm -f XBackgnd.o +> /usr/local/bin/gcc -c -O -I. -I../../. -I../.././X11 -DTCPCONN -DUNIXCONN XBackgnd.c +> XBackgnd.c: In function XSetWindowBackground: +> XBackgnd.c:16: undeclared variable `sz_' (first use here) +> *** Error code 1 +> make: Fatal error: Command failed for target `XBackgnd.o' +> elsie$ exit +> +> script done on Mon Dec 26 10:53:51 1988 +> +> SAMPLE FIX: +> *** 1.1/Xlibint.h Mon Dec 26 10:39:37 1988 +> --- 1.2/Xlibint.h Mon Dec 26 10:39:37 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,133 ---- +> #if defined(__STDC__) && !defined(UNIXCPP) +> #define GetReqExtra(name, n, req) \ +> 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) \ +> -- +> Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex. +