BSD 4_3_Net_2 release
[unix-history] / usr / src / usr.bin / gcc / cc1 / grot / README-X11
CommitLineData
783ec64c
C
1Our 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
9I installed gcc 1.34 (plus the expr.c fix) and also ran the "fixincludes"
10script.
11
12I 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
16where -fcombine-regs, -fstrength-reduce, and -finline-functions
17specify desired optimizations, -fpcc-struct-return makes things
18compatible with the dbm library, -DPURDUE buys the Purdue speedups,
19-Dinline=INLINE avoids a problem with a variable named "inline" in the
20X file "fonts/bdftosnf/fontutil.c", and -DNOSTDHDRS avoids a problem
21with multiple (and conflicting) typedef'ing of "size_t" in the
22gcc-provided STDDEF_H and Sun's "sys/types.h".
23
24Some clients may need -fwritable-strings. twm is said to need it.
25
26The ANSIfication fix:
27
28> From ado Mon Dec 26 10:55:28 1988
29> To: xbugs@expo.lcs.mit.edu
30> Subject: Xlibint and __STDC__ don't mix
31>
32>
33> X Window System Bug Report
34> xbugs@expo.lcs.mit.edu
35>
36>
37>
38>
39> VERSION:
40> R3
41>
42> CLIENT MACHINE and OPERATING SYSTEM:
43> Sun 3/60 running SunOS 4.0
44>
45> DISPLAY:
46> Sun CG4
47>
48> WINDOW MANAGER:
49> uwm
50>
51> AREA:
52> Xlib
53>
54> SYNOPSIS:
55> Xlibint.h and __STDC__ don't mix
56>
57> DESCRIPTION:
58> If __STDC__ is defined (and UNIXCPP is not defined),
59> code that uses the GetReqExtra macro defined in Xlibint.h
60> is uncompilable.
61>
62> REPEAT BY:
63> Script started on Mon Dec 26 10:52:58 1988
64> elsie$ cd lib/X
65> elsie$ rm Xbackgnd.o
66> rm: Xbackgnd.o: No such file or directory
67> elsie$ rm XBackgnd.o
68> elsie$ make XBackgnd.o CC=/usr/local/bin/gcc
69> rm -f XBackgnd.o
70> /usr/local/bin/gcc -c -O -I. -I../../. -I../.././X11 -DTCPCONN -DUNIXCONN XBackgnd.c
71> XBackgnd.c: In function XSetWindowBackground:
72> XBackgnd.c:16: undeclared variable `sz_' (first use here)
73> *** Error code 1
74> make: Fatal error: Command failed for target `XBackgnd.o'
75> elsie$ exit
76>
77> script done on Mon Dec 26 10:53:51 1988
78>
79> SAMPLE FIX:
80> *** 1.1/Xlibint.h Mon Dec 26 10:39:37 1988
81> --- 1.2/Xlibint.h Mon Dec 26 10:39:37 1988
82> ***************
83> *** 122,133 ****
84> #if defined(__STDC__) && !defined(UNIXCPP)
85> #define GetReqExtra(name, n, req) \
86> WORD64ALIGN\
87> ! if ((dpy->bufptr + SIZEOF(*req) + n) > dpy->bufmax)\
88> _XFlush(dpy);\
89> req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
90> req->reqType = X_##name;\
91> ! req->length = (SIZEOF(*req) + n)>>2;\
92> ! dpy->bufptr += SIZEOF(*req) + n;\
93> dpy->request++
94> #else
95> #define GetReqExtra(name, n, req) \
96> --- 122,133 ----
97> #if defined(__STDC__) && !defined(UNIXCPP)
98> #define GetReqExtra(name, n, req) \
99> WORD64ALIGN\
100> ! if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
101> _XFlush(dpy);\
102> req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
103> req->reqType = X_##name;\
104> ! req->length = (SIZEOF(x##name##Req) + n)>>2;\
105> ! dpy->bufptr += SIZEOF(x##name##Req) + n;\
106> dpy->request++
107> #else
108> #define GetReqExtra(name, n, req) \
109> --
110> Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex.
111