diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-24 03:30:57 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-24 03:30:57 +0000 |
commit | 431023a318e680258f02c1fb5fdca176c68e5cb7 (patch) | |
tree | cedbdd37d2a93310636cf71c781041a2b5ee68a3 /community/xdiskusage/stdin-is-null.patch | |
parent | 0459e6459ee534bf22ab8a5381cd485e6035e9e2 (diff) |
Thu Apr 24 03:25:33 UTC 2014
Diffstat (limited to 'community/xdiskusage/stdin-is-null.patch')
-rw-r--r-- | community/xdiskusage/stdin-is-null.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/community/xdiskusage/stdin-is-null.patch b/community/xdiskusage/stdin-is-null.patch deleted file mode 100644 index e70789c13..000000000 --- a/community/xdiskusage/stdin-is-null.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- xdiskusage-1.48/xdiskusage.C 2004-09-21 07:23:14.000000000 +0200 -+++ xdiskusage-1.48.carles/xdiskusage.C 2007-07-30 23:42:05.000000000 +0200 -@@ -223,6 +223,19 @@ - return 1; - } - -+// returns true if stdin is /dev/null -+// To fix Debian bug #276193 -+// Technically could be possible that returns "true" and is not "true", -+// because same device ID is used across file systems. But is the best -+// solutions that I have -+int isstdinnull() { -+ struct stat ststdin,stnull; -+ stat("/dev/null",&stnull); -+ fstat(0,&ststdin); -+ -+ return (ststdin.st_rdev==stnull.st_rdev); -+} -+ - int main(int argc, char**argv) { - #if FL_MAJOR_VERSION < 2 - // Make fltk look more like KDE/Windoze: -@@ -253,7 +266,7 @@ - OutputWindow* d = OutputWindow::make(argv[n++]); - if (d) d->show(argc,argv); - } -- } else if (!isatty(0)) { -+ } else if (!isatty(0) && !isstdinnull()) { - // test for pipe, if so read stdin: - OutputWindow* d = OutputWindow::make(0); - if (d) d->show(argc,argv); |