]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
include/compat: Add win32 compatibility layer
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Tue, 8 Oct 2019 10:49:31 +0000 (13:49 +0300)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 4 Jun 2020 15:52:16 +0000 (15:52 +0000)
commit889247d55714149bec1d96834fb9bad0c861151e
treec09bb0c8efd055aeb22248e6210568f3f5341f27
parent99b91e9eba418917c58e1b46299ea9e3e39c72af
include/compat: Add win32 compatibility layer

Windows provides socket and other related structures that are mostly
following the Posix standards, but using different headers.

Rather than adding lots of platform checks and require future commits
to do so as well, we're adding headers with the same names, which
in turn include the required Windows headers.

In a few cases, some functions declared by unistd.h are actually
defined by different Windows headers, so we'll need additional includes.

One thing to note here is that boost requires us to include aio.hpp
before the Windows socket headers.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
16 files changed:
CMakeLists.txt
src/common/admin_socket_client.cc
src/common/hostname.cc
src/include/compat.h
src/include/win32/arpa/inet.h [new file with mode: 0644]
src/include/win32/netdb.h [new file with mode: 0644]
src/include/win32/netinet/in.h [new file with mode: 0644]
src/include/win32/netinet/ip.h [new file with mode: 0644]
src/include/win32/netinet/tcp.h [new file with mode: 0644]
src/include/win32/poll.h [new file with mode: 0644]
src/include/win32/sys/errno.h [new file with mode: 0644]
src/include/win32/sys/select.h [new file with mode: 0644]
src/include/win32/sys/socket.h [new file with mode: 0644]
src/include/win32/sys/un.h [new file with mode: 0644]
src/include/win32/winsock_compat.h [new file with mode: 0644]
src/include/win32/winsock_wrapper.h [new file with mode: 0644]