nodecl fwrite_unlocked W
nodecl getdents W
nodecl getdomainname T
+header getopt getopt.h unistd.h
nodecl getw T
nodecl getwc_unlocked W
nodecl getwchar_unlocked W
header htonl netinet/in.h arpa/inet.h
header htons netinet/in.h arpa/inet.h
+header iswalnum wchar.h wctype.h
+header iswalpha wchar.h wctype.h
+header iswblank wchar.h wctype.h
+header iswcntrl wchar.h wctype.h
+header iswctype wchar.h wctype.h
+header iswdigit wchar.h wctype.h
+header iswdigit wchar.h wctype.h
+header iswgraph wchar.h wctype.h
+header iswlower wchar.h wctype.h
+header iswprint wchar.h wctype.h
+header iswpunct wchar.h wctype.h
+header iswspace wchar.h wctype.h
+header iswupper wchar.h wctype.h
+header iswxdigit wchar.h wctype.h
header ntohl netinet/in.h arpa/inet.h
header ntohs netinet/in.h arpa/inet.h
+header optarg getopt.h unistd.h
+header opterr getopt.h unistd.h
+header optind getopt.h unistd.h
+header optopt getopt.h unistd.h
nodecl pivot_root T
proto poll poll.h int(struct pollfd*,nfds_t,int) int(struct pollfd[],nfds_t,int) int poll (struct pollfd *, nfds_t, int); int poll(struct pollfd fds[], nfds_t nfds, int timeout);
nodecl putw T
nodecl putwc_unlocked W
nodecl putwchar_unlocked W
nodecl scalbf T
+proto setgroups unistd.h grp.h int setgroups(size_t, const gid_t []); int setgroups(size_t, const gid_t *);
nodecl sincos T
nodecl start T
nodecl stime T
+header strcasecmp string.h strings.h
+header strncasecmp string.h strings.h
+header towlower wchar.h wctype.h
+header towupper wchar.h wctype.h
+header va_arg bits/stdarg.h stdarg.h
+header va_copy bits/stdarg.h stdarg.h
+header va_end bits/stdarg.h stdarg.h
+header va_start bits/stdarg.h stdarg.h
header wcrtomb wchar.h stdio.h
+header wctype wchar.h wctype.h
awk -F'\t' '{print $2}' data/musl.syms
} |sort |uniq |awk -F'\t' '
BEGIN {
- posix = "data/posix2008.ok.proto"
syms = "data/musl.syms"
tags = "data/musl.tags.proto"
+ posix = "data/posix2008.ok.proto"
while (getline < syms == 1)
sym[$2] = $1
# todo: same tag may be defined in several headers
- while (getline < tags == 1)
- tag[$1] = $2 "\t" $3 "\t" $5 "\t" $6
+ while (getline < tags == 1) {
+ if ($5 ~ /^#undef/)
+ continue
+ if ($1 in tag)
+ tag[$1] = tag[$1] "@" $2 "\t" $3 "\t" $5 "\t" $6
+ else
+ tag[$1] = $2 "\t" $3 "\t" $5 "\t" $6
+ }
while (getline < posix == 1)
pos[$1] = $2 "\t" $5 "\t" $6
if (pos[$1])
s = s " posix"
- print $1 "\t" substr(s,2) "\t" sym[$1] "\t" tag[$1] "\t" pos[$1]
+ n = split(tag[$1],a,"@")
+ if (n==0) {
+ n=1
+ a[1]=""
+ }
+ for (i = 1; i <= n; i++)
+ print $1 "\t" substr(s,2) "\t" sym[$1] "\t" a[i] "\t" pos[$1]
}' >data/musl.all
awk -F'\t' '
if ($1 !~ /^_/)
print "nodecl\t" $1 "\t" $3
}
+$2 ~ /inc/ && $5 == "p" {
+ # check for different declarations of the same symbol
+ if ($1 in proto) {
+ if (proto[$1] != $6)
+ print "proto\t" $1 "\t" $4 "\t" head[$1] "\t" $6 "\t" proto[$1]
+ } else {
+ proto[$1] = $6
+ head[$1] = $4
+ }
+}
$2 ~ /inc posix/ && $4 != $8 {
# different header
-
n = split($8, a, " ")
for (i = 1; i <= n; i++)
if ($4 == a[i])