summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-06-26 23:04:57 +0200
committerJim Meyering <meyering@redhat.com>2008-06-26 23:31:05 +0200
commit8ce745dc612b21c01439da9a0ca217054841d177 (patch)
tree6fd92f21ad638aec81af64368dc2cdb54cbacdfe
parent1fcd8cf8b40057cc67c6c56349450ebfd3690dae (diff)
downloadcoreutils-8ce745dc612b21c01439da9a0ca217054841d177.tar.xz
tests: adjust c99-to-c89 patch as well as the code to generate it
* maint.mk (patch-check) [REGEN_PATCH]: Trim some trailing blanks. * src/c99-to-c89.diff: Adjust shred.c offsets.
-rw-r--r--maint.mk9
-rw-r--r--src/c99-to-c89.diff2
2 files changed, 6 insertions, 5 deletions
diff --git a/maint.mk b/maint.mk
index a011a11eb..19b7f121e 100644
--- a/maint.mk
+++ b/maint.mk
@@ -510,10 +510,11 @@ patch-check:
cp -a src src-c89
(cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
> $@.1 2>&1
- if test "$(REGEN_PATCH)" = yes; then \
- diff -upr src src-c89 | sed 's,src-c89/,src/,' \
- | grep -vE '^(Only in|File )' \
- | perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/' \
+ if test "$(REGEN_PATCH)" = yes; then \
+ diff -upr src src-c89 | sed 's,src-c89/,src/,' \
+ | grep -vE '^(Only in|File )' \
+ | perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/;' \
+ -e 's/^ $$//' \
> new-diff || : ; fi
grep -v '^patching file ' $@.1 > $@.2 || :
msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
diff --git a/src/c99-to-c89.diff b/src/c99-to-c89.diff
index ae37d1e95..9268d387d 100644
--- a/src/c99-to-c89.diff
+++ b/src/c99-to-c89.diff
@@ -159,7 +159,7 @@ diff -upr src/seq.c src/seq.c
diff -upr src/shred.c src/shred.c
--- src/shred.c 1970-01-01 00:00:00.000000000 +0000
+++ src/shred.c 1970-01-01 00:00:00.000000000 +0000
-@@ -458,7 +458,7 @@ dopass (int fd, char const *qname, off_t
+@@ -469,7 +469,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
SECTOR_SIZE, except at the end. */