home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume8 / next.patch / part01 next >
Encoding:
Internet Message Format  |  1990-07-08  |  12.0 KB

  1. Path: uunet!cs.utexas.edu!sun-barr!newstop!sun!uunet.UU.NET!ntvax!doug
  2. From: ntvax!doug@uunet.UU.NET
  3. Newsgroups: comp.sources.x
  4. Subject: v08i050: Patches for NeXT platform, Part01/01
  5. Message-ID: <138566@sun.Eng.Sun.COM>
  6. Date: 9 Jul 90 07:28:42 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 397
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: <ntvax!doug@uunet.UU.NET>
  12. Posting-number: Volume 8, Issue 50
  13. Archive-name: next.patch/part01
  14.  
  15. Several people have asked to get a copy of this set of patches.  I was able to
  16. build the entire Release 4 on my NeXT (EXCEPT for a server) after applying
  17. this patch and all 12 MIT patches to the distribution source tree.  I include
  18. the note that was with it when it was mailed to me by Andreas Stolcke.  It has
  19. some important caveats.  Not all of the binaries run under XNeXT R3.  I think
  20. the R4 window managers dont, for example.
  21.  
  22. One more important warning:  check the patchfile VERY CAREFULLY to make sure
  23. that the mailer did not add any line breaks--the patches will partially fail
  24. without giving a warning if there are, so count the lines in each section and
  25. match them with the line numbers listed in the patch, and compare to the
  26. original files, too.
  27.  
  28. Douglas Scott
  29.  
  30. ---------------------------cut here--------------------------------------------
  31. These are the patches the X11R4 distribution necessary to build a client-only
  32. version on the NeXT (Release 1.0).
  33.  
  34. I hope I have included everything needed, if not let me know!
  35.  
  36. Remember that the font utilities (showsnf, bdftosnf, mkfontdir) don't work.
  37. The same is true for other server-related stuff like the rgb database.
  38. You have to use the versions supplied with the XNeXT distribution, which is
  39. X11R3 based. You can compile R4 fonts on a Sun, however, and then copy them over
  40. to the NeXT font directories.
  41.  
  42. Apply the patches with 'patch -p0' to the top-level R4 directory.
  43.  
  44. Andreas Stolcke, 3/15/90
  45.  
  46.  
  47. *** /dev/null    Thu Mar 15 12:07:08 1990
  48. --- mit/config/NeXT.cf    Thu Feb 22 21:37:33 1990
  49. ***************
  50. *** 0 ****
  51. --- 1,49 ----
  52. + /*
  53. +  * SET VERSION NUMBERS BEFORE MAKING MAKEFILES
  54. +  *
  55. +  * If you change either of the following numbers, you will need to do a 
  56. +  * full build (make World) at the top of the sources....
  57. +  */
  58. + #define NeXTPlatform      YES        /* set to NO if not on a NeXT */
  59. + #define OSName            NeXT Release 1.0
  60. + #define OSMajorVersion    1
  61. + #define OSMinorVersion    0
  62. + #define HasSaberC      NO        /* for machines that have it */
  63. + #define HasNdbm          YES
  64. + #define BuildServer            NO
  65. + #define UseCCMakeDepend        YES    /* makedepend doesn't know #import */
  66. + #define    CppCmd /lib/cpp -traditional
  67. + #define HasGcc YES             /* VERY USEFUL for server on Sun3 */
  68. + /* #define BootstrapCFlags -traditional -Dconst= -Dvolatile= */
  69. + #ifdef UseInstalled        /* if outside the tree */
  70. + #define CcCmd cc -bsd -DNOSTDHDRS -finline-functions -fstrength-reduce -fpcc-struct-return -fwritable-strings -traditional -Dconst= -Dinline=
  71. + #else                /* server won't compile with -traditional */
  72. + #define CcCmd cc -bsd -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return 
  73. + #endif
  74. + #define SystemV           NO
  75. + #define HasPutenv NO
  76. + #define HasBsearch NO
  77. + #define HasVoidSignalReturn NO
  78. + /* you may find one or both of these options useful on your system */
  79. + /* #define DefaultCCOptions -f68881 -pipe */
  80. + #define LibraryCCOptions /* don't want special floating point */
  81. + #define LibraryDefines  /**/
  82. + /* see below for ServerDefines */
  83. + #define AllocateLocalDefines /**/
  84. + #define ExtensionDefines -DSHAPE -DMITSHM -DMULTIBUFFER -DMITMISC
  85. + #define ServerDefines -DXDMCP ExtensionDefines AllocateLocalDefines
  86. + #define SetTtyGroup YES
  87. + #define InstKmemFlags -m 2755 -g kmem
  88. *** mit/config/Imakefile.dist    Tue Dec 12 09:37:30 1989
  89. --- mit/config/Imakefile    Sat Feb 17 23:30:42 1990
  90. ***************
  91. *** 7,13 ****
  92.   
  93.   DEPLIBS = 
  94.   HEADERS = imakemdep.h 
  95. ! CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl site.def *.bac *.cf
  96.   DEFINES = $(SIGNAL_DEFINES)
  97.   
  98.   #undef ImakeDependency
  99. --- 7,14 ----
  100.   
  101.   DEPLIBS = 
  102.   HEADERS = imakemdep.h 
  103. ! CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl Library.tmpl *.bac \
  104. !       site.def MacroFile
  105.   DEFINES = $(SIGNAL_DEFINES)
  106.   
  107.   #undef ImakeDependency
  108. *** mit/config/Imake.rules.dist    Mon Dec 18 14:14:19 1989
  109. --- mit/config/Imake.rules    Sun Feb 18 14:46:12 1990
  110. ***************
  111. *** 427,433 ****
  112.   #ifndef InstallScript
  113.   #define    InstallScript(program,dest)                    @@\
  114.   install:: program.script                        @@\
  115. !     $(INSTALL) -c $(INSTPGMFLAGS) program.script dest/program
  116.   #endif /* InstallScript */
  117.   
  118.   
  119. --- 427,433 ----
  120.   #ifndef InstallScript
  121.   #define    InstallScript(program,dest)                    @@\
  122.   install:: program.script                        @@\
  123. !     $(INSTALL) -c $(INSTBINFLAGS) program.script dest/program
  124.   #endif /* InstallScript */
  125.   
  126.   
  127. ***************
  128. *** 1069,1075 ****
  129.   #ifndef MakeSubincludesForBuild
  130.   #define MakeSubincludesForBuild(step,dir,srclist)            @@\
  131.   step::  dir srclist                            @@\
  132. !     @-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \        @@\
  133.           set -x; cd dir; $(RM) $$list)                @@\
  134.       @for i in srclist; do \                        @@\
  135.           (set -x; cd dir; $(LN) ../$$i .); \            @@\
  136. --- 1069,1075 ----
  137.   #ifndef MakeSubincludesForBuild
  138.   #define MakeSubincludesForBuild(step,dir,srclist)            @@\
  139.   step::  dir srclist                            @@\
  140. !     @-(list=`echo srclist | sed -e 's?[^ ]*\/??g'`; \         @@\
  141.           set -x; cd dir; $(RM) $$list)                @@\
  142.       @for i in srclist; do \                        @@\
  143.           (set -x; cd dir; $(LN) ../$$i .); \            @@\
  144. ***************
  145. *** 1079,1085 ****
  146.                                       @@\
  147.   clean::                                    @@\
  148.       @-(if [ -d dir ]; then \                    @@\
  149. !         list=`echo srclist | sed -e 's/[^ ]*\///g'`; \        @@\
  150.           set -x; cd dir; $(RM) $$list; else exit 0; fi)
  151.   #endif
  152.   
  153. --- 1079,1085 ----
  154.                                       @@\
  155.   clean::                                    @@\
  156.       @-(if [ -d dir ]; then \                    @@\
  157. !         list=`echo srclist | sed -e 's?[^ ]*\/??g'`; \        @@\
  158.           set -x; cd dir; $(RM) $$list; else exit 0; fi)
  159.   #endif
  160.   
  161. *** mit/config/Imake.tmpl.dist    Mon Dec 18 14:01:44 1989
  162. --- mit/config/Imake.tmpl    Thu Feb 15 18:56:23 1990
  163. ***************
  164. *** 178,184 ****
  165.   #endif
  166.   #endif /* ibm */
  167.   
  168.   
  169.   #ifndef MacroIncludeFile
  170.   /**/# WARNING:  Imake.tmpl not configured; guessing at definitions!!!
  171. --- 178,189 ----
  172.   #endif
  173.   #endif /* ibm */
  174.   
  175. ! #ifdef NeXT
  176. ! #define MacroIncludeFile <NeXT.cf>
  177. ! #define MacroFile NeXT.cf
  178. ! #undef NeXT
  179. ! #define NeXTArchitecture
  180. ! #endif /* NeXT */
  181.   
  182.   #ifndef MacroIncludeFile
  183.   /**/# WARNING:  Imake.tmpl not configured; guessing at definitions!!!
  184. *** mit/config/Project.tmpl.dist    Mon Dec 18 13:46:46 1989
  185. --- mit/config/Project.tmpl    Tue Jan 30 16:21:39 1990
  186. ***************
  187. *** 384,390 ****
  188.                 RGB = rgb            /* assume BINDIR in path */
  189.               FONTC = bdftosnf        /* assume BINDIR in path */
  190.           MKFONTDIR = mkfontdir        /* assume BINDIR in path */
  191. !         MKDIRHIER = BourneShell $(BINDIR)/mkdirhier.sh
  192.   #else
  193.               IMAKE = $(IMAKESRC)/imake
  194.              DEPEND = DependCmd
  195. --- 384,390 ----
  196.                 RGB = rgb            /* assume BINDIR in path */
  197.               FONTC = bdftosnf        /* assume BINDIR in path */
  198.           MKFONTDIR = mkfontdir        /* assume BINDIR in path */
  199. !         MKDIRHIER = BourneShell $(BINDIR)/mkdirhier
  200.   #else
  201.               IMAKE = $(IMAKESRC)/imake
  202.              DEPEND = DependCmd
  203. ***************
  204. *** 511,517 ****
  205.   #if HasSunOSSharedLibraries
  206.             DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  207.   #else
  208. !           DEPLIBS = $(LOCAL_LIBRARIES)
  209.   #endif
  210.            DEPLIBS1 = $(DEPLIBS)
  211.            DEPLIBS2 = $(DEPLIBS)
  212. --- 511,518 ----
  213.   #if HasSunOSSharedLibraries
  214.             DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  215.   #else
  216. ! /*     DEPLIBS = $(LOCAL_LIBRARIES) */
  217. !           DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  218.   #endif
  219.            DEPLIBS1 = $(DEPLIBS)
  220.            DEPLIBS2 = $(DEPLIBS)
  221. *** mit/config/imakemdep.h.dist    Mon Dec 18 13:56:39 1989
  222. --- mit/config/imakemdep.h    Thu Feb 15 20:59:39 1990
  223. ***************
  224. *** 126,131 ****
  225. --- 126,135 ----
  226.   #ifdef ibm
  227.       "-Dibm",    /* IBM PS/2 and RT under both AOS and AIX */
  228.   #endif
  229. + #ifdef NeXT
  230. +     "-DNeXT",
  231. +     "-traditional",
  232. + #endif
  233.   };
  234.   #else /* else MAKEDEPEND */
  235.   /*
  236. ***************
  237. *** 194,199 ****
  238. --- 198,212 ----
  239.   #endif
  240.   #ifdef CMU
  241.       {"CMU", "1"},
  242. + #endif
  243. + #ifdef NeXT
  244. + /*    {"NeXT", "1"}, */
  245. + # ifdef __MACH__
  246. +     {"__MACH__", "1"},
  247. + # endif
  248. + # ifdef __STRICT_BSD__
  249. +     {"__STRICT_BSD__", "1"},
  250. + # endif
  251.   #endif
  252.       /* add any additional symbols before this line */
  253.       {NULL, NULL}
  254. *** mit/util/scripts/Imakefile.dist    Fri Oct 20 05:30:13 1989
  255. --- mit/util/scripts/Imakefile    Wed Feb 21 22:56:44 1990
  256. ***************
  257. *** 3,17 ****
  258.   all:: $(PROGRAMS)
  259.   
  260.   CppScriptTarget(xmkmf, xmkmf.cpp, -DCONFIGDIRSPEC=-I$(CONFIGDIR), $(ICONFIGFILES))
  261.   CppScriptTarget(makedepend, mdepend.cpp, -DPREPROC='"'"$(PREPROCESSCMD)"'"', $(ICONFIGFILES))
  262.   CppScriptTarget(x11mf, x11mf.cpp, /**/, /**/)
  263.   CppScriptTarget(mergelib, mergelib.cpp, "-DARCMD=$(AR)" "-DRANLIB=$(RANLIB)", $(ICONFIGFILES))
  264.   CppScriptTarget(mkdirhier, mkdirh.cpp, /**/, /**/)
  265.   
  266. ! InstallProgram(xmkmf,$(BINDIR))
  267. ! InstallProgram(mkdirhier,$(BINDIR))
  268.   #if UseCCMakeDepend
  269. ! InstallProgram(makedepend,$(BINDIR))
  270.   #endif
  271.   
  272.   clean::
  273. --- 3,21 ----
  274.   all:: $(PROGRAMS)
  275.   
  276.   CppScriptTarget(xmkmf, xmkmf.cpp, -DCONFIGDIRSPEC=-I$(CONFIGDIR), $(ICONFIGFILES))
  277. + #if HasGcc
  278. + CppScriptTarget(makedepend, mdepend.cpp, -DHasGcc -DPREPROC='"'"$(PREPROCESSCMD)"'"', $(ICONFIGFILES))
  279. + #else
  280.   CppScriptTarget(makedepend, mdepend.cpp, -DPREPROC='"'"$(PREPROCESSCMD)"'"', $(ICONFIGFILES))
  281. + #endif
  282.   CppScriptTarget(x11mf, x11mf.cpp, /**/, /**/)
  283.   CppScriptTarget(mergelib, mergelib.cpp, "-DARCMD=$(AR)" "-DRANLIB=$(RANLIB)", $(ICONFIGFILES))
  284.   CppScriptTarget(mkdirhier, mkdirh.cpp, /**/, /**/)
  285.   
  286. ! InstallMultipleFlags(xmkmf,$(BINDIR),InstBinFlags)
  287. ! InstallMultipleFlags(mkdirhier,$(BINDIR),InstBinFlags)
  288.   #if UseCCMakeDepend
  289. ! InstallMultipleFlags(makedepend,$(BINDIR),InstBinFlags)
  290.   #endif
  291.   
  292.   clean::
  293. *** mit/util/scripts/mdepend.cpp.dist    Thu Jan 19 14:20:14 1989
  294. --- mit/util/scripts/mdepend.cpp    Wed Feb 21 22:57:15 1990
  295. ***************
  296. *** 121,127 ****
  297. --- 121,131 ----
  298.   done
  299.   echo ' $*' >> $ARGS
  300.   
  301. + #ifdef HasGcc
  302. + echo "exec $CC -M `cat $ARGS`" > $CPPCMD
  303. + #else
  304.   echo "exec $CC `cat $ARGS`" > $CPPCMD
  305. + #endif
  306.   chmod +x $CPPCMD
  307.   rm $ARGS
  308.   
  309. ***************
  310. *** 148,153 ****
  311. --- 152,160 ----
  312.   fi
  313.   
  314.   echo '' > $DEPENDLINES
  315. + #ifdef HasGcc
  316. + $CPPCMD $files >> $DEPENDLINES
  317. + #else
  318.   for i in $files
  319.   do
  320.       $CPPCMD $i \
  321. ***************
  322. *** 187,192 ****
  323. --- 194,200 ----
  324.           print rec
  325.           }' \
  326.     | egrep -v '^[^:]*:[     ]*$' >> $DEPENDLINES
  327. + #endif
  328.   
  329.   trap "" 1 2 13 15    # Now we are committed
  330.   case "$makefile" in
  331. *** mit/clients/xload/get_load.c.dist    Thu Dec 14 06:46:20 1989
  332. --- mit/clients/xload/get_load.c    Fri Feb 16 11:54:03 1990
  333. ***************
  334. *** 69,74 ****
  335. --- 69,78 ----
  336.   #    endif /* i386 */
  337.   #endif
  338.   
  339. + #ifdef NeXT
  340. + #include <sys/param.h>
  341. + #endif
  342.   #ifdef mips
  343.   #include <sys/fixpoint.h>
  344.   #endif
  345. ***************
  346. *** 295,305 ****
  347. --- 299,317 ----
  348.   static struct nlist nl[2];
  349.   static struct lavnum vec[3];
  350.   #else /* not macII */
  351. + #ifdef NeXT
  352.   static struct nlist namelist[] = {        /* namelist for vmunix grubbing */
  353.   #define LOADAV 0
  354. +     {{KERNEL_LOAD_VARIABLE}},
  355. +     {{0}}
  356. + };
  357. + #else
  358. + static struct nlist namelist[] = {        /* namelist for vmunix grubbing */
  359. + #define LOADAV 0
  360.       {KERNEL_LOAD_VARIABLE},
  361.       {0}
  362.   };
  363. + #endif /* NeXT */
  364.   #endif /* macII */
  365.   
  366.   
  367. ***************
  368. *** 371,377 ****
  369.   
  370.       (void) lseek(kmem, loadavg_seek, 0);
  371.   #endif /* macII */
  372. ! #if defined(sun) || defined (UTEK) || defined(sequent) || defined(alliant)
  373.       {
  374.           long temp;
  375.           (void) read(kmem, (char *)&temp, sizeof(long));
  376. --- 383,389 ----
  377.   
  378.       (void) lseek(kmem, loadavg_seek, 0);
  379.   #endif /* macII */
  380. ! #if defined(sun) || defined (UTEK) || defined(sequent) || defined(alliant) || defined(NeXT)
  381.       {
  382.           long temp;
  383.           (void) read(kmem, (char *)&temp, sizeof(long));
  384. -- 
  385. ___________________________________________________________________________
  386. Douglas Scott
  387. doug@dept.csci.unt.edu
  388.  
  389. dan
  390. ----------------------------------------------------
  391. O'Reilly && Associates   argv@sun.com / argv@ora.com
  392. Opinions expressed reflect those of the author only.
  393.