diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-09-11 12:04:04 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2014-09-15 13:31:22 +0200 |
commit | 3765075c5f7c115abd10b0b76df81ae230ffceae (patch) | |
tree | ace36c88949926949239d34c5abfe7cae2c9d34b /test | |
parent | 31b38090183b8bd77c86c1195d57b4a3b5df04da (diff) | |
download | dbus-3765075c5f7c115abd10b0b76df81ae230ffceae.tar.gz |
Split _dbus_fd_set_close_on_exec into Unix and Windows versions
On Unix, the thing that can be made close-on-exec is a file descriptor,
which is an int.
On Windows, the thing that can be made close-on-exec is a HANDLE,
which is pointer-sized (but not necessarily a pointer!). In practice,
on Windows we only called _dbus_fd_set_close_on_exec() on socket
pseudo-file-descriptors (SOCKET, which is an unsigned int);
every SOCKET can validly be cast to HANDLE, but not every HANDLE
is a SOCKET.
Before this commit we used an intptr_t as a sort of fake
union { int; HANDLE; }, which just obscures what's going on.
In practice, everything that called _dbus_fd_set_close_on_exec()
is really platform-specific anyway, so let's just have two separate
functions and call this solved.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39610
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions