6 ( cd $MUSL; git log
-n1 ) |
awk '
12 commit = "<h4>commit</h4><p>commit <a href=\"http://git.musl-libc.org/cgit/musl/commit/?id=" hash "\">" hash "</a>"
14 commit = commit "<br>" $0
18 posix = "data/posix2008.ok"
19 syms = "data/musl.syms"
20 tags = "data/musl.tags"
22 while (getline < syms == 1)
24 while (getline < tags == 1) {
28 s = "<a href=\"http://git.musl-libc.org/cgit/musl/tree/include/" $2 "#n" $4 "\">" $3 "</a> "
29 kind[$1] = kind[$1] $3
30 kindstr[$1] = kindstr[$1] s
33 legend = "<h4>legend</h4><ul><li>status: musl implementation status summary<ul>"
34 legend = legend "<li>(empty) - implemented"
35 legend = legend "<li>nosym - prototype found in include files (see decl) but not in libc.a (see sym)"
36 legend = legend "<li>nodecl - symbol is in libc.a but not declared in a public header"
37 legend = legend "<li>missing - neither in include files (see decl) nor in libc.a (see sym)"
38 legend = legend "</ul><li>sym: external symbol kind as found by `nm libc.a` (symbol kind only reported once)<ul>"
39 legend = legend "<li>C - symbol is common (uninitialized data)"
40 legend = legend "<li>D - symbol is in the initialized data section"
41 legend = legend "<li>R - symbol is in the read only data section"
42 legend = legend "<li>T - symbol is in the text section"
43 legend = legend "<li>V - weak object"
44 legend = legend "<li>W - weak symbol"
45 legend = legend "</ul><li>decl: kind of declaration as found by `ctags -R include` (every occurance is reported)<ul>"
46 legend = legend "<li>d - macro definition"
47 legend = legend "<li>p - function prototype"
48 legend = legend "<li>x - external and forward variable declaration"
49 legend = legend "</ul></ul>"
50 legend = legend "<p>(STREAMS and posix_trace* apis are excluded)"
52 print "<h3>musl vs posix api</h3>"
55 print "<h4>table</h4><table border=1><tr><th colspan=3>musl<th colspan=4>posix<tr><th>status<th>sym<th>decl<th>name<th>header<th>option<th>desc"
56 nodecl = nosym = missing = 0
57 while (getline < posix == 1) {
59 if (sym[$1] && kind[$1]) {
64 } else if (kind[$1] ~ /d/) {
66 } else if (kind[$1]) {
76 s = s "<td>" kindstr[$1]
80 s = s "<td><a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/functions/" $1 ".html\">" $1 "</a>"
83 for (i = 1; i <= n; i++) {
86 s = s " <a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/" h ".html\">" x[i] "</a>"
90 for (i = 1; i <= n; i++)
91 s = s " <a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/help/codes.html#" x[i] "\">" x[i] "</a>"
98 print "<h4>stats</h4><ul><li>missing: " missing "<li>nosym: " nosym "<li>nodecl: " nodecl "</ul>"