5 ( cd $MUSL; git log -n1 ) | awk '
11 commit = "<h4>commit</h4><p>commit <a href=\"http://git.etalabs.net/cgi-bin/gitweb.cgi?p=musl;a=commit;h=" hash "\">" hash "</a>"
13 commit = commit "<br>" $0
17 posix = "data/posix2008"
18 syms = "data/musl.syms"
19 tags = "data/musl.tags"
21 while (getline < syms == 1)
23 while (getline < tags == 1) {
27 s = "<a href=\"http://git.etalabs.net/cgi-bin/gitweb.cgi?p=musl;a=blob;f=include/" $2 ";hb=" hash "#l" $4 "\">" $3 "</a> "
28 kind[$1] = kind[$1] $3
29 kindstr[$1] = kindstr[$1] s
32 legend = "<h4>legend</h4><ul><li>status: musl implementation status summary<ul>"
33 legend = legend "<li>(empty) - implemented"
34 legend = legend "<li>nosym - prototype found in include files (see decl) but not in libc.a (see sym)"
35 legend = legend "<li>nodecl - symbol is in libc.a but not declared in a public header"
36 legend = legend "<li>missing - neither in include files (see decl) nor in libc.a (see sym)"
37 legend = legend "</ul><li>sym: external symbol kind as found by `nm libc.a` (symbol kind only reported once)<ul>"
38 # legend = legend "<li>A - symbol value is absolute"
39 # legend = legend "<li>B - symbol is in the uninitialized data section (known as BSS)"
40 legend = legend "<li>C - symbol is common (uninitialized data)"
41 legend = legend "<li>D - symbol is in the initialized data section"
42 # legend = legend "<li>G - symbol is in the initialized data section for small objects"
43 # legend = legend "<li>I - indirect reference to another symbol"
44 # legend = legend "<li>N - debugging symbol"
45 legend = legend "<li>R - symbol is in the read only data section"
46 # legend = legend "<li>S - symbol is in the uninitialized data section for small objects"
47 legend = legend "<li>T - symbol is in the text section"
48 # legend = legend "<li>U - undefined symbol"
49 legend = legend "<li>V - weak object"
50 legend = legend "<li>W - weak symbol"
51 legend = legend "</ul><li>decl: kind of declaration as found by `ctags -R include` (every occurance is reported)<ul>"
52 legend = legend "<li>d - macro definition"
53 legend = legend "<li>p - function prototype"
54 legend = legend "<li>x - external and forward variable declaration"
55 legend = legend "</ul></ul>"
56 legend = legend "<p>(any option mark found in the synopsis of a manual is listed in the option column, this is often wrong)"
58 print "<h3>musl vs posix api</h3>"
61 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"
62 nodecl = nosym = missing = 0
63 while (getline < posix == 1) {
65 if (sym[$1] && kind[$1]) {
70 } else if (kind[$1] ~ /d/) {
72 } else if (kind[$1]) {
82 s = s "<td>" kindstr[$1]
86 s = s "<td><a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/functions/" $1 ".html\">" $1 "</a>"
89 for (i = 1; i <= n; i++)
90 s = s " <a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/" x[i] ".html\">" x[i] "</a>"
93 for (i = 1; i <= n; i++)
94 s = s " <a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/help/codes.html#" x[i] "\">" x[i] "</a>"
101 print "<h4>stats</h4><ul><li>missing: " missing "<li>nosym: " nosym "<li>nodecl: " nodecl "</ul>"