Subject: Re: X11R5 server sources
To: Ron Roskens <roskens@cs.umn.edu>
From: Mark Davies <mark@Comp.VUW.AC.NZ>
List: port-hp300
Date: 01/10/1996 12:15:02
------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <7077.821229301.1@comp.vuw.ac.nz>

	From:  Jason Thorpe <thorpej@nas.nasa.gov>
	Date:  Tue, 09 Jan 1996 14:22:33 -0800

> I know of one, possibly two efforts to port X11R6 to NetBSD/hp300.  It's 
> not an easy task.  Stay tuned.

Below is attached the patches against X11R6 patch-level-13 needed to build the 
clients (including xdm) under netbsd1.1 on hp300's.  The server is being 
worked on.

cheers
mark


------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <7077.821229301.2@comp.vuw.ac.nz>

diff -cr R6/xc/config/cf/Imake.cf R6.VUW/xc/config/cf/Imake.cf
*** R6/xc/config/cf/Imake.cf	Sat Dec 23 12:39:11 1995
--- R6.VUW/xc/config/cf/Imake.cf	Fri Dec 29 17:25:03 1995
***************
*** 59,64 ****
--- 59,67 ----
  #define i386BsdArchitecture
  #define i386Architecture
  #endif
+ #ifdef __m68k__
+ #define hpBsdArchitecture
+ #endif
  #if defined(__sparc__) || defined(sparc)
  #define SparcArchitecture
  #undef sparc
diff -cr R6/xc/config/cf/NetBSD.cf R6.VUW/xc/config/cf/NetBSD.cf
*** R6/xc/config/cf/NetBSD.cf	Sat Dec 23 13:32:42 1995
--- R6.VUW/xc/config/cf/NetBSD.cf	Sun Dec 31 00:24:10 1995
***************
*** 3,10 ****
  #define OSName		NetBSD
  #define	OSVendor	/**/
  XCOMM operating system:  OSName
! #define OSMajorVersion    0
! #define OSMinorVersion    9
  
  #define HasPutenv       YES
  #define HasBSD44Sockets YES
--- 3,10 ----
  #define OSName		NetBSD
  #define	OSVendor	/**/
  XCOMM operating system:  OSName
! #define OSMajorVersion    1
! #define OSMinorVersion    1
  
  #define HasPutenv       YES
  #define HasBSD44Sockets YES
***************
*** 60,65 ****
--- 60,67 ----
  #  define ServerOSDefines	-DDDXOSINIT
  # else
  #  define ServerOSDefines	/**/
+ #  define XFree86ServerDefines	/**/
+ #  define UseRgbTxt	YES
  # endif
  #endif
  #define ServerExtraDefines GccGasOption XFree86ServerDefines
***************
*** 150,153 ****
--- 152,161 ----
  
  #ifdef i386Architecture
  # include <xfree86.cf>
+ #endif
+ 
+ #ifdef hpBsdArchitecture
+ #ifndef XhpBSDServer
+ #define XhpBSDServer	NO
+ #endif
  #endif
diff -cr R6/xc/programs/Xserver/Imakefile R6.VUW/xc/programs/Xserver/Imakefile
*** R6/xc/programs/Xserver/Imakefile	Sat Dec 23 12:40:25 1995
--- R6.VUW/xc/programs/Xserver/Imakefile	Sun Dec 31 00:20:54 1995
***************
*** 83,89 ****
  #ifdef ServerExtraSysLibs
     EXTRASYSLIBS = ServerExtraSysLibs
  #endif
! #if SystemV4 || defined(SGIArchitecture) || defined(XFree86Version)
          SYSLIBS = MathLibrary Krb5Libraries $(EXTRASYSLIBS)
  #else
          SYSLIBS = MathLibrary Krb5Libraries DBMLibrary $(EXTRASYSLIBS)
--- 83,89 ----
  #ifdef ServerExtraSysLibs
     EXTRASYSLIBS = ServerExtraSysLibs
  #endif
! #if SystemV4 || defined(SGIArchitecture) || defined(XFree86Version) || defined(hpBsdArchitecture)
          SYSLIBS = MathLibrary Krb5Libraries $(EXTRASYSLIBS)
  #else
          SYSLIBS = MathLibrary Krb5Libraries DBMLibrary $(EXTRASYSLIBS)
***************
*** 396,401 ****
--- 396,420 ----
  ServerTarget(Xhp,$(HPSUBDIRS),$(HPOBJS),$(HPLIBS),$(HPSYSLIBS))
  #ifndef ServerToInstall
  #define ServerToInstall Xhp
+ #endif
+ #endif	/* XhpServer */
+ 
+ 
+ #if XhpBSDServer
+ XCOMM
+ XCOMM XhpBSD server for BSD on HP Series 300/400 machines
+ XCOMM
+ MFBDIR  = hw/hpbsd/mfb
+ CFB8DIR = hw/hpbsd/cfb
+ DDXDIR1 = hw/hpbsd
+ HPBSDSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS)
+ HPBSDOBJS = hw/hpbsd/hpInit.o
+ HPBSDLIBS = hw/hpbsd/topcat/libtopcat.a hw/hpbsd/hyperion/libhyper.a \
+             hw/hpbsd/libhpbsd.a hw/hpbsd/input/libinput.a CFB8Libs
+ HPBSDSYSLIBS = $(CBRT) $(SYSLIBS)
+ ServerTarget(XhpBSD,$(HPBSDSUBDIRS),$(HPBSDOBJS),$(HPBSDLIBS),$(HPBSDSYSLIBS))
+ #ifndef ServerToInstall
+ #define ServerToInstall XhpBSD
  #endif
  #endif	/* XhpServer */
  
diff -cr R6/xc/programs/Xserver/include/servermd.h R6.VUW/xc/programs/Xserver/include/servermd.h
*** R6/xc/programs/Xserver/include/servermd.h	Sat Dec 23 12:40:28 1995
--- R6.VUW/xc/programs/Xserver/include/servermd.h	Sun Dec 31 18:52:33 1995
***************
*** 133,139 ****
  
  #if (defined(sun) && !(defined(i386) && defined(SVR4))) || \
      (defined(AMOEBA) && (defined(sparc) || defined(mc68000))) || \
!     (defined(__NetBSD__) && (defined(__sparc__) || defined(mc68000)))
  
  #if defined(sun386) || defined(sun5)
  # define IMAGE_BYTE_ORDER	LSBFirst        /* Values for the SUN only */
--- 133,139 ----
  
  #if (defined(sun) && !(defined(i386) && defined(SVR4))) || \
      (defined(AMOEBA) && (defined(sparc) || defined(mc68000))) || \
!     (defined(__NetBSD__) && (defined(__sparc__) || defined(mc68000) || defined(__m68k__)))
  
  #if defined(sun386) || defined(sun5)
  # define IMAGE_BYTE_ORDER	LSBFirst        /* Values for the SUN only */
***************
*** 150,161 ****
  # define SHARED_IDCACHE
  #endif
  
! #ifdef mc68020
  #define FAST_UNALIGNED_READS
  #endif
  
  #define	GLYPHPADBYTES		4
  #define GETLEFTBITS_ALIGNMENT	1
  
  #endif /* sun */
  
--- 150,166 ----
  # define SHARED_IDCACHE
  #endif
  
! #if defined(mc68020) || defined(__mc68020__)
  #define FAST_UNALIGNED_READS
  #endif
  
+ #if defined(__NetBSD__) && defined(__m68k__)
+ #define	GLYPHPADBYTES		2
+ #define GETLEFTBITS_ALIGNMENT	4
+ #else
  #define	GLYPHPADBYTES		4
  #define GETLEFTBITS_ALIGNMENT	1
+ #endif
  
  #endif /* sun */
  
diff -cr R6/xc/programs/xdm/Imakefile R6.VUW/xc/programs/xdm/Imakefile
*** R6/xc/programs/xdm/Imakefile	Sat Dec 23 12:40:59 1995
--- R6.VUW/xc/programs/xdm/Imakefile	Wed Jan 10 11:39:10 1996
***************
*** 59,65 ****
  SYS_LIBRARIES = -ls
  #endif
  
! #if defined(XFree86Version) && HasLibCrypt
  SYS_LIBRARIES = -lcrypt
  #endif
  
--- 59,65 ----
  SYS_LIBRARIES = -ls
  #endif
  
! #if (defined(XFree86Version) && HasLibCrypt) || defined(NetBSDArchitecture)
  SYS_LIBRARIES = -lcrypt
  #endif
  
***************
*** 67,74 ****
  SOCK_DEFINES = -DBSD44SOCKETS
  #endif
  
! #ifdef i386Architecture
! FRAGILE_DEFINES = -DFRAGILE_DEV_MEM
  #endif
  
  #if HasVFork
--- 67,78 ----
  SOCK_DEFINES = -DBSD44SOCKETS
  #endif
  
! #if defined(i386Architecture)
! FRAGILE_DEFINES = -DFRAGILE_DEV_MEM=0x100000
! #endif
! 
! #if defined(hpBsdArchitecture)
! FRAGILE_DEFINES = -DFRAGILE_DEV_MEM=0xFF800000
  #endif
  
  #if HasVFork
diff -cr R6/xc/programs/xdm/genauth.c R6.VUW/xc/programs/xdm/genauth.c
*** R6/xc/programs/xdm/genauth.c	Sat Dec 23 13:37:05 1995
--- R6.VUW/xc/programs/xdm/genauth.c	Wed Jan 10 11:43:48 1996
***************
*** 92,98 ****
  	return 0;
      }
  #ifdef FRAGILE_DEV_MEM
!     if (strcmp(name, "/dev/mem") == 0) lseek (fd, (off_t) 0x100000, SEEK_SET);
  #endif
      reads = FILE_LIMIT;
      sum[0] = 0;
--- 92,98 ----
  	return 0;
      }
  #ifdef FRAGILE_DEV_MEM
!     if (strcmp(name, "/dev/mem") == 0) lseek (fd, (off_t) FRAGILE_DEV_MEM, SEEK_SET);
  #endif
      reads = FILE_LIMIT;
      sum[0] = 0;
diff -cr R6/xc/programs/xdm/sessreg.c R6.VUW/xc/programs/xdm/sessreg.c
*** R6/xc/programs/xdm/sessreg.c	Sat Dec 23 12:41:04 1995
--- R6.VUW/xc/programs/xdm/sessreg.c	Fri Dec 29 16:58:03 1995
***************
*** 67,77 ****
--- 67,85 ----
  #endif
  
  #ifndef WTMP_FILE
+ # ifdef _PATH_WTMP
+ # define WTMP_FILE    _PATH_WTMP
+ # else
  # define WTMP_FILE	"/usr/adm/wtmp"
  #endif
+ #endif
  #ifndef UTMP_FILE
+ # ifdef _PATH_UTMP
+ # define UTMP_FILE    _PATH_UTMP
+ # else
  # define UTMP_FILE	"/etc/utmp"
  #endif
+ #endif
  #ifndef NO_LASTLOG
  #ifndef LLOG_FILE
  # define LLOG_FILE	"/usr/adm/lastlog"
***************
*** 262,267 ****
--- 270,279 ----
  	}
  	current_time = time ((Time_t *) 0);
  	set_utmp (&utmp_entry, line, user_name, host_name, current_time, aflag);
+ #if defined(CSRG_BASED) || defined(__osf__)
+ 	if (aflag)
+ 		(void) setlogin(user_name);
+ #endif
  	if (!utmp_none) {
  #ifdef SYSV
  		utmpname (utmp_file);
diff -cr R6/xc/programs/xterm/main.c R6.VUW/xc/programs/xterm/main.c
*** R6/xc/programs/xterm/main.c	Sat Dec 23 13:32:32 1995
--- R6.VUW/xc/programs/xterm/main.c	Fri Dec 29 16:39:59 1995
***************
*** 283,300 ****
--- 283,311 ----
  #ifdef UTMP_FILE
  #define UTMP_FILENAME UTMP_FILE
  #else
+ #ifdef _PATH_UTMP
+ #define UTMP_FILENAME _PATH_UTMP
+ #else
  #define UTMP_FILENAME "/etc/utmp"
  #endif
  #endif
+ #endif
  
  #ifndef LASTLOG_FILENAME
+ #ifdef _PATH_LASTLOG
+ #define LASTLOG_FILENAME _PATH_LASTLOG
+ #else
  #define LASTLOG_FILENAME "/usr/adm/lastlog"  /* only on BSD systems */
  #endif
+ #endif
  
  #ifndef WTMP_FILENAME
  #ifdef WTMP_FILE
  #define WTMP_FILENAME WTMP_FILE
  #else
+ #ifdef _PATH_WTMP
+ #define WTMP_FILENAME _PATH_WTMP
+ #else
  #ifdef SYSV
  #define WTMP_FILENAME "/etc/wtmp"
  #else
***************
*** 302,307 ****
--- 313,319 ----
  #endif
  #endif
  #endif
+ #endif
  
  #include <signal.h>
  
***************
*** 2558,2563 ****
--- 2570,2579 ----
  		pw = getpwuid(screen->uid);
  		if (pw && pw->pw_name)
  		    Setenv ("LOGNAME=", pw->pw_name); /* for POSIX */
+ #if defined(CSRG_BASED) || defined(__osf__)
+ 		if (pw && pw->pw_name)
+ 		    (void) setlogin(pw->pw_name);
+ #endif
  #ifdef USE_SYSV_UTMP
  		/* Set up our utmp entry now.  We need to do it here
  		** for the following reasons:

------- =_aaaaaaaaaa0--