diff -cr gcc-2.6/cccp.c \emx\gnu\gcc-2.6/cccp.c
*** gcc-2.6/cccp.c	Sat Nov 19 00:54:36 1994
--- /emx/gnu/gcc-2.6/cccp.c	Fri Dec 02 23:39:50 1994
***************
*** 1,3 ****
--- 1,4 ----
+ /* cccp.c -- changed for emx by Eberhard Mattes -- Dec 1994 */
  /* C Compatible Compiler Preprocessor (CCCP)
     Copyright (C) 1986, 87, 89, 92, 93, 1994 Free Software Foundation, Inc.
     Written by Paul Rubin, June 1986
***************
*** 388,393 ****
--- 389,402 ----
  
  static int print_deps_missing_files = 0;
  
+ #ifdef EMX
+ /* Nonzero means use .obj instead of .o for target file when printing
+    dependencies. */
+ 
+ static int omf = 0;
+ 
+ #endif /* EMX */
+ 
  /* Nonzero means print names of header files (-H).  */
  
  static int print_include_names = 0;
***************
*** 1160,1165 ****
--- 1169,1178 ----
    }
  #endif
  
+ #ifdef __EMX__
+   _emxload_env ("GCCLOAD");
+ #endif /* __EMX__ */
+ 
    in_fname = NULL;
    out_fname = NULL;
  
***************
*** 1611,1616 ****
--- 1624,1641 ----
  	inhibit_predefs = 1;
  	break;
  
+ #ifdef EMX
+       case 'Z':
+         if (!strcmp (argv[i], "-Zomf"))
+           omf = 1;
+         else if (!strcmp (argv[i], "-Zc++-comments")
+                  || !strcmp (argv[i], "-ZC++-comments"))
+           cplusplus_comments = 1;
+         else
+           fatal ("Invalid option `%s'", argv[i]);
+         break;
+ #endif /* EMX */
+ 
        case '\0': /* JF handle '-' as file name meaning stdin or stdout */
  	if (in_fname == NULL) {
  	  in_fname = "";
***************
*** 2028,2034 ****
--- 2053,2063 ----
  
        /* Supply our own suffix.  */
  #ifndef VMS
+ #ifndef EMX
        strcpy (q, ".o");
+ #else /* EMX */
+       strcpy (q, omf ? ".obj" : ".o");
+ #endif /* EMX */
  #else
        strcpy (q, ".obj");
  #endif
***************
*** 4237,4243 ****
--- 4266,4276 ----
  
    /* If specified file name is absolute, just open it.  */
  
+ #ifndef __EMX__
    if (*fbeg == '/') {
+ #else /* __EMX__ */
+   if (*fbeg == '/' || *fbeg == '\\' || _fngetdrive (fbeg) != 0) {
+ #endif /* __EMX__ */
      strncpy (fname, fbeg, flen);
      fname[flen] = 0;
      if (redundant_include_p (fname))
diff -cr gcc-2.6/cp/lex.c \emx\gnu\gcc-2.6/cp/lex.c
*** gcc-2.6/cp/lex.c	Sat Oct 15 01:31:16 1994
--- /emx/gnu/gcc-2.6/cp/lex.c	Fri Dec 02 23:40:28 1994
***************
*** 1,3 ****
--- 1,4 ----
+ /* lex.c -- changed for emx by Eberhard Mattes -- Dec 1994 */
  /* Separate lexical analyzer for GNU C++.
     Copyright (C) 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
     Hacked by Michael Tiemann (tiemann@cygnus.com)
***************
*** 2570,2575 ****
--- 2571,2630 ----
  		      TREE_INT_CST_HIGH (fileinfo) = interface_unknown;
  		    }
  		}
+ #ifdef EMX
+               else if (c == 'p'
+                        && getch () == 'a'
+                        && getch () == 'c'
+ 		       && getch () == 'k')
+                 {
+                   int align;
+                   extern int maximum_field_alignment;
+ 
+                   align = -1;
+                   do
+                     {
+                       nextchar = getch ();
+                     } while (nextchar == ' ' || nextchar == '\t');
+                   if (nextchar == '(')
+                     {
+                       do
+                         {
+                           nextchar = getch ();
+                         } while (nextchar == ' ' || nextchar == '\t');
+                       switch (nextchar)
+                         {
+                         case ')':
+                           align = 0;
+                           break;
+                         case '1':
+                         case '2':
+                         case '4':
+                           align = nextchar - '0';
+                           break;
+                         }
+                       if (nextchar != ')')
+                         do
+                           {
+                             nextchar = getch ();
+                           } while (nextchar == ' ' || nextchar == '\t');
+                       if (nextchar != ')')
+                         align = -1;
+                     }
+                   if (align < 0)
+                     {
+                       error ("invalid #pragma pack");
+                       goto skipline;
+                     }
+                   maximum_field_alignment = align * 8;
+                   do
+                     {
+                       nextchar = getch ();
+                     } while (nextchar == ' ' || nextchar == '\t');
+                   c = nextchar;
+ 		  if (c != '\n')
+ 		    warning ("trailing characters ignored");
+ 		}
+ #endif /* EMX */
  	    }
  	  goto skipline;
  	}
diff -cr gcc-2.6/explow.c \emx\gnu\gcc-2.6/explow.c
*** gcc-2.6/explow.c	Thu Jul 14 14:41:30 1994
--- /emx/gnu/gcc-2.6/explow.c	Fri Dec 02 23:40:00 1994
***************
*** 1,3 ****
--- 1,5 ----
+ /* explow.c -- changed for emx by Eberhard Mattes -- Dec 1994 */
+ 
  /* Subroutines for manipulating rtx's in semantically interesting ways.
     Copyright (C) 1987, 1991, 1994 Free Software Foundation, Inc.
  
***************
*** 714,719 ****
--- 716,756 ----
    if (adjust == const0_rtx)
      return;
  
+ #ifdef EMX
+   if (TARGET_PROBE &&
+           (GET_CODE (adjust) != CONST_INT || INTVAL (adjust) >= PROBE_SIZE))
+     {
+       int i, j;
+ 
+       if (GET_CODE (adjust) == CONST_INT && INTVAL (adjust) <= PROBE_MAX_INLINE)
+         {
+           i = INTVAL (adjust); j = 0;
+           while (i >= PROBE_SIZE)
+             {
+               i -= PROBE_SIZE; j += PROBE_SIZE;
+ /* (set (mem:QI (plus:SI (reg:SI 7) (const_int -j)) (const_int 0))) */
+               emit_insn (gen_rtx (SET, VOIDmode,
+                            gen_rtx (MEM, QImode,
+                              gen_rtx (PLUS, Pmode,
+                                gen_rtx (REG, Pmode, 7), /* esp */
+                                gen_rtx (CONST_INT, SImode, -j))),
+                            const0_rtx));
+             }
+         }
+       else
+         {
+           emit_push_insn (adjust, SImode, 0, 0, 0, 0, 0, 0, 0, 0);
+ /* (call (mem:QI (symbol_ref:SI ("__probe"))) (const_int 1)) */
+           emit_insn (gen_rtx (CALL, VOIDmode,
+                        gen_rtx (MEM, QImode,
+                          gen_rtx (SYMBOL_REF, Pmode, "__probe")),
+                        const1_rtx));
+           /*
+           emit_insn (gen_rtx (ASM_INPUT, VOIDmode, "call ___probe"));
+           */
+         }
+     }
+ #endif /* EMX */
    temp = expand_binop (Pmode,
  #ifdef STACK_GROWS_DOWNWARD
  		       sub_optab,
diff -cr gcc-2.6/gcc.c \emx\gnu\gcc-2.6/gcc.c
*** gcc-2.6/gcc.c	Mon Nov 07 17:01:42 1994
--- /emx/gnu/gcc-2.6/gcc.c	Fri Dec 02 23:39:52 1994
***************
*** 1,3 ****
--- 1,5 ----
+ /* gcc.c -- changed for emx by Eberhard Mattes -- Dec 1994 */
+ 
  /* Compiler driver program that can handle many languages.
     Copyright (C) 1987, 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
  
***************
*** 117,122 ****
--- 119,130 ----
  #define NULL_PTR ((GENERIC_PTR)0)
  #endif
  
+ #ifdef __EMX__
+ #include <process.h>
+ #include <stdlib.h>
+ extern char *_getname();
+ #endif /* __EMX__ */
+ 
  #ifdef USG
  #define vfork fork
  #endif /* USG */
***************
*** 165,176 ****
--- 173,186 ----
  extern int errno;
  #endif
  
+ #ifndef __EMX__
  extern int sys_nerr;
  #if defined(bsd4_4) || defined(__NetBSD__)
  extern const char *const sys_errlist[];
  #else
  extern char *sys_errlist[];
  #endif
+ #endif /* not __EMX__ */
  
  extern int execv (), execvp ();
  
***************
*** 248,253 ****
--- 258,273 ----
  /* Forward declaration for prototypes.  */
  struct path_prefix;
  
+ #ifdef EMX
+ /* Nonzero means create .obj files instead of .o files.  */
+ static int omf;
+ 
+ /* Nonzero means pipes are supported.  */
+ static int pipes_supported;
+ 
+ static char *omf_file		PROTO((char *));
+ #endif /* EMX */
+ 
  static void set_spec		PROTO((char *, char *));
  static struct compiler *lookup_compiler PROTO((char *, int, char *));
  static char *find_a_file	PROTO((struct path_prefix *, char *, int));
***************
*** 747,758 ****
--- 767,795 ----
  			%{L*} %{T*} %o %{!nostdlib:libgcc.a%s %L libgcc.a%s %{!A:%E}}\n }}}}}}";
  #else
  /* Use -L and have the linker do the search for -lgcc.  */
+ #ifndef EMX
  static char *link_command_spec = "\
  %{!fsyntax-only: \
   %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
  			%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
  			%{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\
  			%{L*} %D %{T*} %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}}";
+ #else /* EMX */
+ static char *link_command_spec = "\
+ %{!fsyntax-only: \
+  %{!c:%{!M:%{!MM:%{!E:%{!S:%{!Zomf:ld}%{Zomf:emxomfld}\
+ 			%l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
+ 			%{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\
+ 			%{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\
+ 			%{L*} %D %{T*} %o\
+ 			%{!nostdlib:\
+ 			  %{Zcrtdll=*:-l%* -los2 -lemx2}\
+ 			  %{!Zcrtdll:%{!Zcrtdll=*:-lgcc %L -lgcc\
+ 			     %{Zno-rte:-los2}\
+ 			     %{!Zno-rte:%{Zsys:-lsys -los2}\
+ 					%{!Zsys:-lemx -los2 -lemx2}}}}\
+ 			  %{!A:%E}}\n }}}}}}";
+ #endif /* EMX */
  #endif
  #endif
  
***************
*** 986,991 ****
--- 1023,1049 ----
  	  i++;
  	}
  
+ #ifdef EMX
+       /* Handle abbreviations.  Note that no abbreviation must expand
+          to more than two options.  */
+       else if (!strcmp (argv[i], "-Zmts"))
+ 	{
+ 	  newv[newindex++] = "-Zmt";
+ 	  newv[newindex++] = "-static";
+ 	  i++;
+ 	}
+       else if (!strcmp (argv[i], "-Zmtd"))
+ 	{
+ 	  newv[newindex++] = "-Zmt";
+ 	  newv[newindex++] = "-Zcrtdll=c_import";
+ 	  i++;
+ 	}
+       else if (!strcmp (argv[i], "-Zcrtdll"))
+ 	{
+ 	  newv[newindex++] = "-Zcrtdll=c_import";
+ 	  i++;
+ 	}
+ #endif /* EMX */
        /* Handle old-fashioned options--just copy them through,
  	 with their arguments.  */
        else if (argv[i][0] == '-')
***************
*** 1003,1008 ****
--- 1061,1070 ----
  	    nskip += 1;
  	  else if (! strcmp (p, "Xlinker"))
  	    nskip += 1;
+ #ifdef EMX
+ 	  else if (! strcmp (p, "Zlinker"))
+ 	    nskip += 1;
+ #endif /* EMX */
  
  	  /* Watch out for an option at the end of the command line that
  	     is missing arguments, and avoid skipping past the end of the
***************
*** 1997,2002 ****
--- 2059,2127 ----
  
  #if !defined(__MSDOS__) && !defined(OS2) && !defined(WINNT)
  
+ #ifdef __EMX__
+ 
+ static int
+ pexecute (search_flag, program, argv, not_last)
+      int search_flag;
+      char *program;
+      char *argv[];
+      int not_last;
+ {
+   int pid;
+   int pdes[2], org_stdin, org_stdout;
+   int input_desc = last_pipe_input;
+   int output_desc = STDOUT_FILE_NO;
+ 
+   /* If this isn't the last process, make a pipe for its output,
+      and record it as waiting to be the input to the next process.  */
+ 
+   if (not_last)
+     {
+       if (pipe (pdes) < 0)
+ 	pfatal_with_name ("pipe");
+       output_desc = pdes[WRITE_PORT];
+       last_pipe_input = pdes[READ_PORT];
+     }
+   else
+     last_pipe_input = STDIN_FILE_NO;
+ 
+   if (pipes_supported && input_desc != STDIN_FILE_NO)
+     {
+       org_stdin = dup (STDIN_FILE_NO);
+       dup2 (input_desc, STDIN_FILE_NO);
+       close (input_desc); 
+     }
+   if (pipes_supported && output_desc != STDOUT_FILE_NO)
+     {
+       org_stdout = dup (STDOUT_FILE_NO);
+       dup2 (output_desc, STDOUT_FILE_NO);
+       close (output_desc);
+     }
+   pid = (search_flag ? spawnv : spawnvp) (P_NOWAIT, program,
+                                           (char const * const *)argv);
+   if (pipes_supported && input_desc != STDIN_FILE_NO)
+     {
+       dup2 (org_stdin, STDIN_FILE_NO);
+       close (org_stdin);
+     }
+   if (pipes_supported && output_desc != STDOUT_FILE_NO)
+     {
+       dup2 (org_stdout, STDOUT_FILE_NO);
+       close (org_stdout);
+     }
+ 
+   if (pid == -1)
+     {
+       perror_exec (program);
+       exit (-1);
+     }
+ 
+   return pid;
+ }
+ 
+ #else /* not __EMX__ */
+ 
  static int
  pexecute (search_flag, program, argv, not_last)
       int search_flag;
***************
*** 2085,2090 ****
--- 2210,2216 ----
      }
  }
  
+ #endif /* not __EMX__ */
  #endif /* not __MSDOS__ and not OS2 */
  
  #if defined(OS2) || defined(WINNT)
***************
*** 2192,2197 ****
--- 2318,2327 ----
  #ifdef __MSDOS__
          fatal ("-pipe not supported under MS-DOS");
  #endif
+ #ifdef __EMX__
+         if (!pipes_supported)
+           fatal ("-pipe not supported under MS-DOS");
+ #endif /* __EMX__ */
  	argbuf[i] = 0;	/* termination of command args.  */
  	commands[n_commands].prog = argbuf[i + 1];
  	commands[n_commands].argv = &argbuf[i + 1];
***************
*** 2271,2276 ****
--- 2401,2410 ----
  	pid = wait (&status);
  #endif
  #endif
+ #ifdef __EMX__
+ 	while (pid < 0 && errno == EINTR)
+ 	  pid = wait (&status);
+ #endif /* __EMX__ */
  	if (pid < 0)
  	  abort ();
  
***************
*** 2597,2602 ****
--- 2731,2746 ----
  	  n_infiles++;
  	  i++;
  	}
+ #ifdef EMX
+       else if (strcmp (argv[i], "-Zlinker") == 0)
+ 	{
+ 	  if (i + 1 == argc)
+ 	    fatal ("argument to `-Zlinker' is missing");
+ 
+ 	  n_infiles += 2;
+ 	  i++;
+ 	}
+ #endif /* EMX */
        else if (strncmp (argv[i], "-l", 2) == 0)
  	n_infiles++;
        else if (argv[i][0] == '-' && argv[i][1] != 0)
***************
*** 2690,2695 ****
--- 2834,2843 ----
  		i += SWITCH_TAKES_ARG (c) - (p[1] != 0);
  	      else if (WORD_SWITCH_TAKES_ARG (p))
  		i += WORD_SWITCH_TAKES_ARG (p);
+ #ifdef EMX
+ 	      if (!strcmp (p, "Zomf"))
+ 		omf = 1;
+ #endif /* EMX */
  	    }
  	}
        else
***************
*** 2819,2824 ****
--- 2967,2981 ----
  	  infiles[n_infiles].language = spec_lang;
  	  infiles[n_infiles++].name = argv[++i];
  	}
+ #ifdef EMX
+       else if (strcmp (argv[i], "-Zlinker") == 0)
+ 	{
+ 	  infiles[n_infiles].language = spec_lang;
+ 	  infiles[n_infiles++].name = "-O";
+ 	  infiles[n_infiles].language = spec_lang;
+ 	  infiles[n_infiles++].name = argv[++i];
+ 	}
+ #endif /* EMX */
        else if (strncmp (argv[i], "-l", 2) == 0)
  	{
  	  infiles[n_infiles].language = spec_lang;
***************
*** 3036,3041 ****
--- 3193,3202 ----
  	  {
  	    obstack_1grow (&obstack, 0);
  	    string = obstack_finish (&obstack);
+ #ifdef EMX
+ 	    if (omf && (this_is_output_file || this_is_library_file))
+ 	      string = omf_file (string);
+ #endif /* EMX */
  	    if (this_is_library_file)
  	      string = find_file (string);
  	    store_arg (string, delete_this_arg, this_is_output_file);
***************
*** 3085,3090 ****
--- 3246,3255 ----
  	  {
  	    obstack_1grow (&obstack, 0);
  	    string = obstack_finish (&obstack);
+ #ifdef EMX
+ 	    if (omf && (this_is_output_file || this_is_library_file))
+ 	      string = omf_file (string);
+ #endif /* EMX */
  	    if (this_is_library_file)
  	      string = find_file (string);
  	    store_arg (string, delete_this_arg, this_is_output_file);
***************
*** 3104,3109 ****
--- 3269,3278 ----
  	  {
  	    obstack_1grow (&obstack, 0);
  	    string = obstack_finish (&obstack);
+ #ifdef EMX
+ 	    if (omf && (this_is_output_file || this_is_library_file))
+ 	      string = omf_file (string);
+ #endif /* EMX */
  	    if (this_is_library_file)
  	      string = find_file (string);
  	    store_arg (string, delete_this_arg, this_is_output_file);
***************
*** 4169,4174 ****
--- 4338,4367 ----
    return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode));
  }
  
+ #ifdef EMX
+ 
+ /* If NAME ends with `.o', create a new string ending with `.obj'
+    instead.  Otherwise, return NAME.  The new string is allocated with
+    malloc. */
+ 
+ static char *
+ omf_file (name)
+      char *name;
+ {
+   int len = strlen (name);
+ 
+   if (len >= 3 && strcmp (name + len - 2, ".o") == 0)
+     {
+       char *p = xmalloc (len + 3);
+       bcopy (name, p, len);
+       bcopy ("bj", p + len, 3);
+       return p;
+     }
+   else
+     return name;
+ }
+ #endif /* EMX */
+ 
  /* On fatal signals, delete all the temporary files.  */
  
  static void
***************
*** 4200,4205 ****
--- 4393,4408 ----
    while (p != argv[0] && p[-1] != '/' && p[-1] != DIR_SEPARATOR) --p;
    programname = p;
  
+ #ifdef __EMX__
+   _emxload_env ("GCCLOAD");
+   _envargs (&argc, &argv, "GCCOPT");
+   _response (&argc, &argv);
+   _wildcard (&argc, &argv);
+ 
+   /* pipe() is supported under OS/2 and by RSX.  */
+   pipes_supported = _osmode != DOS_MODE || (_emx_env & 0x1000);
+ #endif /* __EMX__ */
+ 
    if (signal (SIGINT, SIG_IGN) != SIG_IGN)
      signal (SIGINT, fatal_error);
  #ifdef SIGHUP
***************
*** 4492,4497 ****
--- 4695,4718 ----
  	}
        obstack_grow (&collect_obstack, "\0", 1);
        putenv (obstack_finish (&collect_obstack));
+ 
+ #ifdef EMX
+       /* Substitute the basename of the first input file for %b in
+ 	 link_command_spec. */
+ 
+       input_basename = infiles[0].name;
+       for (p = input_basename; *p; p++)
+ 	if (*p == '/')
+ 	  input_basename = p + 1;
+ 
+       /* Find a suffix starting with the last period,
+ 	 and set basename_length to exclude that suffix.  */
+       basename_length = strlen (input_basename);
+       p = input_basename + basename_length;
+       while (p != input_basename && *p != '.') --p;
+       if (*p == '.' && p != input_basename)
+ 	basename_length = p - input_basename;
+ #endif /* EMX */
  
        value = do_spec (link_command_spec);
        if (value < 0)
diff -cr gcc-2.6/toplev.c \emx\gnu\gcc-2.6/toplev.c
*** gcc-2.6/toplev.c	Tue Oct 25 21:09:12 1994
--- /emx/gnu/gcc-2.6/toplev.c	Fri Dec 02 23:40:06 1994
***************
*** 1,3 ****
--- 1,5 ----
+ /* toplev.c -- changed for emx by Eberhard Mattes -- Dec 1994 */
+ 
  /* Top level of GNU C compiler
     Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc.
  
***************
*** 2032,2037 ****
--- 2034,2048 ----
  
    if (dump_base_name == 0)
      dump_base_name = name ? name : "gccdump";
+ #ifdef __EMX__
+   {
+     int len = strlen (dump_base_name);
+     char *tem = (char *) xmalloc (len + 1);
+     strcpy (tem, dump_base_name);
+     strip_off_ending (tem, len);
+     dump_base_name = tem;
+   }
+ #endif /* __EMX__ */
  
    parse_time = 0;
    varconst_time = 0;
***************
*** 2107,2153 ****
--- 2118,2208 ----
  
    /* If jump_opt dump desired, open the output file.  */
    if (jump_opt_dump)
+ #ifndef __EMX__
      jump_opt_dump_file = open_dump_file (dump_base_name, ".jump");
+ #else /* __EMX__ */
+     jump_opt_dump_file = open_dump_file (dump_base_name, ".jp1");
+ #endif /* __EMX__ */
  
    /* If cse dump desired, open the output file.  */
    if (cse_dump)
+ #ifndef __EMX__
      cse_dump_file = open_dump_file (dump_base_name, ".cse");
+ #else /* __EMX__ */
+     cse_dump_file = open_dump_file (dump_base_name, ".cs1");
+ #endif /* __EMX__ */
  
    /* If loop dump desired, open the output file.  */
    if (loop_dump)
+ #ifndef __EMX__
      loop_dump_file = open_dump_file (dump_base_name, ".loop");
+ #else /* __EMX__ */
+     loop_dump_file = open_dump_file (dump_base_name, ".loo");
+ #endif /* __EMX__ */
  
    /* If cse2 dump desired, open the output file.  */
    if (cse2_dump)
+ #ifndef __EMX__
      cse2_dump_file = open_dump_file (dump_base_name, ".cse2");
+ #else /* __EMX__ */
+     cse2_dump_file = open_dump_file (dump_base_name, ".cs2");
+ #endif /* __EMX__ */
  
    /* If flow dump desired, open the output file.  */
    if (flow_dump)
+ #ifndef __EMX__
      flow_dump_file = open_dump_file (dump_base_name, ".flow");
+ #else /* __EMX__ */
+     flow_dump_file = open_dump_file (dump_base_name, ".flo");
+ #endif /* __EMX__ */
  
    /* If combine dump desired, open the output file.  */
    if (combine_dump)
+ #ifndef __EMX__
      combine_dump_file = open_dump_file (dump_base_name, ".combine");
+ #else /* __EMX__ */
+     combine_dump_file = open_dump_file (dump_base_name, ".cmb");
+ #endif /* __EMX__ */
  
    /* If scheduling dump desired, open the output file.  */
    if (sched_dump)
+ #ifndef __EMX__
      sched_dump_file = open_dump_file (dump_base_name, ".sched");
+ #else /* __EMX__ */
+     sched_dump_file = open_dump_file (dump_base_name, ".sd1");
+ #endif /* __EMX__ */
  
    /* If local_reg dump desired, open the output file.  */
    if (local_reg_dump)
+ #ifndef __EMX__
      local_reg_dump_file = open_dump_file (dump_base_name, ".lreg");
+ #else /* __EMX__ */
+     local_reg_dump_file = open_dump_file (dump_base_name, ".lre");
+ #endif /* __EMX__ */
  
    /* If global_reg dump desired, open the output file.  */
    if (global_reg_dump)
+ #ifndef __EMX__
      global_reg_dump_file = open_dump_file (dump_base_name, ".greg");
+ #else /* __EMX__ */
+     global_reg_dump_file = open_dump_file (dump_base_name, ".gre");
+ #endif /* __EMX__ */
  
    /* If 2nd scheduling dump desired, open the output file.  */
    if (sched2_dump)
+ #ifndef __EMX__
      sched2_dump_file = open_dump_file (dump_base_name, ".sched2");
+ #else /* __EMX__ */
+     sched2_dump_file = open_dump_file (dump_base_name, ".sd2");
+ #endif /* __EMX__ */
  
    /* If jump2_opt dump desired, open the output file.  */
    if (jump2_opt_dump)
+ #ifndef __EMX__
      jump2_opt_dump_file = open_dump_file (dump_base_name, ".jump2");
+ #else /* __EMX__ */
+     jump2_opt_dump_file = open_dump_file (dump_base_name, ".jp2");
+ #endif /* __EMX__ */
  
    /* If dbr_sched dump desired, open the output file.  */
    if (dbr_sched_dump)
***************
*** 2157,2163 ****
--- 2212,2222 ----
  
    /* If stack_reg dump desired, open the output file.  */
    if (stack_reg_dump)
+ #ifndef __EMX__
      stack_reg_dump_file = open_dump_file (dump_base_name, ".stack");
+ #else /* __EMX__ */
+     stack_reg_dump_file = open_dump_file (dump_base_name, ".stk");
+ #endif /* __EMX__ */
  
  #endif
  
***************
*** 3348,3353 ****
--- 3407,3416 ----
    int version_flag = 0;
    char *p;
  
+ #ifdef __EMX__
+   _emxload_env ("GCCLOAD");
+ #endif /* __EMX__ */
+ 
    /* save in case md file wants to emit args as a comment.  */
    save_argc = argc;
    save_argv = argv;
***************
*** 3959,3969 ****
--- 4022,4034 ----
  	       lim - (char *) &environ);
        fflush (stderr);
  
+ #ifndef __EMX__
  #ifdef USG
        system ("ps -l 1>&2");
  #else /* not USG */
        system ("ps v");
  #endif /* not USG */
+ #endif /* not __EMX__ */
      }
  #endif /* not OS2 and not VMS and not WINNT */
  
diff -cr gcc-2.6/varasm.c \emx\gnu\gcc-2.6/varasm.c
*** gcc-2.6/varasm.c	Tue Nov 22 04:22:10 1994
--- /emx/gnu/gcc-2.6/varasm.c	Fri Dec 02 23:40:10 1994
***************
*** 1,3 ****
--- 1,5 ----
+ /* varasm.c -- changed for emx by Eberhard Mattes -- Dec 1994 */
+ 
  /* Output variables, constants and external declarations, for GNU compiler.
     Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc.
  
***************
*** 718,723 ****
--- 720,726 ----
      text_section ();
  
    /* Tell assembler to move to target machine's alignment for functions.  */
+ #ifndef EMX
    align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
    if (align > 0)
      {
***************
*** 726,731 ****
--- 729,744 ----
        else
  	ASM_OUTPUT_ALIGN (asm_out_file, align);
      }
+ #else /* EMX */
+   if (output_bytecode)
+     {
+       align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
+       if (align > 0)
+ 	BC_OUTPUT_ALIGN (asm_out_file, align);
+     }
+   else
+     ASM_OUTPUT_ALIGN_CODE (asm_out_file);
+ #endif /* EMX */
  
  #ifdef ASM_OUTPUT_FUNCTION_PREFIX
    ASM_OUTPUT_FUNCTION_PREFIX (asm_out_file, fnname);
***************
*** 1563,1569 ****
--- 1576,1584 ----
  {
    char label[256];
    char *name;
+ #ifndef EMX
    int align;
+ #endif /* EMX */
  
    /* Shouldn't get here */
    if (output_bytecode)
***************
*** 1578,1586 ****
--- 1593,1605 ----
  #endif
  
    /* Write the assembler code to define one.  */
+ #ifndef EMX
    align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
    if (align > 0)
      ASM_OUTPUT_ALIGN (asm_out_file, align);
+ #else /* EMX */
+   ASM_OUTPUT_ALIGN_CODE (asm_out_file);
+ #endif /* EMX */
  
    ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "LTRAMP", 0);
    TRAMPOLINE_TEMPLATE (asm_out_file);
