summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/grep/08-skip.patch
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:19:12 (GMT)
commit0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch)
treec0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core-testing/grep/08-skip.patch
downloadlinhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz
linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2
initial import
Diffstat (limited to 'abs/core-testing/grep/08-skip.patch')
-rw-r--r--abs/core-testing/grep/08-skip.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/abs/core-testing/grep/08-skip.patch b/abs/core-testing/grep/08-skip.patch
new file mode 100644
index 0000000..fb6645f
--- /dev/null
+++ b/abs/core-testing/grep/08-skip.patch
@@ -0,0 +1,42 @@
+--- grep-2.5.1a/src/grep.c.skip 2006-05-31 09:26:58.000000000 +0100
++++ grep-2.5.1a/src/grep.c 2006-05-31 09:28:24.000000000 +0100
+@@ -261,19 +261,6 @@
+ bufbeg[-1] = eolbyte;
+ bufdesc = fd;
+
+- if (fstat (fd, &stats->stat) != 0)
+- {
+- error (0, errno, "fstat");
+- return 0;
+- }
+- if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
+- return 0;
+-#ifndef DJGPP
+- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode)))
+-#else
+- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
+-#endif
+- return 0;
+ if (S_ISREG (stats->stat.st_mode))
+ {
+ if (file)
+@@ -875,6 +862,19 @@
+ }
+ else
+ {
++ if (stat (file, &stats->stat) != 0)
++ {
++ suppressible_error (file, errno);
++ return 1;
++ }
++ if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
++ return 1;
++#ifndef DJGPP
++ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode)))
++#else
++ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
++#endif
++ return 1;
+ while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
+ continue;
+