From 1ee4fe83d74978f44eb61b23dda9c258f4af82b1 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 1 Mar 2019 19:46:28 -0500 Subject: decide not to try autogenerating tests, it is too error prone --- Makefile | 9 ++------- defs2d.awk | 16 ---------------- locale.c | 8 +++++++- locale.d | 7 ------- locale.defs | 1 - signal.c | 11 ++++++++++- signal.d | 10 ---------- signal.defs | 2 -- 8 files changed, 19 insertions(+), 45 deletions(-) delete mode 100755 defs2d.awk delete mode 100644 locale.d delete mode 100644 locale.defs delete mode 100644 signal.d delete mode 100644 signal.defs diff --git a/Makefile b/Makefile index 9933928..13f953f 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,6 @@ TESTOBJS=main.o \ time.o \ test.o -.SUFFIXES: .defs .d - -.defs.d: - awk -f defs2d.awk $< > $@ - testlibc: $(TESTOBJS) $(LIBDIR)/libc.a $(CC) -o $@ $(TESTOBJS) $(LDFLAGS) @@ -36,10 +31,10 @@ float.o: float.c test.h inttypes.o: inttypes.c test.h iso646.o: iso646.c test.h limits.o: limits.c test.h -locale.o: locale.c locale.d test.h +locale.o: locale.c test.h math.o: math.c test.h setjmp.o: setjmp.c test.h -signal.o: signal.c signal.d test.h +signal.o: signal.c test.h stdalign.o: stdalign.c test.h stdard.o: stdarg.c test.h stdatomic.o: stdatomic.c test.h diff --git a/defs2d.awk b/defs2d.awk deleted file mode 100755 index 23af3de..0000000 --- a/defs2d.awk +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/awk -f - -/type/ { - printf("static %s a_%s;\n\n", $2, $2); -} - -/distinct/ { - printf("static int %s[] = {\n", $2); - for (i = 3; i <= NF; i++) { - #printf("#ifndef %s\n", $i); - #printf("#error %s not defined\n", $i); - #printf("#endif\n"); - printf("\t%s,\n", $i); - } - printf("};\n"); -} diff --git a/locale.c b/locale.c index 7ae3397..9714995 100644 --- a/locale.c +++ b/locale.c @@ -2,7 +2,13 @@ #include #include "test.h" -#include "locale.d" +static int locale_categories[] = { + LC_ALL, + LC_COLLATE, + LC_CTYPE, + LC_MONETARY, + LC_NUMERIC, +}; void test_locale_h(void) { diff --git a/locale.d b/locale.d deleted file mode 100644 index 49ab136..0000000 --- a/locale.d +++ /dev/null @@ -1,7 +0,0 @@ -static int locale_categories[] = { - LC_ALL, - LC_COLLATE, - LC_CTYPE, - LC_MONETARY, - LC_NUMERIC, -}; diff --git a/locale.defs b/locale.defs deleted file mode 100644 index 2cecc76..0000000 --- a/locale.defs +++ /dev/null @@ -1 +0,0 @@ -distinct locale_categories LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME diff --git a/signal.c b/signal.c index 13aa074..050534a 100644 --- a/signal.c +++ b/signal.c @@ -1,7 +1,16 @@ #include #include "test.h" -#include "signal.d" +static sig_atomic_t sig_atomic; + +static int signals[] = { + SIGABRT, + SIGFPE, + SIGILL, + SIGINT, + SIGSEGV, + SIGTERM, +}; void test_signal_h(void) { diff --git a/signal.d b/signal.d deleted file mode 100644 index 87ca380..0000000 --- a/signal.d +++ /dev/null @@ -1,10 +0,0 @@ -static sig_atomic_t a_sig_atomic_t; - -static int signals[] = { - SIGABRT, - SIGFPE, - SIGILL, - SIGINT, - SIGSEGV, - SIGTERM, -}; diff --git a/signal.defs b/signal.defs deleted file mode 100644 index 5640f97..0000000 --- a/signal.defs +++ /dev/null @@ -1,2 +0,0 @@ -type sig_atomic_t -distinct signals SIGABRT SIGFPE SIGILL SIGINT SIGSEGV SIGTERM -- cgit v1.2.1