summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.maint4
-rw-r--r--src/c99-to-c89.diff67
3 files changed, 53 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index e62602020..91927ee30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-09 Jim Meyering <jim@meyering.net>
+
+ Compensate for new c99'isms in seq.c.
+ * Makefile.maint (patch-check): Use -p1, not -p2, so a patch
+ generated via "make patch-check REGEN=1" actually works.
+ * src/c99-to-c89.diff: Handle new c99'isms in seq.c.
+
2007-07-09 Pádraig Brady <P@draigBrady.com>
Fix the automatic number width formatting in seq.
diff --git a/Makefile.maint b/Makefile.maint
index 04efbc297..3bdfeac3b 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -359,10 +359,10 @@ sc_useless_cpp_parens:
patch-check:
rm -rf src-c89 $@.1 $@.2
cp -a src src-c89
- (cd src-c89; patch -p2 -V never --fuzz=0) < src/c99-to-c89.diff \
+ (cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
> $@.1 2>&1
if test "$${REGEN_PATCH+set}" = set; then \
- diff -upr src src-c89 > new-diff || : ; fi
+ diff -upr src src-c89 | sed 's,src-c89/,src/,' > new-diff || : ; fi
grep -v '^patching file ' $@.1 > $@.2 || :
msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
rm -f src-c89/*.o || msg='rm failed'; \
diff --git a/src/c99-to-c89.diff b/src/c99-to-c89.diff
index e4d2abf72..df1b62b49 100644
--- a/src/c99-to-c89.diff
+++ b/src/c99-to-c89.diff
@@ -1,11 +1,6 @@
-Index: src/remove.c
-===================================================================
-RCS file: /fetish/cu/src/remove.c,v
-retrieving revision 1.158
-diff --git a/src/remove.c b/src/remove.c
-index 4728bdd..7477da5 100644
---- a/src/remove.c 2007-03-23 21:49:33.000000000 +0100
-+++ b/src/remove.c 2007-03-25 09:58:29.000000000 +0200
+diff -upr src/remove.c src/remove.c
+--- src/remove.c 2007-05-29 16:22:10.000000000 +0200
++++ src/remove.c 2007-07-09 19:15:47.000000000 +0200
@@ -254,9 +254,10 @@ pop_dir (Dirstack_state *ds)
{
size_t n_lengths = obstack_object_size (&ds->len_stack) / sizeof (size_t);
@@ -72,14 +67,9 @@ index 4728bdd..7477da5 100644
/* Remove all files and/or directories specified by N_FILES and FILE.
Apply the options in X. */
-Index: src/rm.c
-===================================================================
-RCS file: /fetish/cu/src/rm.c,v
-retrieving revision 1.140
-diff --git a/src/rm.c b/src/rm.c
-index 364a21c..7a24014 100644
---- a/src/rm.c
-+++ b/src/rm.c
+diff -upr src/rm.c src/rm.c
+--- src/rm.c 2007-05-29 16:22:10.000000000 +0200
++++ src/rm.c 2007-07-09 19:15:47.000000000 +0200
@@ -355,6 +355,7 @@ main (int argc, char **argv)
quote ("/"));
}
@@ -99,13 +89,44 @@ index 364a21c..7a24014 100644
+ }
+ }
}
-Index: src/shred.c
-===================================================================
-RCS file: /fetish/cu/src/shred.c,v
-retrieving revision 1.130
-diff -u -p -r1.130 shred.c
---- a/src/shred.c 3 Sep 2006 02:53:16 -0000 1.130
-+++ b/src/shred.c 3 Oct 2006 13:48:24 -0000
+diff -upr src/seq.c src/seq.c
+--- src/seq.c 2007-07-09 18:37:02.000000000 +0200
++++ src/seq.c 2007-07-09 19:15:47.000000000 +0200
+@@ -157,6 +157,7 @@ scan_arg (const char *arg)
+ : (decimal_point == arg /* .# -> 0.# */
+ || ! ISDIGIT (decimal_point[-1]))); /* -.# -> 0.# */
+ }
++ {
+ char const *e = strchr (arg, 'e');
+ if (! e)
+ e = strchr (arg, 'E');
+@@ -165,6 +166,7 @@ scan_arg (const char *arg)
+ long exponent = strtol (e + 1, NULL, 10);
+ ret.precision += exponent < 0 ? -exponent : 0;
+ }
++ }
+ }
+
+ return ret;
+@@ -293,6 +295,7 @@ get_default_format (operand first, opera
+ size_t last_width = last.width + (prec - last.precision);
+ if (last.precision && prec == 0)
+ last_width--; /* don't include space for '.' */
++ {
+ size_t width = MAX (first_width, last_width);
+ if (width <= INT_MAX)
+ {
+@@ -300,6 +303,7 @@ get_default_format (operand first, opera
+ sprintf (format_buf, "%%0%d.%dLf", w, prec);
+ return format_buf;
+ }
++ }
+ }
+ else
+ {
+diff -upr src/shred.c src/shred.c
+--- src/shred.c 2007-06-23 12:19:19.000000000 +0200
++++ src/shred.c 2007-07-09 19:15:47.000000000 +0200
@@ -463,7 +463,7 @@ dopass (int fd, char const *qname, off_t
out. Thus, it shouldn't give up on bad blocks. This
code works because lim is always a multiple of