v08i050: Patches for NeXT platform, Part01/01
ntvax!doug at uunet.UU.NET
ntvax!doug at uunet.UU.NET
Mon Jul 9 17:28:42 AEST 1990
Submitted-by: <ntvax!doug at uunet.UU.NET>
Posting-number: Volume 8, Issue 50
Archive-name: next.patch/part01
Several people have asked to get a copy of this set of patches. I was able to
build the entire Release 4 on my NeXT (EXCEPT for a server) after applying
this patch and all 12 MIT patches to the distribution source tree. I include
the note that was with it when it was mailed to me by Andreas Stolcke. It has
some important caveats. Not all of the binaries run under XNeXT R3. I think
the R4 window managers dont, for example.
One more important warning: check the patchfile VERY CAREFULLY to make sure
that the mailer did not add any line breaks--the patches will partially fail
without giving a warning if there are, so count the lines in each section and
match them with the line numbers listed in the patch, and compare to the
original files, too.
Douglas Scott
---------------------------cut here--------------------------------------------
These are the patches the X11R4 distribution necessary to build a client-only
version on the NeXT (Release 1.0).
I hope I have included everything needed, if not let me know!
Remember that the font utilities (showsnf, bdftosnf, mkfontdir) don't work.
The same is true for other server-related stuff like the rgb database.
You have to use the versions supplied with the XNeXT distribution, which is
X11R3 based. You can compile R4 fonts on a Sun, however, and then copy them over
to the NeXT font directories.
Apply the patches with 'patch -p0' to the top-level R4 directory.
Andreas Stolcke, 3/15/90
*** /dev/null Thu Mar 15 12:07:08 1990
--- mit/config/NeXT.cf Thu Feb 22 21:37:33 1990
***************
*** 0 ****
--- 1,49 ----
+ /*
+ * SET VERSION NUMBERS BEFORE MAKING MAKEFILES
+ *
+ * If you change either of the following numbers, you will need to do a
+ * full build (make World) at the top of the sources....
+ */
+ #define NeXTPlatform YES /* set to NO if not on a NeXT */
+ #define OSName NeXT Release 1.0
+ #define OSMajorVersion 1
+ #define OSMinorVersion 0
+ #define HasSaberC NO /* for machines that have it */
+ #define HasNdbm YES
+ #define BuildServer NO
+
+ #define UseCCMakeDepend YES /* makedepend doesn't know #import */
+
+ #define CppCmd /lib/cpp -traditional
+
+ #define HasGcc YES /* VERY USEFUL for server on Sun3 */
+
+ /* #define BootstrapCFlags -traditional -Dconst= -Dvolatile= */
+
+ #ifdef UseInstalled /* if outside the tree */
+ #define CcCmd cc -bsd -DNOSTDHDRS -finline-functions -fstrength-reduce -fpcc-struct-return -fwritable-strings -traditional -Dconst= -Dinline=
+ #else /* server won't compile with -traditional */
+ #define CcCmd cc -bsd -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return
+ #endif
+ #define SystemV NO
+ #define HasPutenv NO
+ #define HasBsearch NO
+
+ #define HasVoidSignalReturn NO
+
+ /* you may find one or both of these options useful on your system */
+ /* #define DefaultCCOptions -f68881 -pipe */
+
+ #define LibraryCCOptions /* don't want special floating point */
+ #define LibraryDefines /**/
+ /* see below for ServerDefines */
+
+ #define AllocateLocalDefines /**/
+
+ #define ExtensionDefines -DSHAPE -DMITSHM -DMULTIBUFFER -DMITMISC
+
+ #define ServerDefines -DXDMCP ExtensionDefines AllocateLocalDefines
+
+ #define SetTtyGroup YES
+
+ #define InstKmemFlags -m 2755 -g kmem
*** mit/config/Imakefile.dist Tue Dec 12 09:37:30 1989
--- mit/config/Imakefile Sat Feb 17 23:30:42 1990
***************
*** 7,13 ****
DEPLIBS =
HEADERS = imakemdep.h
! CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl site.def *.bac *.cf
DEFINES = $(SIGNAL_DEFINES)
#undef ImakeDependency
--- 7,14 ----
DEPLIBS =
HEADERS = imakemdep.h
! CFFILES = $(HEADERS) Imake.rules Imake.tmpl Project.tmpl Library.tmpl *.bac \
! site.def MacroFile
DEFINES = $(SIGNAL_DEFINES)
#undef ImakeDependency
*** mit/config/Imake.rules.dist Mon Dec 18 14:14:19 1989
--- mit/config/Imake.rules Sun Feb 18 14:46:12 1990
***************
*** 427,433 ****
#ifndef InstallScript
#define InstallScript(program,dest) @@\
install:: program.script @@\
! $(INSTALL) -c $(INSTPGMFLAGS) program.script dest/program
#endif /* InstallScript */
--- 427,433 ----
#ifndef InstallScript
#define InstallScript(program,dest) @@\
install:: program.script @@\
! $(INSTALL) -c $(INSTBINFLAGS) program.script dest/program
#endif /* InstallScript */
***************
*** 1069,1075 ****
#ifndef MakeSubincludesForBuild
#define MakeSubincludesForBuild(step,dir,srclist) @@\
step:: dir srclist @@\
! @-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\
set -x; cd dir; $(RM) $$list) @@\
@for i in srclist; do \ @@\
(set -x; cd dir; $(LN) ../$$i .); \ @@\
--- 1069,1075 ----
#ifndef MakeSubincludesForBuild
#define MakeSubincludesForBuild(step,dir,srclist) @@\
step:: dir srclist @@\
! @-(list=`echo srclist | sed -e 's?[^ ]*\/??g'`; \ @@\
set -x; cd dir; $(RM) $$list) @@\
@for i in srclist; do \ @@\
(set -x; cd dir; $(LN) ../$$i .); \ @@\
***************
*** 1079,1085 ****
@@\
clean:: @@\
@-(if [ -d dir ]; then \ @@\
! list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\
set -x; cd dir; $(RM) $$list; else exit 0; fi)
#endif
--- 1079,1085 ----
@@\
clean:: @@\
@-(if [ -d dir ]; then \ @@\
! list=`echo srclist | sed -e 's?[^ ]*\/??g'`; \ @@\
set -x; cd dir; $(RM) $$list; else exit 0; fi)
#endif
*** mit/config/Imake.tmpl.dist Mon Dec 18 14:01:44 1989
--- mit/config/Imake.tmpl Thu Feb 15 18:56:23 1990
***************
*** 178,184 ****
#endif
#endif /* ibm */
!
#ifndef MacroIncludeFile
/**/# WARNING: Imake.tmpl not configured; guessing at definitions!!!
--- 178,189 ----
#endif
#endif /* ibm */
! #ifdef NeXT
! #define MacroIncludeFile <NeXT.cf>
! #define MacroFile NeXT.cf
! #undef NeXT
! #define NeXTArchitecture
! #endif /* NeXT */
#ifndef MacroIncludeFile
/**/# WARNING: Imake.tmpl not configured; guessing at definitions!!!
*** mit/config/Project.tmpl.dist Mon Dec 18 13:46:46 1989
--- mit/config/Project.tmpl Tue Jan 30 16:21:39 1990
***************
*** 384,390 ****
RGB = rgb /* assume BINDIR in path */
FONTC = bdftosnf /* assume BINDIR in path */
MKFONTDIR = mkfontdir /* assume BINDIR in path */
! MKDIRHIER = BourneShell $(BINDIR)/mkdirhier.sh
#else
IMAKE = $(IMAKESRC)/imake
DEPEND = DependCmd
--- 384,390 ----
RGB = rgb /* assume BINDIR in path */
FONTC = bdftosnf /* assume BINDIR in path */
MKFONTDIR = mkfontdir /* assume BINDIR in path */
! MKDIRHIER = BourneShell $(BINDIR)/mkdirhier
#else
IMAKE = $(IMAKESRC)/imake
DEPEND = DependCmd
***************
*** 511,517 ****
#if HasSunOSSharedLibraries
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
#else
! DEPLIBS = $(LOCAL_LIBRARIES)
#endif
DEPLIBS1 = $(DEPLIBS)
DEPLIBS2 = $(DEPLIBS)
--- 511,518 ----
#if HasSunOSSharedLibraries
DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
#else
! /* DEPLIBS = $(LOCAL_LIBRARIES) */
! DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
#endif
DEPLIBS1 = $(DEPLIBS)
DEPLIBS2 = $(DEPLIBS)
*** mit/config/imakemdep.h.dist Mon Dec 18 13:56:39 1989
--- mit/config/imakemdep.h Thu Feb 15 20:59:39 1990
***************
*** 126,131 ****
--- 126,135 ----
#ifdef ibm
"-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
#endif
+ #ifdef NeXT
+ "-DNeXT",
+ "-traditional",
+ #endif
};
#else /* else MAKEDEPEND */
/*
***************
*** 194,199 ****
--- 198,212 ----
#endif
#ifdef CMU
{"CMU", "1"},
+ #endif
+ #ifdef NeXT
+ /* {"NeXT", "1"}, */
+ # ifdef __MACH__
+ {"__MACH__", "1"},
+ # endif
+ # ifdef __STRICT_BSD__
+ {"__STRICT_BSD__", "1"},
+ # endif
#endif
/* add any additional symbols before this line */
{NULL, NULL}
*** mit/util/scripts/Imakefile.dist Fri Oct 20 05:30:13 1989
--- mit/util/scripts/Imakefile Wed Feb 21 22:56:44 1990
***************
*** 3,17 ****
all:: $(PROGRAMS)
CppScriptTarget(xmkmf, xmkmf.cpp, -DCONFIGDIRSPEC=-I$(CONFIGDIR), $(ICONFIGFILES))
CppScriptTarget(makedepend, mdepend.cpp, -DPREPROC='"'"$(PREPROCESSCMD)"'"', $(ICONFIGFILES))
CppScriptTarget(x11mf, x11mf.cpp, /**/, /**/)
CppScriptTarget(mergelib, mergelib.cpp, "-DARCMD=$(AR)" "-DRANLIB=$(RANLIB)", $(ICONFIGFILES))
CppScriptTarget(mkdirhier, mkdirh.cpp, /**/, /**/)
! InstallProgram(xmkmf,$(BINDIR))
! InstallProgram(mkdirhier,$(BINDIR))
#if UseCCMakeDepend
! InstallProgram(makedepend,$(BINDIR))
#endif
clean::
--- 3,21 ----
all:: $(PROGRAMS)
CppScriptTarget(xmkmf, xmkmf.cpp, -DCONFIGDIRSPEC=-I$(CONFIGDIR), $(ICONFIGFILES))
+ #if HasGcc
+ CppScriptTarget(makedepend, mdepend.cpp, -DHasGcc -DPREPROC='"'"$(PREPROCESSCMD)"'"', $(ICONFIGFILES))
+ #else
CppScriptTarget(makedepend, mdepend.cpp, -DPREPROC='"'"$(PREPROCESSCMD)"'"', $(ICONFIGFILES))
+ #endif
CppScriptTarget(x11mf, x11mf.cpp, /**/, /**/)
CppScriptTarget(mergelib, mergelib.cpp, "-DARCMD=$(AR)" "-DRANLIB=$(RANLIB)", $(ICONFIGFILES))
CppScriptTarget(mkdirhier, mkdirh.cpp, /**/, /**/)
! InstallMultipleFlags(xmkmf,$(BINDIR),InstBinFlags)
! InstallMultipleFlags(mkdirhier,$(BINDIR),InstBinFlags)
#if UseCCMakeDepend
! InstallMultipleFlags(makedepend,$(BINDIR),InstBinFlags)
#endif
clean::
*** mit/util/scripts/mdepend.cpp.dist Thu Jan 19 14:20:14 1989
--- mit/util/scripts/mdepend.cpp Wed Feb 21 22:57:15 1990
***************
*** 121,127 ****
--- 121,131 ----
done
echo ' $*' >> $ARGS
+ #ifdef HasGcc
+ echo "exec $CC -M `cat $ARGS`" > $CPPCMD
+ #else
echo "exec $CC `cat $ARGS`" > $CPPCMD
+ #endif
chmod +x $CPPCMD
rm $ARGS
***************
*** 148,153 ****
--- 152,160 ----
fi
echo '' > $DEPENDLINES
+ #ifdef HasGcc
+ $CPPCMD $files >> $DEPENDLINES
+ #else
for i in $files
do
$CPPCMD $i \
***************
*** 187,192 ****
--- 194,200 ----
print rec
}' \
| egrep -v '^[^:]*:[ ]*$' >> $DEPENDLINES
+ #endif
trap "" 1 2 13 15 # Now we are committed
case "$makefile" in
*** mit/clients/xload/get_load.c.dist Thu Dec 14 06:46:20 1989
--- mit/clients/xload/get_load.c Fri Feb 16 11:54:03 1990
***************
*** 69,74 ****
--- 69,78 ----
# endif /* i386 */
#endif
+ #ifdef NeXT
+ #include <sys/param.h>
+ #endif
+
#ifdef mips
#include <sys/fixpoint.h>
#endif
***************
*** 295,305 ****
--- 299,317 ----
static struct nlist nl[2];
static struct lavnum vec[3];
#else /* not macII */
+ #ifdef NeXT
static struct nlist namelist[] = { /* namelist for vmunix grubbing */
#define LOADAV 0
+ {{KERNEL_LOAD_VARIABLE}},
+ {{0}}
+ };
+ #else
+ static struct nlist namelist[] = { /* namelist for vmunix grubbing */
+ #define LOADAV 0
{KERNEL_LOAD_VARIABLE},
{0}
};
+ #endif /* NeXT */
#endif /* macII */
***************
*** 371,377 ****
(void) lseek(kmem, loadavg_seek, 0);
#endif /* macII */
! #if defined(sun) || defined (UTEK) || defined(sequent) || defined(alliant)
{
long temp;
(void) read(kmem, (char *)&temp, sizeof(long));
--- 383,389 ----
(void) lseek(kmem, loadavg_seek, 0);
#endif /* macII */
! #if defined(sun) || defined (UTEK) || defined(sequent) || defined(alliant) || defined(NeXT)
{
long temp;
(void) read(kmem, (char *)&temp, sizeof(long));
--
___________________________________________________________________________
Douglas Scott
doug at dept.csci.unt.edu
dan
----------------------------------------------------
O'Reilly && Associates argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.
More information about the Comp.sources.x
mailing list