home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14524 < prev    next >
Encoding:
Text File  |  1992-07-28  |  36.3 KB  |  1,370 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
  3. From: db@sunbim.be
  4. Subject: X11r5 patches for Solaris 2.0 !
  5. Message-ID: <9207281304.AA17840@whitney.sunbim.be.sunbim.uucp>
  6. Sender: daemon@athena.mit.edu (Mr Background)
  7. Organization: The Internet
  8. Date: Tue, 28 Jul 1992 13:04:43 GMT
  9. Lines: 1359
  10.  
  11.  
  12. This is my first attempt to get X11r5 to work on Solaris 2.0.
  13.  
  14. You will find the patches I applied to my sources in order to do this
  15. below.
  16.  
  17. Note several things however :
  18.     - this is an incompletely tested port.
  19.     - this is an incomplete port (see Notes: below), because of
  20.         some problems.
  21.     - I am still running the Solaris 2.0 Early Access (Feb. 1992)
  22.         I suppose Sun sends out the CD's to the US first :-(
  23.  
  24. Some more positive signs :
  25.     - most X clients seem to work. (except bitmap, xcalc)
  26.     - OSF/Motif 1.2 seems to work well on top of it.
  27.     - if you already have Solaris 2.0 FCS, then you may not
  28.       suffer from the problems I currently have.
  29.  
  30. I suppose the X Consortium will soon come out with an "official" patch
  31. for Solaris 2.0. My patches may help you get started in the mean time.
  32. Don't throw away this patch file if you use it. You will want to back
  33. out my changes when the Consortium releases its official patch.
  34.  
  35. Finally, suggestions for improvement are welcomed.
  36.  
  37.     Danny Backx                db@sunbim.be
  38.     System Engineer, BIM, Kwikstraat 4, B-3078 Everberg, Belgium
  39.     Tel. +32(2)759.59.25            Fax. +32(2)759.47.95
  40.  
  41.  
  42. Notes :
  43.     - Compilation must be done with BOOTSTRAPCFLAGS=-DSVR4
  44.  
  45.     - I have used the Sun Unbundled C compiler for my work.
  46.       I had the Cygnus development system as well, but didn't use
  47.       it. There are a few changes for the Cygnus system in sun.cf,
  48.       but they are probably incomplete.
  49.  
  50.     - for the Imakefile changes (LEX and YACC), I am depending
  51.       on the fact that the default rules for make have the
  52.       following definitions :
  53.         LEX=lex
  54.         YACC=yacc
  55.       because I've e.g. changed "yacc" to "${YACC}" several
  56.       times.
  57.  
  58.     - sockets vs. TLI - there are a couple of places where there
  59.       is something of TLI, but incomplete. E.g. XDM still has
  60.       a call to accept() if you compile with -DSTREAMSCONN.
  61.       I have therefore decided not currently to do anything about
  62.       that.
  63.  
  64.     - Because of not currently getting rid of sockets etc., it
  65.       really makes no sense to try to get rid of libucb either.
  66.       Therefore, the BSD compatibility package must be installed
  67.       for all this to work.
  68.  
  69.     - for all this to work, you better have
  70.         /opt/SUNWste/bin
  71.       in your path, and better before /usr/css/bin.
  72.       If you're using Cygnus' development package, you should
  73.       have /opt/cygnus-sol2/bin in your path.
  74.  
  75.     - (This applies to the Sun C compiler.) It is a good idea to
  76.         setenv TMPDIR /tmp
  77.       which is a SWAP tmp by default, and therefore is bigger
  78.       than /var/tmp which the C compiler uses.
  79.  
  80.     - Some stuff didn't compile on my system. The reason is (I think)
  81.       a bug in the LD for Solaris 2.0 beta. When compiling certain
  82.       apps with $MIT/fonts/lib/font/libfont.a, ld seemed to go in an
  83.       infinite loop. Obviously it didn't create any executable image.
  84.       The message it kept spitting at me all the time was
  85.  
  86.     cc -O -Xc -o fs  difs/libdifs.a ../.././fonts/lib/font/libfont.a difs/libdifs.a os/libos.a    
  87.     ld: warning: file ../.././fonts/lib/font/libfont.a(fsfuncs.o): attempted multiple inclusion of file 
  88.     ld: warning: file ../.././fonts/lib/font/libfont.a(fsfuncs.o): attempted multiple inclusion of file 
  89.     ld: warning: file ../.././fonts/lib/font/libfont.a(fsfuncs.o): attempted multiple inclusion of file 
  90.  
  91.  
  92.       Applications that didn't make it because of this :
  93.         server/Xsun
  94.         fonts/server/fs
  95.         fonts/clients/mkfontdir
  96.  
  97.       Because of the fact that I couldn't compile a server, all of PEX
  98.       is untested.
  99.  
  100.       For another reason, xcalc didn't compile on my system.
  101.       Description below.
  102.  
  103.     - clients/bitmap/bitmap doesn't seem to work.
  104.         aretha!db 467 % bitmap
  105.         Error: Unresolved inheritance operation
  106.  
  107. clients/twm/Makefile :
  108.     Yacc and lex - don't seem to exist under Solaris 2.0
  109.     Therefore, fell back to the Cygnus development package...
  110.         YACC=    byacc
  111.         LEX=    flex
  112.     Changes to both clients/twm/Imakefile and config/sun.cf to
  113.     make LEX and YACC work.
  114.  
  115. clients/twm/lex.l :
  116.     Definition of yywrap() is not needed - #ifdeffed it out.
  117.         #ifndef yywrap
  118.         yywrap() {return(1);}
  119.         #endif
  120.  
  121.     This may be a Cygnus-only problem.
  122.  
  123. clients/xcalc/math.c :
  124.     In SVR4, xcalc tries to use FPE_INTDIV etc. which are documented
  125.     in siginfo(5) as supposed to be known macros if you
  126.         #include <siginfo.h>
  127.     There seems to be no header file which has these symbols in them...
  128.     Note that I'm still running the "Early Access" (February 1992)
  129.     version of Solaris 2.0.
  130.  
  131. clients/xload/get_load.c :
  132.     Kernel file is not "/stand/unix" but "/kernel/unix".
  133.  
  134. clients/xload/Imakefile :
  135.     Need nlist(3E), and therefore must link with "-L/usr/ucblib -lucb".
  136.     Added this in the Imakefile.
  137.  
  138. clients/xdm/Imakefile :
  139.     socket stuff needs -lsocket
  140.  
  141. demos/xgc/Imakefile :
  142.     needs LEX and YACC.
  143.  
  144. config/sun.cf :
  145.     Added an attempt to support the Cygnus environment.
  146.     LEX and YACC variables.
  147.  
  148.     Do we have to use -DTCPCONN -DUNIXCONN -DSTREAMSCONN ?
  149.         Currently didn't use STREAMSCONN because the
  150.         R5 Release Notes say you're in trouble if you
  151.         don't have sockets.
  152.  
  153.     #define SystemV4 makes a lot of things work - most
  154.         -lnsl are ok after that.
  155.  
  156.     I edited it to always have -lsocket together with -lnsl
  157.  
  158.  
  159. fonts/clients/fsinfo/Imakefile, fonts/clients/fslsfonts/Imakefile,
  160. fonts/clients/fstobdf/Imakefile, fonts/clients/showfont/Imakefile :
  161.     needed -lsocket -lnsl
  162.  
  163. clients/xterm/main.c, clients/xterm/resize.c :
  164.     All places where "#ifdef sun" was found were changed to
  165.         #if defined(sun) && !defined(SVR4)
  166.  
  167.     Also, a couple of lines were added to resize.c to make it
  168.     print something under SVR4 as well. Probably not necessary.
  169.  
  170. clients/xconsole/xconsole.c :
  171.     Added support for wscons(7). Also had to fix the fact that TIOCCONS
  172.     was still #defined in /usr/include/sys/suntty.h, but not working.
  173.  
  174.     Xconsole needs to be setuid to root to work under SVR4.
  175.  
  176. clients/xconsole/Imakefile, clients/xterm/Imakefile, clients/xload/Imakefile :
  177.     All setuid-something programs need to be compiled with LD_RUN_PATH
  178.     set when doing the final link. If not, they will not pick up the
  179.     libraries from (e.g.) /usr/ucblib because that directory is not
  180.     secure.
  181.  
  182.     Note - these patches do NOT implement LD_RUN_PATH. You should recompile
  183.     these three clients yourself after the global build, with LD_RUN_PATH
  184.     set.
  185.  
  186. server/ddx/sun/Imakefile :
  187.     Had to make the GX stuff not happen on Solaris 2.0. Don't have the
  188.     driver yet...
  189.  
  190. server/ddx/sun/sun.h, server/ddx/sun/*.c :
  191.     Changed all #include <sundev/.. or <sun/... to <sys/
  192.     Same thing for <pixrect/...
  193.     Also had to remove all #include <struct.h>
  194.     Added #include <unistd.h> for R_OK and X_OK.
  195.  
  196. server/ddx/sun/kbd_mode.c, server/ddx/sun/constype.c :
  197.     Similar changes.
  198.  
  199.  
  200.  
  201. ===========
  202. Two articles previouly posted about porting X11r5 to ATT SVr4 -
  203.  
  204. > Article 32286 of comp.windows.x:
  205. > From: steve@ecf.toronto.edu (Steve Kotsopoulos)
  206. > Newsgroups: comp.windows.x,comp.unix.sysv386
  207. > Subject: Building X11R5 under AT&T SVR4
  208. > Message-ID: <1991Sep12.164818.16380@ecf.toronto.edu>
  209. > Date: 12 Sep 91 16:48:18 GMT
  210. > Organization: University of Toronto, Engineering Computing Facility
  211. > Lines: 56
  212. >
  213. > Now that I have the server and clients working, here is a list of
  214. > things people should check if they are having problems building X11R5
  215. > (I run AT&T's SVR4, so I'm not sure how much of this applies
  216. > to DELL, ESIX, ISC or SCO)  :-(
  217. >
  218. > 1. You will need lots of disk space! I repartitioned my disk so that
  219. >    I had a 250Meg /X11 area for source and installed binaries.
  220. >    As it turns out, I didn't need that much, but I will probably use
  221. >    it all up once the contrib stuff is released.
  222. >
  223. > 2. I had lots of problems trying to use gcc, so I used the standard
  224. >    C compiler. Make sure that you don't have /usr/ucb before /bin
  225. >    in your path, or else you will get a shell script version of cc
  226. >    that set a bunch of parameters (incorrectly, for X11R5) before
  227. >    calling /usr/ccs/bin/cc to do the real work.
  228. >
  229. > 3. Follow the advice of Steve Hite (shite@sinkhole.unf.edu):
  230. >      "DON'T use the C shell on Esix 4.0.3a.  The X library is HUGE and
  231. >       csh complains about too long of an argument list.  The Korn shell
  232. >       will work just dandy."
  233. >
  234. >    All my clients were dumping core at first, but after changing to the
  235. >    Korn shell (and also changing several other things at the same time,
  236. >    so I'm not sure if csh was the culprit) they all worked properly. 
  237. >
  238. >    Note: I did not get any complaints about too long of an argument
  239. >      list, so maybe this is only neccessary on Esix.
  240. >
  241. > 4. Change the line in server/Imakefile that reads:
  242. >         SYSLIBS = -lm /usr/ucblib/libucb.a
  243. >    to read:
  244. >         SYSLIBS = -lm -lc /usr/ucblib/libucb.a
  245. >
  246. >    This ensures that the directory reading routines from libc.a are
  247. >    used intead of the ones in libucb.a (BSD version of readdir).
  248. >
  249. > 5. Go for it, with: make World BOOTSTRAPCFLAGS="-DATT -DSVR4 -DSYSV386"
  250. >    This took 3.5 hours on a 33MHz 486.
  251. >
  252. > 6. fix the 2 suid clients (xterm & xload):
  253. >     'export LD_RUN_PATH=/usr/X386/lib'
  254. >     delete mit/clients/xterm/xterm & mit/clients/xload/xload and
  255. >     relink them again.
  256. >
  257. > 7. make install
  258. >
  259. > If anyone has problems with the X386 server you should be aware that
  260. > MIT was not able to test it because they do not have a SVGA board.
  261. >
  262. > Also, MANY thanks to mark@zok.sgcs.com and roell@dell.com for all the
  263. > work they put into getting X386 included in X11R5.
  264. > -- 
  265. > Steve Kotsopoulos                   mail:   steve@ecf.toronto.edu
  266. > Systems Analyst                     bitnet: steve@ecf.UTORONTO.BITNET
  267. > Engineering Computing Facility      uucp:   uunet!utai!ecf!steve
  268. > University of Toronto               phone:  (416) 978-5898
  269.  
  270.  
  271. > Article 32398 of comp.windows.x:
  272. > From: mats@alruna.UUCP (Mats Wichmann)
  273. > Newsgroups: comp.windows.x
  274. > Subject: Re: Building X11R5 under AT&T SVR4
  275. > Message-ID: <24624.9109131444@unisoft.unisoft.com>
  276. > Date: 13 Sep 91 14:43:10 GMT
  277. > Sender: daemon@athena.mit.edu (Mr Background)
  278. > Organization: The Internet
  279. > Lines: 37
  280. >
  281. > On Sep 12,  4:48pm, Steve Kotsopoulos wrote:
  282. > ] Now that I have the server and clients working, here is a list of
  283. > ] things people should check if they are having problems building X11R5
  284. > ] (I run AT&T's SVR4, so I'm not sure how much of this applies
  285. > ] to DELL, ESIX, ISC or SCO)  :-(
  286. > ] 
  287. > ....
  288. > This one for sure applies to all sVr4's:
  289. > ] 
  290. > ] 4. Change the line in server/Imakefile that reads:
  291. > ]         SYSLIBS = -lm /usr/ucblib/libucb.a
  292. > ]    to read:
  293. > ]         SYSLIBS = -lm -lc /usr/ucblib/libucb.a
  294. > ] 
  295. > ]    This ensures that the directory reading routines from libc.a are
  296. > ]    used intead of the ones in libucb.a (BSD version of readdir).
  297. >
  298. > I haven't seen the x11r5 source yet (still waiting, sigh), but this is a
  299. > problem I've run into many a time in the nine months or so I've been running
  300. > sVr4:  while the ucblib does provide some useful utility, it has a tendency
  301. > to supply routines you don't expect, so unless you are explicitly trying to
  302. > get a BSD-ish program to work without porting (hint: odds are good you won't
  303. > get away with it anyway), you'll need -lc before -lucb to insure you get
  304. > sVr4's "standard" libc versions of things.  The readdir routines are just
  305. > one of many instances of this.  You'll probably also need to make sure that
  306. > -I/usr/include precededs -I/usr/ucbinclude.
  307. >
  308. > For things that use Larry Wall's Shell Script From Hell (Configure), it
  309. > might sometimes even be necessary to take /usr/ucb out of your path before
  310. > running it - or it will go find things in /usr/ucb that you don't want
  311. > it to use!!!
  312. >
  313. >
  314. > -- 
  315. > Mats Wichmann
  316. > Systems Software Consultant
  317. > alruna!mats@unisoft.com
  318.  
  319.  
  320. Patches...
  321.  
  322. Note that I haven't included a patch file for config/sun.cf because the sun.cf
  323. that I started from was already hacked up.
  324. You will find my complete config/sun.cf file at the end, as a shar file.
  325.  
  326.  
  327. *** mit/extensions/lib/PEX/cp/Imakefile.orig    Tue Jul 23 03:09:49 1991
  328. --- mit/extensions/lib/PEX/cp/Imakefile    Fri Jul 24 09:58:19 1992
  329. ***************
  330. *** 29,34 ****
  331. --- 29,38 ----
  332.   #define PexPhigsCDebugFlags LibraryCDebugFlags
  333.   #endif
  334.   
  335. + #if defined(SunArchitecture) && defined(SVR4)
  336. + SYS_LIBRARIES = -lsocket
  337. + #endif
  338.     CCOPTIONS = PexCCOptions
  339.   CDEBUGFLAGS = PexPhigsCDebugFlags
  340.       DEFINES = PexPhigsDefines
  341. *** mit/fonts/clients/fsinfo/Imakefile.orig    Wed Jul 17 20:04:42 1991
  342. --- mit/fonts/clients/fsinfo/Imakefile    Fri Jul 24 11:27:59 1992
  343. ***************
  344. *** 5,9 ****
  345. --- 5,13 ----
  346.   OBJS = fsinfo.o
  347.   INCLUDES = -I$(FONTSRC)/include
  348.   
  349. + #if defined(SunArchitecture) && defined(SVR4)
  350. + SYS_LIBRARIES = -lsocket -lnsl
  351. + #endif
  352.   ComplexProgramTarget(fsinfo)
  353.   
  354. *** mit/fonts/clients/fslsfonts/Imakefile.orig    Wed Jul 17 20:04:49 1991
  355. --- mit/fonts/clients/fslsfonts/Imakefile    Fri Jul 24 11:29:36 1992
  356. ***************
  357. *** 5,9 ****
  358. --- 5,13 ----
  359.   OBJS = fslsfonts.o
  360.   INCLUDES = -I$(FONTSRC)/include
  361.   
  362. + #if defined(SunArchitecture) && defined(SVR4)
  363. + SYS_LIBRARIES = -lsocket -lnsl
  364. + #endif
  365.   ComplexProgramTarget(fslsfonts)
  366.   
  367. *** mit/fonts/clients/fstobdf/Imakefile.orig    Wed Jul 17 20:04:55 1991
  368. --- mit/fonts/clients/fstobdf/Imakefile    Fri Jul 24 11:30:31 1992
  369. ***************
  370. *** 3,8 ****
  371. --- 3,12 ----
  372.   DEPLIBS = $(FSLIBSRC)/libFS.a $(DEPXLIB)
  373.   INCLUDES = -I$(FONTSRC)/include
  374.   
  375. + #if defined(SunArchitecture) && defined(SVR4)
  376. + SYS_LIBRARIES = -lsocket -lnsl
  377. + #endif
  378.              SRCS = chars.c fstobdf.c header.c props.c
  379.              OBJS = chars.o fstobdf.o header.o props.o
  380.   
  381. *** mit/fonts/clients/showfont/Imakefile.orig    Wed Jul 17 20:05:00 1991
  382. --- mit/fonts/clients/showfont/Imakefile    Fri Jul 24 11:32:40 1992
  383. ***************
  384. *** 5,9 ****
  385. --- 5,13 ----
  386.   OBJS = showfont.o
  387.   INCLUDES = -I$(FONTSRC)/include
  388.   
  389. + #if defined(SunArchitecture) && defined(SVR4)
  390. + SYS_LIBRARIES = -lsocket -lnsl
  391. + #endif
  392.   ComplexProgramTarget(showfont)
  393.   
  394. *** mit/lib/Xt/Resources.c.orig    Thu Jun 13 23:03:44 1991
  395. --- mit/lib/Xt/Resources.c    Wed Jul 15 14:05:13 1992
  396. ***************
  397. *** 244,249 ****
  398. --- 244,261 ----
  399.   #undef xrmres
  400.   } /* _XtCompileResourceList */
  401.   
  402. + /*
  403. + ** db - for OLIT 3.0 compatibility... see Donna Converse's message
  404. + **    on Xpert dated Wed, 8 Jul 1992 16:29:03 GMT.
  405. + **    "Re: shared libs on Suns. (also:  R5 shared libraries)"
  406. + */
  407. + void XrmCompileResourceList(resources, num_resources)
  408. +     XtResourceList    resources;
  409. +     Cardinal    num_resources;
  410. + {
  411. +     _XtCompileResourceList(resources, num_resources);
  412. + }
  413.   /* Like _XtCompileResourceList, but strings are not permanent */
  414.   static void  XrmCompileResourceListEphem(resources, num_resources)
  415.       register XtResourceList resources;
  416. *** mit/lib/Xt/Xtos.h.orig    Thu Dec 27 19:34:36 1990
  417. --- mit/lib/Xt/Xtos.h    Fri Jul 17 11:22:48 1992
  418. ***************
  419. *** 73,79 ****
  420. --- 73,83 ----
  421.    * Some System V boxes extract alloca.o from /lib/libPW.a; if you
  422.    * decide that you don't want to use alloca, you might want to fix it here.
  423.    */
  424. + #ifdef SVR4
  425. + #include <alloca.h>
  426. + #else
  427.   char *alloca();
  428. + #endif
  429.   #define ALLOCATE_LOCAL(size) alloca((int)(size))
  430.   #define DEALLOCATE_LOCAL(ptr)  /* as nothing */
  431.   #endif /* who does alloca */
  432. *** mit/lib/Xt/Converters.c.orig    Tue Jul 23 19:39:00 1991
  433. --- mit/lib/Xt/Converters.c    Wed Jul 15 14:01:55 1992
  434. ***************
  435. *** 61,73 ****
  436.   #define XtQVisual    XrmPermStringToQuark(XtRVisual)
  437.   
  438.   static XrmQuark  XtQBool;
  439. ! static XrmQuark  XtQBoolean;
  440.   static XrmQuark  XtQColor;
  441.   static XrmQuark  XtQDimension;
  442. ! static XrmQuark  XtQFont;
  443.   static XrmQuark  XtQFontSet;
  444. ! static XrmQuark  XtQFontStruct;
  445. ! static XrmQuark  XtQInt;
  446.   static XrmQuark  XtQPixel;
  447.   static XrmQuark  XtQPosition;
  448.   XrmQuark  _XtQString;
  449. --- 61,73 ----
  450.   #define XtQVisual    XrmPermStringToQuark(XtRVisual)
  451.   
  452.   static XrmQuark  XtQBool;
  453. ! XrmQuark  XtQBoolean;
  454.   static XrmQuark  XtQColor;
  455.   static XrmQuark  XtQDimension;
  456. ! XrmQuark  XtQFont;
  457.   static XrmQuark  XtQFontSet;
  458. ! XrmQuark  XtQFontStruct;
  459. ! XrmQuark  XtQInt;
  460.   static XrmQuark  XtQPixel;
  461.   static XrmQuark  XtQPosition;
  462.   XrmQuark  _XtQString;
  463. *** mit/clients/xterm/main.c.orig    Fri Mar 20 14:22:44 1992
  464. --- mit/clients/xterm/main.c    Fri Jul 24 14:55:11 1992
  465. ***************
  466. *** 1504,1510 ****
  467.       char buf[64];
  468.       char *TermName = NULL;
  469.       int ldisc = 0;
  470. ! #ifdef sun
  471.   #ifdef TIOCSSIZE
  472.       struct ttysize ts;
  473.   #endif    /* TIOCSSIZE */
  474. --- 1504,1513 ----
  475.       char buf[64];
  476.       char *TermName = NULL;
  477.       int ldisc = 0;
  478. ! #ifdef USE_TERMIOS
  479. !     struct winsize ws;
  480. ! #else /* ~ USE_TERMIOS */
  481. ! #if defined(sun) && !defined(SVR4)
  482.   #ifdef TIOCSSIZE
  483.       struct ttysize ts;
  484.   #endif    /* TIOCSSIZE */
  485. ***************
  486. *** 1513,1518 ****
  487. --- 1516,1522 ----
  488.       struct winsize ws;
  489.   #endif    /* TIOCSWINSZ */
  490.   #endif    /* sun */
  491. + #endif    /* USE_TERMIOS */
  492.       struct passwd *pw = NULL;
  493.   #ifdef UTMP
  494.       struct utmp utmp;
  495. ***************
  496. *** 1710,1716 ****
  497.           }
  498.       }
  499.   
  500. ! #ifdef sun
  501.   #ifdef TIOCSSIZE
  502.       /* tell tty how big window is */
  503.       if(screen->TekEmu) {
  504. --- 1714,1720 ----
  505.           }
  506.       }
  507.   
  508. ! #if defined(sun) && !defined(SVR4)
  509.   #ifdef TIOCSSIZE
  510.       /* tell tty how big window is */
  511.       if(screen->TekEmu) {
  512. ***************
  513. *** 2354,2360 ****
  514.               if(handshake.rows > 0 && handshake.cols > 0) {
  515.               screen->max_row = handshake.rows;
  516.               screen->max_col = handshake.cols;
  517. ! #ifdef sun
  518.   #ifdef TIOCSSIZE
  519.               ts.ts_lines = screen->max_row + 1;
  520.               ts.ts_cols = screen->max_col + 1;
  521. --- 2358,2364 ----
  522.               if(handshake.rows > 0 && handshake.cols > 0) {
  523.               screen->max_row = handshake.rows;
  524.               screen->max_col = handshake.cols;
  525. ! #if defined(sun) && !defined(SVR4)
  526.   #ifdef TIOCSSIZE
  527.               ts.ts_lines = screen->max_row + 1;
  528.               ts.ts_cols = screen->max_col + 1;
  529. ***************
  530. *** 2410,2416 ****
  531.   
  532.   
  533.           /* need to reset after all the ioctl bashing we did above */
  534. ! #ifdef sun
  535.   #ifdef TIOCSSIZE
  536.           ioctl  (0, TIOCSSIZE, &ts);
  537.   #endif    /* TIOCSSIZE */
  538. --- 2414,2420 ----
  539.   
  540.   
  541.           /* need to reset after all the ioctl bashing we did above */
  542. ! #if defined(sun) && !defined(SVR4)
  543.   #ifdef TIOCSSIZE
  544.           ioctl  (0, TIOCSSIZE, &ts);
  545.   #endif    /* TIOCSSIZE */
  546. *** mit/clients/xterm/resize.c.orig    Tue Jul 23 15:12:14 1991
  547. --- mit/clients/xterm/resize.c    Fri Jul 24 14:28:47 1992
  548. ***************
  549. *** 130,136 ****
  550.       "\0337\033[r\033[999;999H\033[6n",
  551.       "\033[18t",
  552.   };
  553. ! #ifndef sun
  554.   #ifdef TIOCSWINSZ
  555.   char *getwsize[EMULATIONS] = {    /* size in pixels */
  556.       0,
  557. --- 130,136 ----
  558.       "\0337\033[r\033[999;999H\033[6n",
  559.       "\033[18t",
  560.   };
  561. ! #if defined(SVR4) || !defined(sun)
  562.   #ifdef TIOCSWINSZ
  563.   char *getwsize[EMULATIONS] = {    /* size in pixels */
  564.       0,
  565. ***************
  566. *** 159,165 ****
  567.   char sunname[] = "sunsize";
  568.   int tty;
  569.   FILE *ttyfp;
  570. ! #ifndef sun
  571.   #ifdef TIOCSWINSZ
  572.   char *wsize[EMULATIONS] = {
  573.       0,
  574. --- 159,165 ----
  575.   char sunname[] = "sunsize";
  576.   int tty;
  577.   FILE *ttyfp;
  578. ! #if defined(SVR4) || !defined(sun)
  579.   #ifdef TIOCSWINSZ
  580.   char *wsize[EMULATIONS] = {
  581.       0,
  582. ***************
  583. *** 195,201 ****
  584.       char newtc [1024];
  585.   #endif /* USE_TERMCAP */
  586.       char buf[BUFSIZ];
  587. ! #ifdef sun
  588.   #ifdef TIOCSSIZE
  589.       struct ttysize ts;
  590.   #endif    /* TIOCSSIZE */
  591. --- 195,201 ----
  592.       char newtc [1024];
  593.   #endif /* USE_TERMCAP */
  594.       char buf[BUFSIZ];
  595. ! #if defined(sun) && !defined(SVR4)
  596.   #ifdef TIOCSSIZE
  597.       struct ttysize ts;
  598.   #endif    /* TIOCSSIZE */
  599. ***************
  600. *** 335,341 ****
  601.       }
  602.       if(restore[emu])
  603.           write(tty, restore[emu], strlen(restore[emu]));
  604. ! #ifdef sun
  605.   #ifdef TIOCGSIZE
  606.       /* finally, set the tty's window size */
  607.       if (ioctl (tty, TIOCGSIZE, &ts) != -1) {
  608. --- 335,341 ----
  609.       }
  610.       if(restore[emu])
  611.           write(tty, restore[emu], strlen(restore[emu]));
  612. ! #if defined(sun) && !defined(SVR4)
  613.   #ifdef TIOCGSIZE
  614.       /* finally, set the tty's window size */
  615.       if (ioctl (tty, TIOCGSIZE, &ts) != -1) {
  616. ***************
  617. *** 419,424 ****
  618. --- 419,428 ----
  619.   #ifndef SVR4
  620.           printf ("%sCOLUMNS=%d;\nLINES=%d;\nexport COLUMNS LINES;\n",
  621.               setname, cols, rows);
  622. + #else
  623. + /* Added db */
  624. +         printf ("%sCOLUMNS=%d;\nLINES=%d;\nexport COLUMNS LINES;\n",
  625. +             setname, cols, rows);
  626.   #endif /* !SVR4 */
  627.   #endif    /* USE_SYSV_TERMCAP */
  628.   
  629. ***************
  630. *** 429,434 ****
  631. --- 433,442 ----
  632.            setname, termcap);
  633.   #else /* else not USE_TERMCAP */
  634.   #ifndef SVR4
  635. +         printf ("set noglob;\n%ssetenv COLUMNS '%d';\nsetenv LINES '%d';\nunset noglob;\n",
  636. +             setname, cols, rows);
  637. + #else
  638. + /* Added db */
  639.           printf ("set noglob;\n%ssetenv COLUMNS '%d';\nsetenv LINES '%d';\nunset noglob;\n",
  640.               setname, cols, rows);
  641.   #endif /* !SVR4 */
  642. *** mit/clients/xterm/screen.c.orig    Thu Aug 22 20:30:38 1991
  643. --- mit/clients/xterm/screen.c    Fri Jul 24 15:06:06 1992
  644. ***************
  645. *** 485,491 ****
  646.       int rows, cols;
  647.       int border = 2 * screen->border;
  648.       int move_down_by;
  649. ! #ifdef sun
  650.   #ifdef TIOCSSIZE
  651.       struct ttysize ts;
  652.   #endif    /* TIOCSSIZE */
  653. --- 485,491 ----
  654.       int rows, cols;
  655.       int border = 2 * screen->border;
  656.       int move_down_by;
  657. ! #if defined(sun) && !defined(SVR4)
  658.   #ifdef TIOCSSIZE
  659.       struct ttysize ts;
  660.   #endif    /* TIOCSSIZE */
  661. ***************
  662. *** 579,585 ****
  663.       screen->fullVwin.fullheight = height;
  664.       screen->fullVwin.fullwidth = width;
  665.       ResizeSelection (screen, rows, cols);
  666. ! #ifdef sun
  667.   #ifdef TIOCSSIZE
  668.       /* Set tty's idea of window size */
  669.       ts.ts_lines = rows;
  670. --- 579,585 ----
  671.       screen->fullVwin.fullheight = height;
  672.       screen->fullVwin.fullwidth = width;
  673.       ResizeSelection (screen, rows, cols);
  674. ! #if defined(sun) && !defined(SVR4)
  675.   #ifdef TIOCSSIZE
  676.       /* Set tty's idea of window size */
  677.       ts.ts_lines = rows;
  678. *** mit/clients/xload/get_load.c.orig    Thu Jul 25 18:21:17 1991
  679. --- mit/clients/xload/get_load.c    Thu Jul 23 13:09:47 1992
  680. ***************
  681. *** 386,392 ****
  682. --- 386,396 ----
  683.    */
  684.   #ifndef KERNEL_FILE
  685.   #ifdef SVR4
  686. + #ifdef sun
  687. + #define KERNEL_FILE "/kernel/unix"
  688. + #else
  689.   #define KERNEL_FILE "/stand/unix"
  690. + #endif
  691.   #else
  692.   #ifdef SYSV
  693.   #define KERNEL_FILE "/unix"
  694. No differences encountered
  695. *** mit/clients/twm/lex.l.orig    Fri Dec 15 19:02:02 1989
  696. --- mit/clients/twm/lex.l    Thu Jul 23 12:07:18 1992
  697. ***************
  698. *** 87,93 ****
  699. --- 87,95 ----
  700.                     ParseError = 1;
  701.                   }
  702.   %%
  703. + #ifndef yywrap
  704.   yywrap() { return(1);}
  705. + #endif
  706.   
  707.   #undef unput
  708.   #undef input
  709. *** mit/clients/twm/Imakefile.orig    Wed Jul 17 04:48:07 1991
  710. --- mit/clients/twm/Imakefile    Thu Jul 23 12:21:06 1992
  711. ***************
  712. *** 20,25 ****
  713. --- 20,32 ----
  714.           parse.o menus.o events.o resize.o util.o version.o iconmgr.o \
  715.           cursor.o icons.o
  716.   
  717. + #ifdef LexCmd
  718. + LEX=LexCmd
  719. + #endif
  720. + #ifdef YaccCmd
  721. + YACC=YaccCmd
  722. + #endif
  723.   AllTarget(twm)
  724.   
  725.   SpecialObjectRule(parse.o,NullParameter,'-DSYSTEM_INIT_FILE="'$(TWMDIR)'/system.twmrc"')
  726. ***************
  727. *** 33,39 ****
  728.   InstallNonExecFile(system.twmrc,$(TWMDIR))
  729.   
  730.   gram.h gram.c: gram.y
  731. !     yacc $(YFLAGS) gram.y
  732.       $(MV) y.tab.c gram.c
  733.       $(MV) y.tab.h gram.h
  734.   
  735. --- 40,46 ----
  736.   InstallNonExecFile(system.twmrc,$(TWMDIR))
  737.   
  738.   gram.h gram.c: gram.y
  739. !     ${YACC} $(YFLAGS) gram.y
  740.       $(MV) y.tab.c gram.c
  741.       $(MV) y.tab.h gram.h
  742.   
  743. *** mit/clients/xconsole/xconsole.c.orig    Thu Jul 25 18:24:34 1991
  744. --- mit/clients/xconsole/xconsole.c    Mon Jul 27 08:10:07 1992
  745. ***************
  746. *** 110,115 ****
  747. --- 110,127 ----
  748.   #define FILE_NAME   "/dev/xcons"
  749.   #endif
  750.   
  751. + #if defined(sun) && defined(SVR4)
  752. + #define    USE_WSCONS
  753. + #include    <termios.h>
  754. + #include    <sys/stropts.h>        /* for I_PUSH */
  755. + #include    <sys/strredir.h>
  756. + static int  tty_fd, pty_fd;
  757. + static char ttydev[64], ptydev[64];
  758. + #else
  759.   #ifndef USE_FILE
  760.   #include    <sys/ioctl.h>
  761.   #ifdef SVR4
  762. ***************
  763. *** 124,129 ****
  764. --- 136,143 ----
  765.   #endif
  766.   #endif
  767.   
  768. + #endif
  769.   #if defined(SYSV) && defined(SYSV386)
  770.   #define USE_OSM
  771.   #endif
  772. ***************
  773. *** 161,166 ****
  774. --- 175,192 ----
  775.           /* Don't have to be owner of /dev/console when using /dev/osm. */
  776.           input = fdopen(osm_pipe(), "r");
  777.   #endif
  778. + #ifdef USE_WSCONS
  779. +         {
  780. +         int    cons;
  781. +         if ((cons = open("/dev/console", O_RDONLY)) >= 0) {
  782. +             if (get_pty(&pty_fd, &tty_fd, ttydev, ptydev) == 0 &&
  783. +                 ioctl(cons, SRIOCSREDIR, tty_fd) != -1)
  784. +                     input = fdopen(pty_fd, "r");
  785. +         }
  786. +         }
  787. + #endif /* WSCONS */
  788.           if (input && app_resources.verbose)
  789.           {
  790.           char    *hostname;
  791. ***************
  792. *** 588,594 ****
  793.       XawTextSetInsertionPoint (w, len);
  794.   }
  795.   
  796. ! #ifdef USE_PTY
  797.   /* This function opens up a pty master and stuffs it's value into pty.
  798.    * If it finds one, it returns a value of 0.  If it does not find one,
  799.    * it returns a value of !0.  This routine is designed to be re-entrant,
  800. --- 614,620 ----
  801.       XawTextSetInsertionPoint (w, len);
  802.   }
  803.   
  804. ! #if defined(USE_PTY) || defined(USE_WSCONS)
  805.   /* This function opens up a pty master and stuffs it's value into pty.
  806.    * If it finds one, it returns a value of 0.  If it does not find one,
  807.    * it returns a value of !0.  This routine is designed to be re-entrant,
  808. *** mit/clients/xconsole/Imakefile.orig    Wed Jul 17 03:07:12 1991
  809. --- mit/clients/xconsole/Imakefile    Mon Jul 27 08:32:40 1992
  810. ***************
  811. *** 7,10 ****
  812. --- 7,17 ----
  813.   
  814.   ComplexProgramTarget(xconsole)
  815.   
  816. + #if defined(SunArchitecture) && defined(SystemV4)
  817. + InstallProgramWithFlags($(PROGRAMS),$(BINDIR),$(INSTUIDFLAGS))
  818. + #else
  819. + InstallProgramWithFlags($(PROGRAMS),$(BINDIR),NullParameter)
  820. + #endif
  821.   InstallAppDefaults(XConsole)
  822. *** mit/demos/xgc/Imakefile.orig    Mon Jul 22 16:07:27 1991
  823. --- mit/demos/xgc/Imakefile    Fri Jul 24 07:50:59 1992
  824. ***************
  825. *** 11,22 ****
  826.     SYS_LIBRARIES = -lm
  827.            YFLAGS = -d
  828.   
  829.   ComplexProgramTarget(xgc)
  830.   
  831.   InstallAppDefaults(Xgc)
  832.   
  833.   gram.h gram.c: gram.y
  834. !     yacc -d gram.y
  835.       $(MV) y.tab.c gram.c
  836.       $(MV) y.tab.h gram.h
  837.   
  838. --- 11,29 ----
  839.     SYS_LIBRARIES = -lm
  840.            YFLAGS = -d
  841.   
  842. + #ifdef    YaccCmd
  843. + YACC=    YaccCmd
  844. + #endif
  845. + #ifdef    LexCmd
  846. + LEX=    LexCmd
  847. + #endif
  848.   ComplexProgramTarget(xgc)
  849.   
  850.   InstallAppDefaults(Xgc)
  851.   
  852.   gram.h gram.c: gram.y
  853. !     ${YACC} -d gram.y
  854.       $(MV) y.tab.c gram.c
  855.       $(MV) y.tab.h gram.h
  856.   
  857. *** mit/server/ddx/sun/sunCG6C.c.orig    Fri Jul 26 23:17:06 1991
  858. --- mit/server/ddx/sun/sunCG6C.c    Mon Jul 27 11:04:03 1992
  859. ***************
  860. *** 39,50 ****
  861.   
  862.   #ifdef FBTYPE_SUNFAST_COLOR
  863.   #include    <sys/mman.h>
  864.   #include    <pixrect/memreg.h>
  865.   #include    "colormap.h"
  866.   #include    "colormapst.h"
  867.   #include    "resource.h"
  868.   #include    <cfb.h>
  869. - #include    <struct.h>
  870.   
  871.   #define CG6_VBASE    0x70000000
  872.   
  873. --- 39,54 ----
  874.   
  875.   #ifdef FBTYPE_SUNFAST_COLOR
  876.   #include    <sys/mman.h>
  877. + #ifdef SVR4
  878. + #include    <sys/memreg.h>
  879. + #else
  880.   #include    <pixrect/memreg.h>
  881. + #include    <struct.h>
  882. + #endif
  883.   #include    "colormap.h"
  884.   #include    "colormapst.h"
  885.   #include    "resource.h"
  886.   #include    <cfb.h>
  887.   
  888.   #define CG6_VBASE    0x70000000
  889.   
  890. *** mit/server/ddx/sun/sunCG.c.orig    Fri Aug 23 20:12:45 1991
  891. --- mit/server/ddx/sun/sunCG.c    Mon Jul 27 10:57:15 1992
  892. ***************
  893. *** 32,41 ****
  894. --- 32,47 ----
  895.   #include    "sun.h"
  896.   
  897.   #include    <sys/mman.h>
  898. + #ifdef SVR4
  899. + #include    <sys/memreg.h>
  900. + #else
  901.   #include    <pixrect/memreg.h>
  902. + #endif
  903.   #include    "colormapst.h"
  904.   #include    "resource.h"
  905. + #ifndef SVR4
  906.   #include    <struct.h>
  907. + #endif
  908.   
  909.   extern int TellLostMap(), TellGainedMap();
  910.   
  911. *** mit/server/ddx/sun/sunCG2M.c.orig    Fri May 31 20:06:15 1991
  912. --- mit/server/ddx/sun/sunCG2M.c    Mon Jul 27 10:59:54 1992
  913. ***************
  914. *** 25,33 ****
  915. --- 25,38 ----
  916.   #include    "resource.h"
  917.   
  918.   #include    <sys/mman.h>
  919. + #ifdef SVR4
  920. + #include    <sys/memreg.h>
  921. + #include    <sys/cg2reg.h>
  922. + #else
  923.   #include    <pixrect/memreg.h>
  924.   #include    <pixrect/cg2reg.h>
  925.   #include    <struct.h>
  926. + #endif
  927.   
  928.   #ifndef _MAP_NEW
  929.   extern caddr_t valloc();
  930. *** mit/server/ddx/sun/kbd_mode.c.orig    Thu Sep 10 22:24:42 1987
  931. --- mit/server/ddx/sun/kbd_mode.c    Mon Jul 27 10:40:33 1992
  932. ***************
  933. *** 36,46 ****
  934. --- 36,55 ----
  935.    *      kbd_mode:       set keyboard encoding mode
  936.    */
  937.   
  938. + #ifdef SVR4
  939. + #include <sys/fcntl.h>
  940. + #endif
  941.   #include <sys/types.h>
  942.   #include <sys/file.h>
  943.   #include <sys/ioctl.h>
  944. + #ifdef SVR4
  945. + #include <sys/kbio.h>
  946. + #include <sys/kbd.h>
  947. + #else
  948.   #include <sundev/kbio.h>
  949.   #include <sundev/kbd.h>
  950. + #endif
  951.   #include <stdio.h>
  952.   
  953.   static void         die(), usage();
  954. *** mit/server/ddx/sun/sun.h.orig    Mon Mar  2 12:54:22 1992
  955. --- mit/server/ddx/sun/sun.h    Mon Jul 27 10:35:53 1992
  956. ***************
  957. *** 17,22 ****
  958. --- 17,26 ----
  959.   #ifndef _SUN_H_
  960.   #define _SUN_H_
  961.   
  962. + #ifdef SVR4
  963. + #include    <unistd.h>
  964. + #endif
  965.   #include    <errno.h>
  966.   extern int  errno;
  967.   #include    <sys/param.h>
  968. ***************
  969. *** 25,34 ****
  970. --- 29,45 ----
  971.   #include    <sys/file.h>
  972.   #include    <sys/fcntl.h>
  973.   #include    <sys/signal.h>
  974. + #ifdef SVR4
  975. + #include    <sys/kbd.h>
  976. + #include    <sys/kbio.h>
  977. + #include    <sys/msio.h>
  978. + #include    <sys/fbio.h>
  979. + #else
  980.   #include    <sundev/kbd.h>
  981.   #include    <sundev/kbio.h>
  982.   #include    <sundev/msio.h>
  983.   #include    <sun/fbio.h>
  984. + #endif
  985.   
  986.   /*
  987.    * SUN_WINDOWS is now defined (or not) by the Makefile
  988. ***************
  989. *** 49,55 ****
  990. --- 60,70 ----
  991.   #include    <sunwindow/win_struct.h>
  992.   #else 
  993.   /* already included by sunwindow/win_input.h */
  994. + #ifdef SVR4
  995. + #include    <sys/vuid_event.h>
  996. + #else
  997.   #include    <sundev/vuid_event.h>
  998. + #endif
  999.   #endif /* SUN_WINDOWS */
  1000.   
  1001.   #include    "X.h"
  1002. *** mit/server/ddx/sun/sunCG3C.c.orig    Fri May 31 20:06:24 1991
  1003. --- mit/server/ddx/sun/sunCG3C.c    Mon Jul 27 11:01:40 1992
  1004. ***************
  1005. *** 34,40 ****
  1006. --- 34,45 ----
  1007.   #include    "sun.h"
  1008.   
  1009.   #include    <sys/mman.h>
  1010. + #ifdef SVR4
  1011. + #include    <sys/memreg.h>
  1012. + #else
  1013.   #include    <pixrect/memreg.h>
  1014. + #include    <struct.h>
  1015. + #endif
  1016.   /*
  1017.   #include    <sundev/cg4reg.h>
  1018.   */
  1019. ***************
  1020. *** 41,47 ****
  1021.   #include    "colormap.h"
  1022.   #include    "colormapst.h"
  1023.   #include    "resource.h"
  1024. - #include    <struct.h>
  1025.   
  1026.   /*-
  1027.    * The cg3 frame buffer is divided into several pieces.
  1028. --- 46,51 ----
  1029. *** mit/server/ddx/sun/sunCG4C.c.orig    Fri May 31 20:06:22 1991
  1030. --- mit/server/ddx/sun/sunCG4C.c    Mon Jul 27 11:02:45 1992
  1031. ***************
  1032. *** 38,49 ****
  1033.   #include    "sun.h"
  1034.   
  1035.   #include    <sys/mman.h>
  1036.   #include    <pixrect/memreg.h>
  1037.   #include    <sundev/cg4reg.h>
  1038.   #include    "colormap.h"
  1039.   #include    "colormapst.h"
  1040.   #include    "resource.h"
  1041. - #include    <struct.h>
  1042.   
  1043.   /*-
  1044.    * The cg4 frame buffer is divided into several pieces.
  1045. --- 38,54 ----
  1046.   #include    "sun.h"
  1047.   
  1048.   #include    <sys/mman.h>
  1049. + #ifdef SVR4
  1050. + #include    <sys/memreg.h>
  1051. + #include    <sys/cg4reg.h>
  1052. + #else
  1053.   #include    <pixrect/memreg.h>
  1054.   #include    <sundev/cg4reg.h>
  1055. + #include    <struct.h>
  1056. + #endif
  1057.   #include    "colormap.h"
  1058.   #include    "colormapst.h"
  1059.   #include    "resource.h"
  1060.   
  1061.   /*-
  1062.    * The cg4 frame buffer is divided into several pieces.
  1063. *** mit/server/ddx/sun/sunKbd.c.orig    Mon Mar  2 13:08:08 1992
  1064. --- mit/server/ddx/sun/sunKbd.c    Mon Jul 27 10:52:59 1992
  1065. ***************
  1066. *** 56,61 ****
  1067. --- 56,65 ----
  1068.   #include <signal.h>
  1069.   #include <sys/ioctl.h>
  1070.   
  1071. + #ifdef SVR4
  1072. + #include <sys/filio.h>
  1073. + #endif
  1074.   typedef struct {
  1075.       int              trans;              /* Original translation form */
  1076.   } SunKbPrivRec, *SunKbPrivPtr;
  1077. *** mit/server/ddx/sun/sunBW2.c.orig    Fri May 31 20:06:18 1991
  1078. --- mit/server/ddx/sun/sunBW2.c    Mon Jul 27 10:49:28 1992
  1079. ***************
  1080. *** 57,63 ****
  1081. --- 57,67 ----
  1082.   #include    "resource.h"
  1083.   
  1084.   #include    <sys/mman.h>
  1085. + #ifdef SVR4
  1086. + #include    <sys/bw2reg.h>
  1087. + #else
  1088.   #include    <sundev/bw2reg.h>
  1089. + #endif
  1090.   
  1091.   extern caddr_t mmap();
  1092.   
  1093. *** mit/server/ddx/sun/constype.c.orig    Tue Sep 26 23:57:12 1989
  1094. --- mit/server/ddx/sun/constype.c    Mon Jul 27 10:47:59 1992
  1095. ***************
  1096. *** 38,44 ****
  1097. --- 38,50 ----
  1098.   style.
  1099.   */
  1100.   #include <stdio.h>
  1101. + #ifdef SVR4
  1102. + #include <string.h>
  1103. + #include <sys/machtypes.h>
  1104. + #include <fcntl.h>
  1105. + #else
  1106.   #include <strings.h>
  1107. + #endif
  1108.   
  1109.   main (argc, argv)
  1110.       int argc;
  1111. ***************
  1112. *** 60,66 ****
  1113. --- 66,76 ----
  1114.   }
  1115.   #include <sys/ioctl.h>
  1116.   #include <sys/file.h>
  1117. + #ifdef SVR4
  1118. + #include <sys/fbio.h>
  1119. + #else
  1120.   #include <sun/fbio.h>
  1121. + #endif
  1122.   
  1123.   /* decoding as of Release 3.4 : fbio.h 1.3 87/01/09 SMI */
  1124.       /* the convention for entries in this table is to translate the
  1125. *** mit/server/ddx/sun/sunCG2C.c.orig    Fri May 31 20:06:20 1991
  1126. --- mit/server/ddx/sun/sunCG2C.c    Mon Jul 27 10:58:55 1992
  1127. ***************
  1128. *** 38,46 ****
  1129. --- 38,51 ----
  1130.   #include    "sun.h"
  1131.   
  1132.   #include    <sys/mman.h>
  1133. + #ifdef SVR4
  1134. + #include    <sys/memreg.h>
  1135. + #include    <sys/cg2reg.h>
  1136. + #else
  1137.   #include    <struct.h>
  1138.   #include    <pixrect/memreg.h>
  1139.   #include    <pixrect/cg2reg.h>
  1140. + #endif
  1141.   #include    "colormap.h"
  1142.   #include    "colormapst.h"
  1143.   #include    "resource.h"
  1144. *** mit/server/ddx/sun/Imakefile.orig    Mon Jul 29 22:27:50 1991
  1145. --- mit/server/ddx/sun/Imakefile    Mon Jul 27 10:29:13 1992
  1146. ***************
  1147. *** 1,7 ****
  1148.   XCOMM $XConsortium: Imakefile,v 5.13 91/07/29 18:26:59 rws Exp $
  1149.   #include <Server.tmpl>
  1150.   
  1151. ! #ifdef SparcArchitecture
  1152.   #if HasMITGXSource
  1153.   GXSRC=sunGX.c
  1154.   #else
  1155. --- 1,7 ----
  1156.   XCOMM $XConsortium: Imakefile,v 5.13 91/07/29 18:26:59 rws Exp $
  1157.   #include <Server.tmpl>
  1158.   
  1159. ! #if defined(SparcArchitecture) && !defined(SystemV4)
  1160.   #if HasMITGXSource
  1161.   GXSRC=sunGX.c
  1162.   #else
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171. : This is a shell archive file. Remove everything above this line
  1172. : to unbundle. chmod +x "thisfile", then run it: e.g. % thisfile
  1173. : SHAR archive format.  Archive created Tue Jul 28 14:48:37 MET DST 1992
  1174. : file contains: 
  1175. :     mit/config/sun.cf
  1176. echo x - sun.cf
  1177. sed 's/^X//' > sun.cf <<'+END+OF+sun.cf'
  1178. XXCOMM platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  1179. X
  1180. X#define    SVR4
  1181. X
  1182. X#ifdef SVR4
  1183. X#define OSName            SunOS 5.0
  1184. X#define OSMajorVersion    5
  1185. X#define OSMinorVersion    0
  1186. X#define OSTeenyVersion    0
  1187. X#else
  1188. X#define OSName            SunOS 4.1.1
  1189. X#define OSMajorVersion    4
  1190. X#define OSMinorVersion    1
  1191. X#define OSTeenyVersion    1
  1192. X#endif
  1193. X
  1194. XXCOMM operating system:  OSName
  1195. X
  1196. X#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
  1197. X/* We do not guarantee this will work */
  1198. X#define BootstrapCFlags   -DNOSTDHDRS
  1199. X#define StandardDefines   -DNOSTDHDRS
  1200. X#endif
  1201. X
  1202. X/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
  1203. X#if OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))
  1204. X#define SunPost411FCSLd      YES
  1205. X#endif
  1206. X
  1207. X#if OSMajorVersion == 5
  1208. X/*
  1209. X** Solaris 2.0
  1210. X*/
  1211. X#define    SystemV4        YES
  1212. X#define    HasSockets        YES
  1213. X#define    SunPost411FCSLd        YES
  1214. X#define    CcCmd            cc        /* This had better been /opt/SUNWste/bin/cc */
  1215. X#define DefaultCCOptions    -Xc
  1216. X#define    CppCmd            /usr/ccs/lib/cpp
  1217. X#define    ArCmd            ar cq
  1218. X#define    DoRanlibCmd        0
  1219. X#define    BootstrapCFlags        -DSVR4 -Xc -Dsun -Dsparc -Dunix
  1220. X#define    StandardDefines        -DSVR4 -Xc -Dsun -Dsparc -Dunix
  1221. X#define    StandardCppDefines    -DSVR4 -Dsun -Dsparc -Dunix
  1222. X#define SharedLibraryLoadFlags    -G        /* Left out "-z text" -- don't know why */
  1223. X#define    InstKmemFlags        -g root -m 2755
  1224. X
  1225. X/*
  1226. X** If you have no Sun C compiler.
  1227. X*/
  1228. X#if    UseCygnusTools
  1229. X#ifdef    YaccCmd
  1230. X#undef    YaccCmd
  1231. X#endif
  1232. X#define    YaccCmd            byacc
  1233. X
  1234. X#ifdef    LexCmd
  1235. X#undef    LexCmd
  1236. X#endif
  1237. X#define    LexCmd            flex
  1238. X
  1239. X#ifdef    CcCmd
  1240. X#undef    CcCmd
  1241. X#endif
  1242. X#define    CcCmd            gcc
  1243. X#ifdef    DefaultCCOptions
  1244. X#undef    DefaultCCOptions
  1245. X#endif
  1246. X#define    DefaultCCOptions    -ansi -DSVR4
  1247. X#endif
  1248. X
  1249. X#define SetTtyGroup      NO
  1250. X#else
  1251. X/*
  1252. X** Stuff NOT for Solaris 2.0
  1253. X*/
  1254. X#define SetTtyGroup      YES
  1255. X#define InstKmemFlags      -g kmem -m 2755
  1256. X#endif
  1257. X
  1258. X#define HasSaberC      YES        /* for machines that have it */
  1259. X#define HasNdbm          YES
  1260. X#define HasShm          YES
  1261. X#define HasSecureRPC      YES
  1262. X#define HasPutenv      YES
  1263. X#define XsunServer      YES        /* has color and mono support */
  1264. X#define XsunMonoServer      YES        /* monochrome only */
  1265. X#define BuildPexExt      XsunServer
  1266. X
  1267. X#ifdef    InstallCmd
  1268. X#undef    InstallCmd
  1269. X#endif
  1270. X#define    InstallCmd    install
  1271. X
  1272. X#ifdef sparc
  1273. X#undef sparc
  1274. X#define SparcArchitecture
  1275. X#endif
  1276. X#ifdef sun386
  1277. X#undef sun386
  1278. X#define i386Architecture
  1279. X#endif
  1280. X
  1281. X#ifdef SVR4
  1282. X#include <sv4Lib.rules>
  1283. X#else
  1284. X#include <sunLib.rules>
  1285. X#endif
  1286. X
  1287. X#if HasGcc
  1288. X
  1289. X#define OptimizedCDebugFlags -O
  1290. X#if defined(HasGcc2) 
  1291. X#define OptimizedCDebugFlags -O2
  1292. X#else
  1293. X#define SharedLibraryCcCmd cc
  1294. X#define ExtraLoadFlags -B/usr/bin/
  1295. X#define AllocateLocalDefines /**/
  1296. X#endif
  1297. X
  1298. X.c.o:
  1299. X    $(CC) -c $(CFLAGS) $*.c
  1300. X
  1301. X#else
  1302. X
  1303. X#define AllocateLocalDefines -DINCLUDE_ALLOCA_H
  1304. X
  1305. X#ifndef SVR4
  1306. X#ifdef mc68000
  1307. X#define DefaultCCOptions -f68881 -pipe
  1308. X#else
  1309. X#define DefaultCCOptions
  1310. X#endif
  1311. X#endif
  1312. X
  1313. X#define PexCCOptions DefaultCCOptions
  1314. X
  1315. X#endif
  1316. X
  1317. X#define LibraryCCOptions /* don't want special floating point */
  1318. X
  1319. X#ifndef UseSunWindowsInServer
  1320. X#define UseSunWindowsInServer    NO    /* link in SunWindows support? */
  1321. X#endif
  1322. X
  1323. X#if UseSunWindowsInServer
  1324. X#define SunWindowsDefines -DSUN_WINDOWS
  1325. X#else
  1326. X#define SunWindowsDefines /* as nothing */
  1327. X#endif
  1328. X
  1329. X#define ServerOSDefines SunWindowsDefines AllocateLocalDefines
  1330. +END+OF+sun.cf
  1331. echo '-rw-r--r--  1 db           3234 Jul 27 15:59 sun.cf    (as sent)'
  1332. chmod u=rw,g=r,o=r sun.cf
  1333. ls -l sun.cf
  1334. exit 0
  1335.  
  1336. --
  1337.     Danny Backx
  1338.     System Engineer
  1339.  
  1340. E-Mail: db@sunbim.be    (or uunet!mcsun!ub4b!sunbim!db)
  1341.  
  1342. Telephone: +32(2)759.59.25    Fax : +32(2)759.47.95
  1343.  
  1344. Postal Mail :
  1345.     Danny Backx
  1346.     BIM
  1347.     Kwikstraat 4
  1348.     3078 Everberg
  1349.     Belgium
  1350.