From ad7a5bacd4a21a26a14d7835422aa4f31a0330d4 Mon Sep 17 00:00:00 2001 From: nsz Date: Wed, 14 Sep 2011 03:55:45 +0200 Subject: [PATCH] prototype check cleanups --- data/musl.problems | 2 -- makeall.sh | 11 +---------- tab_c99.html | 2 +- type.sh | 8 ++++++++ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/data/musl.problems b/data/musl.problems index c6c110e..b537c57 100644 --- a/data/musl.problems +++ b/data/musl.problems @@ -1,5 +1,3 @@ -proto aio_read aio.h ssize_t(struct aiocb*) int(struct aiocb*) ssize_t aio_read(struct aiocb *); int aio_read(struct aiocb *aiocbp); -proto aio_write aio.h ssize_t(struct aiocb*) int(struct aiocb*) ssize_t aio_write(struct aiocb *); int aio_write(struct aiocb *aiocbp); nodecl cfmakeraw T nodecl cfsetspeed W nodecl clearerr_unlocked W diff --git a/makeall.sh b/makeall.sh index b803b6c..012f2e3 100755 --- a/makeall.sh +++ b/makeall.sh @@ -50,16 +50,7 @@ $2 ~ /inc posix/ && $4 != $8 { } $2 ~ /inc posix/ && $7 != $10 && $5 == "p" { # different prototype - - # todo: move to type.sh - gsub(/restrict const/, "const", $10) - gsub(/restrict/, "", $10) - gsub(/\[[0-9]+\]/, "[]", $10) - gsub(/unsigned int/, "unsigned", $7) - gsub(/long int/, "long", $7) - - if ($7 != $10) - print "proto\t" $1 "\t" $4 "\t" $7 "\t" $10 "\t" $6 "\t" $9 + print "proto\t" $1 "\t" $4 "\t" $7 "\t" $10 "\t" $6 "\t" $9 } ' data/musl.all >data/musl.problems diff --git a/tab_c99.html b/tab_c99.html index 102aebd..0644b15 100644 --- a/tab_c99.html +++ b/tab_c99.html @@ -1,5 +1,5 @@

musl vs c99 api

-

commit

commit 13cd969552409e05c941829f2aabb15e2f4d9a1f
Date: Tue Sep 13 21:09:35 2011 -0400

fix various errors in function signatures/prototypes found by nsz +

commit

commit 4da289e1b3a0d09048d9be1dfc3a7280531a1e48
Date: Tue Sep 13 21:21:53 2011 -0400

fix return types for aio_read and aio_write again

previous fix was backwards and propagated the wrong type rather than
the right one...

legend

table

muslc99
statussymdeclnameheaderprotosection
missing  NDEBUGassert.h B.1 Diagnostics diff --git a/type.sh b/type.sh index 3aa5a9c..2050e4b 100755 --- a/type.sh +++ b/type.sh @@ -75,6 +75,14 @@ function put(tok) { state = "type" } } + + # fixes + gsub(/restrict const/, "const", s) + gsub(/restrict/, "", s) + gsub(/\[[0-9]+\]/, "[]", s) + gsub(/unsigned int/, "unsigned", s) + gsub(/long int/, "long", s) + print s } ' -- 2.11.4.GIT