diff -cr gcc-2.7/cccp.c \emx\gnu\gcc-2.7/cccp.c
*** gcc-2.7/cccp.c	Thu Jun 15 12:16:30 1995
--- /emx/gnu/gcc-2.7/cccp.c	Mon Jun 26 23:23:54 1995
***************
*** 1,3 ****
--- 1,4 ----
+ /* cccp.c -- changed for emx by Eberhard Mattes -- Jun 1995 */
  /* C Compatible Compiler Preprocessor (CCCP)
     Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
     Written by Paul Rubin, June 1986
***************
*** 383,388 ****
--- 384,397 ----
  
  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;
***************
*** 1343,1348 ****
--- 1352,1361 ----
    }
  #endif
  
+ #ifdef __EMX__
+   _emxload_env ("GCCLOAD");
+ #endif /* __EMX__ */
+ 
    in_fname = NULL;
    out_fname = NULL;
  
***************
*** 1792,1797 ****
--- 1805,1822 ----
  	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 = "";
***************
*** 2205,2211 ****
--- 2230,2240 ----
  
        /* 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
***************
*** 4487,4492 ****
--- 4516,4524 ----
  #ifdef DIR_SEPARATOR
        || *fbeg == DIR_SEPARATOR
  #endif
+ #ifdef __EMX__
+       || _fngetdrive (fbeg) != 0
+ #endif /* __EMX__ */
        ) {
      strncpy (fname, (char *) fbeg, flen);
      fname[flen] = 0;
diff -cr gcc-2.7/cp/decl.c \emx\gnu\gcc-2.7/cp/decl.c
*** gcc-2.7/cp/decl.c	Fri Jun 16 00:10:00 1995
--- /emx/gnu/gcc-2.7/cp/decl.c	Tue Jul 11 02:26:06 1995
***************
*** 98,104 ****
  
  #ifndef BOOL_TYPE_SIZE
  #ifdef SLOW_BYTE_ACCESS
! #define BOOL_TYPE_SIZE BITS_PER_WORD
  #else
  #define BOOL_TYPE_SIZE BITS_PER_UNIT
  #endif
--- 98,104 ----
  
  #ifndef BOOL_TYPE_SIZE
  #ifdef SLOW_BYTE_ACCESS
! #define BOOL_TYPE_SIZE ((SLOW_BYTE_ACCESS) ? (BITS_PER_WORD) : (BITS_PER_UNIT))
  #else
  #define BOOL_TYPE_SIZE BITS_PER_UNIT
  #endif
diff -cr gcc-2.7/explow.c \emx\gnu\gcc-2.7/explow.c
*** gcc-2.7/explow.c	Thu Jun 15 12:30:10 1995
--- /emx/gnu/gcc-2.7/explow.c	Mon Jun 26 23:23:54 1995
***************
*** 1,3 ****
--- 1,4 ----
+ /* explow.c -- changed for emx by Eberhard Mattes -- Jun 1995 */
  /* Subroutines for manipulating rtx's in semantically interesting ways.
     Copyright (C) 1987, 1991, 1994, 1995 Free Software Foundation, Inc.
  
***************
*** 773,778 ****
--- 774,814 ----
    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.7/gcc.c \emx\gnu\gcc-2.7/gcc.c
*** gcc-2.7/gcc.c	Thu Jun 15 12:38:02 1995
--- /emx/gnu/gcc-2.7/gcc.c	Tue Jun 27 22:12:42 1995
***************
*** 1,3 ****
--- 1,4 ----
+ /* gcc.c -- changed for emx by Eberhard Mattes -- Jun 1995 */
  /* Compiler driver program that can handle many languages.
     Copyright (C) 1987, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
  
***************
*** 118,123 ****
--- 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 */
***************
*** 173,179 ****
--- 180,188 ----
  extern int errno;
  #endif
  
+ #ifndef __EMX__
  extern int sys_nerr;
+ #endif /* __EMX__ */
  #ifndef HAVE_STRERROR
  #if defined(bsd4_4)
  extern const char *const sys_errlist[];
***************
*** 265,270 ****
--- 274,287 ----
  /* 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;
+ #endif /* EMX */
+ 
  static void set_spec		PROTO((char *, char *));
  static struct compiler *lookup_compiler PROTO((char *, int, char *));
  static char *build_search_list	PROTO((struct path_prefix *, char *, int));
***************
*** 726,731 ****
--- 743,749 ----
  			%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\n }}}}}}";
  #else
  /* Use -L.  */
+ #ifndef EMX
  static char *link_command_spec = "\
  %{!fsyntax-only: \
   %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \
***************
*** 734,739 ****
--- 752,773 ----
  			%{static:} %{L*} %D %{T*} %o\
  			%{!nostdlib:%{!nodefaultlibs:%G %L %G}}\
  			%{!A:%{!nostdlib:%{!nostartfiles:%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:%{!nostdlib:%{!nostartfiles:%S}}}\
+ 			%{static:} %{L*} %D %{T*} %o\
+ 			%{!nostdlib:%{!nodefaultlibs:\
+ 			  %{Zcrtdll=*:-l%* -los2 -lemx2}\
+ 			  %{!Zcrtdll:%{!Zcrtdll=*:%G %L %G\
+ 			     %{Zno-rte:-los2}\
+ 			     %{!Zno-rte:%{Zsys:-lsys -los2}\
+ 					%{!Zsys:-lemx -los2 -lemx2}}}}}}\
+ 			%{!A:%{!nostdlib:%{!nostartfiles:%E}}}\n }}}}}}";
+ #endif /* EMX */
  #endif
  
  /* A vector of options to give to the linker.
***************
*** 967,972 ****
--- 1001,1028 ----
  	  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] == '-')
***************
*** 984,989 ****
--- 1040,1049 ----
  	    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
***************
*** 2019,2024 ****
--- 2079,2146 ----
  
  #endif
  
+ #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, 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__ */
+ 
  #if !defined(__MSDOS__) && !defined(OS2) && !defined(_WIN32)
  
  static int
***************
*** 2111,2116 ****
--- 2233,2240 ----
  
  #endif /* not __MSDOS__ and not OS2 and not _WIN32 */
  
+ #endif /* not __EMX__ */
+ 
  #if defined(OS2) || defined(_WIN32)
  
  #ifdef _WIN32
***************
*** 2218,2223 ****
--- 2342,2351 ----
  #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];
***************
*** 2299,2304 ****
--- 2427,2436 ----
  	pid = wait (&status);
  #endif
  #endif
+ #ifdef __EMX__
+ 	while (pid < 0 && errno == EINTR)
+ 	  pid = wait (&status);
+ #endif /* __EMX__ */
  	if (pid < 0)
  	  abort ();
  
***************
*** 2629,2634 ****
--- 2761,2776 ----
  	  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)
***************
*** 2722,2727 ****
--- 2864,2873 ----
  		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
***************
*** 2853,2858 ****
--- 2999,3013 ----
  	  infiles[n_infiles].language = 0;
  	  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 = 0;
***************
*** 3394,3400 ****
--- 3549,3562 ----
  	    break;
  
  	  case 'O':
+ #ifdef EMX
+             if (omf)
+               obstack_grow (&obstack, ".obj", 4);
+             else
+               obstack_grow (&obstack, ".o", 2);
+ #else /* not EMX */
  	    obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX));
+ #endif /* not EMX */
  	    arg_going = 1;
  	    break;
  
***************
*** 4246,4251 ****
--- 4408,4423 ----
    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
***************
*** 4577,4582 ****
--- 4749,4772 ----
  	}
        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.7/toplev.c \emx\gnu\gcc-2.7/toplev.c
*** gcc-2.7/toplev.c	Thu Jun 15 13:09:50 1995
--- /emx/gnu/gcc-2.7/toplev.c	Mon Jun 26 23:23:56 1995
***************
*** 1,3 ****
--- 1,4 ----
+ /* toplev.c -- changed for emx by Eberhard Mattes -- Jun 1995 */
  /* Top level of GNU C compiler
     Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
  
***************
*** 1983,1988 ****
--- 1984,1998 ----
  
    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;
***************
*** 2058,2104 ****
--- 2068,2158 ----
  
    /* 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)
***************
*** 2108,2114 ****
--- 2162,2172 ----
  
    /* 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
  
***************
*** 3310,3315 ****
--- 3368,3377 ----
    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;
***************
*** 3927,3937 ****
--- 3989,4001 ----
  	       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 _WIN32 */
  
diff -cr gcc-2.7/varasm.c \emx\gnu\gcc-2.7/varasm.c
*** gcc-2.7/varasm.c	Thu Jun 15 13:12:06 1995
--- /emx/gnu/gcc-2.7/varasm.c	Mon Jun 26 23:23:56 1995
***************
*** 1,3 ****
--- 1,4 ----
+ /* varasm.c -- changed for emx by Eberhard Mattes -- Jun 1995 */
  /* Output variables, constants and external declarations, for GNU compiler.
     Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
  
***************
*** 772,777 ****
--- 773,779 ----
    function_section (decl);
  
    /* Tell assembler to move to target machine's alignment for functions.  */
+ #ifndef EMX
    align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
    if (align > 0)
      {
***************
*** 780,785 ****
--- 782,797 ----
        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);
***************
*** 1645,1651 ****
--- 1657,1665 ----
  {
    char label[256];
    char *name;
+ #ifndef EMX
    int align;
+ #endif /* EMX */
  
    /* Shouldn't get here */
    if (output_bytecode)
***************
*** 1660,1668 ****
--- 1674,1686 ----
  #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);
