brazos.is.rice.edu:/pub/aix_rt/X11R5.src/AIX_R5_Patch

Following is a set of patches that will go a long way towards getting
X11R5 to compile on AIX/RT 2.2.1.  These patches are to be used in 
conjunction with the tar file AIX_ibm.tar.Z that can be found in the
directory brazos.is.rice.edu:/pub/aix_rt/X11R5.src/AIX_ibm.tar.Z.
This tar file is a modified version of John Carr's RT/AOS server code 
developed at mit.

To apply the patches and perform a build, I would suggest the following:

	1) Unpack the mit distribution
	2) Patch the mit distribution up to patch level 10
	3) Apply this patch file
		% cd mit; patch < AIX_R5_Patch
	4) Unpack the server/ddx/ibm subtree with the command:
		% mv server/ddx/{ibm,ibm.orig}
		% zcat AIX_ibm.tar.Z | tar xf -
	5) Start the first shot of the make:
		% \rm -rf X11
		% make World >&! make.world &
	6) When that finishes, make the server alone:
		% cd server/ddx/ibm
		% make
	7) From here, there will be lots of stuff that probably didn't 
		compile.  However, you can get much of it to compile with
		a little perseverance and flipping the "-DSVR4" preprocessor
		switch as necessary.

Good luck !!!

Michael Brantley

Currently (Until May 15, 1992)          Soon to be (Beginning June 8, 1992)
--------------------------------------- ---------------------------------------
O.N.C.S.                                Department of Computer Science
Rice University, Houston Texas          Princeton University, Princeton, NJ
(brantley@rice.edu)                     (brantley@princeton.edu)


*** /mnt/./clients/xterm/Imakefile	Mon Apr 13 16:48:48 1992
--- ./clients/xterm/Imakefile	Wed Apr 15 14:01:50 1992
***************
*** 45,51 ****
  
  #ifndef TermcapLibrary
  #if SystemV && !defined(MacIIArchitecture)
! #if defined(CrayArchitecture) || defined(HPArchitecture) || defined(RsArchitecture)
  #define TermcapLibrary -lcurses		/* special cases of System V */
  #else
  #define TermcapLibrary -ltermlib	/* usually in here */
--- 45,51 ----
  
  #ifndef TermcapLibrary
  #if SystemV && !defined(MacIIArchitecture)
! #if defined(CrayArchitecture) || defined(HPArchitecture) || defined(RsArchitecture) || defined(AIXArchitecture)
  #define TermcapLibrary -lcurses		/* special cases of System V */
  #else
  #define TermcapLibrary -ltermlib	/* usually in here */
*** /mnt/./extensions/server/PEX/ddpex/mi/level2/miConvert.c	Sun May  5 17:50:39 1991
--- ./extensions/server/PEX/ddpex/mi/level2/miConvert.c	Mon Apr 13 16:49:35 1992
***************
*** 225,231 ****
      convert = ColourConversionRoutine[cinput->colourType*rdrColourModel];
  
      /* convert is 1 if input and output color model are the same */
!     if (convert == NoChange) {
        /* no conversion necessary */
        *coutput = *cinput;
        return Success;
--- 225,231 ----
      convert = ColourConversionRoutine[cinput->colourType*rdrColourModel];
  
      /* convert is 1 if input and output color model are the same */
!     if (convert == (ColorConversionTableType) NoChange) {
        /* no conversion necessary */
        *coutput = *cinput;
        return Success;
***************
*** 317,323 ****
      convert = ColourConversionRoutine[input_color*rdrColourModel];
  
      /* convert is 1 if input and output color model are the same */
!     if (convert == NoChange) {
        /* no conversion necessary */
        *voutput = vinput;
        return Success;
--- 317,323 ----
      convert = ColourConversionRoutine[input_color*rdrColourModel];
  
      /* convert is 1 if input and output color model are the same */
!     if (convert == (ColorConversionTableType) NoChange) {
        /* no conversion necessary */
        *voutput = vinput;
        return Success;
***************
*** 485,491 ****
      convert = ColourConversionRoutine[input_color*rdrColourModel];
  
      /* convert is 1 if input and output color model are the same */
!     if (convert == NoChange) {
        /* no conversion necessary */
        *foutput = finput;
        return Success;
--- 485,491 ----
      convert = ColourConversionRoutine[input_color*rdrColourModel];
  
      /* convert is 1 if input and output color model are the same */
!     if (convert == (ColorConversionTableType) NoChange) {
        /* no conversion necessary */
        *foutput = finput;
        return Success;
*** /mnt/./extensions/server/PEX/ddpex/mi/shared/miMisc.c	Wed Jul 10 08:09:09 1991
--- ./extensions/server/PEX/ddpex/mi/shared/miMisc.c	Mon Apr 13 16:49:36 1992
***************
*** 89,94 ****
--- 89,99 ----
  static ddULONG	intImpDeps[MI_MAXDRAWABLES][SI_NUM_INT_IMPS + 1] = {
  	0,		/* dummy */
  	SI_DITHERING_SUPPORTED,
+ #ifdef AIXrt
+ #define	SI_MAX_EDGE_WIDTH ((unsigned long) 0xFFFFFFFF) /*~((unsigned long)0)*/
+ #define	SI_MAX_LINE_WIDTH ((unsigned long) 0xFFFFFFFF) /*~((unsigned long)0)*/
+ #define	SI_MAX_MARKER_SIZE ((unsigned long) 0xFFFFFFFF) /*~((unsigned long)0)*/
+ #endif
  	SI_MAX_EDGE_WIDTH,
  	SI_MAX_LINE_WIDTH,
  	SI_MAX_MARKER_SIZE,
***************
*** 103,108 ****
--- 108,118 ----
  	SI_NOM_EDGE_WIDTH,
  	SI_NOM_LINE_WIDTH,
  	SI_NOM_MARKER_SIZE,
+ #ifdef AIXrt
+ #define	SI_SUPP_EDGE_WIDTHS ((unsigned long) 0xFFFFFFFF) /*~((unsigned long)0)*/
+ #define	SI_SUPP_LINE_WIDTHS ((unsigned long) 0xFFFFFFFF) /*~((unsigned long)0)*/
+ #define	SI_SUPP_MARKER_SIZES ((unsigned long)0xFFFFFFFF) /*~((unsigned long)0)*/
+ #endif
  	SI_SUPP_EDGE_WIDTHS,
  	SI_SUPP_LINE_WIDTHS,
  	SI_SUPP_MARKER_SIZES,
*** /mnt/./fonts/lib/font/fc/fserve.c	Fri Jul 26 19:59:45 1991
--- ./fonts/lib/font/fc/fserve.c	Mon Apr 13 16:49:38 1992
***************
*** 30,35 ****
--- 30,36 ----
   * font server specific font access
   */
  
+ #include	<stdio.h>
  #include	<X11/X.h>
  #include	<X11/Xos.h>
  #include	"FS.h"
*** /mnt/./lib/X/globals.c	Fri Jul 12 14:54:43 1991
--- ./lib/X/globals.c	Mon Apr 13 16:49:34 1992
***************
*** 67,73 ****
--- 67,75 ----
  typedef int (*funcptr)();
  ZEROINIT (funcptr, _XErrorFunction, NULL);
  ZEROINIT (funcptr, _XIOErrorFunction, NULL);
+ #ifndef AIX
  ZEROINIT (_XQEvent *, _qfree, NULL);
+ #endif
  
  
  /*
*** /mnt/./util/makedepend/main.c	Thu Jul 25 10:51:49 1991
--- ./util/makedepend/main.c	Mon Apr 13 16:49:22 1992
***************
*** 71,77 ****
  	fatal ("got signal %d\n", sig);
  }
  
! #if defined(USG) || (defined(SYSV386) && defined(SYSV))
  #define USGISH
  #endif
  
--- 71,77 ----
  	fatal ("got signal %d\n", sig);
  }
  
! #if defined(USG) || (defined(SYSV386) && defined(SYSV)) || defined(AIX)
  #define USGISH
  #endif
  
*** /mnt/./server/ddx/mfb/maskbits.c	Tue Jul  9 16:05:59 1991
--- ./server/ddx/mfb/maskbits.c	Wed Apr 15 09:49:11 1992
***************
*** 985,1011 ****
  
  #include "mergerop.h"
  
! #define O 0
  #define I ~((unsigned long)0)
  
  mergeRopRec mergeRopBits[16] = {
! O,O,O,O,	/* clear	0x0		0 */
! I,O,O,O,	/* and		0x1		src AND dst */
! I,O,I,O,	/* andReverse	0x2		src AND NOT dst */
! O,O,I,O,	/* copy		0x3		src */
! I,I,O,O,	/* andInverted	0x4		NOT src AND dst */
! O,I,O,O,	/* noop		0x5		dst */
! O,I,I,O,	/* xor		0x6		src XOR dst */
! I,I,I,O,	/* or		0x7		src OR dst */
! I,I,I,I,	/* nor		0x8		NOT src AND NOT dst */
! O,I,I,I,	/* equiv	0x9		NOT src XOR dst */
! O,I,O,I,	/* invert	0xa		NOT dst */
! I,I,O,I,	/* orReverse	0xb		src OR NOT dst */
! O,O,I,I,	/* copyInverted	0xc		NOT src */
! I,O,I,I,	/* orInverted	0xd		NOT src OR dst */
! I,O,O,I,	/* nand		0xe		NOT src OR NOT dst */
! O,O,O,I,	/* set		0xf		1 */
  };
  
  #undef O
  #undef I
--- 985,1039 ----
  
  #include "mergerop.h"
  
! #define O ((unsigned long) 0)
  #define I ~((unsigned long)0)
  
+ #ifndef AIX /* AIX doesn't handle aggregate initializations at all well */
  mergeRopRec mergeRopBits[16] = {
! O,O,O,O,        /* clear        0x0             0 */
! I,O,O,O,        /* and          0x1             src AND dst */
! I,O,I,O,        /* andReverse   0x2             src AND NOT dst */
! O,O,I,O,        /* copy         0x3             src */
! I,I,O,O,        /* andInverted  0x4             NOT src AND dst */
! O,I,O,O,        /* noop         0x5             dst */
! O,I,I,O,        /* xor          0x6             src XOR dst */
! I,I,I,O,        /* or           0x7             src OR dst */
! I,I,I,I,        /* nor          0x8             NOT src AND NOT dst */
! O,I,I,I,        /* equiv        0x9             NOT src XOR dst */
! O,I,O,I,        /* invert       0xa             NOT dst */
! I,I,O,I,        /* orReverse    0xb             src OR NOT dst */
! O,O,I,I,        /* copyInverted 0xc             NOT src */
! I,O,I,I,        /* orInverted   0xd             NOT src OR dst */
! I,O,O,I,        /* nand         0xe             NOT src OR NOT dst */
! O,O,O,I,        /* set          0xf             1 */
  };
+ #else
+ 
+ mergeRopRec mergeRopBits[16];
+ 
+ initialize_mergeRopBits()
+ {
+     int i;
+     mergeRopBits[0].ca1 = O; mergeRopBits[0].cx1 = O; mergeRopBits[0].ca2 = O;
+     mergeRopBits[1].ca1 = I; mergeRopBits[1].cx1 = O; mergeRopBits[1].ca2 = O;
+     mergeRopBits[2].ca1 = I; mergeRopBits[2].cx1 = O; mergeRopBits[2].ca2 = I;
+     mergeRopBits[3].ca1 = O; mergeRopBits[3].cx1 = O; mergeRopBits[3].ca2 = I;
+     mergeRopBits[4].ca1 = I; mergeRopBits[4].cx1 = I; mergeRopBits[4].ca2 = O;
+     mergeRopBits[5].ca1 = O; mergeRopBits[5].cx1 = I; mergeRopBits[5].ca2 = O;
+     mergeRopBits[6].ca1 = O; mergeRopBits[6].cx1 = I; mergeRopBits[6].ca2 = I;
+     mergeRopBits[7].ca1 = I; mergeRopBits[7].cx1 = I; mergeRopBits[7].ca2 = I;
+     for (i=0; i<8; i++) {
+         mergeRopBits[15-i].ca1 = mergeRopBits[i].ca1;
+         mergeRopBits[15-i].cx1 = mergeRopBits[i].cx1;
+         mergeRopBits[15-i].ca2 = mergeRopBits[i].ca2;
+     }
+     for (i=0; i<8; i++) {
+         mergeRopBits[i].cx2 = O;
+         mergeRopBits[15-i].cx2 = I;
+     }
+ }
+ 
+ #endif /* AIX */
  
  #undef O
  #undef I
*** /mnt/./server/os/connection.c	Mon Apr 13 16:46:55 1992
--- ./server/os/connection.c	Tue Apr 28 13:54:19 1992
***************
*** 454,460 ****
  ResetWellKnownSockets ()
  {
      ResetOsBuffers();
! #if defined(UNIXCONN) && !defined(SVR4)
      if (unixDomainConnection != -1)
      {
  	/*
--- 454,460 ----
  ResetWellKnownSockets ()
  {
      ResetOsBuffers();
! #if defined(UNIXCONN) && !defined(SVR4) && !defined(AIXrt)
      if (unixDomainConnection != -1)
      {
  	/*
***************
*** 971,977 ****
      }
  }
  
! #ifdef AIXV3
  
  static int grabbingClient;
  static int reallyGrabbed;
--- 971,977 ----
      }
  }
  
! #if defined(AIXV3) || defined(AIXrt)
  
  static int grabbingClient;
  static int reallyGrabbed;
*** /mnt/./clients/xterm/charproc.c	Mon Apr 13 16:48:51 1992
--- ./clients/xterm/charproc.c	Wed Apr 15 13:57:46 1992
***************
*** 1511,1517 ****
  			update_appcursor();
  			break;
  		case 2:			/* ANSI/VT52 mode		*/
! 			if (func == bitset) {
  				screen->gsets[0] =
  					screen->gsets[1] =
  					screen->gsets[2] =
--- 1511,1517 ----
  			update_appcursor();
  			break;
  		case 2:			/* ANSI/VT52 mode		*/
! 			if (func == (void *) bitset) {
  				screen->gsets[0] =
  					screen->gsets[1] =
  					screen->gsets[2] =
***************
*** 1524,1530 ****
  			if(screen->c132) {
  				ClearScreen(screen);
  				CursorSet(screen, 0, 0, termw->flags);
! 				if((j = func == bitset ? 132 : 80) !=
  				 ((termw->flags & IN132COLUMNS) ? 132 : 80) ||
  				 j != screen->max_col + 1) {
  				        Dimension replyWidth, replyHeight;
--- 1524,1530 ----
  			if(screen->c132) {
  				ClearScreen(screen);
  				CursorSet(screen, 0, 0, termw->flags);
! 				if((j = func == (void *)bitset ? 132 : 80) !=
  				 ((termw->flags & IN132COLUMNS) ? 132 : 80) ||
  				 j != screen->max_col + 1) {
  				        Dimension replyWidth, replyHeight;
***************
*** 1552,1558 ****
  			}
  			break;
  		case 4:			/* DECSCLM (slow scroll)	*/
! 			if (func == bitset) {
  				screen->jumpscroll = 0;
  				if (screen->scroll_amt)
  					FlushScroll(screen);
--- 1552,1558 ----
  			}
  			break;
  		case 4:			/* DECSCLM (slow scroll)	*/
! 			if (func == (void *)bitset) {
  				screen->jumpscroll = 0;
  				if (screen->scroll_amt)
  					FlushScroll(screen);
***************
*** 1582,1594 ****
  			/* ignore autorepeat */
  			break;
  		case 9:			/* MIT bogus sequence		*/
! 			if(func == bitset)
  				screen->send_mouse_pos = 1;
  			else
  				screen->send_mouse_pos = 0;
  			break;
  		case 38:		/* DECTEK			*/
! 			if(func == bitset && !(screen->inhibit & I_TEK)) {
  				if(screen->logging) {
  					FlushLog(screen);
  					screen->logstart = Tbuffer;
--- 1582,1594 ----
  			/* ignore autorepeat */
  			break;
  		case 9:			/* MIT bogus sequence		*/
! 			if(func == (void *)bitset)
  				screen->send_mouse_pos = 1;
  			else
  				screen->send_mouse_pos = 0;
  			break;
  		case 38:		/* DECTEK			*/
! 			if(func == (void *)bitset && !(screen->inhibit & I_TEK)) {
  				if(screen->logging) {
  					FlushLog(screen);
  					screen->logstart = Tbuffer;
***************
*** 1597,1611 ****
  			}
  			break;
  		case 40:		/* 132 column mode		*/
! 			screen->c132 = (func == bitset);
  			update_allow132();
  			break;
  		case 41:		/* curses hack			*/
! 			screen->curses = (func == bitset);
  			update_cursesemul();
  			break;
  		case 44:		/* margin bell			*/
! 			screen->marginbell = (func == bitset);
  			if(!screen->marginbell)
  				screen->bellarmed = -1;
  			update_marginbell();
--- 1597,1611 ----
  			}
  			break;
  		case 40:		/* 132 column mode		*/
! 			screen->c132 = (func == (void *)bitset);
  			update_allow132();
  			break;
  		case 41:		/* curses hack			*/
! 			screen->curses = (func == (void *)bitset);
  			update_cursesemul();
  			break;
  		case 44:		/* margin bell			*/
! 			screen->marginbell = (func == (void *)bitset);
  			if(!screen->marginbell)
  				screen->bellarmed = -1;
  			update_marginbell();
***************
*** 1620,1626 ****
  			 * if this feature is enabled, logging may be 
  			 * enabled and disabled via escape sequences.
  			 */
! 			if(func == bitset)
  				StartLog(screen);
  			else
  				CloseLog(screen);
--- 1620,1626 ----
  			 * if this feature is enabled, logging may be 
  			 * enabled and disabled via escape sequences.
  			 */
! 			if(func == (void *)bitset)
  				StartLog(screen);
  			else
  				CloseLog(screen);
***************
*** 1631,1637 ****
  			break;
  		case 47:		/* alternate buffer */
  			if (!termw->misc.titeInhibit) {
! 			    if(func == bitset)
  				ToAlternate(screen);
  			    else
  				FromAlternate(screen);
--- 1631,1637 ----
  			break;
  		case 47:		/* alternate buffer */
  			if (!termw->misc.titeInhibit) {
! 			    if(func == (void *)bitset)
  				ToAlternate(screen);
  			    else
  				FromAlternate(screen);
***************
*** 1638,1650 ****
  			}
  			break;
  		case 1000:		/* xterm bogus sequence		*/
! 			if(func == bitset)
  				screen->send_mouse_pos = 2;
  			else
  				screen->send_mouse_pos = 0;
  			break;
  		case 1001:		/* xterm sequence w/hilite tracking */
! 			if(func == bitset)
  				screen->send_mouse_pos = 3;
  			else
  				screen->send_mouse_pos = 0;
--- 1638,1650 ----
  			}
  			break;
  		case 1000:		/* xterm bogus sequence		*/
! 			if(func == (void *)bitset)
  				screen->send_mouse_pos = 2;
  			else
  				screen->send_mouse_pos = 0;
  			break;
  		case 1001:		/* xterm sequence w/hilite tracking */
! 			if(func == (void *)bitset)
  				screen->send_mouse_pos = 3;
  			else
  				screen->send_mouse_pos = 0;
*** /mnt/./clients/twm/iconmgr.c	Mon Apr 13 16:46:44 1992
--- ./clients/twm/iconmgr.c	Wed Apr 15 09:57:33 1992
***************
*** 39,45 ****
  #include "siconify.bm"
  #include <X11/Xos.h>
  #include <X11/Xmu/CharSet.h>
! #ifdef macII
  int strcmp(); /* missing from string.h in AUX 2.0 */
  #endif
  
--- 39,45 ----
  #include "siconify.bm"
  #include <X11/Xos.h>
  #include <X11/Xmu/CharSet.h>
! #if defined(macII) || defined(AIX)
  int strcmp(); /* missing from string.h in AUX 2.0 */
  #endif
  
*** /mnt/./config/ibm.cf	Tue Jul 30 18:01:24 1991
--- ./config/ibm.cf	Wed Apr 15 09:40:55 1992
***************
*** 1,5 ****
--- 1,15 ----
  XCOMM platform:  $XConsortium: ibm.cf,v 1.29 91/07/28 22:39:58 rws Exp $
  
+ /* It pains me to do it, but the following lines will hack the makefiles
+       to work on an RT running AIX 2.2.1 */
+ #define AIXArchitecture
+ #define RtArchitecture
+ #undef USE_PCC
+ #undef PS2Architecture
+ #define LibraryCDebugFlags
+ #define DefaultCDebugFlags
+ /* Michael Brantley, Rice University */
+ 
  #ifdef RsArchitecture
  #define OSName		AIX 3.1.5
  #define OSMajorVersion	3
***************
*** 61,66 ****
--- 71,77 ----
  #ifdef RtArchitecture
  #define BootstrapCFlags -Daix
  #define OSDefines -DAIX -DAIXrt -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT
+ #define AIXrt YES
  #else
  #define ExecableScripts		YES
  #define ExpandManNames		YES
***************
*** 79,87 ****
  #define ibmosdefs -DHCVERSION=HCRevision
  #else
  #ifdef RtArchitecture
! #define CcCmd cc -Nd4000 -Nn3000 -DBSD_INCLUDES
! #define ibmosdefs -DSYSV -Nd4000 -Nn3000
! #define ibmlibdefs -Hcpp
  #else
  #define ibmosdefs -DSYSV
  #endif
--- 90,99 ----
  #define ibmosdefs -DHCVERSION=HCRevision
  #else
  #ifdef RtArchitecture
! #define CcCmd cc -a -Nd8000 -Nn5000 -DBSD_INCLUDES
! #define ibmosdefs -DSYSV -DSVR4 -Nd8000 -Nn5000 -Dibm032 -DX_NOT_STDC_ENV -DX_NOT_POSIX
! #define ServerCCOptions -a
! #define ibmlibdefs /* -Hcpp */
  #else
  #define ibmosdefs -DSYSV
  #endif
***************
*** 110,119 ****
   */
  #define ibmInclude8514  NO /* YES */
  #define ibmIncludeAED   NO
! #define ibmIncludeAPA16 YES
  #define ibmIncludeAPA8c NO
  #define ibmIncludeEGA   NO /* YES */
! #define ibmIncludeMPEL  NO
  #define ibmIncludeVGA   NO /* YES */
  #define ibmIncludeGEN   NO
  #endif /* RtArchitecture */
--- 122,131 ----
   */
  #define ibmInclude8514  NO /* YES */
  #define ibmIncludeAED   NO
! #define ibmIncludeAPA16 NO
  #define ibmIncludeAPA8c NO
  #define ibmIncludeEGA   NO /* YES */
! #define ibmIncludeMPEL  YES
  #define ibmIncludeVGA   NO /* YES */
  #define ibmIncludeGEN   NO
  #endif /* RtArchitecture */
***************
*** 224,230 ****
   * define this as you like for server compilation 
   * affected: all makefiles in .../X11/server
   */
! #define ServerOSDefines  cppdefs -DNOSTDHDRS OSDefines
  
  
  #define FontOSDefines StandardDefines
--- 236,247 ----
   * define this as you like for server compilation 
   * affected: all makefiles in .../X11/server
   */
! #ifdef RtArchitecture
! #define ServerDefines  StandardDefines -DUNIXCPP -DNOSTDHDRS OSDefines ExtensionDefines -Dibm032 -DXDMCP
! #else
! #define ServerDefines  StandardDefines -DUNIXCPP -DNOSTDHDRS OSDefines ExtensionDefines
! #endif /* RtArchitecture */
! #define ServerOSDefines  cppdefs -DNOSTDHDRS OSDefines -Dibm032 -DXDMCP
  
  
  #define FontOSDefines StandardDefines
***************
*** 236,242 ****
--- 253,268 ----
  /* define the following line for easily debuggable servers, the */
  /* second line for especially speedy servers.			*/
  /* #define ServerCDebugFlags	-O -DDEBUG -DTRACE_X */
+ /* The AIX 2.2.1 C compiler cannot optimize the server properly ... sigh. */
+ #ifdef AIXArchitecture
+ #ifndef HIGH_C
+ #define       ServerCDebugFlags ibmAthenaDefs
+ #else
  #define	ServerCDebugFlags -O ibmAthenaDefs
+ #endif
+ #else
+ #define       ServerCDebugFlags -O ibmAthenaDefs
+ #endif
  
  /* define this as you like for normal library compilation */
  #define LibraryDefines cppdefs ibmlibdefs StandardDefines
*** /mnt/./config/imakemdep.h	Sun Aug 25 14:39:59 1991
--- ./config/imakemdep.h	Mon Apr 13 16:49:38 1992
***************
*** 55,61 ****
  #define imake_ccflags "-Daix -DSYSV -D_IBMR2"
  #else
  #ifdef aix
! #define imake_ccflags "-Daix -DSYSV"
  #endif
  #endif
  
--- 55,61 ----
  #define imake_ccflags "-Daix -DSYSV -D_IBMR2"
  #else
  #ifdef aix
! #define imake_ccflags "-Daix -DSYSV -DX_NOT_POSIX -DX_NOT_STDC_ENV"
  #endif
  #endif
  
*** /mnt/./extensions/lib/PEX/include/attr.h	Thu Jul 18 11:58:32 1991
--- ./extensions/lib/PEX/include/attr.h	Tue Apr 14 12:53:39 1992
***************
*** 79,84 ****
--- 79,85 ----
   * Phg_attr_base_cardinality elements to define the base type
   * and cardinality of their attributes.
   */  
+ #ifndef AIXrt
  typedef enum {
      PHG_ATTR_INT		= PHG_ATTR_TYPE(PHG_ATTR_BASE_INT, 1),
      PHG_ATTR_INT_PAIR		= PHG_ATTR_TYPE(PHG_ATTR_BASE_INT_PAIR, 2),
***************
*** 102,107 ****
--- 103,133 ----
      PHG_ATTR_LONG		= PHG_ATTR_TYPE(PHG_ATTR_BASE_LONG, 1),
      PHG_ATTR_SHORT		= PHG_ATTR_TYPE(PHG_ATTR_BASE_SHORT, 1)
  } Phg_attr_base_cardinality;
+ #else
+ typedef enum {
+     PHG_ATTR_INT		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST, 1),
+     PHG_ATTR_INT_PAIR		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 1, 2),
+     PHG_ATTR_INT_TRIPLE		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 23, 3),
+     PHG_ATTR_X			= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 2, 1),
+     PHG_ATTR_INDEX_X		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 3, 2),
+     PHG_ATTR_Y			= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 4, 1),
+     PHG_ATTR_INDEX_Y		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 5, 2),
+     PHG_ATTR_XY			= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 6, 2),
+     PHG_ATTR_INDEX_XY		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 7, 3),
+     PHG_ATTR_BOOLEAN		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 8, 1),
+     PHG_ATTR_ENUM		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 9, 1),
+     PHG_ATTR_CHAR		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 10, 1),
+     PHG_ATTR_STRING		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 11, 1),
+     PHG_ATTR_RECT_PTR		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 15, 1),
+     PHG_ATTR_OPAQUE		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 16, 1),
+     PHG_ATTR_NO_VALUE		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 17, 0),
+     PHG_ATTR_AV			= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 18, 1),
+     PHG_ATTR_FUNCTION_PTR	= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 19, 1),
+     PHG_ATTR_ICON_PTR		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 20, 1),
+     PHG_ATTR_LONG		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 24, 1),
+     PHG_ATTR_SHORT		= PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 25, 1)
+ } Phg_attr_base_cardinality;
+ #endif /* AIXrt */
  
  /* Note that this macro is machine dependent in that it assumes the
   * base_type-cardinality pair will be in the lower 13 bits of the 
***************
*** 117,128 ****
--- 143,162 ----
      PHG_ATTR_LIST_IS_PTR	= 1
  } Phg_attr_list_ptr_type;
  
+ #ifndef AIXrt
  #define	PHG_ATTR_LIST_INLINE(list_type, base_cardinality)	\
      PHG_ATTR_LIST_OF(list_type, PHG_ATTR_LIST_IS_INLINE, base_cardinality)
      
  #define	PHG_ATTR_LIST_PTR(list_type, base_cardinality)	\
      PHG_ATTR_LIST_OF(list_type, PHG_ATTR_LIST_IS_PTR, base_cardinality)
+ #else
+ #define	PHG_ATTR_LIST_INLINE(list_type, base_cardinality)	\
+     PHG_ATTR_LIST_OF(list_type, 0, base_cardinality)
      
+ #define	PHG_ATTR_LIST_PTR(list_type, base_cardinality)	\
+     PHG_ATTR_LIST_OF(list_type, 1, base_cardinality)
+ #endif
+     
  typedef enum {
      /* Note that PHG_ATTR_NONE must have a value of zero,
       * since a no-list type is assumed for each of the
***************
*** 185,193 ****
--- 219,233 ----
  
  /* Generic attributes
   */
+ #ifndef AIXrt
  typedef enum {
      PHG_ATTR_LIST = PHG_ATTR(PHG_ATTR_PKG_GENERIC, PHG_ATTR_LIST_PTR(PHG_ATTR_RECURSIVE, PHG_ATTR_NO_VALUE), 0)
  } Phg_attr_generic;
+ #else
+ typedef enum {
+     PHG_ATTR_LIST = PHG_ATTR(PHG_ATTR_PKG_FIRST, PHG_ATTR_LIST_PTR(1, PHG_ATTR_TYPE(PHG_ATTR_BASE_FIRST + 17, 0)), 0)
+ } Phg_attr_generic;
+ #endif
  
  /* PHG_ATTR_STANDARD_SIZE is large enough to allow for 
   * most attribute-value lists.
*** /mnt/./clients/xdm/dm.h	Mon Apr 13 16:47:07 1992
--- ./clients/xdm/dm.h	Wed Apr 15 10:03:03 1992
***************
*** 65,70 ****
--- 65,74 ----
  #undef dirty		/* Some bozo put a macro called dirty in sys/param.h */
  #endif /* pegasus */
  
+ #ifdef AIX		/* AIX - gotta have it !!! */
+ #include <sys/lockf.h>
+ #endif
+ 
  #ifndef X_NOT_POSIX
  #ifdef _POSIX_SOURCE
  #include <sys/wait.h>
*** /mnt/./util/scripts/bsdinst.sh	Tue Jul  9 14:19:36 1991
--- ./util/scripts/bsdinst.sh	Mon Apr 13 16:49:22 1992
***************
*** 9,15 ****
  dst=""
  src=""
  dostrip=""
! owner=""
  mode=""
  
  while [ x$1 != x ]; do
--- 9,15 ----
  dst=""
  src=""
  dostrip=""
! owner="root"
  mode=""
  
  while [ x$1 != x ]; do
***************
*** 17,30 ****
  	-c) shift
  	    continue;;
  
! 	-m) flags="$flags $1 $2 "
! 	    mode="$2"
  	    shift
  	    shift
  	    continue;;
  
! 	-o) flags="$flags -u $2 "
! 	    owner="$2"
  	    shift
  	    shift
  	    continue;;
--- 17,30 ----
  	-c) shift
  	    continue;;
  
! #	-m) flags="$flags $1 $2 "  Uncomment for non AIXrt
! 	-m) mode="$2"
  	    shift
  	    shift
  	    continue;;
  
! #	-o) flags="$flags -u $2 "   Uncomment for non AIXrt
! 	-o) owner="$2"
  	    shift
  	    shift
  	    continue;;
***************
*** 55,61 ****
  *)
  	case "$owner" in
  	"")
! 		flags="$flags -u root"
  		;;
  	esac
  	;;
--- 55,61 ----
  *)
  	case "$owner" in
  	"")
! #		flags="$flags -u root"  Uncomment for non-AIX
  		;;
  	esac
  	;;
***************
*** 124,129 ****
--- 124,130 ----
  # install through symbolic links.  Uncomment it if it offends you.
  # rm -f $dst/$srcbase
  (cd $srcdir ; $installcmd -f $dst $flags $src)
+ (cd $dst ; chmod $mode $src ; chown $owner $src)
  
  if [ x$dostrip = xstrip ]
  then
