home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 22 gnu
/
22-gnu.zip
/
rcs57pc3.zip
/
diff
/
pc
/
patches.diff
< prev
next >
Wrap
Text File
|
1999-03-29
|
4KB
|
139 lines
diff -cbr diffutils-2.7.1/diff.c diff/diff.c
*** diffutils-2.7.1/diff.c Mon Nov 14 05:10:56 1994
--- diff/diff.c Sun Feb 21 20:34:02 1999
***************
*** 572,579 ****
--- 572,583 ----
On Posix hosts, this has no effect. */
#if HAVE_SETMODE
binary_I_O = 1;
+ #ifdef __IBMC__
+ freopen("", "wb", stdout);
+ #else
setmode (STDOUT_FILENO, O_BINARY);
#endif
+ #endif
break;
default:
***************
*** 982,987 ****
--- 986,1000 ----
}
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)
{
diff -cbr diffutils-2.7.1/diff.h diff/diff.h
*** diffutils-2.7.1/diff.h Mon Oct 31 07:27:26 1994
--- diff/diff.h Tue Sep 22 19:17:50 1998
***************
*** 19,24 ****
--- 19,27 ----
#include "system.h"
#include <stdio.h>
+ #ifdef __IBMC__
+ #include <popen.h>
+ #endif
#include "regex.h"
#define TAB_WIDTH 8
diff -cbr diffutils-2.7.1/diff3.c diff/diff3.c
*** diffutils-2.7.1/diff3.c Mon Nov 14 05:10:56 1994
--- diff/diff3.c Wed Mar 20 07: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 diffutils-2.7.1/dir.c diff/dir.c
*** diffutils-2.7.1/dir.c Mon Sep 12 17:52:22 1994
--- diff/dir.c Sun Mar 03 19: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 diffutils-2.7.1/sdiff.c diff/sdiff.c
*** diffutils-2.7.1/sdiff.c Mon Nov 14 05:10:56 1994
--- diff/sdiff.c Sun Sep 06 09:49:54 1998
***************
*** 687,693 ****
SIGXFSZ,
#endif
SIGINT,
! SIGPIPE
};
/* Prefer `sigaction' if it is available, since `signal' can lose signals. */
--- 687,695 ----
SIGXFSZ,
#endif
SIGINT,
! #ifdef SIGPIPE
! SIGPIPE,
! #endif
};
/* Prefer `sigaction' if it is available, since `signal' can lose signals. */
***************
*** 783,791 ****
--- 785,795 ----
{
cleanup ();
+ #if 0
/* Yield an exit status indicating that a signal was received. */
untrapsig (s);
kill (getpid (), s);
+ #endif
/* That didn't work, so exit with error status. */
exit (2);