]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
include/compat: Add missing win32 type and constant definitions
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 4 Nov 2019 08:49:31 +0000 (08:49 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 4 Jun 2020 15:51:40 +0000 (15:51 +0000)
commit99b91e9eba418917c58e1b46299ea9e3e39c72af
tree9f9002d47dda7d3cf881ac0d00fca62988068c8d
parentb8f632327fe6d1e0bcd0b5cf55b2234674a7d42c
include/compat: Add missing win32 type and constant definitions

The following types and constants are not defined on Windows, for
which reason we're going to include them in compat.h.

* uid_t, gid_t
* sigset_t
* HOST_NAME_MAX
* O_CLOEXEC, which we're going to define as a no-op. By default,
  handles are not inherited by subprocesses.
* SHUT_* flags
* loff_t
* __STRING
* EBADE, ENODATA, ESHUTDOWN, ESTALE, EREMOTEIO
* suseconds_t
* SIGKILL, SIGINT - we're mostly going to stub signal handling
on Windows

Also, we'll have to make sure that pipe_cloexec uses C style linking,
which would otherwise be affected as the include order changes.

timeval.tv_sec is defined as long instead of time_t on Windows[1], which
we'll have to take into account.

[1] https://docs.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-timeval

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/common/ceph_context.h
src/crush/CrushCompiler.cc
src/include/ceph_assert.h
src/include/compat.h
src/include/statlite.h
src/log/LogClock.h