Index: config/cf/Imake.cf
===================================================================
RCS file: /cvs/xc/config/cf/Imake.cf,v
retrieving revision 3.91
diff -u -r3.91 Imake.cf
--- config/cf/Imake.cf	3 Apr 2004 22:26:20 -0000	3.91
+++ config/cf/Imake.cf	17 Jun 2004 23:25:44 -0000
@@ -1077,6 +1077,19 @@
 # endif
 #endif
 
+#ifdef __riscos__
+# define RISCOSArchitecture
+# define MacroIncludeFile <riscos.cf>
+# define MacroFile riscos.cf
+# undef riscos
+# ifdef __arm__
+#  define Arm32Architecture
+#  undef arm
+#  undef __arm
+#  undef __arm__
+# endif
+#endif
+
 #ifndef MacroIncludeFile
 XCOMM WARNING:  Imake.cf not configured; guessing at definitions!!!
 XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
Index: config/cf/Imakefile
===================================================================
RCS file: /cvs/xc/config/cf/Imakefile,v
retrieving revision 3.31
diff -u -r3.31 Imakefile
--- config/cf/Imakefile	3 Apr 2004 21:45:53 -0000	3.31
+++ config/cf/Imakefile	17 Jun 2004 23:25:46 -0000
@@ -112,6 +112,7 @@
 os2.cf \
 osf1.cf \
 pegasus.cf \
+riscos.cf \
 sco.cf \
 sco5.cf \
 sequent.cf \
Index: config/cf/X11.tmpl
===================================================================
RCS file: /cvs/xc/config/cf/X11.tmpl,v
retrieving revision 1.259
diff -u -r1.259 X11.tmpl
--- config/cf/X11.tmpl	11 Jun 2004 00:02:16 -0000	1.259
+++ config/cf/X11.tmpl	17 Jun 2004 23:25:50 -0000
@@ -3679,7 +3679,7 @@
  *
  * Make sure that *Standard is set correctly, if not, the
  * standard compile/link paths will be added *before* the
- * local X directorys and installed versions of the standard
+ * local X directories and installed versions of the standard
  * X headers will end up getting used.
  */
 
Index: config/imake/imakemdep.h
===================================================================
RCS file: /cvs/xc/config/imake/imakemdep.h,v
retrieving revision 3.77
diff -u -r3.77 imakemdep.h
--- config/imake/imakemdep.h	4 Jun 2004 17:16:12 -0000	3.77
+++ config/imake/imakemdep.h	17 Jun 2004 23:25:51 -0000
@@ -1383,6 +1383,9 @@
 #if defined(__LITTLE_ENDIAN__)
       {"__LITTLE_ENDIAN__", "1"},
 #endif
+#if defined(__riscos__)
+        {"__riscos__", "1"},
+#endif
 	/* add any additional symbols before this line */
 	{NULL, NULL}
 };
Index: config/makedepend/Imakefile
===================================================================
RCS file: /cvs/xc/config/makedepend/Imakefile,v
retrieving revision 3.14
diff -u -r3.14 Imakefile
--- config/makedepend/Imakefile	31 Mar 2004 23:02:16 -0000	3.14
+++ config/makedepend/Imakefile	17 Jun 2004 23:25:51 -0000
@@ -20,7 +20,7 @@
 #endif
 #ifdef PreIncDir
 PREINCDIR = PreIncDir
-PREINC_DEFINES = -DPREINCDIR=\"$(PREINCDIR)\"
+PREINC_DEFINES = -DPREINCDIR="\"$(PREINCDIR)\""
 #endif
 #ifndef StdIncDir
 #if CrossCompiling
@@ -30,19 +30,19 @@
 #endif
 #endif
 STDINCDIR = StdIncDir
-STDINC_DEFINES = -DINCLUDEDIR=\"$(STDINCDIR)\"
+STDINC_DEFINES = -DINCLUDEDIR="\"$(STDINCDIR)\""
 #ifdef PostIncDir
 POSTINCDIR = PostIncDir
-POSTINC_DEFINES = -DPOSTINCDIR=\"$(POSTINCDIR)\"
+POSTINC_DEFINES = -DPOSTINCDIR="\"$(POSTINCDIR)\""
 #endif
 #ifdef ExtraIncDir
 EXTRAINCDIR = ExtraIncDir
-EXTRAINC_DEFINES = -DEXTRAINCDIR=\"$(EXTRAINCDIR)\"
+EXTRAINC_DEFINES = -DEXTRAINCDIR="\"$(EXTRAINCDIR)\""
 #endif
 INC_DEFINES = $(PREINC_DEFINES) $(STDINC_DEFINES) $(POSTINC_DEFINES) \
 	      $(EXTRAINC_DEFINES)
 OSUF = Concat(.,Osuf)
-OSUF_DEFINES = -DOBJSUFFIX=\"$(OSUF)\"
+OSUF_DEFINES = -DOBJSUFFIX="\"$(OSUF)\""
 MAIN_DEFINES = $(INC_DEFINES) $(SIGNAL_DEFINES) $(OSUF_DEFINES)
 INCLUDES = -I$(IMAKESRC) -I$(TOP)/include $(TOP_X_INCLUDES)/X11
 
Index: include/Xos.h
===================================================================
RCS file: /cvs/xc/include/Xos.h,v
retrieving revision 3.43
diff -u -r3.43 Xos.h
--- include/Xos.h	3 Apr 2004 22:26:20 -0000	3.43
+++ include/Xos.h	17 Jun 2004 23:26:10 -0000
@@ -273,7 +273,8 @@
 
 #if defined(ISC) || defined(__UNIXOS2__) || \
     (defined(linux) && !defined(__GLIBC__)) || \
-    (defined(__QNX__) && !defined(UNIXCONN))
+    (defined(__QNX__) && !defined(UNIXCONN)) || \
+    (defined(__riscos__))
 /*
  *	Some OS's may not have this
  */
Index: lib/ICE/iceauth.c
===================================================================
RCS file: /cvs/xc/lib/ICE/iceauth.c,v
retrieving revision 3.6
diff -u -r3.6 iceauth.c
--- lib/ICE/iceauth.c	31 May 2002 18:45:41 -0000	3.6
+++ lib/ICE/iceauth.c	17 Jun 2004 23:26:13 -0000
@@ -69,7 +69,7 @@
     }
 #else
     {
-#ifndef __UNIXOS2__
+#if !defined(__UNIXOS2__) && !defined(__riscos__) 
 	long    time ();
 #endif
 	ldata[0] = time ((long *) 0);
Index: lib/Xaw/Vendor.c
===================================================================
RCS file: /cvs/xc/lib/Xaw/Vendor.c,v
retrieving revision 1.9
diff -u -r1.9 Vendor.c
--- lib/Xaw/Vendor.c	31 May 2002 18:45:44 -0000	1.9
+++ lib/Xaw/Vendor.c	17 Jun 2004 23:26:14 -0000
@@ -111,11 +111,12 @@
  *
  ***************************************************************************/
 
-#ifdef __UNIXOS2__
+#if defined(__UNIXOS2__) || defined(__riscos__)
 /* to fix the EditRes problem because of wrong linker semantics */
 extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */
 extern VendorShellClassRec _XawVendorShellClassRec;
 extern void _XawFixupVendorShell();
+#ifndef __riscos__
 unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag)
 {
 	switch (flag) {
@@ -130,6 +131,7 @@
 		return 0;
 	}
 }
+#endif
 #define vendorShellClassRec _XawVendorShellClassRec
 
 #endif
@@ -193,7 +195,7 @@
   }
 };
 
-#ifndef __UNIXOS2__
+#if !defined(__UNIXOS2__) && !defined(__riscos__)
 externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass =
 	(WidgetClass) (&vendorShellClassRec);
 #endif
@@ -337,7 +339,7 @@
     }
 }
 
-#if defined(__osf__) || defined(__UNIXOS2__)
+#if defined(__osf__) || defined(__UNIXOS2__) || defined(__riscos__)
 /* stupid OSF/1 shared libraries have the wrong semantics */
 /* symbols do not get resolved external to the shared library */
 void _XawFixupVendorShell()
