1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
--- ./waitpid.c 1999/08/12 19:21:32 1.1
+++ ./waitpid.c 1999/09/06 08:51:02
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with GNU DIFF; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
+#if HAVE_FORK
#include "system.h"
#define WAITPID_CHILDREN 8
@@ -66,3 +66,4 @@
*stat_loc = waited_status[i];
return p;
}
+#endif
--- ./Makefile.in 1999/08/11 18:33:08 1.1
+++ ./Makefile.in 1999/09/06 09:40:18
@@ -158,10 +158,10 @@
# We need more tests.
check:
- ./cmp cmp cmp
- ./diff diff diff
- ./diff3 diff3 diff3 diff3
- ./sdiff sdiff sdiff
+ ./cmp cmp.exe cmp.exe
+ ./diff diff.exe diff.exe
+ ./diff3 diff3.exe diff3.exe diff3.exe
+ ./sdiff sdiff.exe sdiff.exe
uninstall:
for p in $(PROGRAMS); do \
--- ./diff3.c 1999/08/12 19:20:24 1.1
+++ ./diff3.c 1999/09/06 09:11:34
@@ -1188,16 +1188,11 @@
#else /* ! HAVE_FORK */
FILE *fpipe;
- char *command = xmalloc (sizeof (diff_program) + 30 + INT_STRLEN_BOUND (int)
+ char *command = xmalloc (sizeof (diff_program) + 50 + INT_STRLEN_BOUND (int)
+ 4 * (strlen (filea) + strlen (fileb)));
char *p;
- sprintf (command, "%s -a --horizon-lines=%d -- ",
- diff_program, horizon_lines);
+ sprintf (command, "\"%s -a --horizon-lines=%d -- %s %s\"", diff_program, horizon_lines, filea, fileb);
p = command + strlen (command);
- SYSTEM_QUOTE_ARG (p, filea);
- *p++ = ' ';
- SYSTEM_QUOTE_ARG (p, fileb);
- *p = '\0';
fpipe = popen (command, "r");
if (!fpipe)
perror_with_exit (command);
--- ./sdiff.c 1999/08/12 19:20:43 1.1
+++ ./sdiff.c 1999/09/06 09:22:28
@@ -549,6 +549,7 @@
for (i = 0; diffargv[i]; i++)
cmdsize += 4 * strlen (diffargv[i]) + 3;
command = p = xmalloc (cmdsize);
+#ifndef __MINGW32__
for (i = 0; diffargv[i]; i++)
{
char const *a = diffargv[i];
@@ -556,6 +557,21 @@
*p++ = ' ';
}
p[-1] = '\0';
+#else
+ *command = '\\';
+ command[1] ='"';
+ command[2] = '\0';
+ for (i = 0; diffargv[i]; i++){
+ p = strchr(command, '\0');
+ strcpy(--p, diffargv[i]);
+ p = strchr(command, '\0');
+ *p = ' ';
+ p[1] = '\0';
+ }
+ *p++ = '\\';
+ *p++ = '\"';
+ *p = '\0';
+#endif
diffout = popen (command, "r");
if (!diffout)
perror_fatal (command);
@@ -692,7 +708,9 @@
SIGXFSZ,
#endif
SIGINT,
+#ifdef SIGPIPE
SIGPIPE
+#endif
};
/* Prefer `sigaction' if it is available, since `signal' can lose signals. */
--- ./cmp.c 1999/08/12 19:20:03 1.1
+++ ./cmp.c 1999/09/06 09:07:32
@@ -221,6 +221,7 @@
/* If output is redirected to the null device, we may assume `-s'. */
+#ifndef _WIN32
if (comparison_type != type_status)
{
struct stat outstat, nullstat;
@@ -230,6 +231,7 @@
&& 0 < same_file (&outstat, &nullstat))
comparison_type = type_status;
}
+#endif
/* If only a return code is needed,
and if both input descriptors are associated with plain files,
|