diff -cbr orig/pc/config.h new/pc/config.h
*** orig/pc/config.h	Sun Nov 13 22:37:46 1994
--- new/pc/config.h	Sat Jan 28 15:28:12 1995
***************
*** 134,139 ****
--- 134,145 ----
  #include <io.h>
  #include <process.h>
  
+ /* The PC tradition is that file names that differ only in case are the same,
+    and using `stricmp' is required for proper behavior with HPFS.
+    OS/2 does not strictly forbid case sensitive file systems like NFS,
+    but it's too painful to get this right, unfortunately.  */
+ #define filename_cmp(a, b) stricmp (a, b)
+ 
  char *filename_lastdirchar (char const *);
  #define filename_lastdirchar (filename_lastdirchar)
  
*** 153,156 ****
--- 153,164 ----
  #define TMPDIR_ENV "TEMP"
  
  #define PR_PROGRAM "pr"
+ #define DIFF_PROGRAM "diff.exe"
+ #define NULL_DEVICE "nul"
+ #define DEFAULT_EDITOR_PROGRAM "edit"
+ 
+ #ifdef _MSC_VER
+ #define alloca _alloca
+ #define getenv getenv
+ #endif
diff -cbr orig/pc/emx/config.h new/pc/emx/config.h
*** orig/pc/emx/config.h	Wed Nov 09 19:22:06 1994
--- new/pc/emx/config.h	Sun Nov 20 19:29:36 1994
***************
*** 1,5 ****
--- 1,9 ----
  /* emx configuration */
  
+ #ifdef __CRTRSXNT__
+ #include <crtrsxnt.h>
+ #endif
+ 
  #include <malloc.h>
  #include <pc/config.h>
  
***************
*** 9,17 ****
      _wildcard (pargc, pargv); \
      _emxload_env ("RCSLOAD"); \
      setvbuf (stdout, NULL, _IOFBF, BUFSIZ); \
    }
  
! #define pid_t int
  
  /* diffutils doesn't need re_comp,
     but the shared library that diffutils builds
--- 13,26 ----
      _wildcard (pargc, pargv); \
      _emxload_env ("RCSLOAD"); \
      setvbuf (stdout, NULL, _IOFBF, BUFSIZ); \
+     if (*pargc == 1) { \
+       program_name = (*pargv)[0]; \
+       printf ("\nGNU diffutils version %s\n\n", version_string); \
+       usage (); exit(0); \
+     } \
    }
  
! /* #define pid_t int */
  
  /* diffutils doesn't need re_comp,
     but the shared library that diffutils builds
diff -cbr orig/dir.c new/dir.c
*** orig/dir.c	Mon Sep 12 17:52:22 1994
--- new/dir.c	Sun Mar 03 20:30:34 1996
***************
*** 91,97 ****
  	  data_used += d_size;
  	  nnames++;
  	}
!       if (errno)
  	{
  	  int e = errno;
  	  closedir (reading);
--- 91,97 ----
  	  data_used += d_size;
  	  nnames++;
  	}
!       if (errno && errno != ENOENT)
  	{
  	  int e = errno;
  	  closedir (reading);
diff -cbr orig/diff3.c new/diff3.c
*** orig/diff3.c	Mon Nov 14 07:10:56 1994
--- new/diff3.c	Wed Mar 20 08:22:02 1996
***************
*** 940,947 ****
   * Routines to input and parse two way diffs.
   */
  
- extern char **environ;
- 
  static struct diff_block *
  process_diff (filea, fileb, last_block)
       char const *filea, *fileb;
--- 940,945 ----
***************
*** 1179,1185 ****
  	  dup2 (fds[1], STDOUT_FILENO);
  	  close (fds[1]);
  	}
!       execve (diff_program, (char **) argv, environ);
        /* Avoid stdio, because the parent process's buffers are inherited.  */
        write (STDERR_FILENO, diff_program, strlen (diff_program));
        write (STDERR_FILENO, ": not found\n", 12);
--- 1177,1183 ----
  	  dup2 (fds[1], STDOUT_FILENO);
  	  close (fds[1]);
  	}
!       execv (diff_program, (char **) argv);
        /* Avoid stdio, because the parent process's buffers are inherited.  */
        write (STDERR_FILENO, diff_program, strlen (diff_program));
        write (STDERR_FILENO, ": not found\n", 12);
diff -cbr orig/diff.c new/diff.c
*** orig/diff.c	Mon Nov 14 07:10:56 1994
--- new/diff.c	Mon Dec 29 15:15:58 1997
***************
*** 983,988 ****
--- 983,997 ----
  	  else
  	    stat_result = stat (inf[i].name, &inf[i].stat);
  
+ #ifdef __EMX__
+ 	  /* HACK: Treat 'nul' as a nonexistent file. */
+ 	  if (stat_result != 0 && errno == EINVAL && stricmp (inf[i].name, "nul") == 0)
+ 	    {
+ 	      stat_result = 0;
+ 	      inf[i].desc = -1;
+ 	    }
+ #endif /*__EMX__*/
+ 
  	  if (stat_result != 0)
  	    {
  	      perror_with_name (inf[i].name);

