From: Szabolcs Nagy Date: Sat, 3 Nov 2012 20:51:05 +0000 (+0100) Subject: api: add stdbool and stddef X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=837aeb3a8d1b9925b4a5e271083bb4218dfa5933;hp=9c6efc03eba4568ba9f1672a2bb0c50a047edd8e;p=libc-test api: add stdbool and stddef --- diff --git a/src/api/stdbool.c b/src/api/stdbool.c new file mode 100644 index 0000000..3eb9736 --- /dev/null +++ b/src/api/stdbool.c @@ -0,0 +1,10 @@ +#include +#define T(t) (t*)0; +#define C(n) switch(n){case n:;} +static void f() +{ +T(bool) +C(true) +C(false) +C(__bool_true_false_are_defined) +} diff --git a/src/api/stddef.c b/src/api/stddef.c new file mode 100644 index 0000000..3f7664e --- /dev/null +++ b/src/api/stddef.c @@ -0,0 +1,11 @@ +#include +#define T(t) (t*)0; +#define C(n) switch(n){case n:;} +static void f() +{ +{void *p=NULL;} +C(offsetof(struct{int i;}, i)) +T(ptrdiff_t) +T(wchar_t) +T(size_t) +}