diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-04-05 17:30:16 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-04-05 17:34:10 +0900 |
commit | 5b77d39672aca33416be95c685295e49ecb9f457 (patch) | |
tree | 3be939476ffdf37fdc00bbddc693afbcdf8c8b80 /src/w32-fd-t.inc.h | |
parent | 9260fb12509affae190485744fa06c97cbc543bb (diff) | |
download | libassuan-5b77d39672aca33416be95c685295e49ecb9f457.tar.gz |
Fix API break.
* src/posix-fd-t.inc.h (assuan_fd_from_posix_fd): Revert.
* src/w32-fd-t.inc.h (assuan_fd_from_posix_fd): Revert.
* src/system-w32.c (assuan_fd_from_posix_fd): Revert.
--
Note that assuan_fd_from_posix_fd is exposed inline function.
Fixes-commit: 28a40a298661877e1bbeb3eb9ac58a85bdd85b02
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src/w32-fd-t.inc.h')
-rw-r--r-- | src/w32-fd-t.inc.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/w32-fd-t.inc.h b/src/w32-fd-t.inc.h index 4e3e66b..bc3df28 100644 --- a/src/w32-fd-t.inc.h +++ b/src/w32-fd-t.inc.h @@ -28,5 +28,20 @@ typedef void *assuan_fd_t; #define ASSUAN_INVALID_FD ((void*)(-1)) #define ASSUAN_INVALID_PID ((pid_t) -1) +#if GPGRT_HAVE_PRAGMA_GCC_PUSH +# pragma GCC push_options +# pragma GCC diagnostic ignored "-Wbad-function-cast" +#endif +static GPG_ERR_INLINE assuan_fd_t +assuan_fd_from_posix_fd (int fd) +{ + if (fd < 0) + return ASSUAN_INVALID_FD; + else + return (assuan_fd_t) _get_osfhandle (fd); +} +#if GPGRT_HAVE_PRAGMA_GCC_PUSH +# pragma GCC pop_options +#endif ##EOF## |