aboutsummaryrefslogtreecommitdiffstats
path: root/common/sysutils.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-06-23 04:37:08 +0000
committerNIIBE Yutaka <[email protected]>2023-06-23 04:37:08 +0000
commit87a73e8eb0c9e61858253c7616b95a943e56028f (patch)
tree47f1b4f12c2a61e95ebdd76c7e8978232c32e788 /common/sysutils.c
parentgpg,sm,tools: Use string for option --*-fd. (diff)
downloadgnupg-87a73e8eb0c9e61858253c7616b95a943e56028f.tar.gz
gnupg-87a73e8eb0c9e61858253c7616b95a943e56028f.zip
common: Remove translate_sys2libc_fd_int.
* common/sysutils.c (translate_sys2libc_fd_int): Remove. (check_special_filename): Use translate_sys2libc_fdstr. * common/sysutils.h (translate_sys2libc_fd_int): Remove. -- GnuPG-bug-id: 6551 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--common/sysutils.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/common/sysutils.c b/common/sysutils.c
index faff7e4a2..b6e22e943 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -556,24 +556,6 @@ translate_sys2libc_fd (gnupg_fd_t fd, int for_write)
#endif
}
-/* This is the same as translate_sys2libc_fd but takes an integer
- which is assumed to be such an system handle. On WindowsCE the
- passed FD is a rendezvous ID and the function finishes the pipe
- creation. */
-int
-translate_sys2libc_fd_int (int fd, int for_write)
-{
-#ifdef HAVE_W32_SYSTEM
- if (fd <= 2)
- return fd; /* Do not do this for error, stdin, stdout, stderr. */
-
- return translate_sys2libc_fd ((void*)fd, for_write);
-#else
- (void)for_write;
- return fd;
-#endif
-}
-
/*
* Parse the string representation of a file reference (file handle on
@@ -697,7 +679,7 @@ check_special_filename (const char *fname, int for_write, int notranslate)
;
if (!fname[i])
return notranslate? atoi (fname)
- /**/ : translate_sys2libc_fd_int (atoi (fname), for_write);
+ /**/ : translate_sys2libc_fdstr (fname, for_write);
}
return -1;
}