Skip to content

Commit 920ef53

Browse files
committed
Make clearer distinctions between OS includes
1 parent 2ff2d3a commit 920ef53

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

src/ystdlib/wrapped_facade_headers/bits/types/clock_t.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
// clang-format off
55
// IWYU pragma: begin_exports
6+
#if defined(__linux__)
67
#include <bits/types/clock_t.h>
7-
8-
#if defined(__APPLE__)
8+
#elif defined(__APPLE__)
99
#include <sys/_types/_clock_t.h>
1010
#endif
1111
// IWYU pragma: end_exports

src/ystdlib/wrapped_facade_headers/bits/types/clockid_t.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
// clang-format off
55
// IWYU pragma: begin_exports
6+
#if defined(__linux__)
67
#include <bits/types/clockid_t.h>
7-
8-
#if defined(__APPLE__)
8+
#elif defined(__APPLE__)
99
#include <_time.h>
1010
#endif
1111
// IWYU pragma: end_exports
1212
// clang-format on
1313

14-
#endif // YSTDLIB_WRAPPED_FACADE_HEADERS_BITS_TYPES_CLOCK_T_HPP
14+
#endif // YSTDLIB_WRAPPED_FACADE_HEADERS_BITS_TYPES_CLOCKID_T_HPP

src/ystdlib/wrapped_facade_headers/bits/types/time_t.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
// clang-format off
55
// IWYU pragma: begin_exports
6+
#if defined(__linux__)
67
#include <bits/types/time_t.h>
7-
8-
#if defined(__APPLE__)
8+
#elif defined(__APPLE__)
99
#include <sys/_types/_time_t.h>
1010
#endif
1111
// IWYU pragma: end_exports

src/ystdlib/wrapped_facade_headers/sys/types.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
#ifndef YSTDLIB_WRAPPED_FACADE_HEADERS_SYS_TYPES_HPP
2+
#define YSTDLIB_WRAPPED_FACADE_HEADERS_SYS_TYPES_HPP
3+
14
// clang-format off
25
// IWYU pragma: begin_exports
6+
#if defined(__linux__)
37
#include <sys/types.h>
4-
5-
#if defined(__APPLE__)
8+
#elif defined(__APPLE__)
69
#include <sys/_types/_u_char.h>
710
#include <sys/_types/_u_short.h>
811
#include <sys/_types/_u_int.h>
@@ -26,3 +29,5 @@
2629
#endif
2730
// IWYU pragma: end_exports
2831
// clang-format on
32+
33+
#endif // YSTDLIB_WRAPPED_FACADE_HEADERS_SYS_TYPES_HPP

0 commit comments

Comments
 (0)