*** 6000.README.old Sat Jan 12 21:10:02 1991 --- 6000.README Sat Jan 12 22:56:59 1991 *************** *** 0 **** --- 1,116 ---- + This is a collection of patches to make X11R4 libraries compile and run + on the IBM RS-6000 under AIX 3.1. The libraries and clients are installed + under /usr/local, so they do not interfere with the operation of the normal + X11R3 clients. The official AIXwindows and this variant of X11R4 + libraries+clients can coexist. + + After installing, if you want to compile a client under these libraries, + type /usr/local/bin/X11/xmkmf in the client directory. (This presumes, of + course, that the client has an Imakefile. If not, you will have to figure + things out for yourself.) + + THERE ARE NO WARRANTIES OF ANY KIND ASSOCIATED WITH THIS PATCH. THE AUTHOR + MAKES NO CLAIMS REGARDING CORRECTNESS, MERCANTABILITY, OR FITNESS FOR A + PARTICULAR PURPOSE. + + I am happy to collect any changes you might make to get this to run better. + HOWEVER, LISTEN UP: This is not a supported patch. It is provided because + I happened to have made the clients work, and there are a lot of people + out there who seem to want X11R4 clients running on their RS-6000. + + Do not under any circumstances harass the author to fix a problem with this + patch. I am not an official X11 development person, and I provide this patch + out of sheer generosity and helpfulness. (You can notify me of problems, + but be polite.) + + On the other hand, if this has helped you out in some way, I would like to + know that: send e-mail. + + ____ + \ /Dan Greening IBM T.J.Watson Research Center NY (914) 784-7861 + \/ dgreen@cs.ucla.edu Yorktown Heights, NY 10598-0704 CA (213) 825-2266 + + + CHANGED FILES: + + config/ibm.cf Changed to include RsArchitecture definitions. + This has a hack (but a nice hack) to create + shared libraries. (Note these are not + SunOS shared libraries.) + + config/site.cf Site definitions which retain X11R3 in + the standard places, but puts X11R4 in + /usr/local. It also turns off BuildServer. + + config/Imake.tmpl Properly defines the RsArchitecture flag. + + config/imakemdep.h Changed to include definitions for _IBMR2. + The default cpp is set to + /usr/lpp/X11/Xamples/util/cpp/cpp in this + file, so change this if you have something + else. + + Imakefile Changed to correctly order the library make + procedure. (This allows shared libraries.) + + makeshared A new ksh shell file to create an IBM shared + library from a non-shared library. This is + really a hack, since makeshared contains all + the dependencies associated with the different + libraries. Instead, the dependencies should + be built into the Imakefiles for each library. + Hopefully this will happen with X11R5. + + lib/Xaw/Text.c Minor change line 1562 to get it to compile. + + lib/Xt/PassivGraI.h Minor change to avoid massive warning messages. + lib/Xt/SelectionI.h Minor change to avoid warning messages. + + lib/Xmu/Imakefile Change to set default BITMAPDIR to + $(INCDIR)/bitmaps. + + clients/Imakefile Changes to omit xinit from the compiled + clients (it doesn't work w/ R3 server). + + clients/xterm/main.c Reasonable sized changes for pty. + clients/xterm/resize.c Minor change. + + clients/bitmap/bitmap.c Minor changes around line 15. + + clients/xpr/pmp.h Minor change. + clients/xpr/x2pmp.h Minor change. + + clients/xload/get_load.c.old Added code for RS-6000 load computation. + + clients/xdm/dm.h Minor change. + + clients/twm/events.c Minor change line 1500. + + clients/twm/iconmgr.c Minor change. + + TO INSTALL: + + 1. Get X11R4 from your distribution site. Bring it up to fix level 18, + with patches supplied by the X consortium. + + 2. Patch it with these patches. + + cd mit; patch -p0 < rs6000.patch + + 3. Install X11R3 from Austin. The only thing you really need, though, is + + /usr/lpp/X11/Xamples/util/cpp/cpp + + 4. Build the system. + + cd mit + make World BOOTSTRAPCFLAGS='-D_IBMR2' 2>&1 | tee make.world + + The result will be all the libraries and a set of clients. The + libraries made by this construction will be in shared-library form. + + 5. Install everything. + + make install + + Might want to test the clients now, to make sure they work. *** Imakefile.old Sat Dec 23 18:20:27 1989 --- Imakefile Mon Jan 7 14:31:02 1991 *************** *** 1,5 **** #define IHaveSubdirs ! #define PassCDebugFlags WORLDOPTS = -k CHECKFNSRC = $(UTILSRC)/checkfn --- 1,5 ---- #define IHaveSubdirs ! #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' WORLDOPTS = -k CHECKFNSRC = $(UTILSRC)/checkfn *************** *** 16,22 **** #if BuildExamples EXAMPLESDIRS = examples #endif ! SUBDIRS = config include lib extensions $(SERVERDIRSTOMAKE) \ clients demos $(EXAMPLESDIRS) util doc LNINSTALLDIRS = $(EXTENSIONSRC) $(LIBSRC) --- 16,30 ---- #if BuildExamples EXAMPLESDIRS = examples #endif ! /**/# ! /**/# The order given below is necessary for IBM RS-6000 shared libraries to ! /**/# be built correctly. In particular, extensions must be built BEFORE ! /**/# Xmu and Xaw. ! /**/# ! SUBDIRS = config include \ ! lib/Xau lib/X lib/oldX lib/Xt extensions \ ! lib/Xmu lib/Xaw lib/Xdmcp \ ! $(SERVERDIRSTOMAKE) \ clients demos $(EXAMPLESDIRS) util doc LNINSTALLDIRS = $(EXTENSIONSRC) $(LIBSRC) *** makeshared.old Mon Jan 7 16:00:13 1991 --- makeshared Wed Jan 2 23:20:28 1991 *************** *** 0 **** --- 1,37 ---- + #!/bin/ksh -p + function convert { + file=$1 + shift + required=$* + echo Converting $file to a shared library. + set -x + dump -g $file\ + | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$/\1/p' \ + > $file.syms + ld -o $file.shared $file -H512 -T512 -bM:SRE -bE:$file.syms $required -lc -lm + chmod go=r,u=rw $file.shared + mv $file.shared $file + } + case $1 in + libXau.a | libXdmcp.a | libX11.a) + convert $1 + ;; + libXt.a | liboldX.a) + convert $1 ../X/libX11.a + ;; + libXext.a) + convert $1 ../../lib/Xt/libXt.a ../../lib/X/libX11.a + ;; + libXmu.a) + convert $1 ../../extensions/lib/libXext.a ../Xt/libXt.a ../X/libX11.a + ;; + libXaw.a) + convert $1 ../Xmu/libXmu.a ../../extensions/lib/libXext.a ../Xt/libXt.a \ + ../X/libX11.a + ;; + libXinput.a) + convert $1 ../libXext.a ../../../lib/X/libX11.a + ;; + *) + echo "WARNING: library $1 not recognized!" + esac *** clients/Imakefile.old Fri Dec 15 10:53:04 1989 --- clients/Imakefile Sat Jan 12 22:52:00 1991 *************** *** 9,20 **** --- 9,31 ---- #endif #endif + /* xinit is omitted from RS-6000 build (doesn't work with AIX R3 server). */ + + #ifdef RsArchitecture SUBDIRS = \ appres bitmap listres oclock twm xauth xbiff xcalc xclipboard xclock \ + xditview xdpyinfo xedit xfd xkill xload xlogo \ + xlsatoms xlsclients xlsfonts xlswins xmag xman xmh \ + xmodmap xpr xprop xrdb xrefresh xfontsel $(OTHERSUBDIRS) \ + xset xsetroot xstdcmap xterm xwd xwininfo xwud + #else + SUBDIRS = \ + appres bitmap listres oclock twm xauth xbiff xcalc xclipboard xclock \ xditview xdpyinfo xedit xfd xinit xkill xload xlogo \ xlsatoms xlsclients xlsfonts xlswins xmag xman xmh \ xmodmap xpr xprop xrdb xrefresh xfontsel $(OTHERSUBDIRS) \ xset xsetroot xstdcmap xterm xwd xwininfo xwud + #endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) *** config/Imake.tmpl.old Mon Dec 18 17:01:44 1989 --- config/Imake.tmpl Fri Dec 21 19:45:54 1990 *************** *** 155,160 **** --- 155,168 ---- #define ibm #endif + /* + * A convenience for people running on RS-6000's since they define + * _IBMR2, and for people running AIX. + */ + #if defined(_IBMR2) && !defined(ibm) + #define ibm + #endif + #if defined(aix) && !defined(ibm) #define ibm #endif *************** *** 176,181 **** --- 184,194 ---- #undef aix #define AIXArchitecture #endif + #ifdef _IBMR2 + #undef _IBMR2 + #define RsArchitecture + #endif + #endif /* ibm */ *** config/ibm.cf.old Sun Dec 17 18:05:49 1989 --- config/ibm.cf Tue Jan 8 11:27:45 1991 *************** *** 1,4 **** --- 1,8 ---- /* + * Configuration for RS-6000 courtesy Dan Greening + IBM T.J. Watson Research Center. + */ + /* * SET VERSION NUMBERS BEFORE MAKING MAKEFILES */ *************** *** 7,37 **** #define OSMajorVersion 2 /* RT AIX v2.2 */ #define OSMinorVersion 2 #else #define OSMajorVersion 1 /* PS/2 AIX v1.1 (same as rt v2.2) */ #define OSMinorVersion 1 ! #endif #else #define OSMajorVersion 4 /* AOS 4.3 (going away) */ #define OSMinorVersion 3 ! #endif #ifdef ATHENA #define ibmAthenaDefs -DATHENA #else #define ibmAthenaDefs /**/ ! #endif #ifdef AIXArchitecture #define SystemV YES #define OSName AIX - #define BootstrapCFlags -Daix #define HasNdbm NO #ifdef RtArchitecture #define OSDefines -DAIX -DAIXrt -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT #else #define OSDefines -DAIX -DAIX386 -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT #define LdCombineFlags -r /* PS/2 doesn't do ld -X */ ! #endif #define OPERATING_SYSTEM AIX /* directory name under server/ddx/ibm/ */ #ifdef USE_PCC --- 11,54 ---- #define OSMajorVersion 2 /* RT AIX v2.2 */ #define OSMinorVersion 2 #else + #ifdef RsArchitecture + #define OSMajorVersion 3 /* RS-6000 AIX 3.1 */ + #define OSMinorVersion 1 + #else #define OSMajorVersion 1 /* PS/2 AIX v1.1 (same as rt v2.2) */ #define OSMinorVersion 1 ! #endif /* RsArchitecture */ ! #endif /* RtArchitecture */ #else #define OSMajorVersion 4 /* AOS 4.3 (going away) */ #define OSMinorVersion 3 ! #endif /* AIXArchitecture */ #ifdef ATHENA #define ibmAthenaDefs -DATHENA #else #define ibmAthenaDefs /**/ ! #endif /* ATHENA */ #ifdef AIXArchitecture #define SystemV YES #define OSName AIX #define HasNdbm NO #ifdef RtArchitecture + #define BootstrapCFlags -Daix #define OSDefines -DAIX -DAIXrt -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT #else + #ifdef RsArchitecture + #define BootstrapCFlags -D_IBMR2 + /* NOTE: This presumes you have the X11R3 cpp installed. */ + #define OSDefines -DAIX -DAIXrs -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT + #define LdCombineFlags -r /* RS-6000 doesn't do ld -X */ + #else + #define BootstrapCFlags -Daix #define OSDefines -DAIX -DAIX386 -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT #define LdCombineFlags -r /* PS/2 doesn't do ld -X */ ! #endif /* RsArchitecture */ ! #endif /* RtArchitecture */ #define OPERATING_SYSTEM AIX /* directory name under server/ddx/ibm/ */ #ifdef USE_PCC *************** *** 42,50 **** #define CcCmd cc -Nd4000 -Nn3000 -DBSD_INCLUDES #define ibmosdefs -DSYSV -Nd4000 -Nn3000 #else #define CcCmd cc -DBSD_INCLUDES -D_BSD #define ibmosdefs -DSYSV ! #endif #define ibmlibdefs -Hcpp #endif /* USE_PCC */ --- 59,72 ---- #define CcCmd cc -Nd4000 -Nn3000 -DBSD_INCLUDES #define ibmosdefs -DSYSV -Nd4000 -Nn3000 #else + #ifdef RsArchitecture #define CcCmd cc -DBSD_INCLUDES -D_BSD + #define ibmosdefs -DSYSV -DMALLOC_0_RETURNS_NULL -D_IBMR2 -DAIXV3 + #else + #define CcCmd cc -DBSD_INCLUDES -D_BSD #define ibmosdefs -DSYSV ! #endif /* RsArchitecture */ ! #endif /* RtArchitecture */ #define ibmlibdefs -Hcpp #endif /* USE_PCC */ *************** *** 59,65 **** --- 81,92 ---- #define BootstrapCFlags -Dibm #endif /* AIXArchitecture */ + #ifdef RsArchitecture + #define HasVoidSignalReturn YES + #define TermcapLibrary -lcurses + #else #define HasVoidSignalReturn NO + #endif #ifdef RtArchitecture /* *************** *** 78,83 **** --- 105,132 ---- #define ibmIncludeGEN NO #endif /* RtArchitecture */ + #ifdef RsArchitecture + /* + * These define the screens the server will allow + * affected: .../server/ddx/ibm/Makefile + * .../server/ddx/ibm/common/Makefile + * Also, be sure to remove .../server/ddx/ibm/common/ibmscreen.o + */ + #define ibmInclude8514 NO /* YES */ + #define ibmIncludeAED NO + #define ibmIncludeAPA16 NO + #define ibmIncludeAPA8c NO + #define ibmIncludeEGA NO /* YES */ + #define ibmIncludeMPEL NO + #define ibmIncludeVGA NO /* YES */ + #define ibmIncludeGEN NO + #define ibmIncludeSKYWAY YES + #define ibmIncludeCFBLANNO NO + #define ibmIncludeMFBLANNO NO + #define ibmIncludeGAI NO + #define ibmIncludePED NO + #endif /* RsArchitecture */ + #ifdef PS2Architecture /* #define AsCmd /bin.386/i386as *************** *** 212,214 **** --- 261,299 ---- /**/# platform: $XConsortium: ibm.cf,v 1.15 89/12/13 15:27:50 keith Exp $ /**/# operating system: OSName + #if defined(RsArchitecture) && !defined(UseInstalled) + #define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut *.syms + /* + * NormalLibraryObjectRule - generate make rules to build "normal" + * objects. NOTE: These objects are marked "shared". + + */ + #define NormalLibraryObjectRule() @@\ + .c.o: @@\ + $(RM) $@ @@\ + $(CC) -c $(CFLAGS) -bM\:SRE $*.c + /* + * NormalLibraryTarget - generate rules to create a library. + */ + #define NormalLibraryTarget(libname,objlist) @@\ + AllTarget(lib/**/libname.a) @@\ + @@\ + lib/**/libname.a: objlist @@\ + $(RM) $@ @@\ + $(AR) $@ objlist @@\ + $(RANLIB) $@ @@\ + /bin/ksh $(TOP)/makeshared $@ + /* + * NormalLibraryTarget2 - generate rules to create a library in two steps. + * This is used to create libraries with large numbers of files. + */ + #define NormalLibraryTarget2(libname,objlist1,objlist2) @@\ + AllTarget(lib/**/libname.a) @@\ + @@\ + lib/**/libname.a: objlist1 objlist2 @@\ + $(RM) $@ @@\ + $(AR) $@ objlist1 @@\ + $(AR) $@ objlist2 @@\ + $(RANLIB) $@ @@\ + /bin/ksh $(TOP)/makeshared $@ + #endif *** config/imakemdep.h.old Mon Dec 18 16:56:39 1989 --- config/imakemdep.h Sat Dec 22 14:03:52 1990 *************** *** 33,41 **** --- 33,45 ---- #define imake_ccflags "-DSYSV -DUSG" #endif + #ifdef _IBMR2 + #define imake_ccflags "-Daix -DSYSV -D_IBMR2" + #else #ifdef aix #define imake_ccflags "-Daix -DSYSV" #endif + #endif #ifdef umips #ifdef SYSTYPE_SYSV *************** *** 79,85 **** #ifdef apollo #define DEFAULT_CPP "/usr/lib/cpp" #endif ! /* * Step 5: cpp_argv --- 83,91 ---- #ifdef apollo #define DEFAULT_CPP "/usr/lib/cpp" #endif ! #if defined(_IBMR2) && !defined(DEFAULT_CPP) ! #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp" ! #endif /* * Step 5: cpp_argv *************** *** 116,121 **** --- 122,133 ---- #endif #ifdef att "-Datt", /* AT&T products */ + #endif + #ifdef _IBMR2 + "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */ + #ifndef aix + #define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */ + #endif #endif #ifdef aix "-Daix", /* AIX instead of AOS */ *** config/site.def.old Sun Dec 17 18:06:24 1989 --- config/site.def Sat Jan 12 21:38:47 1991 *************** *** 127,138 **** #endif #endif ! /* ! * Make sure that the library has compatibility stuff built into it, for wno ! */ #ifndef BuildXawBC #define BuildXawBC YES /* headers can be installed later */ #endif #ifndef CompatibilityFlags #if InstallOldHeaderFiles #define CompatibilityFlags -DXAW_BC --- 127,172 ---- #endif #endif ! #ifndef SharedLibXext ! #define SharedLibXext NO /* XXX - haven't made it sharable yet */ ! #endif ! ! /* Dan Greening / IBM T.J. Watson Research Center Configuration. ! This setup preserves the location of X11R3. ! It installs everything under /usr/local, in the expected places. ! /usr/local/lib/X11, /usr/local/bin/X11, /usr/local/lib/libX*.a, ! /usr/local/man/man1, /usr/local/include/X11. ! ! You can change this section appropriately for your requirements. ! */ ! ! #define DestDir ! #define UsrLibDir /usr/local/lib ! #define IncRoot /usr/local/include ! #ifdef UseInstalled ! #define StandardIncludes -I/usr/local/include ! #endif ! #define ManDirectoryRoot /usr/local/man ! #define ManSuffix 1 ! #define BinDir /usr/local/bin/X11 ! #define LoaderLibPrefix -L/usr/local/lib ! ! /* This gets install and cpp from their generic places. You may have these ! somewhere else. */ ! ! #define InstallCmd /usr/ucb/install ! #define StripInstalledPrograms YES ! #define CppCmd /usr/lpp/X11/Xamples/util/cpp/cpp -Dibm -D_IBMR2 -DAIXV3 ! ! /* No publically available X11R4 server currently exists. */ ! ! #define BuildServer NO ! #ifndef BuildXawBC #define BuildXawBC YES /* headers can be installed later */ #endif + + #define OptimizedCDebugFlags -O -Q #ifndef CompatibilityFlags #if InstallOldHeaderFiles #define CompatibilityFlags -DXAW_BC *************** *** 141,146 **** #endif #endif - #ifndef SharedLibXext - #define SharedLibXext NO /* XXX - haven't made it sharable yet */ - #endif --- 175,177 ---- *** clients/bitmap/bitmap.c.old Tue Dec 12 12:03:40 1989 --- clients/bitmap/bitmap.c Fri Dec 21 23:38:49 1990 *************** *** 12,17 **** --- 12,18 ---- #include #include #include + #include #include #include *************** *** 160,166 **** --- 161,169 ---- enum RepaintGridType {e_AgainstBackground, e_AgainstForeground, e_Invert}; + #ifndef _IBMR2 extern char *malloc(); + #endif static char *yes_answers[] = { "y", "yes", "on", "all", "true", NULL }; static char *no_answers[] = { "n", "no", "off", "none", "false", NULL }; *************** *** 1533,1539 **** RepaintRasterInverted(); } - #include void Circle(filled) { --- 1536,1541 ---- *** clients/twm/events.c.old Fri Dec 21 18:14:01 1990 --- clients/twm/events.c Fri Dec 21 23:34:50 1990 *************** *** 1497,1503 **** ActiveItem->func == F_FORCEMOVE) ButtonPressed = -1; ExecuteFunction(ActiveItem->func, ActiveItem->action, ! ButtonWindow ? ButtonWindow->frame : NULL, ButtonWindow, &ButtonEvent, Context, TRUE); Context = C_NO_CONTEXT; ButtonWindow = NULL; --- 1497,1503 ---- ActiveItem->func == F_FORCEMOVE) ButtonPressed = -1; ExecuteFunction(ActiveItem->func, ActiveItem->action, ! ButtonWindow ? (void*)ButtonWindow->frame : NULL, ButtonWindow, &ButtonEvent, Context, TRUE); Context = C_NO_CONTEXT; ButtonWindow = NULL; *** clients/twm/iconmgr.c.old Fri Dec 21 18:14:03 1990 --- clients/twm/iconmgr.c Sat Jan 12 21:55:26 1991 *************** *** 40,46 **** --- 40,48 ---- #include #include + #ifndef _IBMR2 int strcmp(); + #endif int iconmgr_textx = siconify_width+11; WList *Active = NULL; *** clients/xdm/dm.h.old Fri Dec 15 20:12:25 1989 --- clients/xdm/dm.h Fri Dec 21 23:49:58 1990 *************** *** 215,221 **** --- 215,223 ---- # define CLOSE_ALWAYS 0 # define LEAVE_FOR_DISPLAY 1 + #ifndef _IBMR2 extern char *malloc (), *realloc (), *strcpy (); + #endif #ifdef SIGNALRETURNSINT #define SIGVAL int *** clients/xload/get_load.c.old Thu Dec 14 09:46:20 1989 --- clients/xload/get_load.c Sun Jan 6 22:52:45 1991 *************** *** 19,24 **** --- 19,25 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Authors: Many and varied... + * This IBM RS-6000 version by Dan Greening and William Moran 1990 */ #include *************** *** 73,79 **** #include #endif ! #ifdef CRAY #include #include #undef n_type --- 74,80 ---- #include #endif ! #if defined(CRAY) || defined(AIXV3) #include #include #undef n_type *************** *** 277,283 **** * provide default for everyone else */ ! # ifdef USG # define KERNEL_LOAD_VARIABLE "sysinfo" # define SYSINFO # else --- 278,284 ---- * provide default for everyone else */ ! # if defined(USG) || defined(AIXV3) # define KERNEL_LOAD_VARIABLE "sysinfo" # define SYSINFO # else *************** *** 340,348 **** } #else /* not macII */ extern void nlist(); ! if(!init) { nlist( KERNEL_FILE, namelist); /* * 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 --- 341,353 ---- } #else /* not macII */ extern void nlist(); ! if(!init) { + #ifdef AIXV3 + knlist( namelist, 1, sizeof(struct nlist)); + #else nlist( KERNEL_FILE, namelist); + #endif /* * 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 *************** *** 391,398 **** (void) read(kmem, (char *)&temp, sizeof(fix)); *loadavg = FIX_TO_DBL(temp); } ! # else /* not mips */ (void) read(kmem, (char *)loadavg, sizeof(double)); # endif /* mips */ # endif /* macII */ #endif /* sun */ --- 396,436 ---- (void) read(kmem, (char *)&temp, sizeof(fix)); *loadavg = FIX_TO_DBL(temp); } ! # else ! # ifdef AIXV3 ! { ! struct sysinfo sysinfo_now; ! static struct sysinfo sysinfo_last; ! static firsttime = TRUE; ! static double runavg = 0.0, swpavg = 0.0; ! ! (void) read(kmem, (char *)&sysinfo_last, sizeof(struct sysinfo)); ! sleep(1); ! (void) lseek(kmem, loadavg_seek, 0); ! (void) read(kmem, (char *)&sysinfo_now, sizeof(struct sysinfo)); ! if (firsttime) ! { ! *loadavg = 0.0; ! sysinfo_last = sysinfo_now; ! firsttime = FALSE; ! } ! else ! { ! runavg *= 0.8; swpavg *= 0.8; ! if (sysinfo_now.runocc != sysinfo_last.runocc) ! runavg += 0.2*((sysinfo_now.runque - sysinfo_last.runque - 1) ! /(double)(sysinfo_now.runocc - sysinfo_last.runocc)); ! if (sysinfo_now.swpocc != sysinfo_last.swpocc) ! swpavg += 0.2*((sysinfo_now.swpque - sysinfo_last.swpque) ! /(double)(sysinfo_now.swpocc - sysinfo_last.swpocc)); ! *loadavg = runavg + swpavg; ! sysinfo_last = sysinfo_now; ! } ! /* otherwise we leave load alone. */ ! } ! # else /* not AIXV3 */ (void) read(kmem, (char *)loadavg, sizeof(double)); + # endif /* AIXV3 */ # endif /* mips */ # endif /* macII */ #endif /* sun */ *** clients/xpr/pmp.h.old Tue Sep 6 17:20:27 1988 --- clients/xpr/pmp.h Fri Dec 21 23:47:06 1990 *************** *** 65,70 **** /* int long3sgn(long) */ #define long3sgn(l) (((l) > 0x800000 - 1)? (l) - 0x1000000 : (l)) ! typedef enum _bool {FALSE, TRUE} bool; #define toggle_(b) b = (b == TRUE)? FALSE: TRUE --- 65,70 ---- /* int long3sgn(long) */ #define long3sgn(l) (((l) > 0x800000 - 1)? (l) - 0x1000000 : (l)) ! typedef unsigned char bool; #define toggle_(b) b = (b == TRUE)? FALSE: TRUE *** clients/xpr/x2pmp.c.old Sun Oct 8 12:23:17 1989 --- clients/xpr/x2pmp.c Fri Dec 21 23:48:18 1990 *************** *** 34,40 **** --- 34,42 ---- #define min_(a, b) (a) < (b) ? (a) : (b) #define abs_(a) (a) < 0 ? -(a) : (a) + #ifndef _IBMR2 extern char *calloc(); + #endif static void leave(); static bits_set(); static unsigned char *magnification_table(); *** clients/xterm/main.c.old Fri Dec 21 18:13:32 1990 --- clients/xterm/main.c Sat Dec 22 00:08:01 1990 *************** *** 79,84 **** --- 79,89 ---- #define HAS_UTMP_UT_HOST #define HAS_BSD_GROUPS #endif + #ifdef _IBMR2 + #define HAS_UTMP_UT_HOST + #define HAS_BSD_GROUPS + #define USE_SYSV_UTMP + #endif #ifdef macII #define HAS_UTMP_UT_HOST #define HAS_BSD_GROUPS *************** *** 926,931 **** --- 931,951 ---- /* got one! */ return(0); #else /* not (umips && SYSTYPE_SYSV) */ + #ifdef _IBMR2 + struct stat fstat_buf; + char *name; + int temptty; + + *pty = open ("/dev/ptc", O_RDWR); + if ((*pty < 0) || ((name = ttyname(*pty)) == NULL)) { + return(1); + } + strcpy( ttydev, name ); + strcpy( ptydev, name ); + ptydev[7] = 'c'; + ttydev[7] = 's'; + return(0); + #else #ifdef CRAY for (; devindex < 256; devindex++) { sprintf (ttydev, "/dev/ttyp%03d", devindex); *************** *** 960,965 **** --- 980,986 ---- (void) letter++; } #endif /* CRAY else not CRAY */ + #endif /* _IBMR2 else not _IBMR2 /* We were unable to allocate a pty master! Return an error * condition and let our caller terminate cleanly. */ *************** *** 1438,1443 **** --- 1459,1468 ---- (void) setpgrp(); #endif /* USE_SYSV_PGRP */ while (1) { + #ifdef _IBMR2 + setsid(); + #endif + #ifdef TIOCNOTTY if ((tty = open ("/dev/tty", 2)) >= 0) { ioctl (tty, TIOCNOTTY, (char *) NULL); *************** *** 1938,1943 **** --- 1963,1982 ---- /* fix pts sh hanging around */ signal (SIGHUP, SIG_DFL); #endif + #ifdef _IBMR2 + /* The AIX 3.1 "rsh" command turns off INTR in sigmask. We + must turn it back on. No you cannot solve this by calling + signal(SIGINT,SIG_DFL). Tried. + -- Dan Greening dgreen@ibm.com */ + { + extern int sigprocmask(); + int mask; + sigset_t set, oset; + + sigemptyset(&set); + sigprocmask(SIG_SETMASK,&set,&oset); + } + #endif /* _IBMR2 */ #ifdef UTMP if(((ptr = getenv("SHELL")) == NULL || *ptr == 0) && *** clients/xterm/resize.c.old Sat Dec 9 17:24:15 1989 --- clients/xterm/resize.c Sat Dec 22 00:08:01 1990 *************** *** 48,53 **** --- 48,57 ---- #define CANT_OPEN_DEV_TTY #endif + #ifdef _IBMR2 + #define CANT_OPEN_DEV_TTY + #endif + #ifdef macII #define USE_SYSV_TERMIO #undef SYSV /* pretend to be bsd */ *** lib/Xaw/Text.c.old Fri Dec 15 12:11:20 1989 --- lib/Xaw/Text.c Fri Dec 21 22:07:25 1990 *************** *** 1559,1565 **** ctx->text.s.right = right; SrcSetSelection(ctx->text.source, left, right, ! (count == 0) ? NULL : selections[0]); if (left < right) { Widget w = (Widget) ctx; --- 1559,1565 ---- ctx->text.s.right = right; SrcSetSelection(ctx->text.source, left, right, ! (count == 0) ? NULL : (void*)selections[0]); if (left < right) { Widget w = (Widget) ctx; *** lib/Xmu/Imakefile.old Tue Dec 12 18:43:10 1989 --- lib/Xmu/Imakefile Thu Jan 3 15:32:28 1991 *************** *** 11,17 **** #ifdef OsNameDefines OS_NAME_DEFINES = OsNameDefines #endif ! CSSDEFS = $(OS_NAME_DEFINES) ConnectionFlags HEADERS = \ Xmu.h \ --- 11,18 ---- #ifdef OsNameDefines OS_NAME_DEFINES = OsNameDefines #endif ! BMDDEFS = -DBITMAPDIR=\"$(INCDIR)/bitmaps\" ! CSSDEFS = $(OS_NAME_DEFINES) $(BITMAPDIR_DEFINES) ConnectionFlags HEADERS = \ Xmu.h \ *************** *** 122,135 **** --- 123,145 ---- # if DebugLibXmu SharedAndDebuggedLibraryObjectRule() SpecialSharedAndDebuggedObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) + SpecialSharedAndDebuggedObjectRule(LocBitmap.o,/**/,$(BMDDEFS)) + SpecialSharedAndDebuggedObjectRule(StrToBmap.o,/**/,$(BMDDEFS)) + SpecialSharedAndDebuggedObjectRule(StrToCurs.o,/**/,$(BMDDEFS)) # else SharedLibraryObjectRule() SpecialSharedObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) + SpecialSharedObjectRule(LocBitmap.o,/**/,$(BMDDEFS)) + SpecialSharedObjectRule(StrToBmap.o,/**/,$(BMDDEFS)) + SpecialSharedObjectRule(StrToCurs.o,/**/,$(BMDDEFS)) # endif #else # if DebugLibXmu && ProfileLibXmu DebuggedAndProfiledLibraryObjectRule() SpecialDebuggedAndProfiledObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) + SpecialDebuggedAndProfiledObjectRule(LocBitmap.o,/**/,$(BMDDEFS)) + SpecialDebuggedAndProfiledObjectRule(StrToBmap.o,/**/,$(BMDDEFS)) + SpecialDebuggedAndProfiledObjectRule(StrToCurs.o,/**/,$(BMDDEFS)) # else # if DebugLibXmu DebuggedLibraryObjectRule() *************** *** 138,146 **** --- 148,162 ---- # if ProfileLibXmu ProfiledLibraryObjectRule() SpecialProfiledObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) + SpecialProfiledObjectRule(LocBitmap.o,/**/,$(BMDDEFS)) + SpecialProfiledObjectRule(StrToBmap.o,/**/,$(BMDDEFS)) + SpecialProfiledObjectRule(StrToCurs.o,/**/,$(BMDDEFS)) # else NormalLibraryObjectRule() SpecialObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) + SpecialObjectRule(LocBitmap.o,/**/,$(BMDDEFS)) + SpecialObjectRule(StrToBmap.o,/**/,$(BMDDEFS)) + SpecialObjectRule(StrToCurs.o,/**/,$(BMDDEFS)) # endif # endif # endif *** lib/Xt/PassivGraI.h.old Fri Dec 21 18:15:13 1990 --- lib/Xt/PassivGraI.h Sat Dec 22 01:48:48 1990 *************** *** 80,89 **** Widget focusKid; XtServerGrabPtr keyList, ptrList; Widget queryEventDescendant; ! Boolean map_handler_added:1; ! Boolean realize_handler_added:1; ! Boolean active_handler_added:1; ! Boolean haveFocus:1; XtGeneology focalPoint; }XtPerWidgetInputRec, *XtPerWidgetInput; --- 80,89 ---- Widget focusKid; XtServerGrabPtr keyList, ptrList; Widget queryEventDescendant; ! unsigned map_handler_added:1; ! unsigned realize_handler_added:1; ! unsigned active_handler_added:1; ! unsigned haveFocus:1; XtGeneology focalPoint; }XtPerWidgetInputRec, *XtPerWidgetInput; *** lib/Xt/SelectionI.h.old Fri Dec 21 18:15:14 1990 --- lib/Xt/SelectionI.h Sat Dec 22 11:04:41 1990 *************** *** 76,84 **** PropList prop_list; Request req; /* state for local non-incr xfer */ int ref_count; /* of active transfers */ ! Boolean incremental:1; ! Boolean free_when_done:1; ! Boolean was_disowned:1; } SelectRec; typedef struct { --- 76,84 ---- PropList prop_list; Request req; /* state for local non-incr xfer */ int ref_count; /* of active transfers */ ! unsigned incremental:1; ! unsigned free_when_done:1; ! unsigned was_disowned:1; } SelectRec; typedef struct { *** server/include/os.h.old Wed Dec 6 16:41:39 1989 --- server/include/os.h Fri Dec 21 22:25:06 1990 *************** *** 105,111 **** int ReadRequestFromClient(); char *strcat(); char *strncat(); - char *strcpy(); char *strncpy(); Bool CloseDownConnection(); FontPathPtr GetFontPath(); --- 105,110 ----