These are patches are intended to be applied against X11R5 pl26 to get X working on the following three platforms. This patch file should correctly fix the mit tree. The contrib hierarchy may or may not work, it has not been tested. Those three platforms are: Tektronix XD88 running UTekV 3.2e. BOOTSTRAPCFLAGS="-DUTEKV" Motorola MPC running System V/88. BOOTSTRAPCFLAGS="-DSYSV -DMOTOROLA" Motorola Monsoon running System V/68. BOOTSTRAPCFLAGS="-DSYSV -DMOTOROLA" These architectures were done together because the platforms are so similar as to make seperate port patches totally incompatible. Most changes for the three platforms involve adding cpp directives on the same line. Below are explanations for non-trivial changes. 1. There was code used only by the above platforms in get_load.c which reopened /dev/kmem. This code was not only redundantly opening the file a second time, it was doing so after a setuid/setgid which loses for us our permissions on /dev/kmem. Thus xload would only work when run as root. Removing this code lets us rely on the initial open call which was done early enough to still have proper permissions gained because of setuid/gid bits on the xload executable. 2. A !UTEKV check was added around code in Xos.h which declares the timeval structure. Although this code is protected by USG, and this UTEKV port does not define USG, some programs line emacs may define it for us. Thus we must protect this code from conflicting with the XD88's own declaration of this structure. 3. Rules for bifparse.[chy] were added to mit/demos/gpc/Imakefile because makedepend adds bifparse.y to our list of dependencies but make can't find a rule to build it. (Its built and removed by the rule for bifparse.) Makedepend thinks we need bifparse.y because of the #line directives in bifparse.c which mention bifparse.y (since that is the name of the file on which yacc was run.) Since the SVR3 yacc overflows on the number of terminals in our source file, the yacc call was removed and the default supplied C and H files are used. This patch file does NOT contain changes necessary for compiling the X server and the cf file for the XD88 will not attempt to compile one. If you are successful in building a working R5 server for the XD88, I'd sure like to hear about it! To use this patch, get the X11R5 code and apply fixes 1-26, all of which are available via anonymous ftp on export.x.org. Then apply this patch file on top of those. You do this by cd'ing to the source tree (the directory containing mit and contrib) and typing: patch -p1 -s < ThisFile You can use patch-2.1 available via anonymous ftp from prep.ai.mit.edu or other gnu sites. If you have problems, questions, suggestions, additions or complete an X server port, send mail to: Kaveh R. Ghazi Systems Programmer TDNS ghazi@noc.rutgers.edu Rutgers University Computing Services ------------------------------------------------------------------------------ diff -r -C5 orig-src/contrib/clients/xmh/tocutil.c src-xd88/contrib/clients/xmh/tocutil.c *** orig-src/contrib/clients/xmh/tocutil.c Thu Oct 3 22:44:23 1991 --- src-xd88/contrib/clients/xmh/tocutil.c Tue Dec 21 22:28:47 1993 *************** *** 1,8 **** --- 1,10 ---- /* * $XConsortium: tocutil.c,v 2.57 91/07/31 01:10:23 keith Exp $ * + * Fixed for UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. * * COPYRIGHT 1987, 1989 * DIGITAL EQUIPMENT CORPORATION * MAYNARD, MASSACHUSETTS * ALL RIGHTS RESERVED. *************** *** 630,640 **** #else /* XI18N */ if (fid < 0 && toc->length != toc->origlength) #endif /* XI18N */ fid = myopen(toc->scanfile, O_RDWR, 0666); if (fid >= 0) { ! #if defined(SYSV) && (defined(SYSV386) || defined(MOTOROLA)) #ifdef XI18N (void) ftruncate_emu(fid, toc->mb_length, toc->scanfile); #else /* XI18N */ (void) ftruncate_emu(fid, toc->length, toc->scanfile); #endif /* XI18N */ --- 632,642 ---- #else /* XI18N */ if (fid < 0 && toc->length != toc->origlength) #endif /* XI18N */ fid = myopen(toc->scanfile, O_RDWR, 0666); if (fid >= 0) { ! #if defined(SYSV) && (defined(SYSV386) || defined(MOTOROLA) || defined(UTEKV)) #ifdef XI18N (void) ftruncate_emu(fid, toc->mb_length, toc->scanfile); #else /* XI18N */ (void) ftruncate_emu(fid, toc->length, toc->scanfile); #endif /* XI18N */ diff -r -C5 orig-src/mit/clients/xdm/daemon.c src-xd88/mit/clients/xdm/daemon.c *** orig-src/mit/clients/xdm/daemon.c Sat May 11 15:37:49 1991 --- src-xd88/mit/clients/xdm/daemon.c Tue Dec 21 22:25:55 1993 *************** *** 1,10 **** --- 1,13 ---- /* * xdm - display manager daemon * * $XConsortium: daemon.c,v 1.8 91/05/11 15:37:38 gildea Exp $ * + * Fixed for Motorola-SYSV && UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * Copyright 1988 Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that *************** *** 60,80 **** close (0); close (1); close (2); ! #ifndef SYSV386 if ((i = open ("/dev/tty", O_RDWR)) >= 0) { /* did open succeed? */ #if (defined(SYSV) || defined(SVR4)) && defined(TIOCTTY) int zero = 0; (void) ioctl (i, TIOCTTY, &zero); #else (void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */ #endif (void) close (i); } ! #endif /* !SYSV386 */ /* * Set up the standard file descriptors. */ (void) open ("/", O_RDONLY); /* root inode already in core */ --- 63,83 ---- close (0); close (1); close (2); ! #if !defined(SYSV386) && !(defined(MOTOROLA)&&defined(SYSV)) && !defined(UTEKV) if ((i = open ("/dev/tty", O_RDWR)) >= 0) { /* did open succeed? */ #if (defined(SYSV) || defined(SVR4)) && defined(TIOCTTY) int zero = 0; (void) ioctl (i, TIOCTTY, &zero); #else (void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */ #endif (void) close (i); } ! #endif /* !SYSV386 && !(MOTOROLA && SYSV) && !UTEKV */ /* * Set up the standard file descriptors. */ (void) open ("/", O_RDONLY); /* root inode already in core */ diff -r -C5 orig-src/mit/clients/xdm/dm.h src-xd88/mit/clients/xdm/dm.h *** orig-src/mit/clients/xdm/dm.h Tue Dec 21 23:47:53 1993 --- src-xd88/mit/clients/xdm/dm.h Tue Dec 21 22:25:55 1993 *************** *** 1,10 **** --- 1,13 ---- /* * xdm - display manager daemon * * $XConsortium: dm.h,v 1.51 91/09/19 16:28:35 keith Exp $ * + * Fixed for Motorola-SYSV && UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * Copyright 1988 Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that *************** *** 52,71 **** #define _POSIX_SOURCE # include #undef _POSIX_SOURCE #endif #endif ! #ifndef NGROUPS_MAX # include #ifdef NGROUPS #define NGROUPS_MAX NGROUPS #endif #endif #ifdef pegasus #undef dirty /* Some bozo put a macro called dirty in sys/param.h */ #endif /* pegasus */ #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE #include #else --- 55,83 ---- #define _POSIX_SOURCE # include #undef _POSIX_SOURCE #endif #endif ! #if !defined(NGROUPS_MAX) || NGROUPS_MAX == 0 ! #undef NGROUPS_MAX /* Avoid redefinition warnings when 0. */ # include #ifdef NGROUPS #define NGROUPS_MAX NGROUPS #endif #endif #ifdef pegasus #undef dirty /* Some bozo put a macro called dirty in sys/param.h */ #endif /* pegasus */ + + #if (defined(MOTOROLA) && defined(SYSV)) || defined(UTEKV) + #include + typedef unsigned long HOST; /* from , don't include it */ + #include + #include + #include + #endif /* (MOTOROLA && SYSV) || UTEKV */ #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE #include #else diff -r -C5 orig-src/mit/clients/xload/get_load.c src-xd88/mit/clients/xload/get_load.c *** orig-src/mit/clients/xload/get_load.c Thu Jul 25 14:21:17 1991 --- src-xd88/mit/clients/xload/get_load.c Tue Dec 21 22:25:56 1993 *************** *** 1,10 **** --- 1,13 ---- /* * get_load - get system load * * $XConsortium: get_load.c,v 1.26 91/07/25 14:20:25 rws Exp $ * + * Fixed for Motorola-SYSV && UTEKV && sysV68. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * Copyright 1989 Massachusetts Institute of Technology * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that *************** *** 42,52 **** #include #endif /* LOADSTUB */ #endif /* apollo */ #endif /* macII */ ! #if defined(MOTOROLA) && defined(SYSV) #include #endif #ifdef sun # include --- 45,55 ---- #include #endif /* LOADSTUB */ #endif /* apollo */ #endif /* macII */ ! #if (defined(MOTOROLA) && defined(SYSV)) || defined(UTEKV) #include #endif #ifdef sun # include *************** *** 367,376 **** --- 370,383 ---- #ifdef hcx #define KERNEL_FILE "/unix" #endif /* hcx */ + #ifdef UTEKV + #define KERNEL_FILE "/unix" + #endif /* UTEKV */ + #ifdef MOTOROLA #if defined(SYSV) && defined(m68k) #define KERNEL_FILE "/sysV68" #endif #if defined(SYSV) && defined(m88k) *************** *** 432,441 **** --- 439,452 ---- # ifdef AIXV3 # define KERNEL_LOAD_VARIABLE "sysinfo" # endif /* AIXV3 */ + # ifdef UTEKV + # define KERNEL_LOAD_VARIABLE "_sysinfo" + # endif /* UTEKV */ + # ifdef MOTOROLA # if defined(SYSV) && defined(m68k) # define KERNEL_LOAD_VARIABLE "sysinfo" # endif # if defined(SYSV) && defined(m88k) *************** *** 507,517 **** } for (i = 0; i < 2; i++) { nl[i].n_value = (int)nl[i].n_value - v.v_kvoffset; } #else /* not macII */ ! #if (!defined(SVR4) || !defined(__STDC__)) && !defined(sgi) && !defined(MOTOROLA) extern void nlist(); #endif #ifdef AIXV3 knlist( namelist, 1, sizeof(struct nlist)); --- 518,528 ---- } for (i = 0; i < 2; i++) { nl[i].n_value = (int)nl[i].n_value - v.v_kvoffset; } #else /* not macII */ ! #if (!defined(SVR4) || !defined(__STDC__)) && !defined(sgi) && !defined(MOTOROLA) && !defined(UTEKV) extern void nlist(); #endif #ifdef AIXV3 knlist( namelist, 1, sizeof(struct nlist)); *************** *** 522,532 **** * Some systems appear to set only one of these to Zero if the entry could * not be found, I hope no_one returns Zero as a good value, or bad things * will happen to you. (I have a hard time believing the value will * ever really be zero anyway). CDP 5/17/89. */ ! #ifdef hcx if (namelist[LOADAV].n_type == 0 && #else if (namelist[LOADAV].n_type == 0 || #endif /* hcx */ namelist[LOADAV].n_value == 0) { --- 533,543 ---- * Some systems appear to set only one of these to Zero if the entry could * not be found, I hope no_one returns Zero as a good value, or bad things * will happen to you. (I have a hard time believing the value will * ever really be zero anyway). CDP 5/17/89. */ ! #if defined(hcx) || (defined(SYSV) && defined(MOTOROLA)) if (namelist[LOADAV].n_type == 0 && #else if (namelist[LOADAV].n_type == 0 || #endif /* hcx */ namelist[LOADAV].n_value == 0) { *************** *** 611,624 **** sysinfo_last = sysinfo_now; } /* otherwise we leave load alone. */ } # else /* not AIXV3 */ ! # if defined(MOTOROLA) && defined(SYSV) { static int init = 0; - static kmem; static long loadavg_seek; static xload_error(); #define CEXP 0.25 /* Constant used for load averaging */ --- 622,634 ---- sysinfo_last = sysinfo_now; } /* otherwise we leave load alone. */ } # else /* not AIXV3 */ ! # if (defined(MOTOROLA) && defined(SYSV)) || defined(UTEKV) { static int init = 0; static long loadavg_seek; static xload_error(); #define CEXP 0.25 /* Constant used for load averaging */ *************** *** 634,650 **** { perror("xload: nlist()"); xload_error("cannot get name list from", KERNEL_FILE); } loadavg_seek = namelist[0].n_value; - - kmem = open(KMEM_FILE, O_RDONLY); - if (kmem < 0) - { - perror("xload: open()"); - xload_error("cannot open", KMEM_FILE); - } } lseek(kmem, loadavg_seek, 0); if (read(kmem, &sysinfod, (int) sizeof (struct sysinfo)) == -1) { --- 644,653 ---- *************** *** 678,688 **** *loadavg = (1.0 - cexp) * oldloadavg; } else { ! *loadavg = ((1.0 - cexp) * oldloadavg) ((rq / oc) * cexp); } oldloadavg = *loadavg; } # else /* not MOTOROLA */ # if defined(sony) && OSMAJORVERSION == 4 --- 681,691 ---- *loadavg = (1.0 - cexp) * oldloadavg; } else { ! *loadavg = ((1.0 - cexp) * oldloadavg) + ((rq / oc) * cexp); } oldloadavg = *loadavg; } # else /* not MOTOROLA */ # if defined(sony) && OSMAJORVERSION == 4 diff -r -C5 orig-src/mit/clients/xmh/miscfuncs.c src-xd88/mit/clients/xmh/miscfuncs.c *** orig-src/mit/clients/xmh/miscfuncs.c Sat Jul 13 17:53:01 1991 --- src-xd88/mit/clients/xmh/miscfuncs.c Tue Dec 21 22:25:56 1993 *************** *** 1,6 **** --- 1,10 ---- /* $XConsortium: miscfuncs.c,v 1.6 91/07/13 17:52:59 gildea Exp $ */ + /* + * Fixed for UTEKV && sysV68. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + */ #include #ifndef X_NOT_POSIX #include *************** *** 22,42 **** char *malloc(); char *realloc(); ! #if defined(SYSV) && (defined(SYSV386) || defined(MOTOROLA)) /* These systems don't have the ftruncate() system call, so we emulate it. * This emulation can only shorten, not lengthen. * For convenience, we pass in the name of the file, even though the * real ftruncate doesn't. */ #include #include #include #include #define CHUNKSIZE 1024 int ftruncate_emu(fd, length, name) --- 26,48 ---- char *malloc(); char *realloc(); ! #if defined(SYSV) && (defined(SYSV386) || defined(MOTOROLA) || defined(UTEKV)) /* These systems don't have the ftruncate() system call, so we emulate it. * This emulation can only shorten, not lengthen. * For convenience, we pass in the name of the file, even though the * real ftruncate doesn't. */ #include #include + #ifndef sysV68 /* is not protected vs. multiple inclusions. */ #include + #endif #include #define CHUNKSIZE 1024 int ftruncate_emu(fd, length, name) diff -r -C5 orig-src/mit/clients/xmh/tocutil.c src-xd88/mit/clients/xmh/tocutil.c *** orig-src/mit/clients/xmh/tocutil.c Wed Jul 31 01:10:36 1991 --- src-xd88/mit/clients/xmh/tocutil.c Tue Dec 21 22:32:18 1993 *************** *** 1,8 **** --- 1,10 ---- /* * $XConsortium: tocutil.c,v 2.57 91/07/31 01:10:23 keith Exp $ * + * Fixed for UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. * * COPYRIGHT 1987, 1989 * DIGITAL EQUIPMENT CORPORATION * MAYNARD, MASSACHUSETTS * ALL RIGHTS RESERVED. *************** *** 499,509 **** position += msg->length; } if (fid < 0 && toc->length != toc->origlength) fid = myopen(toc->scanfile, O_RDWR, 0666); if (fid >= 0) { ! #if defined(SYSV) && (defined(SYSV386) || defined(MOTOROLA)) (void) ftruncate_emu(fid, toc->length, toc->scanfile); #else (void) ftruncate(fid, toc->length); (void) myclose(fid); #endif --- 501,511 ---- position += msg->length; } if (fid < 0 && toc->length != toc->origlength) fid = myopen(toc->scanfile, O_RDWR, 0666); if (fid >= 0) { ! #if defined(SYSV) && (defined(SYSV386) || defined(MOTOROLA) || defined(UTEKV)) (void) ftruncate_emu(fid, toc->length, toc->scanfile); #else (void) ftruncate(fid, toc->length); (void) myclose(fid); #endif diff -r -C5 orig-src/mit/clients/xterm/main.c src-xd88/mit/clients/xterm/main.c *** orig-src/mit/clients/xterm/main.c Tue Dec 21 23:57:27 1993 --- src-xd88/mit/clients/xterm/main.c Tue Dec 21 22:48:08 1993 *************** *** 1,10 **** --- 1,13 ---- #ifndef lint static char *rid="$XConsortium: main.c,v 1.200.1.1 93/11/02 17:14:14 gildea Exp $"; #endif /* lint */ /* + * Fixed for Motorola-SYSV && UTEKV && sysV68. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * W A R N I N G * * If you think you know what all of this code is doing, you are * probably very mistaken. There be serious and nasty dragons here. * *************** *** 146,155 **** --- 149,168 ---- #include #endif /* hpux */ #ifdef sgi #include #endif /* sgi */ + #if defined(MOTOROLA) || defined(UTEKV) + extern char* ttyname(); + #ifndef X_NOT_POSIX /* Motorola sysV68 is not POSIX, sysV88 is POSIX. */ + #define USE_POSIX_WAIT + #endif /* !X_NOT_POSIX */ + #define USE_SYSV_UTMP + #ifndef UTEKV + #define HAS_UTMP_UT_HOST + #endif /* !UTEKV */ + #endif /* MOTOROLA || UTEKV*/ #endif /* SYSV */ #ifndef SYSV /* BSD systems */ #include #include diff -r -C5 orig-src/mit/config/Imake.tmpl src-xd88/mit/config/Imake.tmpl *** orig-src/mit/config/Imake.tmpl Tue Dec 21 23:47:37 1993 --- src-xd88/mit/config/Imake.tmpl Tue Dec 21 22:34:50 1993 *************** *** 1,7 **** --- 1,10 ---- /* * generic imake template + * + * Fixed for UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. */ #ifndef XCOMM #define XCOMM # #endif *************** *** 216,225 **** --- 219,234 ---- # endif # ifdef SVR4 # define MotoR4Architecture # endif #endif /* MOTOROLA */ + + #ifdef UTEKV + # define MacroIncludeFile + # define MacroFile xd88.cf + # define XD88Architecture + #endif /* UTEKV */ #ifdef SYSV386 # define MacroIncludeFile # define MacroFile x386.cf # ifdef SVR4 diff -r -C5 orig-src/mit/config/imakemdep.h src-xd88/mit/config/imakemdep.h *** orig-src/mit/config/imakemdep.h Sun Aug 25 15:39:59 1991 --- src-xd88/mit/config/imakemdep.h Tue Dec 21 22:36:02 1993 *************** *** 1,8 **** --- 1,11 ---- /* * $XConsortium: imakemdep.h,v 1.38 91/08/25 11:36:39 rws Exp $ * + * Fixed for Motorola-SYSV && UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * This file contains machine-dependent constants for the imake utility. * When porting imake, read each of the steps below and add in any necessary * definitions. Do *not* edit ccimake.c or imake.c! */ *************** *** 85,103 **** #ifdef apollo #define imake_ccflags "-DX_NOT_POSIX" #endif #else /* not CCIMAKE */ #ifndef MAKEDEPEND /* * Step 2: dup2 * If your OS doesn't have a dup2() system call to duplicate one file * descriptor onto another, define such a mechanism here (if you don't * already fall under the existing category(ies). */ ! #if defined(SYSV) && !defined(CRAY) && !defined(Mips) #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ fcntl(fd1, F_DUPFD, fd2))) #endif --- 88,110 ---- #ifdef apollo #define imake_ccflags "-DX_NOT_POSIX" #endif + #ifdef UTEKV + #define imake_ccflags "-DSYSV" + #endif + #else /* not CCIMAKE */ #ifndef MAKEDEPEND /* * Step 2: dup2 * If your OS doesn't have a dup2() system call to duplicate one file * descriptor onto another, define such a mechanism here (if you don't * already fall under the existing category(ies). */ ! #if defined(SYSV) && !defined(CRAY) && !defined(Mips) && !defined(UTEKV) && !defined(MOTOROLA) #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ fcntl(fd1, F_DUPFD, fd2))) #endif *************** *** 222,231 **** --- 229,241 ---- # endif # ifdef SVR4 "-DSVR4", # endif #endif /* MOTOROLA */ + #ifdef UTEKV + "-DUTEKV", /* Tektronix XD88 (UTekV) Systems */ + #endif /* UTEKV */ #ifdef SYSV386 /* System V/386 folks */ "-DSYSV386", # ifdef SVR4 "-DSVR4", # endif diff -r -C5 orig-src/mit/config/moto.cf src-xd88/mit/config/moto.cf *** orig-src/mit/config/moto.cf Thu Aug 15 12:06:44 1991 --- src-xd88/mit/config/moto.cf Tue Dec 21 22:37:01 1993 *************** *** 1,6 **** --- 1,10 ---- XCOMM platform: $XConsortium: moto.cf,v 1.10 91/08/15 12:05:30 rws Exp $ + /* + * Fixed for Motorola-SYSV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + */ #if defined(MotoR3Architecture) #define OSName Motorola R32V2/R3V6.2 #define OSMajorVersion 3 *************** *** 13,23 **** --- 17,33 ---- #define LnCmd ln -s #define HasSockets YES #define BuildServer NO #define MotifBC YES #define UseCCMakeDepend YES + + #if HasGcc + #define OptimizedCDebugFlags /* -O2 */ + #else #define OptimizedCDebugFlags /* -O */ + #endif + #define BuildPex HasGcc #define DefaultUserPath :/bin:/usr/bin:$(BINDIR) #define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR) #endif /* MotoR3Architecture */ diff -r -C5 orig-src/mit/demos/gpc/Imakefile src-xd88/mit/demos/gpc/Imakefile *** orig-src/mit/demos/gpc/Imakefile Wed Jan 5 15:05:30 1994 --- src-xd88/mit/demos/gpc/Imakefile Wed Jan 5 15:07:48 1994 *************** *** 1,5 **** --- 1,8 ---- XCOMM $XConsortium: Imakefile,v 1.15 91/08/22 14:26:28 rws Exp $ XCOMM + XCOMM Fixed for Motorola-SYSV && UTEKV. + XCOMM By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + XCOMM XCOMM Copyright 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium XCOMM XCOMM All Rights Reserved *************** *** 48,53 **** --- 51,64 ---- DEFINES = -DUSING_PHIGS ComplexProgramTarget(plbpex) + + # sysv3 yacc breaks/overflows on bifparse.y so use the supplied C & H files. + bifparse.y: bifparse.yacc + $(CP) -p bifparse.yacc bifparse.y + bifparse.c: bifparse.y + touch bifparse.c + bifparse.h: bifparse.y + touch bifparse.h bifparse:: $(CP) bifparse.yacc bifparse.y diff -r -C5 orig-src/mit/extensions/lib/PEX/archive/ar_ops.c src-xd88/mit/extensions/lib/PEX/archive/ar_ops.c *** orig-src/mit/extensions/lib/PEX/archive/ar_ops.c Tue Dec 21 23:55:32 1993 --- src-xd88/mit/extensions/lib/PEX/archive/ar_ops.c Tue Dec 21 22:38:19 1993 *************** *** 1,7 **** --- 1,11 ---- /* $XConsortium: ar_ops.c,v 5.6 91/12/11 16:04:27 hersh Exp $ */ + /* + * Fixed for Motorola-SYSV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + */ /*********************************************************** Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium. All Rights Reserved *************** *** 407,417 **** if (endar.opcode != PHG_AR_EOA) return(1); /* Remove the EOA element. This is written by pclosearfile. */ ! #if defined(UTEKV) || (defined(SYSV) && defined(SYSV386)) /* Losing machines running System V Release 3.2 don't define the function ftruncate(), although both BSD and System V Release 4 systems do. Thus we take a more twisted approach on such systems */ { --- 411,421 ---- if (endar.opcode != PHG_AR_EOA) return(1); /* Remove the EOA element. This is written by pclosearfile. */ ! #if defined(UTEKV) || (defined(SYSV) && (defined(SYSV386)||defined(MOTOROLA))) /* Losing machines running System V Release 3.2 don't define the function ftruncate(), although both BSD and System V Release 4 systems do. Thus we take a more twisted approach on such systems */ { *************** *** 443,453 **** return (1); /* Get the mode on the old file and set the new file to be of that mode */ fstat(fd, &stat_val); ! #ifdef UTEKV fchmod(new_fd, stat_val.st_mode); #else chmod(tmp_file, stat_val.st_mode); #endif --- 447,457 ---- return (1); /* Get the mode on the old file and set the new file to be of that mode */ fstat(fd, &stat_val); ! #if defined(UTEKV) || (defined(MOTOROLA) && defined(SYSV)) fchmod(new_fd, stat_val.st_mode); #else chmod(tmp_file, stat_val.st_mode); #endif diff -r -C5 orig-src/mit/extensions/lib/PEX/cp/cp_ccom.c src-xd88/mit/extensions/lib/PEX/cp/cp_ccom.c *** orig-src/mit/extensions/lib/PEX/cp/cp_ccom.c Tue Dec 21 23:55:43 1993 --- src-xd88/mit/extensions/lib/PEX/cp/cp_ccom.c Tue Dec 21 22:39:20 1993 *************** *** 1,7 **** --- 1,11 ---- /* $XConsortium: cp_ccom.c,v 5.19 92/08/10 20:46:50 eswu Exp $ */ + /* + * Fixed for Motorola-SYSV && UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + */ /*********************************************************** Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. and the X Consortium. All Rights Reserved *************** *** 1316,1326 **** #define DEBUG_PHIGSMON_SOCKET_COMMAND "/tmp/phigs_command" #define DEBUG_PHIGSMON_SOCKET_ERROR "/tmp/phigs_error" #include #endif ! #if defined(hpux) || defined(macII) #include #define socketpair _socketpair static int socketpair(domain, s_type, protocol, sv) int domain, s_type, protocol; int sv[2]; --- 1320,1330 ---- #define DEBUG_PHIGSMON_SOCKET_COMMAND "/tmp/phigs_command" #define DEBUG_PHIGSMON_SOCKET_ERROR "/tmp/phigs_error" #include #endif ! #if defined(hpux) || defined(macII) || defined(UTEKV) || (defined(SYSV) && defined(MOTOROLA)) #include #define socketpair _socketpair static int socketpair(domain, s_type, protocol, sv) int domain, s_type, protocol; int sv[2]; *************** *** 1484,1494 **** } else if ( dup2( spe[1], 1) < 0) { /* error channel */ perror("fork_monitor(dup2-2)"); _exit(0); } else { /* close fd's on exec, leave stderr open */ ! #if defined(hpux) || defined(SVR4) cnt = _NFILE - 1; #else cnt = getdtablesize() - 1; #endif /* hpux */ for ( ; cnt > 2; cnt--) --- 1488,1498 ---- } else if ( dup2( spe[1], 1) < 0) { /* error channel */ perror("fork_monitor(dup2-2)"); _exit(0); } else { /* close fd's on exec, leave stderr open */ ! #if defined(hpux) || defined(SVR4) || defined(UTEKV) || (defined(MOTOROLA) && defined(SYSV)) cnt = _NFILE - 1; #else cnt = getdtablesize() - 1; #endif /* hpux */ for ( ; cnt > 2; cnt--) diff -r -C5 orig-src/mit/fonts/lib/fs/FSConnServ.c src-xd88/mit/fonts/lib/fs/FSConnServ.c *** orig-src/mit/fonts/lib/fs/FSConnServ.c Tue Dec 21 23:47:22 1993 --- src-xd88/mit/fonts/lib/fs/FSConnServ.c Tue Dec 21 22:40:27 1993 *************** *** 1,7 **** --- 1,11 ---- /* $XConsortium: FSConnServ.c,v 1.14 91/09/09 18:55:13 rws Exp $ */ + /* + * Fixed for Motorola-SYSV && UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + */ /* @(#)FSConnServ.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation and the * Massachusetts Institute of Technology * *************** *** 42,52 **** --- 46,62 ---- #endif /* DNETCONN */ #ifndef hpux #ifndef apollo /* nest ifndefs because makedepend is broken */ + #ifndef UTEKV + #if ! (defined(MOTOROLA) && defined(SYSV)) + #include + + #endif /* not (SYSV && MOTOROLA) */ + #endif /* not UTEKV */ #endif #endif #define FamilyLocal (256) diff -r -C5 orig-src/mit/include/Xos.h src-xd88/mit/include/Xos.h *** orig-src/mit/include/Xos.h Sat Aug 17 17:37:02 1991 --- src-xd88/mit/include/Xos.h Tue Dec 21 22:42:08 1993 *************** *** 1,8 **** --- 1,11 ---- /* * $XConsortium: Xos.h,v 1.47 91/08/17 17:14:38 rws Exp $ * + * Fixed for UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * Copyright 1987 by the Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that *************** *** 112,122 **** #endif #include #ifdef CRAY #undef word #endif /* CRAY */ ! #if defined(USG) && !defined(CRAY) && !defined(MOTOROLA) struct timeval { long tv_sec; long tv_usec; }; #ifndef USL_SHARELIB --- 115,125 ---- #endif #include #ifdef CRAY #undef word #endif /* CRAY */ ! #if defined(USG) && !defined(CRAY) && !defined(MOTOROLA) && !defined(UTEKV) struct timeval { long tv_sec; long tv_usec; }; #ifndef USL_SHARELIB diff -r -C5 orig-src/mit/include/Xosdefs.h src-xd88/mit/include/Xosdefs.h *** orig-src/mit/include/Xosdefs.h Fri Jul 19 23:23:05 1991 --- src-xd88/mit/include/Xosdefs.h Tue Dec 21 22:43:30 1993 *************** *** 1,10 **** --- 1,13 ---- /* * O/S-dependent (mis)feature macro definitions * * $XConsortium: Xosdefs.h,v 1.7 91/07/19 23:22:19 rws Exp $ * + * Fixed for UTEKV && sysV68. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * Copyright 1991 Massachusetts Institute of Technology * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that *************** *** 87,95 **** #endif #ifdef MOTOROLA #ifdef SYSV #define X_NOT_STDC_ENV ! #endif ! #endif #endif /* _XOSDEFS_H_ */ --- 90,105 ---- #endif #ifdef MOTOROLA #ifdef SYSV #define X_NOT_STDC_ENV ! #ifdef m68k /* sysV68 is not POSIX, sysV88 is POSIX. */ ! #define X_NOT_POSIX ! #endif /* m68k */ ! #endif /* SYSV */ ! #endif /* MOTOROLA */ ! ! #if defined(UTEKV) || (defined(m88k) && defined(ghs)) || defined(sysV88) ! #define X_NOT_STDC_ENV ! #endif /* UTEKV || m88k-sysv3 GreenHillsSoftware cc || m88k-sysv3 gcc */ #endif /* _XOSDEFS_H_ */ diff -r -C5 orig-src/mit/lib/X/XConnDis.c src-xd88/mit/lib/X/XConnDis.c *** orig-src/mit/lib/X/XConnDis.c Tue Dec 21 23:52:17 1993 --- src-xd88/mit/lib/X/XConnDis.c Tue Dec 21 22:44:41 1993 *************** *** 1,8 **** --- 1,11 ---- /* * $XConsortium: XConnDis.c,v 11.88 91/12/17 17:55:57 rws Exp $ * + * Fixed for UTEKV. + * By Kaveh Ghazi (ghazi@noc.rutgers.edu) 8/24/93. + * * Copyright 1989 Massachusetts Institute of Technology * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that *************** *** 352,361 **** --- 355,367 ---- * 4.2bsd-based systems */ #include #ifdef hpux + #define NO_TCP_H + #endif + #ifdef UTEKV #define NO_TCP_H #endif #ifdef MOTOROLA #ifdef SYSV #define NO_TCP_H diff -r -c -N orig-src/mit/config/xd88.cf src-xd88/mit/config/xd88.cf *** orig-src/mit/config/xd88.cf Wed Dec 31 19:00:00 1969 --- src-xd88/mit/config/xd88.cf Tue Dec 21 13:42:00 1993 *************** *** 0 **** --- 1,30 ---- + /* + * Tektronix XD88 UTekV 3.2e X11R5 port by Kaveh Ghazi 8/24/93. + */ + #define OSName Tektronix XD88 UTekV 3.2e + #define OSMajorVersion 3 + #define OSMinorVersion 2 + XCOMM operating system: OSName + + #define SystemV YES + #define BootstrapCFlags -DUTEKV + #define StandardDefines -DSYSV -DUTEKV + #define Malloc0ReturnsNull YES + #define LnCmd ln -s + #define HasSockets YES + #define BuildServer NO /* The server still needs to be ported. */ + #define XdmServersType ws /* XD88 has an R4 Xserver (with -auth) */ + #define MotifBC YES + #define UseCCMakeDepend YES + + #if HasGcc + #define OptimizedCDebugFlags /* -O2 */ /* gcc-2.4.5 is available. */ + #else + #define OptimizedCDebugFlags /* -O */ /* You can use -O if you want. */ + #endif + + /* The bundled Green Hills cc bombs on PEX, but we can build it with gcc. */ + #define BuildPex HasGcc + + #define DefaultUserPath $(BINDIR):/bin:/usr/bin + #define DefaultSystemPath $(BINDIR):/etc:/usr/etc:/bin:/usr/bin