Skip to content

Commit 292faf3

Browse files
committed
Add TODO
1 parent b71a9c4 commit 292faf3

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎rules/sys_types/src.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@
66
typedef uid_t t1;
77
typedef off_t t2;
88

9+
// glibc declares some APIs with private typedefs, e.g. `__off_t lseek(...)`,
10+
// where Darwin uses `off_t`. Give them the public typedef's translation so
11+
// both platforms produce the same output.
12+
//
13+
// TODO:
14+
//
15+
// Rules are written in terms of standard names `off_t lseek(...)`, however
16+
// libraries choose to implement them using library specific names `__off_t
17+
// lseek(...)`.
18+
//
19+
// Fix this in converter by using the names in the rules, not the
20+
// library-specific names.
21+
922
#ifdef __GLIBC__
1023
typedef __uid_t t3;
1124
typedef __off_t t4;

‎rules/time/src.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ typedef struct timeval t2;
99
typedef struct timespec t3;
1010
typedef time_t t4;
1111

12+
// struct timespec::tv_sec is `__time_t` on glibc and `__darwin_time_t` on
13+
// Darwin. Give both time_t's translation.
14+
//
15+
// TODO:
16+
//
17+
// Rules are written in terms of standard names `time_t tv_sec`, however
18+
// libraries choose to implement them using library specific names `__time_t
19+
// tv_sec`.
20+
//
21+
// Fix this in converter by using the names in the rules, not the
22+
// library-specific names.
23+
1224
#if defined(__GLIBC__)
1325
typedef __time_t t5;
1426
#elif defined(__APPLE__)

0 commit comments

Comments
 (0)