home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / cc-61.0.1 / cc / X11.README < prev   
Text File  |  1991-05-02  |  3KB  |  112 lines

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