Subject: X11R5 for NetBSD/sparc
To: None <port-sparc@sun-lamp.cs.berkeley.edu>
From: A.M. Raportirenko <ram@sunct1.jinr.dubna.su>
List: port-sparc
Date: 05/31/1994 11:47:24
Hi!,

xdm also works well for me. I only insert path '/usr/sbin' for chown into 
files /usr/X11R5/lib/X11/xdm/GiveConsole and TakeConsole.

Also I made
`console "/usr/libexec/getty Pc" sun     off secure'
in the file /etc/ttys.

I never use PEX, so not compiled it.

To install X11R5 on NetBSD/sparc on IPX I made:

0. rebuild kernel TDR2 with cgsix option.
1. build GNU make-3.70
2. insert patch levels 1 - 26 into the X11R5.
3. install sunkbd.930314.tar.gz

After this I unlink /usr/include/sparc from /usr/include/machine, and 
tar into it all *.h files from kernel's sparc subdirectory.

4. Apply patches from file INC.diff
5. Apply patches from file MIT.diff

6. type `make world', `make install', `make install.man'.
7. Sorry, but you must cp file ../mit/rgb/rgb.db into the /usr/X11R5/lib/X11
   by hand. 
8. made changes for xdm, I mentioned above.

----------------------------- INC.diff ----------------------------------------
diff -rc2 ./sparc/dev/kbio.h /usr/include/sparc/dev/kbio.h
*** ./sparc/dev/kbio.h	Sun Feb 27 14:03:46 1994
--- /usr/include/sparc/dev/kbio.h	Thu Mar 24 12:24:44 1994
***************
*** 86,88 ****
  #define KIOCLAYOUT	_IOR('k', 20, int)	/* get keyboard layout */
  
! #define	TR_UNTRANS_EVENT	3
--- 86,108 ----
  #define KIOCLAYOUT	_IOR('k', 20, int)	/* get keyboard layout */
  
! /*
!  * These are how you can have your input translated.
!  * TR_EVENT means that each keystroke is sent as a firm event.
!  * TR_UNTRANS_EVENT also sends a firm event for each up / down transition,
!  * but the value is untranslated: the event id is the key station; the
!  * value indicates whether the transition was up or down; the value of the
!  * shift-mask is undefined.
!  */
! #define	TR_NONE		  0
! #define	TR_ASCII	  1
! #define	TR_EVENT	  2
! #define	TR_UNTRANS_EVENT  3
! 
! /*
!  * Type 4 keyboard LED masks (used to set LED's)
!  */
! #define	LED_NUM_LOCK	0x1
! #define	LED_COMPOSE	0x2
! #define	LED_SCROLL_LOCK	0x4
! #define	LED_CAPS_LOCK	0x8
! 
diff -rc2 ./sparc/dev/vuid_event.h /usr/include/sparc/dev/vuid_event.h
*** ./sparc/dev/vuid_event.h	Fri Dec 17 09:55:06 1993
--- /usr/include/sparc/dev/vuid_event.h	Thu Mar 24 13:09:22 1994
***************
*** 67,70 ****
--- 67,72 ----
  #define	LOC_X_DELTA	0x7f80	/* mouse delta-X */
  #define	LOC_Y_DELTA	0x7f81	/* mouse delta-Y */
+ #define	LOC_X_ABSOLUTE	0x7f82	/* mouse absolute-X */
+ #define	LOC_Y_ABSOLUTE	0x7f83	/* mouse absolute-X */
  
  /*
diff -rc2 ./sparc/sbus/bwtworeg.h /usr/include/sparc/sbus/bwtworeg.h
*** ./sparc/sbus/bwtworeg.h	Fri Dec 17 09:55:57 1993
--- /usr/include/sparc/sbus/bwtworeg.h	Thu Mar 24 13:29:30 1994
***************
*** 82,83 ****
--- 82,90 ----
  	char	ba_ram[4096];		/* actually larger */
  };
+ 
+ /*
+  * Monochrome memory frame buffer hardware definitions
+  */
+ 
+ #define	BW2_FBSIZE		(128*1024)	/* size of frame buffer */
+ #define	BW2_FBSIZE_HIRES	(256*1024)	/* hi-res frame buffer size */
----------------------------- MIT.diff ----------------------------------------
diff -rc2 MIT/clients/twm/lex.l net/clients/twm/lex.l
*** MIT/clients/twm/lex.l	Fri Dec 15 22:02:02 1989
--- net/clients/twm/lex.l	Mon Mar 21 20:45:33 1994
***************
*** 89,92 ****
--- 89,93 ----
  %%
  yywrap() { return(1);}
+ int yylineno;
  
  #undef unput
diff -rc2 MIT/clients/xdm/Imakefile net/clients/xdm/Imakefile
*** MIT/clients/xdm/Imakefile	Tue Mar 15 17:51:23 1994
--- net/clients/xdm/Imakefile	Wed Mar 23 20:23:55 1994
***************
*** 9,12 ****
--- 9,13 ----
  XDMAUTHOBJS = xdmauth.o
  XDMAUTHSRCS = xdmauth.c
+ RPCLIB = -lcrypt
  #endif
  
diff -rc2 MIT/clients/xdm/dm.h net/clients/xdm/dm.h
*** MIT/clients/xdm/dm.h	Tue Mar 15 17:47:31 1994
--- net/clients/xdm/dm.h	Tue Mar 22 11:29:27 1994
***************
*** 57,63 ****
  #ifndef NGROUPS_MAX
  # include	<sys/param.h>
- #ifdef NGROUPS
- #define NGROUPS_MAX NGROUPS
- #endif
  #endif
  
--- 57,60 ----
***************
*** 326,332 ****
  #define Jmp_buf		jmp_buf
  #else
! #define Setjmp(e)   sigsetjmp(e,1)
! #define Longjmp(e,v)	siglongjmp(e,v)
! #define Jmp_buf		sigjmp_buf
  #endif
  
--- 323,332 ----
  #define Jmp_buf		jmp_buf
  #else
! #define Setjmp(e)	setjmp(e)
! #define Longjmp(e,v)	longjmp(e,v)
! #define Jmp_buf		jmp_buf
! /* ---	#define Setjmp(e)   sigsetjmp(e,1)
! 	#define Longjmp(e,v)	siglongjmp(e,v)
! 	#define Jmp_buf		sigjmp_buf --- */
  #endif
  
diff -rc2 MIT/clients/xdm/xdmshell.c net/clients/xdm/xdmshell.c
*** MIT/clients/xdm/xdmshell.c	Fri Jul 19 01:56:13 1991
--- net/clients/xdm/xdmshell.c	Tue Mar 22 20:43:17 1994
***************
*** 37,41 ****
  extern int errno;
  extern int sys_nerr;
- extern char *sys_errlist[];
  
  #ifdef macII
--- 37,40 ----
diff -rc2 MIT/clients/xterm/screen.c net/clients/xterm/screen.c
*** MIT/clients/xterm/screen.c	Thu Aug 22 23:30:38 1991
--- net/clients/xterm/screen.c	Tue Mar 22 11:41:48 1994
***************
*** 46,50 ****
  #endif
  
! extern Char *calloc(), *malloc(), *realloc();
  extern void free();
  
--- 46,50 ----
  #endif
  
! extern void *calloc(), *malloc(), *realloc();
  extern void free();
  
diff -rc2 MIT/config/Imake.tmpl net/config/Imake.tmpl
*** MIT/config/Imake.tmpl	Tue Mar 15 17:47:24 1994
--- net/config/Imake.tmpl	Mon Mar 21 20:45:35 1994
***************
*** 64,68 ****
  #endif
  
! #ifdef sun
  #define MacroIncludeFile <sun.cf>
  #define MacroFile sun.cf
--- 64,68 ----
  #endif
  
! #if defined(sun) || defined(sparc)
  #define MacroIncludeFile <sun.cf>
  #define MacroFile sun.cf
diff -rc2 MIT/config/imake.c net/config/imake.c
*** MIT/config/imake.c	Fri Jul 26 00:51:12 1991
--- net/config/imake.c	Mon Mar 21 20:45:36 1994
***************
*** 185,194 ****
  #ifndef DEFAULT_CPP
  #ifdef USE_CC_E
! #define DEFAULT_CPP "/bin/cc"
  #else
  #ifdef CPP_PROGRAM
  #define DEFAULT_CPP CPP_PROGRAM
  #else
! #define DEFAULT_CPP "/lib/cpp"
  #endif
  #endif
--- 185,194 ----
  #ifndef DEFAULT_CPP
  #ifdef USE_CC_E
! #define DEFAULT_CPP "/usr/bin/cc"
  #else
  #ifdef CPP_PROGRAM
  #define DEFAULT_CPP CPP_PROGRAM
  #else
! #define DEFAULT_CPP "/usr/bin/cpp"
  #endif
  #endif
diff -rc2 MIT/config/imakemdep.h net/config/imakemdep.h
*** MIT/config/imakemdep.h	Sun Aug 25 22:39:59 1991
--- net/config/imakemdep.h	Mon Mar 21 20:45:37 1994
***************
*** 111,115 ****
   *     your Makefiles have no tabs in them and lots of @@ strings.
   */
! #if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx)
  #define FIXUP_CPP_WHITESPACE
  #endif
--- 111,115 ----
   *     your Makefiles have no tabs in them and lots of @@ strings.
   */
! #if defined(sun) || defined(sparc) || defined(SYSV) || defined(SVR4) || defined(hcx)
  #define FIXUP_CPP_WHITESPACE
  #endif
***************
*** 128,131 ****
--- 128,134 ----
  #endif
  
+ #if defined(sun) || defined(sparc) 
+ #define DEFAULT_CPP "/usr/bin/cpp"
+ #endif
  /*
   * Step 5:  cpp_argv
***************
*** 267,271 ****
  	{"aix", "1"},
  #endif
! #ifdef sun
  	{"sun", "1"},
  #endif
--- 270,274 ----
  	{"aix", "1"},
  #endif
! #if defined(sun) || defined(sparc) 
  	{"sun", "1"},
  #endif
diff -rc2 MIT/config/site.def net/config/site.def
*** MIT/config/site.def	Thu Aug  1 10:29:28 1991
--- net/config/site.def	Mon Mar 21 21:50:43 1994
***************
*** 32,41 ****
  #ifdef AfterVendorCF
  
- /*
  #ifdef ProjectRoot
  #undef ProjectRoot
  #endif
  #define ProjectRoot /usr/X11R5
! */
  
  #endif /* AfterVendorCF */
--- 32,49 ----
  #ifdef AfterVendorCF
  
  #ifdef ProjectRoot
  #undef ProjectRoot
  #endif
  #define ProjectRoot /usr/X11R5
! 
! #define InstallXinitConfig	YES	/* install sample xinit config */
! #define InstallXdmConfig	YES	/* install sample xdm config */
! #define InstallFSConfig		YES	/* install sample fs config */
! 
! #define BuildPex		NO
! 
! #define	StandardDefines	-DX_WCHAR -DX_LOCALE -DX_NOT_POSIX -Dsun
! 
! #define ExtensionOSDefines -DXTEST
  
  #endif /* AfterVendorCF */
diff -rc2 MIT/config/sun.cf net/config/sun.cf
*** MIT/config/sun.cf	Tue Mar 15 17:48:52 1994
--- net/config/sun.cf	Tue Mar 22 16:24:07 1994
***************
*** 1,40 ****
  XCOMM platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  
! #define OSName            SunOS 4.1.1
  XCOMM operating system:  OSName
! #define OSMajorVersion    4
! #define OSMinorVersion    1
! #define OSTeenyVersion    1
! 
! #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
! /* We do not guarantee this will work */
! #define BootstrapCFlags   -DNOSTDHDRS
! #define StandardDefines   -DNOSTDHDRS
! #endif
  
- /* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
- #if OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))
  #define SunPost411FCSLd	  YES
- #endif
  
  #define HasSaberC	  YES
  #define HasNdbm		  YES
  #define HasShm		  YES
! #define HasSecureRPC	  YES
  #define SetTtyGroup	  YES
  #define HasPutenv	  YES
  #define XsunServer	  YES		/* has color and mono support */
  #define XsunMonoServer	  YES		/* monochrome only */
! #define BuildPexExt	  XsunServer
  #define InstKmemFlags	  -g kmem -m 2755
  
- #ifdef sparc
- #undef sparc
  #define SparcArchitecture
! #endif
! #ifdef sun386
! #undef sun386
! #define i386Architecture
! #endif
  
  #include <sunLib.rules>
--- 1,39 ----
  XCOMM platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  
! #define OSName            NetBSD 0.9.a
  XCOMM operating system:  OSName
! #define OSMajorVersion    0
! #define OSMinorVersion    9
! #define OSTeenyVersion    a
  
  #define SunPost411FCSLd	  YES
  
  #define HasSaberC	  YES
  #define HasNdbm		  YES
  #define HasShm		  YES
! #define HasXdmAuth	  YES
  #define SetTtyGroup	  YES
  #define HasPutenv	  YES
  #define XsunServer	  YES		/* has color and mono support */
  #define XsunMonoServer	  YES		/* monochrome only */
! 
  #define InstKmemFlags	  -g kmem -m 2755
  
  #define SparcArchitecture
! 
! #define PositionIndependentCFlags -fpic
! #define SharedLibraryLoadFlags -Bshareable -Bforcearchive
! #define ExtraLoadFlags -Wl-B,silly
! 
! #define SharedLibraryDef
! 
! #define PreProcessCmd           /usr/bin/cpp
! 
! #define CppCmd                  /usr/bin/cpp
! #define LdCmd                   /usr/bin/ld
! #define LexCmd                  /usr/bin/lex
! #define MakeCmd                 /usr/local/bin/make
! #define YaccCmd                 /usr/bin/yacc
! #define CcCmd                   /usr/bin/cc          /* a front-end to gcc/CI5 */
  
  #include <sunLib.rules>
***************
*** 42,48 ****
  #if HasGcc
  
! #define SharedLibraryCcCmd cc
! #define ExtraLoadFlags -B/usr/bin/
! #define AllocateLocalDefines /**/
  
  .c.o:
--- 41,46 ----
  #if HasGcc
  
! #define SharedLibraryCcCmd /usr/local/bin/gcc
! #define ExtraLoadFlags -B/usr/local/bin/
  
  .c.o:
***************
*** 51,67 ****
  #else
  
- #define AllocateLocalDefines -DINCLUDE_ALLOCA_H
- 
- #ifdef mc68000
- #define DefaultCCOptions -f68881 -pipe
- #else
- #define DefaultCCOptions -pipe
- #endif
- 
  #define PexCCOptions DefaultCCOptions
  
  #endif
  
! #define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
  #define LibraryCCOptions /* don't want special floating point */
  
--- 49,57 ----
  #else
  
  #define PexCCOptions DefaultCCOptions
  
  #endif
  
! #define SharedAllocateLocalDefines /**/
  #define LibraryCCOptions /* don't want special floating point */
  
***************
*** 71,75 ****
  
  #if UseSunWindowsInServer
! #define SunWindowsDefines -DSUN_WINDOWS
  #else
  #define SunWindowsDefines /* as nothing */
--- 61,65 ----
  
  #if UseSunWindowsInServer
! #define SunWindowsDefines /* as nothing */
  #else
  #define SunWindowsDefines /* as nothing */
diff -rc2 MIT/demos/gpc/stopwatch.c net/demos/gpc/stopwatch.c
*** MIT/demos/gpc/stopwatch.c	Thu Apr  4 21:33:25 1991
--- net/demos/gpc/stopwatch.c	Mon Mar 21 20:45:41 1994
***************
*** 94,99 ****
  #endif
  #ifdef sparc
! #include <sys/param.h>
! #define CLK_TCK HZ
  #else 
  #ifdef SYSV
--- 94,99 ----
  #endif
  #ifdef sparc
! /* ---	#include <sys/param.h>
! 	#define CLK_TCK HZ --- */
  #else 
  #ifdef SYSV
diff -rc2 MIT/demos/ico/ico.c net/demos/ico/ico.c
*** MIT/demos/ico/ico.c	Sat Jul 20 06:09:40 1991
--- net/demos/ico/ico.c	Tue Mar 22 11:55:12 1994
***************
*** 93,98 ****
  extern long time();
  
- extern long rand();
- 
  char *ProgramName;
  Display *dpy;
--- 93,96 ----
***************
*** 733,739 ****
  int nbytes;
  {
! char *p, *malloc();
  
! 	p = malloc((unsigned int)nbytes);
  	if (p) return p;
  	fprintf(stderr,"ico: no more memory\n");
--- 731,737 ----
  int nbytes;
  {
! char *p;
  
! 	p = (char *)malloc((unsigned int)nbytes);
  	if (p) return p;
  	fprintf(stderr,"ico: no more memory\n");
diff -rc2 MIT/demos/xgc/lex.l net/demos/xgc/lex.l
*** MIT/demos/xgc/lex.l	Fri Jul 21 21:01:33 1989
--- net/demos/xgc/lex.l	Mon Mar 21 20:45:42 1994
***************
*** 11,14 ****
--- 11,15 ----
  #include "constants.h"
  
+ int yylineno;
  %}
  
diff -rc2 MIT/fonts/PEX/lex.l net/fonts/PEX/lex.l
*** MIT/fonts/PEX/lex.l	Mon Aug 26 18:16:43 1991
--- net/fonts/PEX/lex.l	Mon Mar 21 20:45:43 1994
***************
*** 65,68 ****
--- 65,70 ----
  %%
  
+ int yylineno;
+ 
  int
  res_words(str)
diff -rc2 MIT/fonts/clients/mkfontdir/mkfontdir.c net/fonts/clients/mkfontdir/mkfontdir.c
*** MIT/fonts/clients/mkfontdir/mkfontdir.c	Wed Jul 17 03:33:46 1991
--- net/fonts/clients/mkfontdir/mkfontdir.c	Tue Mar 22 11:25:01 1994
***************
*** 40,48 ****
  #ifndef PATH_MAX
  #include <sys/param.h>
- #ifdef MAXPATHLEN
- #define PATH_MAX MAXPATHLEN
- #else
- #define PATH_MAX 1024
- #endif
  #endif
  
--- 40,43 ----
diff -rc2 MIT/fonts/server/include/os.h net/fonts/server/include/os.h
*** MIT/fonts/server/include/os.h	Wed Jul 17 03:21:55 1991
--- net/fonts/server/include/os.h	Wed Jul 17 17:17:00 1991
***************
*** 34,48 ****
  /* XXX -- this needs to be in the config stuff */
  
- #ifdef sun
- #define	INCLUDE_ALLOCA_H
- #endif
- 
- #ifdef INCLUDE_ALLOCA_H
- #include	<alloca.h>
- #else
- extern char *alloca();
- 
- #endif
- 
  #define	MAX_REQUEST_SIZE	16384
  
--- 34,37 ----
diff -rc2 MIT/lib/X/XConnDis.c net/lib/X/XConnDis.c
*** MIT/lib/X/XConnDis.c	Tue Mar 15 17:50:15 1994
--- net/lib/X/XConnDis.c	Mon Mar 28 11:48:48 1994
***************
*** 453,457 ****
  
      addr = (struct sockaddr *) &unaddr;
!     addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
  
  #ifdef hpux /* this is disgusting */
--- 453,457 ----
  
      addr = (struct sockaddr *) &unaddr;
!     addrlen = strlen(unaddr.sun_path) + 2;
  
  #ifdef hpux /* this is disgusting */
diff -rc2 MIT/lib/X/Xlib.h net/lib/X/Xlib.h
*** MIT/lib/X/Xlib.h	Mon Jul 22 22:43:38 1991
--- net/lib/X/Xlib.h	Mon Mar 21 20:45:45 1994
***************
*** 59,63 ****
  #else
  /* replace this with #include or typedef appropriate for your system */
! typedef unsigned long wchar_t;
  #endif
  
--- 59,63 ----
  #else
  /* replace this with #include or typedef appropriate for your system */
! #include <stdlib.h>		/* typedef unsigned long wchar_t;    */
  #endif
  
diff -rc2 MIT/lib/Xaw/AsciiSrc.c net/lib/Xaw/AsciiSrc.c
*** MIT/lib/Xaw/AsciiSrc.c	Fri Jul 26 01:10:21 1991
--- net/lib/Xaw/AsciiSrc.c	Tue Mar 22 20:29:41 1994
***************
*** 93,97 ****
  static Boolean SetValues(), WriteToFile();
  extern int errno, sys_nerr;
- extern char* sys_errlist[];
  
  #define superclass		(&textSrcClassRec)
--- 93,96 ----
diff -rc2 MIT/lib/Xaw/TextPop.c net/lib/Xaw/TextPop.c
*** MIT/lib/Xaw/TextPop.c	Fri Jul 26 01:11:11 1991
--- net/lib/Xaw/TextPop.c	Tue Mar 22 20:30:57 1994
***************
*** 62,66 ****
  
  extern int errno, sys_nerr;
- extern char* sys_errlist[];
  
  #define INSERT_FILE ("Enter Filename:")
--- 62,65 ----
diff -rc2 MIT/lib/Xmu/LocBitmap.c net/lib/Xmu/LocBitmap.c
*** MIT/lib/Xmu/LocBitmap.c	Tue Jul  2 16:10:42 1991
--- net/lib/Xmu/LocBitmap.c	Tue Mar 22 11:22:37 1994
***************
*** 41,49 ****
  #ifndef PATH_MAX
  #include <sys/param.h>
- #ifdef MAXPATHLEN
- #define PATH_MAX MAXPATHLEN
- #else
- #define PATH_MAX 1024
- #endif
  #endif /* PATH_MAX */
  
--- 41,44 ----
diff -rc2 MIT/rgb/Imakefile net/rgb/Imakefile
*** MIT/rgb/Imakefile	Tue Mar 15 17:47:16 1994
--- net/rgb/Imakefile	Wed Mar 23 17:51:40 1994
***************
*** 15,19 ****
      DATAFILES = rgb.pag rgb.dir
        DATADEP = rgb.dir		/* just want one run of rgb */
! #if !(defined(SGIArchitecture) || SystemV4)
         DBMLIB = -ldbm
  #endif
--- 15,19 ----
      DATAFILES = rgb.pag rgb.dir
        DATADEP = rgb.dir		/* just want one run of rgb */
! #if !(defined(SGIArchitecture) || SystemV4 || __NetBSD__)
         DBMLIB = -ldbm
  #endif
diff -rc2 MIT/rgb/rgb.c net/rgb/rgb.c
*** MIT/rgb/rgb.c	Sun Jun 30 23:39:37 1991
--- net/rgb/rgb.c	Tue Mar 22 20:41:52 1994
***************
*** 32,36 ****
  extern int errno;			/* some systems are still stupid */
  extern int sys_nerr;
- extern char *sys_errlist[];
  
  char *ProgramName;
--- 32,35 ----
***************
*** 89,95 ****
      }
      (void) close (fd);
  
!     rgb_dbm = dbm_open (dbname, O_RDWR, 0666);
      if (!rgb_dbm) {
  	fprintf (stderr,
  		 "%s:  unable to open dbm database \"%s\" (error %d, %s)\n",
--- 88,94 ----
      }
      (void) close (fd);
  
!     rgb_dbm = dbm_open (dbname, O_RDWR | O_CREAT, 0666);
      if (!rgb_dbm) {
  	fprintf (stderr,
  		 "%s:  unable to open dbm database \"%s\" (error %d, %s)\n",
diff -rc2 MIT/server/Imakefile net/server/Imakefile
*** MIT/server/Imakefile	Tue Mar 15 17:47:34 1994
--- net/server/Imakefile	Sun May 29 21:13:29 1994
***************
*** 47,52 ****
--- 47,56 ----
          SYSLIBS = -lm /usr/ucblib/libucb.a
  #else
+ #ifdef __NetBSD__
+         SYSLIBS = -lm
+ #else
          SYSLIBS = -lm -ldbm
  #endif
+ #endif
             CBRT = ddx/mi/cbrt.o
  
***************
*** 226,230 ****
--- 230,238 ----
  SUBDIRS2 = ddx/sun
  SUNDIRS = $(SUBDIRS0) $(SUBDIRS1) $(SUBDIRS2) $(DEPDIRS)
+ #if (__NetBSD__ && sparc)
+ SUNOBJS = ddx/sun/sunInit.o os/genalloca.o
+ #else
  SUNOBJS = ddx/sun/sunInit.o
+ #endif
  SUNLIBS = ddx/sun/libsun.a CFBLibs
  SUNSYSLIBS = $(SYSLIBS) $(SUNWINDOWSLIBS)
***************
*** 244,248 ****
--- 252,260 ----
  SUBDIRS2 = ddx/sun
  SUNMDIRS = $(SUBDIRS0) $(SUBDIRS2) $(DEPDIRS)
+ #if (__NetBSD__ && sparc)
+ SUNMOBJS = ddx/sun/sunInitMono.o ddx/sun/sunInitExtMono.o os/genalloca.o
+ #else
  SUNMOBJS = ddx/sun/sunInitMono.o ddx/sun/sunInitExtMono.o
+ #endif
  SUNMLIBS = ddx/sun/libsun.a MFBBareLibs $(NONPEXEXTS)
  SUNSYSLIBS = $(SYSLIBS) $(SUNWINDOWSLIBS)
diff -rc2 MIT/server/os/Imakefile net/server/os/Imakefile
*** MIT/server/os/Imakefile	Fri Aug 23 00:04:36 1991
--- net/server/os/Imakefile	Wed Mar 30 19:55:05 1994
***************
*** 11,14 ****
--- 11,19 ----
   */
  
+ #if (__NetBSD__ && sparc)
+ #define OtherSources genalloca.c
+ #define OtherObjects genalloca.o
+ #endif
+ 
  #ifdef HPArchitecture
  #define OtherSources hpsocket.c 
***************
*** 129,132 ****
--- 134,145 ----
  	ar x $(PWLIB) alloca.o
  #endif /* NEED_ALLOCA_FROM_LIBPW */
+ 
+ #if (__NetBSD__ && sparc)
+ genalloca.o: genalloca.c
+ 	$(RM) $@
+ 	cc -S genalloca.c -O
+ 	sed -e "s/_alloca/___builtin_alloca/g" genalloca.s > builtin_alloca.s
+ 	cc -c -o genalloca.o builtin_alloca.s -O
+ #endif
  
  SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
diff -rc2 MIT/server/ddx/sun/Imakefile net/server/ddx/sun/Imakefile
*** MIT/server/ddx/sun/Imakefile	Tue Mar 15 20:09:03 1994
--- net/server/ddx/sun/Imakefile	Sun May 29 21:25:10 1994
***************
*** 14,17 ****
--- 14,21 ----
  #endif
  
+ #ifdef __NetBSD__
+ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) -D_MAP_NEW=0x80000000
+ #endif
+ 
  SRCS1 =	sunInit.c sunBW2.c sunCursor.c sunIo.c sunKbd.c sunMouse.c sunUtils.c\
  	sunCG.c sunCG2C.c sunCG2M.c sunCG3C.c sunCG4C.c sunCG6C.c $(GXSRC)\
diff -rc2 MIT/server/ddx/sun/constype.c net/server/ddx/sun/constype.c
*** MIT/server/ddx/sun/constype.c	Wed Sep 27 02:57:12 1989
--- net/server/ddx/sun/constype.c	Thu Mar 24 09:49:56 1994
***************
*** 61,69 ****
  #include <sys/ioctl.h>
  #include <sys/file.h>
! #include <sun/fbio.h>
  
  /* decoding as of Release 3.4 : fbio.h 1.3 87/01/09 SMI */
  	/* the convention for entries in this table is to translate the
! 	 * macros for frame buffer codes (in <sun/fbio.h>) to short names
  	 * thus:
  	 *	FBTYPE_SUNxBW		becomes bwx
--- 61,69 ----
  #include <sys/ioctl.h>
  #include <sys/file.h>
! #include <machine/fbio.h>
  
  /* decoding as of Release 3.4 : fbio.h 1.3 87/01/09 SMI */
  	/* the convention for entries in this table is to translate the
! 	 * macros for frame buffer codes (in <machine/fbio.h>) to short names
  	 * thus:
  	 *	FBTYPE_SUNxBW		becomes bwx
***************
*** 110,114 ****
  	    /* The source is obsolete.  The table "decode_fb" does not
  	     * have entries for some of the values returned by the ioctl.
! 	     * Compare <sun/fbio.h> to the entries in "decode_fb" */
  	if ( decode_fb[fbattr.fbtype.fb_type] == 0 )	/* decode_fb is obs */
                  return("unk");
--- 110,114 ----
  	    /* The source is obsolete.  The table "decode_fb" does not
  	     * have entries for some of the values returned by the ioctl.
! 	     * Compare <machine/fbio.h> to the entries in "decode_fb" */
  	if ( decode_fb[fbattr.fbtype.fb_type] == 0 )	/* decode_fb is obs */
                  return("unk");
diff -rc2 MIT/server/ddx/sun/kbd_mode.c net/server/ddx/sun/kbd_mode.c
*** MIT/server/ddx/sun/kbd_mode.c	Fri Sep 11 02:24:42 1987
--- net/server/ddx/sun/kbd_mode.c	Thu Mar 24 10:43:33 1994
***************
*** 40,45 ****
  #include <sys/file.h>
  #include <sys/ioctl.h>
! #include <sundev/kbio.h>
! #include <sundev/kbd.h>
  #include <stdio.h>
  
--- 40,45 ----
  #include <sys/file.h>
  #include <sys/ioctl.h>
! #include <sparc/dev/kbio.h>
! #include <sparc/dev/kbd.h>
  #include <stdio.h>
  
diff -rc2 MIT/server/ddx/sun/kbdtype.c net/server/ddx/sun/kbdtype.c
*** MIT/server/ddx/sun/kbdtype.c	Tue Mar 15 20:08:11 1994
--- net/server/ddx/sun/kbdtype.c	Thu Mar 24 11:34:50 1994
***************
*** 14,20 ****
  #include <stdio.h>
  #include <string.h>
! #include <sys/fcntl.h>
! #include <sundev/kbd.h>
! #include <sundev/kbio.h>
  
  char *programname;
--- 14,22 ----
  #include <stdio.h>
  #include <string.h>
! #include <sys/types.h>
! #include <sys/file.h>
! #include <sys/ioctl.h>
! #include <sparc/dev/kbd.h>
! #include <sparc/dev/kbio.h>
  
  char *programname;
***************
*** 76,89 ****
      /*
       * I'm not sure how many of these values for 'kbdtype' can actually
!      * occur. This is the complete list from '/usr/include/sundev/kbd.h'.
       * Any redundant values will not do too much harm, however.
       */
      switch (kbdtype) {
- 	case KB_KLUNK:			/* Micro Switch 103SD32-2 */
- 	    kbdstr = (brief ? "klunk" : " Micro Switch 103SD32-2.");
- 	    break;
- 	case KB_VT100:			/* Keytronics VT100 compatible */
- 	    kbdstr = (brief ? "vt100" : " Keytronics VT100 compatible.");
- 	    break;
  	case KB_SUN2:			/* Sun-2 custom keyboard */
  	    kbdstr = (brief ? "sun2" : " Type-2 Sun keyboard.");
--- 78,85 ----
      /*
       * I'm not sure how many of these values for 'kbdtype' can actually
!      * occur. This is the complete list from '/usr/include/sparc/dev/kbd.h'.
       * Any redundant values will not do too much harm, however.
       */
      switch (kbdtype) {
  	case KB_SUN2:			/* Sun-2 custom keyboard */
  	    kbdstr = (brief ? "sun2" : " Type-2 Sun keyboard.");
***************
*** 215,227 ****
  		    break;
  	    }
- 	    break;
- 	case KB_VT220:			/* Emulation vt220 */
- 	    kbdstr = (brief ? "vt220" : " vt220 emulation.");
- 	    break;
- 	case KB_VT220I:			/* International vt220 Emulation */
- 	    kbdstr = (brief ? "vt220i" : " vt220 emulation (international).");
- 	    break;
- 	case KB_ASCII:			/* Ascii terminal masquerading as kbd */
- 	    kbdstr = (brief ? "ascii" : "n ASCII terminal.");
  	    break;
  	default:
--- 211,214 ----
diff -rc2 MIT/server/ddx/sun/sun.h net/server/ddx/sun/sun.h
*** MIT/server/ddx/sun/sun.h	Tue Mar 15 20:09:05 1994
--- net/server/ddx/sun/sun.h	Thu Mar 24 13:13:33 1994
***************
*** 24,55 ****
  #include    <sys/time.h>
  #include    <sys/file.h>
  #include    <sys/fcntl.h>
  #include    <sys/signal.h>
! #include    <sundev/kbd.h>
! #include    <sundev/kbio.h>
! #include    <sundev/msio.h>
! #include    <sun/fbio.h>
! 
! /*
!  * SUN_WINDOWS is now defined (or not) by the Makefile
!  * variable $(SUNWINDOWSFLAGS) in server/Makefile.
!  */
  
! #ifdef SUN_WINDOWS
! #include    <varargs.h>
! #include    <sys/ioctl.h>
! #include    <stdio.h>
! #include    <pixrect/pixrect_hs.h>
! #include    <sunwindow/rect.h>
! #include    <sunwindow/rectlist.h>
! #include    <sunwindow/pixwin.h>
! #include    <sunwindow/win_screen.h>
! #include    <sunwindow/win_input.h>
! #include    <sunwindow/cms.h>
! #include    <sunwindow/win_struct.h>
! #else 
! /* already included by sunwindow/win_input.h */
! #include    <sundev/vuid_event.h>
! #endif /* SUN_WINDOWS */
  
  #include    "X.h"
--- 24,35 ----
  #include    <sys/time.h>
  #include    <sys/file.h>
+ #include    <sys/ioctl.h>
  #include    <sys/fcntl.h>
  #include    <sys/signal.h>
! #include    <sparc/dev/kbd.h>
! #include    <sparc/dev/kbio.h>
! #include    <machine/fbio.h>
  
! #include    <sparc/dev/vuid_event.h>
  
  #include    "X.h"
diff -rc2 MIT/server/ddx/sun/sunBW2.c net/server/ddx/sun/sunBW2.c
*** MIT/server/ddx/sun/sunBW2.c	Fri May 31 23:06:18 1991
--- net/server/ddx/sun/sunBW2.c	Thu Mar 24 13:22:06 1994
***************
*** 58,62 ****
  
  #include    <sys/mman.h>
! #include    <sundev/bw2reg.h>
  
  extern caddr_t mmap();
--- 58,62 ----
  
  #include    <sys/mman.h>
! #include    <sparc/sbus/bwtworeg.h>
  
  extern caddr_t mmap();
diff -rc2 MIT/server/ddx/sun/sunCG.c net/server/ddx/sun/sunCG.c
*** MIT/server/ddx/sun/sunCG.c	Fri Aug 23 23:12:45 1991
--- net/server/ddx/sun/sunCG.c	Thu Mar 24 13:33:39 1994
***************
*** 33,37 ****
  
  #include    <sys/mman.h>
- #include    <pixrect/memreg.h>
  #include    "colormapst.h"
  #include    "resource.h"
--- 33,36 ----
diff -rc2 MIT/server/ddx/sun/sunCG2C.c net/server/ddx/sun/sunCG2C.c
*** MIT/server/ddx/sun/sunCG2C.c	Fri May 31 23:06:20 1991
--- net/server/ddx/sun/sunCG2C.c	Thu Mar 24 19:36:48 1994
***************
*** 40,45 ****
  #include    <sys/mman.h>
  #include    <struct.h>
! #include    <pixrect/memreg.h>
! #include    <pixrect/cg2reg.h>
  #include    "colormap.h"
  #include    "colormapst.h"
--- 40,45 ----
  #include    <sys/mman.h>
  #include    <struct.h>
! #include    <sparc/sbus/memreg.h>
! #include    <sparc/sbus/cg2reg.h>
  #include    "colormap.h"
  #include    "colormapst.h"
diff -rc2 MIT/server/ddx/sun/sunCG2M.c net/server/ddx/sun/sunCG2M.c
*** MIT/server/ddx/sun/sunCG2M.c	Fri May 31 23:06:15 1991
--- net/server/ddx/sun/sunCG2M.c	Thu Mar 24 19:37:43 1994
***************
*** 26,31 ****
  
  #include    <sys/mman.h>
! #include    <pixrect/memreg.h>
! #include    <pixrect/cg2reg.h>
  #include    <struct.h>
  
--- 26,31 ----
  
  #include    <sys/mman.h>
! #include    <sparc/sbus/memreg.h>
! #include    <sparc/sbus/cg2reg.h>
  #include    <struct.h>
  
diff -rc2 MIT/server/ddx/sun/sunCG3C.c net/server/ddx/sun/sunCG3C.c
*** MIT/server/ddx/sun/sunCG3C.c	Fri May 31 23:06:24 1991
--- net/server/ddx/sun/sunCG3C.c	Thu Mar 24 19:24:04 1994
***************
*** 35,42 ****
  
  #include    <sys/mman.h>
! #include    <pixrect/memreg.h>
! /*
! #include    <sundev/cg4reg.h>
! */
  #include    "colormap.h"
  #include    "colormapst.h"
--- 35,40 ----
  
  #include    <sys/mman.h>
! #include    <sparc/sbus/btreg.h>
! #include    <sparc/sbus/cgthreereg.h>
  #include    "colormap.h"
  #include    "colormapst.h"
***************
*** 79,82 ****
--- 77,85 ----
  #define CG3BC_IMAGE(fb)      ((caddr_t)((fb)->cpixel))
  #define CG3BC_IMAGELEN       (((sizeof (CG3BC) + 4095)/4096)*4096)
+ 
+ #define	CG3AC_MONOLEN	    (128*1024)
+ #define	CG3AC_ENBLEN	    CG3AC_MONOLEN
+ #define	CG3BC_MONOLEN	    (128*1024)
+ #define	CG3BC_ENBLEN	    CG3BC_MONOLEN
  
  /*-
diff -rc2 MIT/server/ddx/sun/sunCG4C.c net/server/ddx/sun/sunCG4C.c
*** MIT/server/ddx/sun/sunCG4C.c	Fri May 31 23:06:22 1991
--- net/server/ddx/sun/sunCG4C.c	Thu Mar 24 19:28:20 1994
***************
*** 39,44 ****
  
  #include    <sys/mman.h>
- #include    <pixrect/memreg.h>
- #include    <sundev/cg4reg.h>
  #include    "colormap.h"
  #include    "colormapst.h"
--- 39,42 ----
diff -rc2 MIT/server/ddx/sun/sunCG6C.c net/server/ddx/sun/sunCG6C.c
*** MIT/server/ddx/sun/sunCG6C.c	Sat Jul 27 02:17:06 1991
--- net/server/ddx/sun/sunCG6C.c	Thu Mar 24 21:09:48 1994
***************
*** 40,44 ****
  #ifdef FBTYPE_SUNFAST_COLOR
  #include    <sys/mman.h>
- #include    <pixrect/memreg.h>
  #include    "colormap.h"
  #include    "colormapst.h"
--- 40,43 ----
***************
*** 162,166 ****
  	     mapsize,
  	     PROT_READ | PROT_WRITE,
! 	     MAP_PRIVATE, fd, CG6_VBASE);
  
      if (mapaddr == (caddr_t) -1)
--- 161,165 ----
  	     mapsize,
  	     PROT_READ | PROT_WRITE,
! 	     MAP_PRIVATE | MAP_FILE, fd, CG6_VBASE);
  
      if (mapaddr == (caddr_t) -1)
***************
*** 169,173 ****
  	     	 mapsize,
  	     	 PROT_READ | PROT_WRITE,
! 	     	 MAP_SHARED, fd, CG6_VBASE);
      }
  
--- 168,172 ----
  	     	 mapsize,
  	     	 PROT_READ | PROT_WRITE,
! 	     	 MAP_SHARED | MAP_FILE, fd, CG6_VBASE);
      }
  
diff -rc2 MIT/server/ddx/sun/sunInit.c net/server/ddx/sun/sunInit.c
*** MIT/server/ddx/sun/sunInit.c	Tue Mar 15 20:09:05 1994
--- net/server/ddx/sun/sunInit.c	Wed Mar 23 22:36:55 1994
***************
*** 163,168 ****
   */
  /*ARGSUSED*/
! sunNonBlockConsoleOff(arg)
!     char	*arg;
  {
      register int i;
--- 163,168 ----
   */
  /*ARGSUSED*/
! void
! sunNonBlockConsoleOff()
  {
      register int i;
***************
*** 216,220 ****
      if (nonBlockConsole) {
  	if (!setup_on_exit) {
! 	    if (on_exit(sunNonBlockConsoleOff, (char *)0))
  		ErrorF("InitOutput: can't register NBIO exit handler\n");
  	    setup_on_exit = 1;
--- 216,220 ----
      if (nonBlockConsole) {
  	if (!setup_on_exit) {
! 	    if (atexit(sunNonBlockConsoleOff))
  		ErrorF("InitOutput: can't register NBIO exit handler\n");
  	    setup_on_exit = 1;
-------------------------------------------------------------------------------

Thats all

ram

------------------------------------------------------------------------------