From 7074baf420cd39eca73f26ea5d2ea353054c780f Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 19 Oct 2005 11:17:47 +0000 Subject: [PATCH] - obsolete Changed files: file-stdin-noclose.patch -> 1.2 --- file-stdin-noclose.patch | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 file-stdin-noclose.patch diff --git a/file-stdin-noclose.patch b/file-stdin-noclose.patch deleted file mode 100644 index 9f84c24..0000000 --- a/file-stdin-noclose.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -urN file-4.15.org/src/magic.c file-4.15/src/magic.c ---- file-4.15.org/src/magic.c 2005-06-30 18:33:01.000000000 +0200 -+++ file-4.15/src/magic.c 2005-09-03 18:21:15.038649200 +0200 -@@ -62,6 +62,10 @@ - - #include "patchlevel.h" - -+#ifndef STDIN_FILENO -+#define STDIN_FILENO 0 -+#endif -+ - #ifndef lint - FILE_RCSID("@(#)$Id$") - #endif /* lint */ -@@ -179,7 +183,8 @@ - close_and_restore(const struct magic_set *ms, const char *name, int fd, - const struct stat *sb) - { -- (void) close(fd); -+ if (fd != STDIN_FILENO) -+ close(fd); - if (fd != STDIN_FILENO && (ms->flags & MAGIC_PRESERVE_ATIME) != 0) { - /* - * Try to restore access, modification times if read it. -@@ -237,9 +242,6 @@ - goto done; - } - --#ifndef STDIN_FILENO --#define STDIN_FILENO 0 --#endif - if (inname == NULL) - fd = STDIN_FILENO; - else if ((fd = open(inname, O_RDONLY)) < 0) { -- 2.44.0