Skip to content

Commit e9ea397

Browse files
committed
Add remaining types
1 parent ce384be commit e9ea397

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

src/ystdlib/wrapped_facade_headers/sys/types.h

Lines changed: 6 additions & 5 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__)
76
#include <sys/types.h>
8-
#elif defined(__APPLE__)
7+
8+
#if defined(__APPLE__)
99
#include <sys/_types/_u_char.h>
1010
#include <sys/_types/_u_short.h>
1111
#include <sys/_types/_u_int.h>
@@ -29,9 +29,10 @@
2929
#include <sys/_types/_u_int16_t.h>
3030
#include <sys/_types/_u_int32_t.h>
3131
#include <sys/_types/_u_int64_t.h>
32-
33-
// For off64_t
34-
#include <sys/dtrace.h>
32+
#include <sys/_types/_blksize_t.h>
33+
#include <sys/_types/_blkcnt_t.h>
34+
#include <sys/_types/_fsblkcnt_t.h>
35+
#include <sys/_types/_fsfilcnt_t.h>
3536
#endif
3637
// IWYU pragma: end_exports
3738
// clang-format on

src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ TEST_CASE("test_sys_types_fsid_t", "[wrapped_facade_headers][sys_types][fsid_t]"
4444
#endif
4545
}
4646

47-
#if defined(__linux__)
48-
TEST_CASE("test_sys_types_loff_t", "[wrapped_facade_headers][sys_types][loff_t]") {
49-
loff_t const i{0};
50-
REQUIRE(0 == i);
51-
}
52-
#endif
53-
5447
TEST_CASE("test_sys_types_ino_t", "[wrapped_facade_headers][sys_types][ino_t]") {
5548
ino_t const i{0};
5649
REQUIRE(0 == i);
@@ -91,11 +84,6 @@ TEST_CASE("test_sys_types_off_t", "[wrapped_facade_headers][sys_types][off_t]")
9184
REQUIRE(0 == i);
9285
}
9386

94-
TEST_CASE("test_sys_types_off64_t", "[wrapped_facade_headers][sys_types][off64_t]") {
95-
off64_t const i{0};
96-
REQUIRE(0 == i);
97-
}
98-
9987
TEST_CASE("test_sys_types_pid_t", "[wrapped_facade_headers][sys_types][pid_t]") {
10088
pid_t const i{0};
10189
REQUIRE(0 == i);
@@ -156,4 +144,24 @@ TEST_CASE("test_sys_types_u_int64_t", "[wrapped_facade_headers][sys_types][u_int
156144
u_int64_t const i{0};
157145
REQUIRE(0 == i);
158146
}
147+
148+
TEST_CASE("test_sys_types_blksize_t", "[wrapped_facade_headers][sys_types][blksize_t]") {
149+
blksize_t const i{0};
150+
REQUIRE(0 == i);
151+
}
152+
153+
TEST_CASE("test_sys_types_blkcnt_t", "[wrapped_facade_headers][sys_types][blkcnt_t]") {
154+
blkcnt_t const i{0};
155+
REQUIRE(0 == i);
156+
}
157+
158+
TEST_CASE("test_sys_types_fsblkcnt_t", "[wrapped_facade_headers][sys_types][fsblkcnt_t]") {
159+
fsblkcnt_t const i{0};
160+
REQUIRE(0 == i);
161+
}
162+
163+
TEST_CASE("test_sys_types_fsfilcnt_t", "[wrapped_facade_headers][sys_types][fsfilcnt_t]") {
164+
fsfilcnt_t const i{0};
165+
REQUIRE(0 == i);
166+
}
159167
} // namespace ystdlib::wrapped_facade_headers::test

0 commit comments

Comments
 (0)