Skip to content

Commit

Permalink
test-sizeof: let's be a tiny bit more careful when using glibc intern…
Browse files Browse the repository at this point in the history
…al types

One can argue that internal glibc types (i.e. those starting with __)
are not really part of the glibc API, hence let's at least ifdef them.

(cherry picked from commit 614ac89)
  • Loading branch information
poettering authored and bluca committed Jul 7, 2023
1 parent 4fc207e commit 86206af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/test-sizeof.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ int main(void) {
info(unsigned);
info(unsigned long);
info(unsigned long long);
#ifdef __GLIBC__
info(__syscall_ulong_t);
info(__syscall_slong_t);
#endif
info(intmax_t);
info(uintmax_t);

Expand All @@ -76,13 +78,17 @@ int main(void) {
info(ssize_t);
info(time_t);
info(usec_t);
#ifdef __GLIBC__
info(__time_t);
#endif
info(pid_t);
info(uid_t);
info(gid_t);
info(socklen_t);

#ifdef __GLIBC__
info(__cpu_mask);
#endif

info(enum Enum);
info(enum BigEnum);
Expand Down

0 comments on commit 86206af

Please sign in to comment.