home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / rcs57pc3.zip / diff / pc / patches.diff < prev    next >
Text File  |  1999-03-29  |  4KB  |  139 lines

  1. diff -cbr diffutils-2.7.1/diff.c diff/diff.c
  2. *** diffutils-2.7.1/diff.c    Mon Nov 14 05:10:56 1994
  3. --- diff/diff.c    Sun Feb 21 20:34:02 1999
  4. ***************
  5. *** 572,579 ****
  6. --- 572,583 ----
  7.            On Posix hosts, this has no effect.  */
  8.   #if HAVE_SETMODE
  9.         binary_I_O = 1;
  10. + #ifdef __IBMC__
  11. +       freopen("", "wb", stdout);
  12. + #else
  13.         setmode (STDOUT_FILENO, O_BINARY);
  14.   #endif
  15. + #endif
  16.         break;
  17.   
  18.       default:
  19. ***************
  20. *** 982,987 ****
  21. --- 986,1000 ----
  22.           }
  23.         else
  24.           stat_result = stat (inf[i].name, &inf[i].stat);
  25. + #ifdef __EMX__
  26. +       /* HACK: Treat 'nul' as a nonexistent file. */
  27. +       if (stat_result != 0 && errno == EINVAL && stricmp (inf[i].name, "nul") == 0)
  28. +         {
  29. +           stat_result = 0;
  30. +           inf[i].desc = -1;
  31. +         }
  32. + #endif /*__EMX__*/
  33.   
  34.         if (stat_result != 0)
  35.           {
  36. diff -cbr diffutils-2.7.1/diff.h diff/diff.h
  37. *** diffutils-2.7.1/diff.h    Mon Oct 31 07:27:26 1994
  38. --- diff/diff.h    Tue Sep 22 19:17:50 1998
  39. ***************
  40. *** 19,24 ****
  41. --- 19,27 ----
  42.   
  43.   #include "system.h"
  44.   #include <stdio.h>
  45. + #ifdef __IBMC__
  46. + #include <popen.h>
  47. + #endif
  48.   #include "regex.h"
  49.   
  50.   #define TAB_WIDTH 8
  51. diff -cbr diffutils-2.7.1/diff3.c diff/diff3.c
  52. *** diffutils-2.7.1/diff3.c    Mon Nov 14 05:10:56 1994
  53. --- diff/diff3.c    Wed Mar 20 07:22:02 1996
  54. ***************
  55. *** 940,947 ****
  56.    * Routines to input and parse two way diffs.
  57.    */
  58.   
  59. - extern char **environ;
  60.   static struct diff_block *
  61.   process_diff (filea, fileb, last_block)
  62.        char const *filea, *fileb;
  63. --- 940,945 ----
  64. ***************
  65. *** 1179,1185 ****
  66.         dup2 (fds[1], STDOUT_FILENO);
  67.         close (fds[1]);
  68.       }
  69. !       execve (diff_program, (char **) argv, environ);
  70.         /* Avoid stdio, because the parent process's buffers are inherited.  */
  71.         write (STDERR_FILENO, diff_program, strlen (diff_program));
  72.         write (STDERR_FILENO, ": not found\n", 12);
  73. --- 1177,1183 ----
  74.         dup2 (fds[1], STDOUT_FILENO);
  75.         close (fds[1]);
  76.       }
  77. !       execv (diff_program, (char **) argv);
  78.         /* Avoid stdio, because the parent process's buffers are inherited.  */
  79.         write (STDERR_FILENO, diff_program, strlen (diff_program));
  80.         write (STDERR_FILENO, ": not found\n", 12);
  81. diff -cbr diffutils-2.7.1/dir.c diff/dir.c
  82. *** diffutils-2.7.1/dir.c    Mon Sep 12 17:52:22 1994
  83. --- diff/dir.c    Sun Mar 03 19:30:34 1996
  84. ***************
  85. *** 91,97 ****
  86.         data_used += d_size;
  87.         nnames++;
  88.       }
  89. !       if (errno)
  90.       {
  91.         int e = errno;
  92.         closedir (reading);
  93. --- 91,97 ----
  94.         data_used += d_size;
  95.         nnames++;
  96.       }
  97. !       if (errno && errno != ENOENT)
  98.       {
  99.         int e = errno;
  100.         closedir (reading);
  101. diff -cbr diffutils-2.7.1/sdiff.c diff/sdiff.c
  102. *** diffutils-2.7.1/sdiff.c    Mon Nov 14 05:10:56 1994
  103. --- diff/sdiff.c    Sun Sep 06 09:49:54 1998
  104. ***************
  105. *** 687,693 ****
  106.          SIGXFSZ,
  107.   #endif
  108.          SIGINT,
  109. !        SIGPIPE
  110.   };
  111.   
  112.   /* Prefer `sigaction' if it is available, since `signal' can lose signals.  */
  113. --- 687,695 ----
  114.          SIGXFSZ,
  115.   #endif
  116.          SIGINT,
  117. ! #ifdef SIGPIPE
  118. !        SIGPIPE,
  119. ! #endif
  120.   };
  121.   
  122.   /* Prefer `sigaction' if it is available, since `signal' can lose signals.  */
  123. ***************
  124. *** 783,791 ****
  125. --- 785,795 ----
  126.       {
  127.         cleanup ();
  128.   
  129. + #if 0
  130.         /* Yield an exit status indicating that a signal was received.  */
  131.         untrapsig (s);
  132.         kill (getpid (), s);
  133. + #endif
  134.   
  135.         /* That didn't work, so exit with error status.  */
  136.         exit (2);
  137.