mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
commond: Introduce FD2NUM to express conversion to number of fds.
* common/sysutils.h (FD2NUM): New. * agent/call-pinentry.c (watch_sock): Use FD2NUM. * agent/gpg-agent.c (handle_connections): Likewise. * dirmngr/dirmngr.c (handle_connections): Likewise. * dirmngr/http.c (connect_with_timeout): Likewise. * kbx/keyboxd.c (handle_connections): Likewise. * scd/scdaemon.c (handle_connections): Likewise. * tpm2d/tpm2daemon.c (handle_connections): Likewise. -- GnuPG-bug-id: 6598 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
521ec40aea
commit
ea1935252e
8 changed files with 12 additions and 10 deletions
|
@ -44,12 +44,14 @@ typedef void *gnupg_fd_t;
|
|||
# define FD2INT(h) ((unsigned int)(h))
|
||||
# endif
|
||||
#define FD_DBG(h) ((int)(intptr_t)(h))
|
||||
#define FD2NUM(h) ((int)(intptr_t)(h))
|
||||
#else
|
||||
typedef int gnupg_fd_t;
|
||||
#define GNUPG_INVALID_FD (-1)
|
||||
#define INT2FD(s) (s)
|
||||
#define FD2INT(h) (h)
|
||||
#define FD_DBG(h) (h)
|
||||
#define FD2NUM(h) (h)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STAT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue