From 61d1a5a25c6f468aefe24f8033b779f140aab6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Mar 2017 21:31:21 -0400 Subject: [PATCH 1/2] test-sizeof: do not link with libsystemd-shared This makes it much quicker to compile. --- Makefile.am | 3 --- src/test/test-sizeof.c | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9a78488f8a..1cc657acca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2182,9 +2182,6 @@ test_selinux_LDADD = \ test_sizeof_SOURCES = \ src/test/test-sizeof.c -test_sizeof_LDADD = \ - libsystemd-shared.la - BUILT_SOURCES += \ src/test/test-hashmap-ordered.c diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 8f99a13772..7c8eac8242 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -17,7 +17,8 @@ along with systemd; If not, see . ***/ -#include "log.h" +#include + #include "time-util.h" /* Print information about various types. Useful when diagnosing @@ -26,10 +27,10 @@ #pragma GCC diagnostic ignored "-Wtype-limits" #define info(t) \ - log_info("%s → %zu bits%s", STRINGIFY(t), \ - sizeof(t)*CHAR_BIT, \ - strstr(STRINGIFY(t), "signed") ? "" : \ - ((t)-1 < (t)0 ? ", signed" : ", unsigned")); + printf("%s → %zu bits%s\n", STRINGIFY(t), \ + sizeof(t)*CHAR_BIT, \ + strstr(STRINGIFY(t), "signed") ? "" : \ + ((t)-1 < (t)0 ? ", signed" : ", unsigned")); int main(void) { info(char); From 0c183e963d8cd1088594be693d0676aafba6a552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Mar 2017 21:31:58 -0400 Subject: [PATCH 2/2] test-sizeof: add some struct-timespec related fields Might help with #5264. --- src/test/test-sizeof.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 7c8eac8242..36389b7710 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -40,6 +40,8 @@ int main(void) { info(unsigned); info(long unsigned); info(long long unsigned); + info(__syscall_ulong_t); + info(__syscall_slong_t); info(float); info(double); @@ -49,6 +51,7 @@ int main(void) { info(ssize_t); info(time_t); info(usec_t); + info(__time_t); return 0; }