diff options
author | NIIBE Yutaka <[email protected]> | 2023-06-23 04:37:08 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-06-23 04:37:08 +0000 |
commit | 87a73e8eb0c9e61858253c7616b95a943e56028f (patch) | |
tree | 47f1b4f12c2a61e95ebdd76c7e8978232c32e788 /common | |
parent | gpg,sm,tools: Use string for option --*-fd. (diff) | |
download | gnupg-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 'common')
-rw-r--r-- | common/sysutils.c | 20 | ||||
-rw-r--r-- | common/sysutils.h | 1 |
2 files changed, 1 insertions, 20 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; } diff --git a/common/sysutils.h b/common/sysutils.h index 2d864a983..380a6d9a9 100644 --- a/common/sysutils.h +++ b/common/sysutils.h @@ -73,7 +73,6 @@ unsigned int get_uint_nonce (void); void gnupg_sleep (unsigned int seconds); void gnupg_usleep (unsigned int usecs); int translate_sys2libc_fd (gnupg_fd_t fd, int for_write); -int translate_sys2libc_fd_int (int fd, int for_write); gpg_error_t gnupg_sys2libc_fdstr (const char *fdstr, int for_write, gnupg_fd_t *r_hd, int *r_fd); int translate_sys2libc_fdstr (const char *fdstr, int for_write); |