mailing list of musl libc
 help / color / mirror / code / Atom feed
* Help assessing status of musl
@ 2011-05-28 23:41 Rich Felker
  2011-05-29 16:19 ` gs
  0 siblings, 1 reply; 20+ messages in thread
From: Rich Felker @ 2011-05-28 23:41 UTC (permalink / raw)
  To: musl

Apologies for the somewhat-slower progress on musl lately. The past
few weeks I've had a good bit less contiguous time to devote to it.
One thing that would help me make better use of my time is if I had a
good list of the remaining areas of functionality that musl is
missing, so I could use smaller blocks of time to write code that's
simple and largely independent of everything else.

Would anyone be willing to go through a list of symbols from musl,
comparing it to the list of functions in the POSIX standard
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html)
and break it down into a list of functions and some categories of
functionality? For the most part anything in non-essential option
groups could be omitted or put in a separate list to address later.

Rich


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-28 23:41 Help assessing status of musl Rich Felker
@ 2011-05-29 16:19 ` gs
  2011-05-29 16:44   ` gs
  0 siblings, 1 reply; 20+ messages in thread
From: gs @ 2011-05-29 16:19 UTC (permalink / raw)
  To: musl; +Cc: Rich Felker

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]


see attached perl script and output.
i recommend you rerun it since i didnt have the most recent musl version 
installed.

On 05/29/2011 01:41 AM, Rich Felker wrote:
> Apologies for the somewhat-slower progress on musl lately. The past
> few weeks I've had a good bit less contiguous time to devote to it.
> One thing that would help me make better use of my time is if I had a
> good list of the remaining areas of functionality that musl is
> missing, so I could use smaller blocks of time to write code that's
> simple and largely independent of everything else.
>
> Would anyone be willing to go through a list of symbols from musl,
> comparing it to the list of functions in the POSIX standard
> (http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html)
> and break it down into a list of functions and some categories of
> functionality? For the most part anything in non-essential option
> groups could be omitted or put in a separate list to address later.
>
> Rich
>


[-- Attachment #2: musl-syms.pl --]
[-- Type: application/x-perl, Size: 1014 bytes --]

[-- Attachment #3: musl-diff.txt --]
[-- Type: text/plain, Size: 3651 bytes --]

a64l
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinl
assert
atanl
atexit
cabs
cacos
cacosh
cacosl
carg
casin
casinh
casinl
catan
catanh
catanl
ccos
ccosh
ccosl
cexp
cimag
clog
conj
contents
cosl
cpow
cproj
creal
csin
csinh
csinl
csqrt
ctan
ctanh
ctanl
daylight
dbm_clearerr
dlclose
dlerror
dlopen
dlsym
encrypt
endgrent
endnetent
endpwent
environ
errno
exec
exp2
fattach
FD_CLR
fdetach
fdim
fdopen
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
fma
fmax
fmemopen
fmin
fmtmsg
fpclassify
fwrite
getc
getdate
getgrgid
getgrnam
getmsg
getnetbyaddr
getpmsg
grantpt
hcreate
iconv
iconv_close
if_freenameindex
if_nameindex
initstate
insque
isastream
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
j0
l64a
lfind
lgamma
lio_listio
llround
log2
lround
lsearch
malloc
mmap
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
munmap
nan
nearbyint
nl_langinfo
open_memstream
optarg
posix_mem_offset
posix_spawn
posix_spawnattr_destroy
posix_spawnattr_getflags
posix_spawnattr_getpgroup
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_getsigdefault
posix_spawnattr_getsigmask
posix_spawnattr_init
posix_spawnattr_setflags
posix_spawnattr_setpgroup
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_spawnattr_setsigdefault
posix_spawnattr_setsigmask
posix_spawn_file_actions_addclose
posix_spawn_file_actions_adddup2
posix_spawn_file_actions_addopen
posix_spawn_file_actions_destroy
posix_spawnp
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getinherited
posix_trace_attr_getlogsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogsize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventtypelist_getnext_id
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_getnext_event
posix_trace_get_status
posix_trace_open
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
psiginfo
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_cancel
pthread_cleanup_pop
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_key_delete
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_self
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putc
putmsg
pututxline
qsort
remque
sched_getparam
sched_get_priority_max
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
sched_yield
sem_open
setkey
setlogmask
setnetent
setprotoent
setstate
sigaction
signbit
signgam
sigprocmask
sinl
stdin
stpcpy
stpncpy
strdup
strfmon
strtold
syslog
tanl
tdelete
tfind
tgamma
timezone
_tolower
_toupper
tsearch
twalk
ulimit
uselocale
V2_chap01
V2_chap02
V2_chap03
va_arg
vfscanf
vswprintf
wcpcpy
wcpncpy
wcscasecmp
wcsdup
wcsftime
wcsncasecmp
wcsnlen
wcstod
wcstok
wcstold
wordexp
y0

[-- Attachment #4: musl-syms.txt --]
[-- Type: text/plain, Size: 9501 bytes --]

unlinkat
fchownat
iswgraph
setuid
getutxid
scalbf
islower_l
wcsncmp
__kernel_sinf
isgraph_l
fopen
tzset
trunc
lrintf
scandir
strtoul
if_nametoindex
stat
vwarn
unlockpt
confstr
__cancel
__ftello_unlocked
iscntrl_l
getrlimit
openpty
pathconf
asctime_r
longjmp
system
ilogbf
getprotobyname
getrusage
bind_textdomain_codeset
pthread_attr_destroy
ldexp
munlock
pthread_condattr_setclock
getpriority
isspace
__fputwc_unlocked
__fpclassifyl
strncat
brk
access
getlogin_r
pthread_condattr_getpshared
umount
nrand48
sigpending
wait
getgrnam_r
pthread_key_create
wcscat
fputc
seekdir
__tre_mem_new_impl
__res_state
mkstemp
vsprintf
__stdio_read
wcsspn
__dns_count_addrs
clearerr
pthread_barrier_wait
cbrt
exp
strsignal
mrand48
ioctl
getservbyname
copysign
getpass
setsockopt
fnmatch
ualarm
pthread_rwlockattr_destroy
pthread_cond_destroy
siginterrupt
__mmap
putenv
writev
tcsendbreak
__libc_sigaction
__getgrent_a
cfsetospeed
dprintf
logb
msgctl
nice
hypot
gethostbyname
vdprintf
creat
verr
__libc_csu_init
utimes
atan2f
prctl
accept
perror
klogctl
readdir_r
tcflow
fread
pthread_mutexattr_gettype
vasprintf
htons
setlinebuf
wmemcmp
sigpause
atan2
pthread_mutexattr_destroy
globfree
wcstoll
putwchar
remainder
acosf
closedir
setregid
timer_getoverrun
getservbyport
iswlower
atan
sigtimedwait
isalpha_l
pthread_mutexattr_getpshared
pthread_cond_broadcast
ispunct_l
setresuid
pthread_attr_getschedparam
__fseeko_unlocked
cfgetispeed
sem_destroy
remquof
newlocale
__fdopen
strlen
pthread_spin_init
vprintf
getmntent_r
gethostent
execvp
sem_init
pthread_rwlock_timedwrlock
strndup
glob
asin
snprintf
fscanf
shmat
pthread_mutexattr_setrobust
clock_nanosleep
timer_delete
__towrite
toupper_l
fwscanf
shmctl
getegid
sigwait
gethostbyname2_r
setenv
pclose
localeconv
wmemmove
lstat
regcomp
clock_getres
pipe
__munmap
atanh
readv
inet_aton
__libc_start_main
wcsncpy
tcgetsid
symlinkat
isupper_l
getuid
fileno
strspn
recvfrom
tanh
wcstoimax
pthread_cond_init
setbuf
putchar
wctomb
catclose
wcspbrk
sethostname
sigsetjmp
mblen
memccpy
tmpnam
frexpf
sigset
dcgettext
symlink
remainderf
log10
__pthread_register_cancel
fgetws
strlcat
log
daemon
pthread_spin_unlock
putwc
sigqueue
getprotoent
setbuffer
pow
towupper
memalign
strerror
_longjmp
msgsnd
ldexpf
atanhf
posix_madvise
tolower_l
__restore
wmemset
strptime
__memrchr
munlockall
gettext
pthread_attr_getscope
lockf
getsubopt
rename
__assert_fail
__stdout_write
setpgid
ftok
fputwc
fexecve
sincos
mknodat
execve
getopt_long_only
strtoull
ftrylockfile
getpagesize
__kernel_rem_pio2
srandom
getservbyport_r
pthread_rwlock_timedrdlock
getpeername
asinh
strstr
__sigprocmask
__brk
signalfd
execv
strcmp
bzero
bcopy
__tm_to_time
pthread_spin_lock
iswalpha
strcat
isblank
fstatvfs
sigsuspend
catopen
getlogin
llabs
index
iswcntrl
sendto
fgets
sigignore
pthread_mutex_timedlock
pthread_barrierattr_getpshared
ftell
strtok_r
unlink
sinhf
pthread_condattr_getclock
pthread_barrierattr_setpshared
fgetwc
pthread_cond_timedwait
swapoff
pthread_cond_wait
fdopendir
wcsxfrm
posix_openpt
_Exit
pthread_setcanceltype
__strdup
ferror
dngettext
wait3
posix_fadvise
tanf
strnlen
duplocale
remquo
__wake
openlog
ctime_r
endutxent
epoll_create
sem_trywait
memcpy
ldiv
usleep
getc_unlocked
frexpl
pselect
sysinfo
random
tcsetattr
free
fchown
pthread_kill
getsid
getopt
imaxdiv
reboot
powf
__ptsname_r
erand48
gmtime
strtoumax
__toread
strncmp
__uflow
fgetc
iswspace
strpbrk
floorf
wcscmp
posix_fallocate
pthread_rwlockattr_getpshared
__fseeko
iswalnum
swscanf
swab
statvfs
mbrlen
dup2
bcmp
wait4
pthread_once
__set_thread_area
getservbyname_r
sethostent
pthread_attr_setguardsize
dirfd
pthread_rwlock_trywrlock
towlower
ftw
log1pf
strsep
nanosleep
mount
fsetpos
rand_r
chown
pthread_attr_getstacksize
pthread_mutex_unlock
acosh
inet_pton
fchdir
__vsyslog
acoshf
pthread_attr_init
__stdio_close
setservent
scalbln
mkfifoat
setpwent
alarm
hypotf
getdelim
mkfifo
ctime
gai_strerror
posix_memalign
getchar
fchmodat
clock_settime
wcsstr
lchmod
getspent
lrint
mbtowc
setjmp
gethostbyaddr
getdomainname
semget
__ieee754_rem_pio2
__rsyscall_unlock
lrand48
wscanf
wcwidth
mbstowcs
vfwscanf
swapon
pause
pthread_rwlock_init
__stpcpy
timer_settime
sem_getvalue
__overflow
shutdown
read
inet_ntop
wmemcpy
dgettext
iswpunct
__fpending
bind
mbrtowc
sqrtf
puts
socket
mbsnrtowcs
sighold
getpid
__stdio_write
mkdtemp
recv
pthread_mutexattr_settype
__syscall_ret
pwrite
pthread_mutex_consistent
endhostent
ceil
tmpfile
pthread_mutex_lock
fdatasync
fabs
scanf
sigdelset
wctrans
pthread_condattr_setpshared
pthread_getspecific
fstat
pthread_exit
getwchar
memchr
__kernel_tan
connect
link
__libc_sigprocmask
strtok
getaddrinfo
wcsnrtombs
strerror_r
iswdigit
atof
pthread_setcancelstate
wcscoll
pthread_condattr_init
iswprint
pthread_mutexattr_init
sleep
execlp
llrint
__kernel_cosf
endspent
floor
pthread_create
cosh
iswctype
fmod
ctermid
__fgetwc_unlocked
pthread_atfork
__restore_rt
__sigaction
isalnum
getenv
__mremap
scalbn
drand48
pthread_rwlock_tryrdlock
wordfree
lckpwdf
expm1f
pthread_attr_setdetachstate
strlcpy
setpriority
isblank_l
adjtimex
getpwent
atoll
time
shmget
round
killpg
coshf
putc_unlocked
warnx
__ctype_get_mb_cur_max
lldiv
utimensat
getdtablesize
ntohl
getwc
wcrtomb
getnameinfo
popen
epoll_create1
cuserid
gethostid
strncasecmp
pthread_barrierattr_init
__dns_doqueries
dup
shm_open
atoi
setgid
setspent
dcngettext
fflush
remove
setsid
ulckpwdf
cbrtf
__fpclassify
kill
fpathconf
memmove
readdir
ungetwc
isascii
ttyname_r
modff
__rand48_step
vswscanf
__syscall_cp
epoll_wait
abort
sigfillset
pthread_testcancel
epoll_pwait
tan
setgrent
isatty
__time_to_tm
strcpy
wcstoull
tempnam
div
copysignf
rintf
setgroups
msgrcv
inet_addr
pthread_equal
fputws
nftw
btowc
tcgetpgrp
expm1
__wait
__timedwait
__futex
sysconf
closelog
logf
clock
recvmsg
strtof
isdigit_l
ntohs
getutxent
getgrent
__fclose_ca
__pthread_unwind_next
strcasecmp
regerror
frexp
sigaltstack
isalpha
__lock
wctob
fcntl
dn_expand
tcgetattr
sscanf
fsync
sigaddset
wcschr
fclose
semctl
pthread_mutexattr_setpshared
__fpclassifyf
initgroups
__lockfile
mktime
getgrouplist
wcstoul
iswblank
abs
fmodf
pthread_join
cfsetispeed
gethostbyname2
getspnam_r
__tzset
truncf
inet_ntoa
sem_post
pthread_rwlock_wrlock
__unmapself
tcsetpgrp
fabsf
mlock
ptsname
pthread_rwlock_unlock
wcstombs
wprintf
vwscanf
mlockall
sem_timedwait
__syscall
syscall
setutxent
funlockfile
mbsinit
waitid
strrchr
sendmsg
sigismember
semop
sigrelse
srand48
signal
mkdir
fputs
asinhf
__rsyscall_lock
adjtime
isgraph
__libc_csu_fini
getpwuid_r
inotify_add_watch
_exit
strftime
__timedwait_cp
strchr
msgget
iconv_open
srand
gettimeofday
flockfile
telldir
raise
gmtime_r
__kernel_rem_pio2f
pthread_spin_destroy
vwprintf
pread
setpgrp
clearenv
faccessat
send
scalb
lcong48
realloc
asinf
renameat
wcstoumax
errx
crypt
__madvise
getgroups
setitimer
isalnum_l
res_query
_start
sigwaitinfo
memcmp
__asctime
ffs
log10f
basename
fwide
pthread_cond_signal
rewind
epoll_ctl
seed48
__rsyscall
__dns_query
sqrt
mkdirat
openat
ceilf
strtoimax
getppid
mprotect
pthread_spin_trylock
alphasort
setresgid
wcslen
vwarnx
sockatmark
cfgetospeed
mempcpy
__setjmp
open
getpwuid
flock
__kernel_cos
sem_unlink
__kernel_tanf
rindex
sbrk
tcflush
pthread_barrier_init
inotify_rm_watch
expf
setmntent
geteuid
pthread_attr_setschedparam
warn
vsscanf
strtol
htonl
setegid
_setjmp
asctime
settimeofday
sync
pthread_rwlock_destroy
tolower
dirname
truncate
gets
wctype
__getpwent_a
getspnam
sem_wait
chdir
freopen
res_init
pthread_detach
pthread_mutex_destroy
labs
opendir
gethostbyname_r
setreuid
clock_gettime
exit
if_indextoname
pthread_mutex_init
isprint_l
getitimer
wcswidth
towctrans
clock_getcpuclockid
getservent
sendfile
erf
write
log1p
unsetenv
pthread_attr_getdetachstate
wcscpy
sinf
ungetc
readlinkat
pthread_condattr_destroy
scalblnf
__stdio_seek
__simple_malloc
inotify_init
freeaddrinfo
pivot_root
sin
inotify_init1
toupper
putchar_unlocked
__getdents
asprintf
gethostbyaddr_r
getpgrp
atol
toascii
endprotoent
cosf
strcspn
bsearch
feof
close
getpgid
printf
__fwritex
fprintf
fstatat
forkpty
select
calloc
__libc_current_sigrtmin
__ipparse
acos
umount2
chmod
getchar_unlocked
isdigit
nextafter
fork
putw
rewinddir
wcswcs
endmntent
atanf
uname
setvbuf
wcsrtombs
wcstol
pthread_attr_setstacksize
localtime_r
difftime
getsockname
execl
listen
poll
pthread_sigmask
vscanf
__syscall_cp_asm
__tre_mem_alloc_impl
__stpncpy
__yield
tcdrain
localtime
vfwprintf
iswxdigit
strtoll
setlocale
iscntrl
strcoll
seteuid
__libc_current_sigrtmax
pthread_barrierattr_destroy
logbf
pthread_mutexattr_getrobust
__ieee754_rem_pio2f
__uniclone
freelocale
gethostname
pthread_attr_setscope
strncpy
mbsrtowcs
timer_gettime
sinh
pthread_setspecific
msync
wmemchr
sigemptyset
wcscspn
memset
__kernel_sin
islower
vsnprintf
fgetpos
isxdigit_l
isprint
stime
getsockopt
sem_close
realpath
getgid
__fopen_rb_ca
ftruncate
imaxabs
__langinfo
waitpid
times
fwprintf
tanhf
timer_create
getutxline
strtod
vfprintf
pthread_mutex_trylock
__crypt_r
strchrnul
hstrerror
pthread_rwlock_rdlock
rmdir
__mktemp
wcsncat
erff
strxfrm
roundf
execle
chroot
getcwd
getpwnam_r
fchmod
readlink
fseek
isxdigit
isupper
utime
__putenv
shm_unlink
jrand48
erfc
isspace_l
ispunct
socketpair
futimens
wcsrchr
catgets
addmntent
cfmakeraw
getpwnam
siglongjmp
getw
iswupper
getline
cos
endservent
pthread_rwlockattr_init
swprintf
strcasestr
sprintf
ttyname
rint
rand
lseek
lchown
pthread_rwlockattr_setpshared
modf
regexec
linkat
ilogb
__errno_location
shmdt
setrlimit
mknod
pthread_barrier_destroy
vfork
nextafterf
pthread_attr_getguardsize
umask

[-- Attachment #5: posix-syms.txt --]
[-- Type: text/plain, Size: 9697 bytes --]

iswgraph
fchownat
posix_trace_attr_setstreamfullpolicy
V2_chap01
setuid
wcsncmp
fopen
tzset
trunc
stpncpy
sigprocmask
fmemopen
scandir
casinh
posix_trace_close
strtoul
if_nametoindex
stat
unlockpt
confstr
getrlimit
posix_trace_attr_setstreamsize
pathconf
system
longjmp
cpow
fegetexceptflag
posix_trace_attr_init
getprotobyname
pthread_mutex_getprioceiling
getrusage
pthread_attr_destroy
ldexp
munlock
pthread_condattr_setclock
isspace
getpriority
strncat
access
fesetround
posix_trace_getnext_event
pthread_condattr_getpshared
isless
nrand48
wait
sigpending
wcscat
seekdir
pthread_key_create
fputc
isgreaterequal
csinl
mkstemp
environ
wcsspn
clearerr
catan
posix_spawnattr_getsigmask
pthread_barrier_wait
exp
cbrt
strsignal
acosl
mrand48
ioctl
getservbyname
fmin
copysign
setsockopt
fnmatch
pthread_rwlockattr_destroy
pthread_cond_destroy
posix_trace_flush
siginterrupt
putenv
writev
tcsendbreak
cfsetospeed
msgctl
logb
dprintf
remque
nice
hypot
cimag
creat
setkey
mq_open
accept
perror
cacos
cosl
tcflow
fread
pthread_mutexattr_gettype
dlopen
endpwent
wmemcmp
posix_spawnattr_setsigdefault
sigpause
atan2
pthread_mutexattr_destroy
wcstoll
remainder
putwchar
daylight
closedir
setregid
posix_spawnattr_getpgroup
aio_error
timer_getoverrun
iswlower
aio_cancel
atan
sigtimedwait
pthread_mutexattr_getpshared
pthread_cond_broadcast
mq_receive
setstate
cexp
posix_trace_eventset_add
pthread_attr_getschedparam
cabs
V2_chap03
posix_trace_eventid_equal
cfgetispeed
sem_destroy
pthread_setschedparam
newlocale
strlen
isnormal
vprintf
gethostent
posix_spawnattr_getflags
posix_spawn
sem_init
pthread_cancel
open_memstream
strndup
pthread_rwlock_timedwrlock
glob
asin
snprintf
shmat
fscanf
pthread_mutexattr_setrobust
fegetround
wcstold
posix_spawnattr_setschedparam
clock_nanosleep
timer_delete
shmctl
pthread_mutexattr_getprotocol
fwscanf
va_arg
getegid
sigwait
setenv
mq_timedsend
pclose
isnan
localeconv
wmemmove
lstat
regcomp
clock_getres
pipe
atanh
readv
y0
posix_trace_eventid_open
errno
wcsncpy
getc
tcgetsid
posix_trace_trygetnext_event
getuid
fileno
tanh
strspn
recvfrom
exec
isinf
wcstoimax
setbuf
wctomb
putchar
catclose
wcspbrk
pthread_mutexattr_setprotocol
fmtmsg
sigsetjmp
mblen
feraiseexcept
sigaction
memccpy
dlerror
tmpnam
aio_suspend
feholdexcept
isgreater
aio_write
symlink
log10
fgetws
log
feupdateenv
wcscasecmp
posix_trace_attr_setinherited
pthread_spin_unlock
putwc
sigqueue
munmap
towupper
pow
islessgreater
islessequal
strerror
msgsnd
_longjmp
syslog
posix_madvise
qsort
wmemset
strptime
munlockall
ctanh
pthread_attr_getscope
lockf
posix_spawnattr_getsigdefault
lsearch
getsubopt
rename
setpgid
ftok
fexecve
fputwc
ftrylockfile
srandom
pthread_mutex_setprioceiling
pthread_rwlock_timedrdlock
getpeername
asinh
atexit
aio_return
strstr
posix_trace_set_filter
pthread_setschedprio
sinl
posix_mem_offset
lgamma
strcmp
pthread_spin_lock
iswalpha
dbm_clearerr
strcat
isblank
sigsuspend
fstatvfs
mq_setattr
catopen
llabs
getlogin
iswcntrl
sendto
posix_typed_mem_open
fgets
sched_setparam
pthread_mutex_timedlock
pthread_barrierattr_getpshared
assert
ftell
posix_trace_start
nl_langinfo
mq_timedreceive
wordexp
unlink
pthread_condattr_getclock
pthread_barrierattr_setpshared
j0
fgetwc
pthread_cond_timedwait
posix_trace_event
fdopendir
wcsxfrm
posix_spawn_file_actions_destroy
posix_openpt
_Exit
ferror
posix_spawnattr_init
posix_fadvise
_toupper
strnlen
duplocale
remquo
openlog
endutxent
sem_trywait
memcpy
ldiv
getc_unlocked
pselect
random
tcsetattr
free
fchown
pthread_kill
fdetach
getsid
getopt
imaxdiv
posix_trace_attr_getlogsize
tsearch
erand48
gmtime
strtoumax
strncmp
iswspace
fgetc
strpbrk
wcscmp
posix_fallocate
pthread_rwlockattr_getpshared
fattach
iswalnum
hcreate
swscanf
swab
statvfs
mbrlen
posix_trace_eventtypelist_getnext_id
contents
pthread_cleanup_pop
pthread_once
sethostent
pthread_attr_setguardsize
dirfd
towlower
pthread_rwlock_trywrlock
llround
twalk
ftw
timezone
wcstok
tdelete
nanosleep
posix_spawn_file_actions_addclose
fsetpos
fmax
posix_spawnattr_setpgroup
chown
pthread_attr_getstacksize
catanl
acosh
posix_spawnattr_getschedpolicy
fchdir
iconv
if_nameindex
endgrent
pthread_attr_init
setservent
scalbln
setpwent
aio_fsync
fetestexcept
clog
feclearexcept
alarm
getdelim
mkfifo
ctime
gai_strerror
ccosh
getnetbyaddr
posix_memalign
fchmodat
getchar
clock_settime
wcsstr
lrint
psiginfo
mbtowc
exp2
lfind
setjmp
semget
lrand48
pthread_attr_getstack
wscanf
wcwidth
mbstowcs
vfwscanf
pause
posix_trace_get_attr
shutdown
sem_getvalue
read
posix_spawnattr_setsigmask
inet_ntop
wmemcpy
iswpunct
mq_unlink
strtold
sched_getparam
mbrtowc
bind
puts
socket
sighold
getpid
mkdtemp
recv
pthread_mutexattr_settype
pwrite
pthread_mutex_consistent
endhostent
ceil
tmpfile
pthread_mutex_lock
fabs
fdatasync
wctrans
sigdelset
scanf
getmsg
pthread_condattr_setpshared
pthread_getspecific
fstat
tfind
pthread_exit
getwchar
posix_trace_attr_setlogsize
getgrnam
memchr
putc
connect
link
sched_getscheduler
posix_trace_trid_eventid_open
strtok
getaddrinfo
wcsnrtombs
cacosl
iswdigit
atof
wcscoll
pthread_setcancelstate
posix_spawnattr_getschedparam
pthread_condattr_init
iswprint
pthread_mutexattr_init
sleep
conj
posix_typed_mem_get_info
llrint
pthread_key_delete
floor
pthread_create
cosh
iswctype
posix_trace_timedgetnext_event
fmod
ctermid
pthread_atfork
isalnum
getenv
csinh
drand48
pthread_rwlock_tryrdlock
pthread_attr_setdetachstate
setpriority
setlogmask
getpwent
iconv_close
malloc
setnetent
pthread_getconcurrency
time
shmget
round
killpg
posix_trace_get_status
putmsg
putc_unlocked
utimensat
lldiv
ntohl
wcrtomb
getwc
getnameinfo
if_freenameindex
popen
gethostid
strncasecmp
pthread_barrierattr_init
shm_open
dup
atoi
setgid
fflush
remove
setsid
kill
fpathconf
readdir
memmove
ungetwc
isascii
vswscanf
stdin
sigfillset
abort
pthread_testcancel
lround
ccosl
creal
tan
setgrent
posix_spawn_file_actions_adddup2
tempnam
strcpy
isatty
div
nearbyint
posix_trace_attr_setname
inet_addr
msgrcv
pthread_equal
fputws
nftw
posix_trace_attr_getname
pthread_setconcurrency
ccos
btowc
tcgetpgrp
sched_rr_get_interval
expm1
isfinite
strdup
posix_spawnattr_setschedpolicy
sysconf
closelog
logf
clock
recvmsg
fpclassify
getgrent
getutxent
fma
strcasecmp
sigaltstack
frexp
isalpha
wctob
posix_spawnp
fcntl
tcgetattr
sscanf
sigaddset
fsync
wcschr
getpmsg
fclose
fegetenv
semctl
pthread_mutexattr_setpshared
mktime
wcstoul
iswblank
abs
pthread_join
vfscanf
cproj
fwrite
a64l
optarg
cfsetispeed
fesetenv
mq_close
nan
truncf
posix_trace_attr_getstreamfullpolicy
sem_post
pthread_rwlock_wrlock
tcsetpgrp
mlock
ptsname
wcstombs
pthread_rwlock_unlock
insque
wprintf
vwscanf
fdim
mlockall
sem_timedwait
wcstod
setutxent
funlockfile
mbsinit
waitid
strrchr
sigismember
sendmsg
sigrelse
semop
srand48
signal
posix_trace_get_filter
fdopen
mkdir
fputs
wcsnlen
isgraph
posix_trace_attr_getstreamsize
aio_read
wcsncasecmp
wcsftime
pthread_self
strftime
strchr
getdate
msgget
iconv_open
srand
flockfile
gettimeofday
telldir
raise
wcpncpy
pthread_spin_destroy
vwprintf
tanl
ctan
fesetexceptflag
pread
setpgrp
send
faccessat
lcong48
realloc
grantpt
pthread_attr_setstack
wcstoumax
crypt
setitimer
getgroups
sigwaitinfo
memcmp
ffs
basename
fwide
pthread_cond_signal
rewind
_tolower
seed48
sqrt
wcpcpy
signgam
openat
posix_trace_clear
ctanl
strtoimax
getppid
mprotect
ulimit
alphasort
wcslen
sockatmark
cfgetospeed
open
getpwuid
pututxline
sem_unlink
dlsym
posix_spawnattr_setflags
tcflush
pthread_attr_getschedpolicy
carg
geteuid
pthread_attr_setschedparam
vsscanf
strtol
htonl
setegid
asctime
tolower
sync
pthread_rwlock_destroy
dirname
truncate
sched_setscheduler
sched_yield
wctype
gets
sem_wait
mq_notify
freopen
chdir
pthread_detach
pthread_mutex_destroy
labs
opendir
setreuid
exit
if_indextoname
pthread_mutex_init
getitimer
posix_spawnattr_destroy
wcswidth
towctrans
clock_getcpuclockid
pthread_mutexattr_setprioceiling
posix_trace_attr_getclockres
erf
write
unsetenv
log1p
pthread_attr_getdetachstate
wcscpy
ungetc
pthread_condattr_destroy
setprotoent
freeaddrinfo
asinl
mmap
sin
toupper
putchar_unlocked
toascii
getpgrp
endprotoent
atol
strcspn
bsearch
pthread_getschedparam
feof
close
getpgid
printf
fstatat
fprintf
csin
select
calloc
casin
l64a
chmod
acos
getchar_unlocked
isdigit
nextafter
fork
V2_chap02
rewinddir
vswprintf
lio_listio
posix_trace_open
uname
atanf
wcsrtombs
setvbuf
wcstol
pthread_attr_setstacksize
difftime
getsockname
strfmon
casinl
listen
poll
pthread_sigmask
vscanf
tcdrain
localtime
wcsdup
vfwprintf
iswxdigit
strtoll
setlocale
iscntrl
strcoll
catanh
seteuid
sched_get_priority_max
pthread_barrierattr_destroy
pthread_mutexattr_getrobust
posix_trace_shutdown
posix_spawn_file_actions_addopen
freelocale
uselocale
gethostname
strncpy
mbsrtowcs
pthread_attr_setscope
sinh
pthread_mutexattr_getprioceiling
isunordered
pthread_setspecific
msync
wmemchr
sigemptyset
wcscspn
islower
memset
vsnprintf
FD_CLR
fgetpos
isprint
getsockopt
sem_close
realpath
getgid
ftruncate
imaxabs
dlclose
waitpid
posix_trace_attr_destroy
times
pthread_getcpuclockid
tgamma
fwprintf
timer_create
sem_open
vfprintf
strtod
pthread_mutex_trylock
pthread_rwlock_rdlock
rmdir
wcsncat
stpcpy
erff
strxfrm
pthread_attr_getinheritsched
getcwd
fchmod
atanl
readlink
mq_send
csqrt
isastream
fseek
isupper
isxdigit
utime
shm_unlink
jrand48
erfc
pthread_attr_setschedpolicy
pthread_attr_setinheritsched
ispunct
signbit
socketpair
futimens
mq_getattr
wcsrchr
catgets
siglongjmp
getpwnam
posix_trace_attr_getinherited
endnetent
iswupper
getline
cos
endservent
pthread_rwlockattr_init
initstate
swprintf
sprintf
getgrgid
ttyname
rint
encrypt
rand
posix_trace_create
pthread_rwlockattr_setpshared
lchown
lseek
modf
log2
ilogb
shmdt
setrlimit
mknod
pthread_barrier_destroy
cacosh
umask
pthread_attr_getguardsize

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-29 16:19 ` gs
@ 2011-05-29 16:44   ` gs
  2011-05-29 17:32     ` gs
  0 siblings, 1 reply; 20+ messages in thread
From: gs @ 2011-05-29 16:44 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

ok, tweaked it a bit more
>
> see attached perl script and output.
> i recommend you rerun it since i didnt have the most recent musl 
> version installed.
>
> On 05/29/2011 01:41 AM, Rich Felker wrote:
>> Apologies for the somewhat-slower progress on musl lately. The past
>> few weeks I've had a good bit less contiguous time to devote to it.
>> One thing that would help me make better use of my time is if I had a
>> good list of the remaining areas of functionality that musl is
>> missing, so I could use smaller blocks of time to write code that's
>> simple and largely independent of everything else.
>>
>> Would anyone be willing to go through a list of symbols from musl,
>> comparing it to the list of functions in the POSIX standard
>> (http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html) 
>>
>> and break it down into a list of functions and some categories of
>> functionality? For the most part anything in non-essential option
>> groups could be omitted or put in a separate list to address later.
>>
>> Rich
>>
>


[-- Attachment #2: musl-diff.txt --]
[-- Type: text/plain, Size: 2940 bytes --]

a64l
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinl
assert
atanl
cabs
cacos
cacosh
cacosl
carg
casin
casinh
casinl
catan
catanh
catanl
ccos
ccosh
ccosl
cexp
cimag
clog
conj
contents
cosl
cpow
cproj
creal
csin
csinh
csinl
csqrt
ctan
ctanh
ctanl
daylight
dbm_clearerr
dlclose
dlerror
dlopen
dlsym
encrypt
environ
errno
exec
exp2
fattach
FD_CLR
fdetach
fdim
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
fma
fmax
fmemopen
fmin
fmtmsg
fpclassify
getdate
getmsg
getnetbyaddr
getpmsg
hcreate
if_freenameindex
if_nameindex
initstate
insque
isastream
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
j0
l64a
lfind
lgamma
lio_listio
llround
log2
lround
lsearch
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
nan
nearbyint
open_memstream
optarg
posix_mem_offset
posix_spawnattr_destroy
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_init
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getinherited
posix_trace_attr_getlogsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogsize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventtypelist_getnext_id
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_getnext_event
posix_trace_get_status
posix_trace_open
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
psiginfo
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_cleanup_pop
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putmsg
remque
sched_getparam
sched_get_priority_max
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
setkey
setstate
signbit
signgam
sinl
stdin
strfmon
tanl
tdelete
tfind
tgamma
timezone
_tolower
_toupper
tsearch
twalk
ulimit
uselocale
V2_chap01
V2_chap02
V2_chap03
va_arg
wcpcpy
wcpncpy
wcscasecmp
wcsdup
wcsftime
wcsncasecmp
wcsnlen
wcstod
wcstok
wcstold
y0

[-- Attachment #3: musl-syms.txt --]
[-- Type: text/plain, Size: 10998 bytes --]

unlinkat
fchownat
setuid
scalbf
__kernel_sinf
isgraph_l
stpncpy
lrintf
scandir
vwarn
__cancel
getrlimit
pathconf
longjmp
ilogbf
getrusage
bind_textdomain_codeset
pthread_attr_destroy
munlock
pthread_condattr_setclock
__fputwc_unlocked
__fpclassifyl
access
getlogin_r
pthread_condattr_getpshared
umount
sigpending
wait
fputc
seekdir
mkstemp
vsprintf
__stdio_read
__dns_count_addrs
posix_spawnattr_getsigmask
mrand48
ioctl
getservbyname
setsockopt
ualarm
pthread_rwlockattr_destroy
siginterrupt
__getgrent_a
msgctl
nice
hypot
gethostbyname
vdprintf
verr
atan2f
prctl
readdir_r
tcflow
vasprintf
htons
wmemcmp
sigpause
textdomain
pthread_mutexattr_destroy
wcstoll
remainder
acosf
setregid
timer_getoverrun
iswlower
setresuid
cfgetispeed
eventfd_write
remquof
newlocale
__fdopen
fstatfs
execvp
pthread_cancel
pthread_rwlock_timedwrlock
strndup
shmat
pthread_mutexattr_setrobust
clock_nanosleep
timer_delete
toupper_l
fwscanf
shmctl
gethostbyname2_r
pclose
regcomp
clock_getres
pipe
atanh
inet_aton
isupper_l
getuid
fileno
strspn
tanh
wcstoimax
pthread_cond_init
hasmntopt
catclose
wcspbrk
sethostname
getmntent
mblen
memccpy
sigaction
tmpnam
symlink
remainderf
fgetws
putwc
munmap
strerror
msgsnd
syslog
setutent
tolower_l
__restore
munlockall
gettext
lockf
getsubopt
rename
__assert_fail
setpgid
ftok
fputwc
fexecve
sincos
execve
getopt_long_only
__kernel_rem_pio2
getservbyport_r
pthread_rwlock_timedrdlock
getpeername
atexit
strstr
getprotobynumber
strcmp
bcopy
__tm_to_time
pthread_spin_lock
iswalpha
strcat
catopen
getlogin
index
iswcntrl
fgets
sigignore
pthread_mutex_timedlock
strtok_r
wordexp
fgetwc
pthread_cond_timedwait
posix_spawn_file_actions_destroy
_Exit
__strdup
dngettext
wait3
posix_fadvise
tanf
duplocale
remquo
openlog
endutxent
sem_trywait
ldiv
usleep
pselect
free
fchown
pthread_kill
getopt
powf
__ptsname_r
erand48
gmtime
__toread
strncmp
__uflow
fgetc
strpbrk
floorf
wcscmp
__fseeko
__posix_spawnx
swscanf
dup2
__set_thread_area
pthread_attr_setguardsize
pthread_rwlock_trywrlock
mount
fsetpos
posix_spawn_file_actions_addclose
rand_r
chown
posix_spawnattr_setpgroup
acosh
inet_pton
fchdir
getgruid_r
iconv
acoshf
alarm
mkfifo
ctime
fchmodat
clock_settime
getspent
lrint
setjmp
getdomainname
__ieee754_rem_pio2
__rsyscall_unlock
lrand48
vfwscanf
swapon
__stpcpy
timer_settime
sem_getvalue
fgetws_unlocked
__overflow
dgettext
strtold
bind
getpid
mkdtemp
recv
pthread_mutexattr_settype
endhostent
ceil
tmpfile
pthread_mutex_lock
scanf
wctrans
pthread_condattr_setpshared
pthread_getspecific
fstat
getgrnam
memchr
connect
link
strtok
wcsnrtombs
strerror_r
iswdigit
__pthread_unregister_cancel
sleep
execlp
feof_unlocked
__kernel_cosf
pthread_key_delete
pthread_create
ctermid
pthread_atfork
__sigaction
scalbnf
getenv
drand48
pthread_attr_setdetachstate
isblank_l
getpwent
malloc
setnetent
getwchar_unlocked
updwtmpx
killpg
coshf
warnx
__ctype_get_mb_cur_max
utimensat
getdtablesize
ntohl
wcrtomb
popen
epoll_create1
cuserid
strncasecmp
pthread_barrierattr_init
atoi
dcngettext
remove
cbrtf
kill
readdir
ungetwc
ttyname_r
epoll_wait
sigfillset
abort
getdents
posix_spawn_file_actions_adddup2
isatty
strcpy
tempnam
fgetwc_unlocked
rintf
setgroups
pthread_equal
fputws
nftw
btowc
tcgetpgrp
__wait
__timedwait
sysconf
logf
strtof
ntohs
getutxent
getgrent
strcasecmp
isalpha
__lock
wctob
fcntl
dn_expand
sscanf
fsync
wcschr
fclose
semctl
initgroups
__lockfile
mktime
abs
fmodf
vfscanf
getspnam_r
__dst_adjust
__tzset
truncf
inet_ntoa
sem_post
__unmapself
tcsetpgrp
mlock
ptsname
wcstombs
mlockall
syscall
setutxent
mbsinit
sigrelse
signal
mkdir
fputs
asinhf
__rsyscall_lock
isgraph
pthread_self
_exit
strftime
__timedwait_cp
strchr
msgget
iconv_open
srand
gettimeofday
flockfile
__kernel_rem_pio2f
memrchr
vwprintf
clearenv
scalb
realloc
asinf
mktemp
grantpt
getutid
errx
setitimer
crypt_r
res_query
sigwaitinfo
memcmp
log10f
rewind
__dns_query
mkdirat
openat
pthread_spin_trylock
mempcpy
__setjmp
open
getpwuid
__kernel_cos
rindex
sbrk
pthread_barrier_init
expf
setmntent
pthread_attr_setschedparam
warn
vsscanf
strtol
_setjmp
pthread_rwlock_destroy
gets
wctype
getspnam
sem_wait
freopen
pthread_detach
posix_spawn_file_actions_init
ferror_unlocked
clock_gettime
exit
isprint_l
getitimer
wcswidth
towctrans
clock_getcpuclockid
sendfile
write
unsetenv
pthread_attr_getdetachstate
ungetc
readlinkat
scalblnf
__stdio_seek
setprotoent
freeaddrinfo
toupper
putchar_unlocked
gethostbyaddr_r
getpgrp
atol
strcspn
bsearch
fputws_unlocked
__dns_get_rr
endutent
getpgid
printf
__fwritex
fprintf
fstatat
select
umount2
getchar_unlocked
isdigit
fork
putw
vswprintf
getutline
endmntent
atanf
setvbuf
wcsrtombs
localtime_r
difftime
getsockname
execl
poll
pthread_sigmask
vscanf
__syscall_cp_asm
__tre_mem_alloc_impl
tcdrain
fflush_unlocked
iswxdigit
setlocale
__libc_current_sigrtmax
__ieee754_rem_pio2f
__uniclone
gethostname
sinh
msync
sigemptyset
wcscspn
islower
pututline
fgetpos
stime
getsockopt
sem_close
getgid
__fopen_rb_ca
ftruncate
getwc_unlocked
fwprintf
vfprintf
pthread_mutex_trylock
__crypt_r
hstrerror
pthread_rwlock_rdlock
rmdir
fchmod
readlink
isxdigit
isupper
utime
__putenv
shm_unlink
jrand48
erfc
ispunct
cfmakeraw
iswupper
endnetent
getline
pthread_rwlockattr_init
strcasestr
getgrgid
ttyname
rint
lseek
lchown
modf
linkat
__errno_location
ilogb
vfork
nextafterf
iswgraph
islower_l
getutxid
wcsncmp
fopen
trunc
tzset
sigprocmask
strtoul
if_nametoindex
stat
unlockpt
confstr
iscntrl_l
__ftello_unlocked
openpty
bsd_signal
asctime_r
system
getprotobyname
ldexp
isspace
getpriority
strncat
brk
nrand48
getgrnam_r
wcscat
pthread_key_create
__tre_mem_new_impl
__res_state
clearerr_unlocked
wcsspn
clearerr
exp
cbrt
pthread_barrier_wait
strsignal
getpass
copysign
fnmatch
ptsname_r
pthread_cond_destroy
__mmap
putenv
writev
__libc_sigaction
tcsendbreak
cfsetospeed
logb
dprintf
fseeko
creat
__libc_csu_init
utimes
accept
perror
klogctl
fread
pthread_mutexattr_gettype
endpwent
fputwc_unlocked
setlinebuf
posix_spawnattr_setsigdefault
atan2
globfree
putwchar
closedir
posix_spawnattr_getpgroup
getservbyport
atan
isalpha_l
sigtimedwait
pthread_cond_broadcast
pthread_mutexattr_getpshared
ispunct_l
pthread_attr_getschedparam
__fseeko_unlocked
sem_destroy
strlen
vprintf
pthread_spin_init
getmntent_r
gethostent
posix_spawn
posix_spawnattr_getflags
sem_init
asin
glob
fscanf
snprintf
__towrite
getegid
sigwait
setenv
localeconv
lstat
wmemmove
__munmap
readv
putwchar_unlocked
__libc_start_main
getc
wcsncpy
tcgetsid
symlinkat
recvfrom
setbuf
wctomb
putchar
eventfd
sigsetjmp
frexpf
dcgettext
sigset
log10
__pthread_register_cancel
strlcat
log
daemon
pthread_spin_unlock
getprotoent
sigqueue
erfcf
setbuffer
towupper
pow
memalign
_longjmp
atanhf
ldexpf
posix_madvise
qsort
wmemset
__memrchr
strptime
pthread_attr_getscope
posix_spawnattr_getsigdefault
mremap
__stdout_write
madvise
mknodat
ftello
ftrylockfile
strtoull
getpagesize
srandom
asinh
fputs_unlocked
__brk
signalfd
getopt_long
execv
bzero
isblank
sigsuspend
fstatvfs
llabs
sendto
ftell
pthread_barrierattr_getpshared
nl_langinfo
vsyslog
unlink
sinhf
pthread_barrierattr_setpshared
pthread_condattr_getclock
swapoff
fdopendir
pthread_cond_wait
wcsxfrm
posix_openpt
pthread_setcanceltype
ferror
strnlen
__wake
epoll_create
ctime_r
memcpy
getc_unlocked
sysinfo
frexpl
random
tcsetattr
getsid
reboot
imaxdiv
strtoumax
iswspace
posix_fallocate
pthread_rwlockattr_getpshared
iswalnum
mbrlen
statvfs
swab
wait4
bcmp
getservbyname_r
pthread_once
sethostent
dirfd
towlower
log1pf
ftw
strsep
nanosleep
__ftello
pthread_attr_getstacksize
pthread_mutex_unlock
__vsyslog
endgrent
pthread_attr_init
scalbln
setservent
__stdio_close
setpwent
mkfifoat
hypotf
getdelim
fwrite_unlocked
gai_strerror
posix_memalign
regfree
getchar
lchmod
wcsstr
mbtowc
gethostbyaddr
semget
wcwidth
wscanf
mbstowcs
pause
pthread_rwlock_init
shutdown
read
inet_ntop
posix_spawnattr_setsigmask
wmemcpy
iswpunct
__fpending
sqrtf
mbrtowc
puts
mbsnrtowcs
socket
sighold
eventfd_read
__stdio_write
__syscall_ret
pthread_mutex_consistent
pwrite
fabs
fdatasync
sigdelset
getwchar
pthread_exit
__kernel_tan
statfs
putc
fgets_unlocked
getaddrinfo
atof
wcscoll
pthread_setcancelstate
iswprint
pthread_condattr_init
pthread_mutexattr_init
llrint
endspent
getutent
floor
cosh
iswctype
fmod
__fgetwc_unlocked
__restore_rt
isalnum
__mremap
scalbn
wordfree
pthread_rwlock_tryrdlock
lckpwdf
expm1f
strlcpy
setpriority
setlogmask
adjtimex
iconv_close
__tre_mem_destroy
atoll
shmget
time
round
putc_unlocked
lldiv
getwc
getnameinfo
gethostid
__dns_doqueries
shm_open
dup
setgid
setspent
fflush
setsid
ulckpwdf
__fpclassify
fpathconf
memmove
isascii
modff
__rand48_step
vswscanf
__syscall_cp
pthread_testcancel
epoll_pwait
tan
fread_unlocked
setgrent
wcstoull
__time_to_tm
div
copysignf
inet_addr
msgrcv
expm1
updwtmp
strdup
__futex
closelog
clock
recvmsg
isdigit_l
fgetc_unlocked
__fclose_ca
__pthread_unwind_next
regerror
sigaltstack
frexp
posix_spawnp
tcgetattr
sigaddset
fputc_unlocked
__fpclassifyf
pthread_mutexattr_setpshared
getgrouplist
iswblank
wcstoul
pthread_join
fwrite
gethostbyname2
cfsetispeed
pthread_rwlock_wrlock
fabsf
fileno_unlocked
pthread_rwlock_unlock
wprintf
vwscanf
__syscall
sem_timedwait
funlockfile
waitid
sendmsg
sigismember
strrchr
semop
srand48
fdopen
adjtime
__pthread_tsd_run_dtors
__libc_csu_fini
getpwuid_r
inotify_add_watch
telldir
raise
gmtime_r
pthread_spin_destroy
pread
setpgrp
send
faccessat
lcong48
renameat
crypt
wcstoumax
__madvise
getgroups
isalnum_l
_start
__asctime
ffs
basename
fwide
pthread_cond_signal
epoll_ctl
seed48
__rsyscall
sqrt
ceilf
strtoimax
mprotect
getppid
alphasort
setresgid
wcslen
vwarnx
sockatmark
cfgetospeed
flock
pututxline
__kernel_tanf
sem_unlink
posix_spawnattr_setflags
tcflush
inotify_rm_watch
geteuid
htonl
setegid
cfsetspeed
asctime
settimeofday
sync
dirname
tolower
truncate
sched_yield
__getpwent_a
verrx
chdir
res_init
gethostbyname_r
opendir
labs
pthread_mutex_destroy
setreuid
if_indextoname
err
pthread_mutex_init
getservent
erf
log1p
sinf
wcscpy
pthread_condattr_destroy
mmap
inotify_init
__simple_malloc
sin
pivot_root
__scanf
inotify_init1
__getdents
asprintf
endprotoent
toascii
cosf
feof
close
forkpty
calloc
__libc_current_sigrtmin
__ipparse
acos
chmod
nextafter
rewinddir
wcswcs
uname
wcstol
pthread_attr_setstacksize
listen
__yield
__stpncpy
localtime
vfwprintf
strtoll
iscntrl
strcoll
seteuid
pthread_barrierattr_destroy
logbf
pthread_mutexattr_getrobust
posix_spawn_file_actions_addopen
freelocale
mbsrtowcs
strncpy
pthread_attr_setscope
timer_gettime
pthread_setspecific
wmemchr
getnetent
__kernel_sin
memset
vsnprintf
isprint
isxdigit_l
realpath
__langinfo
imaxabs
waitpid
times
tanhf
bindtextdomain
sem_open
timer_create
strtod
getutxline
putwc_unlocked
strchrnul
__mktemp
erff
stpcpy
wcsncat
execle
roundf
strxfrm
chroot
getpwnam_r
getcwd
fseek
isspace_l
socketpair
futimens
addmntent
catgets
wcsrchr
getpwnam
siglongjmp
ngettext
getw
endservent
cos
swprintf
sprintf
rand
pthread_rwlockattr_setpshared
regexec
shmdt
setrlimit
mknod
pthread_barrier_destroy
umask
pthread_attr_getguardsize

[-- Attachment #4: posix-syms.txt --]
[-- Type: text/plain, Size: 9697 bytes --]

iswgraph
fchownat
posix_trace_attr_setstreamfullpolicy
V2_chap01
setuid
wcsncmp
fopen
tzset
trunc
stpncpy
sigprocmask
fmemopen
scandir
casinh
posix_trace_close
strtoul
if_nametoindex
stat
unlockpt
confstr
getrlimit
posix_trace_attr_setstreamsize
pathconf
system
longjmp
cpow
fegetexceptflag
posix_trace_attr_init
getprotobyname
pthread_mutex_getprioceiling
getrusage
pthread_attr_destroy
ldexp
munlock
pthread_condattr_setclock
isspace
getpriority
strncat
access
fesetround
posix_trace_getnext_event
pthread_condattr_getpshared
isless
nrand48
wait
sigpending
wcscat
seekdir
pthread_key_create
fputc
isgreaterequal
csinl
mkstemp
environ
wcsspn
clearerr
catan
posix_spawnattr_getsigmask
pthread_barrier_wait
exp
cbrt
strsignal
acosl
mrand48
ioctl
getservbyname
fmin
copysign
setsockopt
fnmatch
pthread_rwlockattr_destroy
pthread_cond_destroy
posix_trace_flush
siginterrupt
putenv
writev
tcsendbreak
cfsetospeed
msgctl
logb
dprintf
remque
nice
hypot
cimag
creat
setkey
mq_open
accept
perror
cacos
cosl
tcflow
fread
pthread_mutexattr_gettype
dlopen
endpwent
wmemcmp
posix_spawnattr_setsigdefault
sigpause
atan2
pthread_mutexattr_destroy
wcstoll
remainder
putwchar
daylight
closedir
setregid
posix_spawnattr_getpgroup
aio_error
timer_getoverrun
iswlower
aio_cancel
atan
sigtimedwait
pthread_mutexattr_getpshared
pthread_cond_broadcast
mq_receive
setstate
cexp
posix_trace_eventset_add
pthread_attr_getschedparam
cabs
V2_chap03
posix_trace_eventid_equal
cfgetispeed
sem_destroy
pthread_setschedparam
newlocale
strlen
isnormal
vprintf
gethostent
posix_spawnattr_getflags
posix_spawn
sem_init
pthread_cancel
open_memstream
strndup
pthread_rwlock_timedwrlock
glob
asin
snprintf
shmat
fscanf
pthread_mutexattr_setrobust
fegetround
wcstold
posix_spawnattr_setschedparam
clock_nanosleep
timer_delete
shmctl
pthread_mutexattr_getprotocol
fwscanf
va_arg
getegid
sigwait
setenv
mq_timedsend
pclose
isnan
localeconv
wmemmove
lstat
regcomp
clock_getres
pipe
atanh
readv
y0
posix_trace_eventid_open
errno
wcsncpy
getc
tcgetsid
posix_trace_trygetnext_event
getuid
fileno
tanh
strspn
recvfrom
exec
isinf
wcstoimax
setbuf
wctomb
putchar
catclose
wcspbrk
pthread_mutexattr_setprotocol
fmtmsg
sigsetjmp
mblen
feraiseexcept
sigaction
memccpy
dlerror
tmpnam
aio_suspend
feholdexcept
isgreater
aio_write
symlink
log10
fgetws
log
feupdateenv
wcscasecmp
posix_trace_attr_setinherited
pthread_spin_unlock
putwc
sigqueue
munmap
towupper
pow
islessgreater
islessequal
strerror
msgsnd
_longjmp
syslog
posix_madvise
qsort
wmemset
strptime
munlockall
ctanh
pthread_attr_getscope
lockf
posix_spawnattr_getsigdefault
lsearch
getsubopt
rename
setpgid
ftok
fexecve
fputwc
ftrylockfile
srandom
pthread_mutex_setprioceiling
pthread_rwlock_timedrdlock
getpeername
asinh
atexit
aio_return
strstr
posix_trace_set_filter
pthread_setschedprio
sinl
posix_mem_offset
lgamma
strcmp
pthread_spin_lock
iswalpha
dbm_clearerr
strcat
isblank
sigsuspend
fstatvfs
mq_setattr
catopen
llabs
getlogin
iswcntrl
sendto
posix_typed_mem_open
fgets
sched_setparam
pthread_mutex_timedlock
pthread_barrierattr_getpshared
assert
ftell
posix_trace_start
nl_langinfo
mq_timedreceive
wordexp
unlink
pthread_condattr_getclock
pthread_barrierattr_setpshared
j0
fgetwc
pthread_cond_timedwait
posix_trace_event
fdopendir
wcsxfrm
posix_spawn_file_actions_destroy
posix_openpt
_Exit
ferror
posix_spawnattr_init
posix_fadvise
_toupper
strnlen
duplocale
remquo
openlog
endutxent
sem_trywait
memcpy
ldiv
getc_unlocked
pselect
random
tcsetattr
free
fchown
pthread_kill
fdetach
getsid
getopt
imaxdiv
posix_trace_attr_getlogsize
tsearch
erand48
gmtime
strtoumax
strncmp
iswspace
fgetc
strpbrk
wcscmp
posix_fallocate
pthread_rwlockattr_getpshared
fattach
iswalnum
hcreate
swscanf
swab
statvfs
mbrlen
posix_trace_eventtypelist_getnext_id
contents
pthread_cleanup_pop
pthread_once
sethostent
pthread_attr_setguardsize
dirfd
towlower
pthread_rwlock_trywrlock
llround
twalk
ftw
timezone
wcstok
tdelete
nanosleep
posix_spawn_file_actions_addclose
fsetpos
fmax
posix_spawnattr_setpgroup
chown
pthread_attr_getstacksize
catanl
acosh
posix_spawnattr_getschedpolicy
fchdir
iconv
if_nameindex
endgrent
pthread_attr_init
setservent
scalbln
setpwent
aio_fsync
fetestexcept
clog
feclearexcept
alarm
getdelim
mkfifo
ctime
gai_strerror
ccosh
getnetbyaddr
posix_memalign
fchmodat
getchar
clock_settime
wcsstr
lrint
psiginfo
mbtowc
exp2
lfind
setjmp
semget
lrand48
pthread_attr_getstack
wscanf
wcwidth
mbstowcs
vfwscanf
pause
posix_trace_get_attr
shutdown
sem_getvalue
read
posix_spawnattr_setsigmask
inet_ntop
wmemcpy
iswpunct
mq_unlink
strtold
sched_getparam
mbrtowc
bind
puts
socket
sighold
getpid
mkdtemp
recv
pthread_mutexattr_settype
pwrite
pthread_mutex_consistent
endhostent
ceil
tmpfile
pthread_mutex_lock
fabs
fdatasync
wctrans
sigdelset
scanf
getmsg
pthread_condattr_setpshared
pthread_getspecific
fstat
tfind
pthread_exit
getwchar
posix_trace_attr_setlogsize
getgrnam
memchr
putc
connect
link
sched_getscheduler
posix_trace_trid_eventid_open
strtok
getaddrinfo
wcsnrtombs
cacosl
iswdigit
atof
wcscoll
pthread_setcancelstate
posix_spawnattr_getschedparam
pthread_condattr_init
iswprint
pthread_mutexattr_init
sleep
conj
posix_typed_mem_get_info
llrint
pthread_key_delete
floor
pthread_create
cosh
iswctype
posix_trace_timedgetnext_event
fmod
ctermid
pthread_atfork
isalnum
getenv
csinh
drand48
pthread_rwlock_tryrdlock
pthread_attr_setdetachstate
setpriority
setlogmask
getpwent
iconv_close
malloc
setnetent
pthread_getconcurrency
time
shmget
round
killpg
posix_trace_get_status
putmsg
putc_unlocked
utimensat
lldiv
ntohl
wcrtomb
getwc
getnameinfo
if_freenameindex
popen
gethostid
strncasecmp
pthread_barrierattr_init
shm_open
dup
atoi
setgid
fflush
remove
setsid
kill
fpathconf
readdir
memmove
ungetwc
isascii
vswscanf
stdin
sigfillset
abort
pthread_testcancel
lround
ccosl
creal
tan
setgrent
posix_spawn_file_actions_adddup2
tempnam
strcpy
isatty
div
nearbyint
posix_trace_attr_setname
inet_addr
msgrcv
pthread_equal
fputws
nftw
posix_trace_attr_getname
pthread_setconcurrency
ccos
btowc
tcgetpgrp
sched_rr_get_interval
expm1
isfinite
strdup
posix_spawnattr_setschedpolicy
sysconf
closelog
logf
clock
recvmsg
fpclassify
getgrent
getutxent
fma
strcasecmp
sigaltstack
frexp
isalpha
wctob
posix_spawnp
fcntl
tcgetattr
sscanf
sigaddset
fsync
wcschr
getpmsg
fclose
fegetenv
semctl
pthread_mutexattr_setpshared
mktime
wcstoul
iswblank
abs
pthread_join
vfscanf
cproj
fwrite
a64l
optarg
cfsetispeed
fesetenv
mq_close
nan
truncf
posix_trace_attr_getstreamfullpolicy
sem_post
pthread_rwlock_wrlock
tcsetpgrp
mlock
ptsname
wcstombs
pthread_rwlock_unlock
insque
wprintf
vwscanf
fdim
mlockall
sem_timedwait
wcstod
setutxent
funlockfile
mbsinit
waitid
strrchr
sigismember
sendmsg
sigrelse
semop
srand48
signal
posix_trace_get_filter
fdopen
mkdir
fputs
wcsnlen
isgraph
posix_trace_attr_getstreamsize
aio_read
wcsncasecmp
wcsftime
pthread_self
strftime
strchr
getdate
msgget
iconv_open
srand
flockfile
gettimeofday
telldir
raise
wcpncpy
pthread_spin_destroy
vwprintf
tanl
ctan
fesetexceptflag
pread
setpgrp
send
faccessat
lcong48
realloc
grantpt
pthread_attr_setstack
wcstoumax
crypt
setitimer
getgroups
sigwaitinfo
memcmp
ffs
basename
fwide
pthread_cond_signal
rewind
_tolower
seed48
sqrt
wcpcpy
signgam
openat
posix_trace_clear
ctanl
strtoimax
getppid
mprotect
ulimit
alphasort
wcslen
sockatmark
cfgetospeed
open
getpwuid
pututxline
sem_unlink
dlsym
posix_spawnattr_setflags
tcflush
pthread_attr_getschedpolicy
carg
geteuid
pthread_attr_setschedparam
vsscanf
strtol
htonl
setegid
asctime
tolower
sync
pthread_rwlock_destroy
dirname
truncate
sched_setscheduler
sched_yield
wctype
gets
sem_wait
mq_notify
freopen
chdir
pthread_detach
pthread_mutex_destroy
labs
opendir
setreuid
exit
if_indextoname
pthread_mutex_init
getitimer
posix_spawnattr_destroy
wcswidth
towctrans
clock_getcpuclockid
pthread_mutexattr_setprioceiling
posix_trace_attr_getclockres
erf
write
unsetenv
log1p
pthread_attr_getdetachstate
wcscpy
ungetc
pthread_condattr_destroy
setprotoent
freeaddrinfo
asinl
mmap
sin
toupper
putchar_unlocked
toascii
getpgrp
endprotoent
atol
strcspn
bsearch
pthread_getschedparam
feof
close
getpgid
printf
fstatat
fprintf
csin
select
calloc
casin
l64a
chmod
acos
getchar_unlocked
isdigit
nextafter
fork
V2_chap02
rewinddir
vswprintf
lio_listio
posix_trace_open
uname
atanf
wcsrtombs
setvbuf
wcstol
pthread_attr_setstacksize
difftime
getsockname
strfmon
casinl
listen
poll
pthread_sigmask
vscanf
tcdrain
localtime
wcsdup
vfwprintf
iswxdigit
strtoll
setlocale
iscntrl
strcoll
catanh
seteuid
sched_get_priority_max
pthread_barrierattr_destroy
pthread_mutexattr_getrobust
posix_trace_shutdown
posix_spawn_file_actions_addopen
freelocale
uselocale
gethostname
strncpy
mbsrtowcs
pthread_attr_setscope
sinh
pthread_mutexattr_getprioceiling
isunordered
pthread_setspecific
msync
wmemchr
sigemptyset
wcscspn
islower
memset
vsnprintf
FD_CLR
fgetpos
isprint
getsockopt
sem_close
realpath
getgid
ftruncate
imaxabs
dlclose
waitpid
posix_trace_attr_destroy
times
pthread_getcpuclockid
tgamma
fwprintf
timer_create
sem_open
vfprintf
strtod
pthread_mutex_trylock
pthread_rwlock_rdlock
rmdir
wcsncat
stpcpy
erff
strxfrm
pthread_attr_getinheritsched
getcwd
fchmod
atanl
readlink
mq_send
csqrt
isastream
fseek
isupper
isxdigit
utime
shm_unlink
jrand48
erfc
pthread_attr_setschedpolicy
pthread_attr_setinheritsched
ispunct
signbit
socketpair
futimens
mq_getattr
wcsrchr
catgets
siglongjmp
getpwnam
posix_trace_attr_getinherited
endnetent
iswupper
getline
cos
endservent
pthread_rwlockattr_init
initstate
swprintf
sprintf
getgrgid
ttyname
rint
encrypt
rand
posix_trace_create
pthread_rwlockattr_setpshared
lchown
lseek
modf
log2
ilogb
shmdt
setrlimit
mknod
pthread_barrier_destroy
cacosh
umask
pthread_attr_getguardsize

[-- Attachment #5: musl-syms.pl --]
[-- Type: application/x-perl, Size: 1024 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-29 16:44   ` gs
@ 2011-05-29 17:32     ` gs
  2011-05-29 18:08       ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: gs @ 2011-05-29 17:32 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

using a better posix list now, as recommended by nsz.
there are a few false positives, namely macros.
but afaik they can be counted on two hands.
> ok, tweaked it a bit more
>>
>> see attached perl script and output.
>> i recommend you rerun it since i didnt have the most recent musl 
>> version installed.
>>
>> On 05/29/2011 01:41 AM, Rich Felker wrote:
>>> Apologies for the somewhat-slower progress on musl lately. The past
>>> few weeks I've had a good bit less contiguous time to devote to it.
>>> One thing that would help me make better use of my time is if I had a
>>> good list of the remaining areas of functionality that musl is
>>> missing, so I could use smaller blocks of time to write code that's
>>> simple and largely independent of everything else.
>>>
>>> Would anyone be willing to go through a list of symbols from musl,
>>> comparing it to the list of functions in the POSIX standard
>>> (http://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html) 
>>>
>>> and break it down into a list of functions and some categories of
>>> functionality? For the most part anything in non-essential option
>>> groups could be omitted or put in a separate list to address later.
>>>
>>> Rich
>>>
>>
>


[-- Attachment #2: musl-syms.pl --]
[-- Type: application/x-perl, Size: 1019 bytes --]

[-- Attachment #3: musl-diff.txt --]
[-- Type: text/plain, Size: 4782 bytes --]

a64l
acoshl
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinhl
asinl
assert
atan2l
atanhl
atanl
cabs
cabsf
cabsl
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
carg
cargf
cargl
casin
casinf
casinh
casinhf
casinhl
casinl
catan
catanf
catanh
catanhf
catanhl
catanl
cbrtl
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
ceill
cexp
cexpf
cexpl
cimag
cimagf
cimagl
clog
clogf
clogl
conj
conjf
conjl
copysignl
coshl
cosl
cpow
cpowf
cpowl
cproj
cprojf
cprojl
creal
crealf
creall
csin
csinf
csinh
csinhf
csinhl
csinl
csqrt
csqrtf
csqrtl
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
daylight
dbm_clearerr
dbm_close
dbm_delete
dbm_error
dbm_fetch
dbm_firstkey
dbm_nextkey
dbm_open
dbm_store
dlclose
dlerror
dlopen
dlsym
encrypt
environ
erfcl
erfl
errno
exp2
exp2f
exp2l
expl
expm1l
fabsl
fattach
FD_CLR
fdetach
fdim
fdimf
fdiml
FD_ISSET
FD_SET
FD_ZERO
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
floorl
fma
fmaf
fmal
fmax
fmaxf
fmaxl
fmemopen
fmin
fminf
fminl
fmodl
fmtmsg
fpclassify
getdate
getdate_err
getgrgid_r
getmsg
getnetbyaddr
getnetbyname
getpmsg
hcreate
hdestroy
hsearch
hypotl
if_freenameindex
if_nameindex
ilogbl
initstate
insque
isastream
isfinite
isgreater
isgreaterequal
isinf
isless
islessequal
islessgreater
isnan
isnormal
isunordered
iswalnum_l
iswalpha_l
iswblank_l
iswcntrl_l
iswctype_l
iswdigit_l
iswgraph_l
iswlower_l
iswprint_l
iswpunct_l
iswspace_l
iswupper_l
iswxdigit_l
j0
j1
jn
l64a
ldexpl
lfind
lgamma
lgammaf
lgammal
lio_listio
llrintf
llrintl
llround
llroundf
llroundl
log10l
log1pl
log2
log2f
log2l
logbl
logl
lrintl
lround
lroundf
lroundl
lsearch
modfl
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
nan
nanf
nanl
nearbyint
nearbyintf
nearbyintl
nextafterl
nexttoward
nexttowardf
nexttowardl
nl_langinfo_l
open_memstream
open_wmemstream
optarg
opterr
optind
optopt
posix_mem_offset
posix_spawnattr_destroy
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_init
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getcreatetime
posix_trace_attr_getgenversion
posix_trace_attr_getinherited
posix_trace_attr_getlogfullpolicy
posix_trace_attr_getlogsize
posix_trace_attr_getmaxdatasize
posix_trace_attr_getmaxsystemeventsize
posix_trace_attr_getmaxusereventsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogfullpolicy
posix_trace_attr_setlogsize
posix_trace_attr_setmaxdatasize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_create_withlog
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_get_name
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventset_del
posix_trace_eventset_empty
posix_trace_eventset_fill
posix_trace_eventset_ismember
posix_trace_eventtypelist_getnext_id
posix_trace_eventtypelist_rewind
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_getnext_event
posix_trace_get_status
posix_trace_open
posix_trace_rewind
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_stop
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
powl
psiginfo
psignal
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_cleanup_pop
pthread_cleanup_push
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putmsg
putpmsg
remainderl
remque
remquol
rintl
roundl
scalblnl
scalbnl
sched_getparam
sched_get_priority_max
sched_get_priority_min
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
setkey
setstate
signbit
signgam
sinhl
sinl
sqrtl
stderr
stdin
stdout
strcasecmp_l
strcoll_l
strerror_l
strfmon
strfmon_l
strftime_l
strncasecmp_l
strxfrm_l
tanhl
tanl
tdelete
tfind
tgamma
tgammaf
tgammal
timezone
_tolower
_toupper
towctrans_l
towlower_l
towupper_l
truncl
tsearch
twalk
tzname
ulimit
uselocale
va_arg
va_copy
va_end
va_start
wcpcpy
wcpncpy
wcscasecmp
wcscasecmp_l
wcscoll_l
wcsdup
wcsftime
wcsncasecmp
wcsncasecmp_l
wcsnlen
wcstod
wcstof
wcstok
wcstold
wcsxfrm_l
wctrans_l
wctype_l
y0
y1
yn

[-- Attachment #4: posix-syms.txt --]
[-- Type: text/plain, Size: 12706 bytes --]

unlinkat
fchownat
setuid
isgraph_l
ccoshl
stpncpy
lrintf
scandir
casinh
posix_trace_close
wcsxfrm_l
iswcntrl_l
sched_get_priority_min
getrlimit
posix_trace_attr_setstreamsize
ctanhl
pathconf
longjmp
cpow
ilogbf
pthread_mutex_getprioceiling
getrusage
pthread_attr_destroy
munlock
pthread_condattr_setclock
strxfrm_l
access
getlogin_r
fesetround
posix_trace_getnext_event
dbm_open
pthread_condattr_getpshared
wcstof
wait
sigpending
seekdir
fputc
mkstemp
vsprintf
erfl
posix_spawnattr_getsigmask
mrand48
ioctl
getservbyname
setsockopt
floorl
pthread_rwlockattr_destroy
posix_trace_flush
siginterrupt
opterr
msgctl
nice
hypot
va_copy
vdprintf
setkey
mq_open
atan2f
cacos
cosl
readdir_r
tcflow
htons
strftime_l
wmemcmp
sigpause
pthread_mutexattr_destroy
wcstoll
remainder
acosf
setregid
aio_error
timer_getoverrun
iswlower
ilogbl
mq_receive
setstate
cexp
posix_trace_eventset_add
expm1l
powl
cfgetispeed
remquof
newlocale
isnormal
execvp
pthread_cancel
open_memstream
strndup
pthread_rwlock_timedwrlock
shmat
pthread_mutexattr_setrobust
fegetround
clock_nanosleep
toupper_l
timer_delete
getdate_err
shmctl
pthread_mutexattr_getprotocol
fwscanf
va_end
va_arg
log2l
mq_timedsend
pclose
isnan
regcomp
clock_getres
pipe
atanh
y0
posix_trace_eventid_open
errno
posix_trace_trygetnext_event
nanf
copysignl
isupper_l
getuid
fileno
tanh
strspn
isinf
wcstoimax
cacoshl
pthread_cond_init
catclose
wcspbrk
pthread_mutexattr_setprotocol
fmtmsg
mblen
sigaction
memccpy
dbm_delete
tmpnam
iswdigit_l
feholdexcept
aio_write
symlink
remainderf
j1
fgetws
iswpunct_l
strcasecmp_l
putwc
cimagl
munmap
islessequal
strerror
msgsnd
syslog
tolower_l
iswgraph_l
munlockall
lockf
lsearch
getsubopt
rename
setpgid
posix_trace_attr_getcreatetime
ftok
conjl
fputwc
fexecve
execve
casinf
pthread_rwlock_timedrdlock
getpeername
atexit
aio_return
strstr
cabsl
cargl
getprotobynumber
strcmp
pthread_spin_lock
iswalpha
dbm_clearerr
strcat
catopen
getlogin
strcoll_l
iswcntrl
sigignore
fgets
getgrgid_r
pthread_mutex_timedlock
assert
strtok_r
wordexp
fmaxl
fgetwc
csinhl
pthread_cond_timedwait
posix_trace_event
posix_spawn_file_actions_destroy
_Exit
posix_spawnattr_init
posix_fadvise
tanf
duplocale
remquo
openlog
endutxent
sem_trywait
ldiv
tanhl
pselect
free
fchown
pthread_kill
getopt
powf
posix_trace_attr_getlogsize
erand48
gmtime
strncmp
fgetc
dbm_store
strpbrk
floorf
wcscmp
open_wmemstream
fattach
swscanf
posix_trace_eventtypelist_getnext_id
dup2
posix_trace_eventid_get_name
pthread_cleanup_pop
nanl
pthread_attr_setguardsize
pthread_rwlock_trywrlock
llround
twalk
iswupper_l
rand_r
posix_spawn_file_actions_addclose
fsetpos
posix_spawnattr_setpgroup
chown
catanl
acosh
inet_pton
fmodl
fchdir
iconv
acoshf
fminl
aio_fsync
clog
cexpl
alarm
mkfifo
strerror_l
ctime
ccosh
lgammal
fchmodat
clock_settime
iswalpha_l
modfl
iswblank_l
lrint
iswalnum_l
setjmp
lrand48
pthread_attr_getstack
vfwscanf
iswspace_l
timer_settime
sem_getvalue
strtold
bind
getpid
mkdtemp
recv
casinhl
pthread_mutexattr_settype
lrintl
ceil
endhostent
tmpfile
pthread_mutex_lock
cpowf
wctrans
scanf
pthread_condattr_setpshared
pthread_getspecific
lgammaf
fstat
tfind
getgrnam
memchr
connect
link
posix_trace_trid_eventid_open
strtok
wcsnrtombs
strerror_r
iswdigit
sleep
cimagf
conj
execlp
pthread_key_delete
pthread_create
ctermid
pthread_atfork
scalbnf
posix_trace_attr_setlogfullpolicy
getenv
csinh
drand48
logbl
pthread_attr_setdetachstate
isblank_l
getpwent
malloc
setnetent
killpg
putmsg
coshf
utimensat
ntohl
wcrtomb
popen
if_freenameindex
strncasecmp
pthread_barrierattr_init
atoi
remove
cbrtf
kill
readdir
ungetwc
ttyname_r
sigfillset
abort
lround
csinf
ccosl
posix_spawn_file_actions_adddup2
tempnam
strcpy
isatty
rintf
posix_trace_attr_setname
pthread_equal
fputws
posix_trace_attr_getname
nftw
pthread_setconcurrency
btowc
atanhl
dbm_nextkey
tcgetpgrp
sched_rr_get_interval
tgammal
posix_spawnattr_setschedpolicy
sysconf
logf
strtof
ntohs
getgrent
getutxent
strcasecmp
isalpha
wctob
fcntl
sscanf
llrintl
fsync
wcschr
getpmsg
fclose
semctl
mktime
fmaf
psignal
posix_trace_attr_getmaxdatasize
abs
fmodf
vfscanf
optarg
cpowl
fesetenv
truncf
inet_ntoa
posix_trace_attr_getstreamfullpolicy
sem_post
cacosf
tcsetpgrp
mlock
ptsname
wcstombs
mlockall
wcstod
setutxent
scalbnl
mbsinit
sigrelse
signal
ldexpl
mkdir
hypotl
asinhf
fputs
yn
wcsnlen
isgraph
posix_trace_attr_getstreamsize
wcsncasecmp
pthread_self
strftime
strchr
msgget
_exit
iconv_open
srand
flockfile
gettimeofday
vwprintf
tanl
ctan
fesetexceptflag
nl_langinfo_l
dbm_error
realloc
asinf
grantpt
putpmsg
setitimer
sigwaitinfo
posix_trace_create_withlog
memcmp
log10f
lroundl
rewind
roundl
dbm_firstkey
wcpcpy
stderr
mkdirat
signgam
openat
hsearch
posix_trace_clear
pthread_spin_trylock
pthread_cleanup_push
open
getpwuid
log10l
dlsym
pthread_barrier_init
expf
ccosf
pthread_attr_getschedpolicy
carg
pthread_attr_setschedparam
remainderl
vsscanf
strtol
_setjmp
pthread_rwlock_destroy
wctype
gets
sem_wait
mq_notify
freopen
pthread_detach
posix_spawn_file_actions_init
clock_gettime
exit
isprint_l
posix_spawnattr_destroy
getitimer
wcswidth
towctrans
clock_getcpuclockid
pthread_mutexattr_setprioceiling
write
unsetenv
pthread_attr_getdetachstate
ungetc
readlinkat
scalblnf
setprotoent
freeaddrinfo
toupper
putchar_unlocked
atol
fmal
getpgrp
strcspn
bsearch
printf
getpgid
csin
fprintf
fstatat
select
l64a
getchar_unlocked
isdigit
fork
iswxdigit_l
cprojl
vswprintf
posix_trace_open
creall
atanf
wcsrtombs
setvbuf
fmaxf
localtime_r
execl
difftime
getsockname
strfmon
poll
pthread_sigmask
vscanf
tcdrain
wcsdup
iswxdigit
setlocale
llrintf
uselocale
gethostname
sinh
pthread_mutexattr_getprioceiling
isunordered
msync
strncasecmp_l
sigemptyset
wcscspn
islower
FD_CLR
fgetpos
getsockopt
sem_close
getgid
ftruncate
posix_trace_attr_destroy
tgamma
fwprintf
vfprintf
pthread_mutex_trylock
pthread_rwlock_rdlock
rmdir
FD_ZERO
pthread_attr_getinheritsched
fchmod
readlink
mq_send
isastream
isupper
isxdigit
utime
shm_unlink
jrand48
pthread_attr_setschedpolicy
erfc
ispunct
signbit
posix_trace_attr_getinherited
endnetent
iswupper
getline
pthread_rwlockattr_init
initstate
getgrgid
ttyname
rint
lseek
lchown
modf
log2
linkat
ilogb
exp2f
nextafterf
cacosh
posix_trace_eventset_empty
iswgraph
posix_trace_attr_setstreamfullpolicy
getutxid
islower_l
wcsncmp
fopen
tzset
trunc
sigprocmask
fmemopen
strtoul
cexpf
if_nametoindex
stat
unlockpt
confstr
iscntrl_l
asctime_r
system
fegetexceptflag
nearbyintl
posix_trace_attr_init
getprotobyname
ldexp
getpriority
isspace
strncat
isless
fminf
nrand48
getgrnam_r
wcscat
expl
pthread_key_create
isgreaterequal
posix_trace_attr_getlogfullpolicy
csinl
casinhf
optind
crealf
environ
wcsspn
catan
clearerr
cbrt
exp
pthread_barrier_wait
acosl
strsignal
copysign
fmin
fnmatch
pthread_cond_destroy
putenv
writev
tcsendbreak
cfsetospeed
dprintf
logb
remque
fseeko
cimag
creat
utimes
exp2l
accept
log2f
perror
fread
dlopen
pthread_mutexattr_gettype
endpwent
posix_spawnattr_setsigdefault
atan2
globfree
putwchar
optopt
daylight
closedir
posix_spawnattr_getpgroup
getservbyport
atan
aio_cancel
isalpha_l
sigtimedwait
pthread_cond_broadcast
pthread_mutexattr_getpshared
ispunct_l
pthread_attr_getschedparam
cabs
rintl
posix_trace_eventid_equal
pthread_setschedparam
sem_destroy
nexttowardf
ceill
strlen
vprintf
pthread_spin_init
gethostent
ctanhf
posix_spawnattr_getflags
posix_spawn
posix_trace_attr_getgenversion
sem_init
asin
glob
fscanf
snprintf
wcstold
posix_spawnattr_setschedparam
ccoshf
getnetbyname
getegid
sigwait
setenv
localeconv
wmemmove
lstat
readv
wcsncpy
getc
tcgetsid
symlinkat
recvfrom
setbuf
wctomb
putchar
towlower_l
sigsetjmp
feraiseexcept
dlerror
catanhf
aio_suspend
frexpf
isgreater
sigset
log10
FD_ISSET
feupdateenv
log
wcscasecmp
fabsl
posix_trace_attr_setinherited
csqrtl
pthread_spin_unlock
getprotoent
sigqueue
erfcf
towupper
pow
islessgreater
_longjmp
atanhf
ldexpf
tzname
posix_madvise
qsort
wmemset
strptime
ctanh
pthread_attr_getscope
posix_spawnattr_getsigdefault
mknodat
strtoull
ftello
ftrylockfile
srandom
pthread_mutex_setprioceiling
asinh
cacoshf
posix_trace_set_filter
pthread_setschedprio
FD_SET
execv
lgamma
posix_mem_offset
sinl
nearbyintf
llroundf
isblank
fstatvfs
sigsuspend
mq_setattr
posix_trace_eventset_ismember
llabs
posix_typed_mem_open
sendto
sched_setparam
ftell
pthread_barrierattr_getpshared
log1pl
nl_langinfo
posix_trace_start
mq_timedreceive
unlink
sinhf
j0
pthread_barrierattr_setpshared
pthread_condattr_getclock
fdopendir
pthread_cond_wait
wcsxfrm
posix_openpt
pthread_setcanceltype
ferror
remquol
_toupper
strnlen
ctime_r
memcpy
getc_unlocked
frexpl
random
tcsetattr
fdetach
getsid
imaxdiv
tsearch
strtoumax
iswspace
posix_fallocate
pthread_rwlockattr_getpshared
hcreate
iswalnum
swab
mbrlen
statvfs
csqrtf
conjf
pthread_once
sethostent
dirfd
towlower
stdout
ftw
log1pf
timezone
clogl
wcstok
tdelete
nanosleep
fmax
pthread_attr_getstacksize
strfmon_l
pthread_mutex_unlock
wctrans_l
posix_spawnattr_getschedpolicy
if_nameindex
endgrent
pthread_attr_init
atan2l
scalbln
setservent
fetestexcept
mkfifoat
setpwent
feclearexcept
cbrtl
hypotf
getdelim
posix_trace_rewind
gai_strerror
getnetbyaddr
posix_memalign
regfree
cprojf
getchar
wcsstr
exp2
mbtowc
psiginfo
cabsf
lfind
semget
wscanf
wcwidth
mbstowcs
pause
posix_trace_get_attr
pthread_rwlock_init
shutdown
inet_ntop
posix_spawnattr_setsigmask
read
wmemcpy
iswpunct
posix_trace_eventset_del
mq_unlink
mbrtowc
sched_getparam
sqrtf
puts
mbsnrtowcs
socket
sighold
pthread_mutex_consistent
pwrite
fdatasync
fabs
getmsg
sigdelset
jn
towctrans_l
getwchar
pthread_exit
posix_trace_attr_setlogsize
putc
iswprint_l
sched_getscheduler
getaddrinfo
cacosl
atof
wcscoll
posix_spawnattr_getschedparam
pthread_setcancelstate
iswprint
pthread_condattr_init
pthread_mutexattr_init
posix_typed_mem_get_info
llrint
floor
cosh
iswctype
posix_trace_timedgetnext_event
fmod
llroundl
isalnum
cargf
scalblnl
scalbn
wordfree
pthread_rwlock_tryrdlock
expm1f
setpriority
setlogmask
iconv_close
dbm_fetch
atoll
pthread_getconcurrency
time
shmget
round
lroundf
posix_trace_get_status
nextafterl
putc_unlocked
dbm_close
lldiv
getwc
getnameinfo
gethostid
ctanf
dup
nexttoward
shm_open
setgid
fflush
setsid
fpathconf
memmove
isascii
modff
vswscanf
stdin
va_start
pthread_testcancel
creal
tan
csinhf
setgrent
wcstoull
div
copysignf
nearbyint
inet_addr
msgrcv
ccos
expm1
isfinite
posix_trace_attr_setmaxdatasize
strdup
posix_trace_attr_getmaxsystemeventsize
closelog
clock
recvmsg
isdigit_l
fpclassify
y1
fma
regerror
frexp
sigaltstack
posix_spawnp
tcgetattr
posix_trace_eventtypelist_rewind
sigaddset
fegetenv
pthread_mutexattr_setpshared
sqrtl
wcstoul
iswblank
pthread_join
fwrite
cproj
a64l
cfsetispeed
mq_close
nan
pthread_rwlock_wrlock
fabsf
insque
pthread_rwlock_unlock
wprintf
posix_trace_stop
vwscanf
fdim
sem_timedwait
funlockfile
waitid
sendmsg
sigismember
strrchr
semop
posix_trace_get_filter
srand48
fdopen
wcscasecmp_l
getpwuid_r
sinhl
aio_read
wcsftime
getdate
telldir
raise
gmtime_r
wcpncpy
pthread_spin_destroy
fdimf
pread
setpgrp
faccessat
send
lcong48
pthread_attr_setstack
renameat
iswlower_l
wcstoumax
crypt
getgroups
isalnum_l
tgammaf
ffs
basename
fwide
pthread_cond_signal
_tolower
acoshl
seed48
sqrt
asinhl
ceilf
ctanl
posix_trace_attr_getmaxusereventsize
strtoimax
getppid
mprotect
ulimit
alphasort
wcslen
sockatmark
cfgetospeed
truncl
pututxline
sem_unlink
posix_spawnattr_setflags
tcflush
geteuid
htonl
setegid
asctime
tolower
sync
dirname
truncate
sched_setscheduler
sched_yield
chdir
logl
posix_trace_eventset_fill
labs
opendir
pthread_mutex_destroy
setreuid
if_indextoname
pthread_mutex_init
getservent
posix_trace_attr_getclockres
erf
log1p
wcscpy
fdiml
sinf
pthread_condattr_destroy
asinl
mmap
sin
towupper_l
coshl
toascii
endprotoent
cosf
pthread_getschedparam
wcsncasecmp_l
feof
close
calloc
casin
nexttowardl
acos
chmod
nextafter
rewinddir
lio_listio
uname
wcstol
pthread_attr_setstacksize
listen
casinl
wcscoll_l
localtime
vfwprintf
strtoll
iscntrl
catanh
strcoll
sched_get_priority_max
seteuid
pthread_barrierattr_destroy
logbf
posix_trace_shutdown
pthread_mutexattr_getrobust
posix_spawn_file_actions_addopen
freelocale
mbsrtowcs
pthread_attr_setscope
strncpy
timer_gettime
erfcl
pthread_setspecific
wmemchr
getnetent
memset
vsnprintf
isxdigit_l
isprint
hdestroy
realpath
clogf
imaxabs
dlclose
waitpid
times
catanhl
pthread_getcpuclockid
tanhf
timer_create
sem_open
getutxline
strtod
wcsncat
erff
stpcpy
strxfrm
execle
roundf
getpwnam_r
getcwd
atanl
csqrt
fseek
isspace_l
pthread_attr_setinheritsched
wctype_l
socketpair
futimens
mq_getattr
wcsrchr
catgets
catanf
getpwnam
siglongjmp
cos
endservent
swprintf
sprintf
encrypt
posix_trace_create
rand
pthread_rwlockattr_setpshared
regexec
shmdt
mknod
setrlimit
pthread_barrier_destroy
umask
pthread_attr_getguardsize
iswctype_l

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-29 17:32     ` gs
@ 2011-05-29 18:08       ` Szabolcs Nagy
  2011-05-30 10:30         ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-05-29 18:08 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

* gs@int3.at <gs@int3.at> [2011-05-29 19:32:35 +0200]:
> using a better posix list now, as recommended by nsz.
> there are a few false positives, namely macros.
> but afaik they can be counted on two hands.

here is an even tighter list
(i excluded macros)

x.sh is the script i used
posix-musl is api specified by posix but no present in musl

[-- Attachment #2: x.sh --]
[-- Type: application/x-sh, Size: 552 bytes --]

[-- Attachment #3: posix-musl --]
[-- Type: text/plain, Size: 4587 bytes --]

a64l
acoshl
acosl
aio_cancel
aio_error
aio_fsync
aio_read
aio_return
aio_suspend
aio_write
asinhl
asinl
atan2l
atanhl
atanl
cabs
cabsf
cabsl
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
carg
cargf
cargl
casin
casinf
casinh
casinhf
casinhl
casinl
catan
catanf
catanh
catanhf
catanhl
catanl
cbrtl
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
ceill
cexp
cexpf
cexpl
cimag
cimagf
cimagl
clog
clogf
clogl
conj
conjf
conjl
copysignl
coshl
cosl
cpow
cpowf
cpowl
cproj
cprojf
cprojl
creal
crealf
creall
csin
csinf
csinh
csinhf
csinhl
csinl
csqrt
csqrtf
csqrtl
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
daylight
dbm_clearerr
dbm_close
dbm_delete
dbm_error
dbm_fetch
dbm_firstkey
dbm_nextkey
dbm_open
dbm_store
dlclose
dlerror
dlopen
dlsym
encrypt
environ
erfcl
erfl
exp2
exp2f
exp2l
expl
expm1l
fabsl
fattach
fdetach
fdim
fdimf
fdiml
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
floorl
fma
fmaf
fmal
fmax
fmaxf
fmaxl
fmemopen
fmin
fminf
fminl
fmodl
fmtmsg
getdate
getdate_err
getgrgid_r
getmsg
getnetbyaddr
getnetbyname
getpmsg
hcreate
hdestroy
hsearch
hypotl
if_freenameindex
if_nameindex
ilogbl
initstate
insque
isastream
isgreater
isgreaterequal
isless
islessequal
islessgreater
isunordered
iswalnum_l
iswalpha_l
iswblank_l
iswcntrl_l
iswctype_l
iswdigit_l
iswgraph_l
iswlower_l
iswprint_l
iswpunct_l
iswspace_l
iswupper_l
iswxdigit_l
j0
j1
jn
l64a
ldexpl
lfind
lgamma
lgammaf
lgammal
lio_listio
llrintf
llrintl
llround
llroundf
llroundl
log10l
log1pl
log2
log2f
log2l
logbl
logl
lrintl
lround
lroundf
lroundl
lsearch
modfl
mq_close
mq_getattr
mq_notify
mq_open
mq_receive
mq_send
mq_setattr
mq_timedreceive
mq_timedsend
mq_unlink
nan
nanf
nanl
nearbyint
nearbyintf
nearbyintl
nextafterl
nexttoward
nexttowardf
nexttowardl
nl_langinfo_l
open_memstream
open_wmemstream
optarg
opterr
optind
optopt
posix_mem_offset
posix_spawnattr_destroy
posix_spawnattr_getschedparam
posix_spawnattr_getschedpolicy
posix_spawnattr_init
posix_spawnattr_setschedparam
posix_spawnattr_setschedpolicy
posix_trace_attr_destroy
posix_trace_attr_getclockres
posix_trace_attr_getcreatetime
posix_trace_attr_getgenversion
posix_trace_attr_getinherited
posix_trace_attr_getlogfullpolicy
posix_trace_attr_getlogsize
posix_trace_attr_getmaxdatasize
posix_trace_attr_getmaxsystemeventsize
posix_trace_attr_getmaxusereventsize
posix_trace_attr_getname
posix_trace_attr_getstreamfullpolicy
posix_trace_attr_getstreamsize
posix_trace_attr_init
posix_trace_attr_setinherited
posix_trace_attr_setlogfullpolicy
posix_trace_attr_setlogsize
posix_trace_attr_setmaxdatasize
posix_trace_attr_setname
posix_trace_attr_setstreamfullpolicy
posix_trace_attr_setstreamsize
posix_trace_clear
posix_trace_close
posix_trace_create
posix_trace_create_withlog
posix_trace_event
posix_trace_eventid_equal
posix_trace_eventid_get_name
posix_trace_eventid_open
posix_trace_eventset_add
posix_trace_eventset_del
posix_trace_eventset_empty
posix_trace_eventset_fill
posix_trace_eventset_ismember
posix_trace_eventtypelist_getnext_id
posix_trace_eventtypelist_rewind
posix_trace_flush
posix_trace_get_attr
posix_trace_get_filter
posix_trace_get_status
posix_trace_getnext_event
posix_trace_open
posix_trace_rewind
posix_trace_set_filter
posix_trace_shutdown
posix_trace_start
posix_trace_stop
posix_trace_timedgetnext_event
posix_trace_trid_eventid_open
posix_trace_trygetnext_event
posix_typed_mem_get_info
posix_typed_mem_open
powl
psiginfo
psignal
pthread_attr_getinheritsched
pthread_attr_getschedpolicy
pthread_attr_getstack
pthread_attr_setinheritsched
pthread_attr_setschedpolicy
pthread_attr_setstack
pthread_getconcurrency
pthread_getcpuclockid
pthread_getschedparam
pthread_mutex_getprioceiling
pthread_mutex_setprioceiling
pthread_mutexattr_getprioceiling
pthread_mutexattr_getprotocol
pthread_mutexattr_setprioceiling
pthread_mutexattr_setprotocol
pthread_setconcurrency
pthread_setschedparam
pthread_setschedprio
putmsg
putpmsg
remainderl
remque
remquol
rintl
roundl
scalblnl
scalbnl
sched_get_priority_max
sched_get_priority_min
sched_getparam
sched_getscheduler
sched_rr_get_interval
sched_setparam
sched_setscheduler
setkey
setstate
signbit
signgam
sinhl
sinl
sqrtl
strcasecmp_l
strcoll_l
strerror_l
strfmon
strfmon_l
strftime_l
strncasecmp_l
strxfrm_l
tanhl
tanl
tdelete
tfind
tgamma
tgammaf
tgammal
timezone
towctrans_l
towlower_l
towupper_l
truncl
tsearch
twalk
tzname
ulimit
uselocale
wcpcpy
wcpncpy
wcscasecmp
wcscasecmp_l
wcscoll_l
wcsdup
wcsftime
wcsncasecmp
wcsncasecmp_l
wcsnlen
wcstod
wcstof
wcstok
wcstold
wcsxfrm_l
wctrans_l
wctype_l
y0
y1
yn

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-29 18:08       ` Szabolcs Nagy
@ 2011-05-30 10:30         ` Szabolcs Nagy
  2011-05-30 15:47           ` Rich Felker
  0 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-05-30 10:30 UTC (permalink / raw)
  To: musl


ok i took the time and created a more comprehensive table
http://port70.net/~nsz/musltab.html



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-30 10:30         ` Szabolcs Nagy
@ 2011-05-30 15:47           ` Rich Felker
  2011-05-30 17:27             ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: Rich Felker @ 2011-05-30 15:47 UTC (permalink / raw)
  To: musl

On Mon, May 30, 2011 at 12:30:09PM +0200, Szabolcs Nagy wrote:
> 
> ok i took the time and created a more comprehensive table
> http://port70.net/~nsz/musltab.html

I like this. Was there an existing tool that created it, or did you
script it?

Rich


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-30 15:47           ` Rich Felker
@ 2011-05-30 17:27             ` Szabolcs Nagy
  2011-06-08 23:58               ` Completeness " Rich Felker
  2011-06-18 21:32               ` Help assessing " Szabolcs Nagy
  0 siblings, 2 replies; 20+ messages in thread
From: Szabolcs Nagy @ 2011-05-30 17:27 UTC (permalink / raw)
  To: musl

* Rich Felker <dalias@aerifal.cx> [2011-05-30 11:47:41 -0400]:
> On Mon, May 30, 2011 at 12:30:09PM +0200, Szabolcs Nagy wrote:
> > 
> > ok i took the time and created a more comprehensive table
> > http://port70.net/~nsz/musltab.html
> 
> I like this. Was there an existing tool that created it, or did you
> script it?
> 

i uploaded the scripts to
http://port70.net/~nsz/musl/

(to run you need to get the posix function manuals into a html/ dir,
depends on exuberant ctags and a musl git checkout with libc.a built)


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Completeness status of musl
  2011-05-30 17:27             ` Szabolcs Nagy
@ 2011-06-08 23:58               ` Rich Felker
  2011-06-21  1:46                 ` Szabolcs Nagy
                                   ` (2 more replies)
  2011-06-18 21:32               ` Help assessing " Szabolcs Nagy
  1 sibling, 3 replies; 20+ messages in thread
From: Rich Felker @ 2011-06-08 23:58 UTC (permalink / raw)
  To: musl

Based on nsz's work (http://port70.net/~nsz/musl/), things look pretty
good! The remaining interfaces musl is missing seem to be (broken down
into the sort of work involved):

Major new code:
- Dynamic loader (dlopen/dlsym)

Moderate-effort new code:
- POSIX Asynchronous IO
- Date parsing (strptime and getdate, etc.)
- XSI search.h functionality
- Network interface listing (if_nameindex)
- Various minor XSI legacy/junk interfaces

Importing external code, with minor cleanups:
- C99 and some XSI-extension math functions

Importing external code, with major cleanups or rewrite:
- PRNG (random)

Dummy/wrapper/trivial code:
- Old netent stuff (which will just be dummies)
- Some locale_t functions (isw*_l)
- Some CX wide string functions
- Floating point environment (fenv.h)

In addition, some existing interfaces still have missing functionality
or need rewrites to meet the desired levels of performance, robustness
against low-memory or large-input conditions, etc.

Rich


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Help assessing status of musl
  2011-05-30 17:27             ` Szabolcs Nagy
  2011-06-08 23:58               ` Completeness " Rich Felker
@ 2011-06-18 21:32               ` Szabolcs Nagy
  1 sibling, 0 replies; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-18 21:32 UTC (permalink / raw)
  To: musl

* Szabolcs Nagy <nsz@port70.net> [2011-05-30 19:27:35 +0200]:
> i uploaded the scripts to
> http://port70.net/~nsz/musl/
> 

i created a git repo of these tools
http://repo.or.cz/w/musl-tools.git

the api tables are included
http://repo.or.cz/w/musl-tools.git/blob_plain/HEAD:/tab_posix.html
http://repo.or.cz/w/musl-tools.git/blob_plain/HEAD:/tab_c99.html

sizeof.c is hosted there as well


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-08 23:58               ` Completeness " Rich Felker
@ 2011-06-21  1:46                 ` Szabolcs Nagy
  2011-06-23  6:54                   ` Rich Felker
  2011-06-25 18:31                 ` Szabolcs Nagy
  2011-06-29 21:14                 ` Rich Felker
  2 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-21  1:46 UTC (permalink / raw)
  To: musl

* Rich Felker <dalias@aerifal.cx> [2011-06-08 19:58:10 -0400]:
> 
> Importing external code, with major cleanups or rewrite:
> - PRNG (random)

i looked into this one
these functions are rather useless
imho the posix api definition is insane
http://pubs.opengroup.org/onlinepubs/9699919799/functions/random.html

i wrote something anyway
see comments in the code:
http://port70.net/~nsz/musl/prng


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-21  1:46                 ` Szabolcs Nagy
@ 2011-06-23  6:54                   ` Rich Felker
  2011-06-23 13:25                     ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: Rich Felker @ 2011-06-23  6:54 UTC (permalink / raw)
  To: musl

On Tue, Jun 21, 2011 at 03:46:40AM +0200, Szabolcs Nagy wrote:
> * Rich Felker <dalias@aerifal.cx> [2011-06-08 19:58:10 -0400]:
> > 
> > Importing external code, with major cleanups or rewrite:
> > - PRNG (random)
> 
> i looked into this one
> these functions are rather useless
> imho the posix api definition is insane
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/random.html
> 
> i wrote something anyway
> see comments in the code:
> http://port70.net/~nsz/musl/prng

I like this. A couple questions/requests:

1. Is this simple code really equivalent (aside from the missing
non-default-size code) to the ugly BSD code that's 100x bigger and
full of undefined behavior? :)

2. If you'd like me to include this in musl, can you please license it
(either LGPL v2.1+ or any LGPL-compatible/less-restrictive license
such as BSD).

3. For future code contributions, please attach the code/patches to
the email rather than just including a link. That way the code being
referred to/discussed is visible even if the version on the website
changes or the website it taken down.

Rich


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-23  6:54                   ` Rich Felker
@ 2011-06-23 13:25                     ` Szabolcs Nagy
  2011-06-23 14:16                       ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-23 13:25 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 3110 bytes --]

* Rich Felker <dalias@aerifal.cx> [2011-06-23 02:54:52 -0400]:

> On Tue, Jun 21, 2011 at 03:46:40AM +0200, Szabolcs Nagy wrote:
> > * Rich Felker <dalias@aerifal.cx> [2011-06-08 19:58:10 -0400]:
> > > 
> > > Importing external code, with major cleanups or rewrite:
> > > - PRNG (random)
> > 
> > i looked into this one
> > these functions are rather useless
> > imho the posix api definition is insane
> > http://pubs.opengroup.org/onlinepubs/9699919799/functions/random.html
> > 
> > i wrote something anyway
> > see comments in the code:
> > http://port70.net/~nsz/musl/prng
> 
> I like this. A couple questions/requests:
> 
> 1. Is this simple code really equivalent (aside from the missing
> non-default-size code) to the ugly BSD code that's 100x bigger and
> full of undefined behavior? :)
> 

the historical bsd implementation used another lcg
for both the <32byte statebuffer and seeding

"modern" implementations seems to use the
 x = (7^5 * x) mod (2^31 - 1)
park-miller generator for seeding
(it makes the generator less predictable,
with the lcg everything is mod 2^k so
the numbers 'linearly depend' on the seed)
(glibc freebsd openbsd.. all use the same code here)
(they use overflowing signed ints and signed >>1 for whatever reason)
(they discard the first 10*n rands which i forgot to do)

(freebsd seems to use the park-miller generator even for
random() in case of small state buffer, which is bad as it
will produce uniform random in [0,2^31-2] not in [0,2^31-1])

i used lcg seeding for simplicity
the lcg seeding is bad, but the generator
does not have good statistical properties
and the seeding method won't change that..

now i made all the compatibility changes (attached)
the following produces identical output with glibc vs my code:
#include <stdio.h>
#include <stdlib.h>
int main() {
        char s[256];
        int i,j;
        for (j = 8; j <= 256; j*=2) {
                initstate(1, s, j);
                for (i = 0; i < 10; i++)
                        printf("%d %d %ld\n", j, i, random());
        }
        return 0;
}

(if compatibility does not matter then a 64bit lcg
could do the same job without much fuss:
 static unsigned long long init[] = {1};
 unsigned long long *x = init;
 long random(void){
    *x = (6364136223846793005* *x + 1442695040888963407);
    return *x >> 33;
 }
etc)

> 2. If you'd like me to include this in musl, can you please license it
> (either LGPL v2.1+ or any LGPL-compatible/less-restrictive license
> such as BSD).
> 

ok
license is
"permission to use, copy, modify, and/or distribute this code
for any purpose with or without fee is hereby granted.
there is no warranty."

so feel free to alter the code
eg the parkmiller code might be better to do with uint64 multiplication
instead of the div/mod hack to avoid overflow:
 return (unsigned long long)16807*x % 0x7fffffff;

> 3. For future code contributions, please attach the code/patches to
> the email rather than just including a link. That way the code being
> referred to/discussed is visible even if the version on the website
> changes or the website it taken down.
> 

ok

[-- Attachment #2: random.c --]
[-- Type: text/x-csrc, Size: 1918 bytes --]

#include <stdlib.h>

/*
32bit unsigned is asssumed
traditional bsd random implementation with park-miller seeding
lagged fibonacci generator params: (7,3), (15,1), (31,3), (63,1)
does not have good statistical properties
*/

static unsigned init[] = {
0x00000000,0x991539b1,0x16a5bce3,0x6774a4cd,
0x3e01511e,0x4e508aaa,0x61048c05,0xf5500617,
0x846b7115,0x6a19892c,0x896a97af,0xdb48f936,
0x14898454,0x37ffd106,0xb58bff9c,0x59e17104,
0xcf918a49,0x09378c83,0x52c7a471,0x8d293ea9,
0x1f4fc301,0xc3db71be,0x39b44e1c,0xf8a44ef9,
0x4c8b80b1,0x19edc328,0x87bf4bdd,0xc9b240e5,
0xe9ee4b1b,0x4382aee7,0x535b6b41,0xf3bec5da};

static int n = 31;
static int i = 3;
static int j = 0;
static unsigned *x = init+1;

static unsigned lcg(unsigned x) {
	return (1103515245*x + 12345) & 0x7fffffff;
}

static unsigned parkmiller(unsigned x) {
	/* x = 7^5 x mod (2^31-1) */
	x = 16807*(x%127773) - 2836*(x/127773);
	if (x & 0x80000000)
		x += 0x7fffffff;
	return x;
}

static void *savestate() {
	x[-1] = ((unsigned)n<<16)|(i<<8)|j;
	return x-1;
}

static void loadstate(unsigned *state) {
	x = state+1;
	n = x[-1]>>16;
	i = (x[-1]>>8)&0xff;
	j = x[-1]&0xff;
}

void srandom(unsigned seed) {
	int k;

	i = n == 31 || n == 7 ? 3 : 1;
	j = 0;
	x[0] = seed ? seed : 1;
	for (k = 1; k < n; k++)
		x[k] = parkmiller(x[k-1]);
	for (k = 0; k < 10*n; k++)
		random();
}

char *initstate(unsigned seed, char *state, size_t size) {
	void *old = savestate();
	if (size < 8)
		return 0;
	else if (size < 32)
		n = 0;
	else if (size < 64)
		n = 7;
	else if (size < 128)
		n = 15;
	else if (size < 256)
		n = 31;
	else
		n = 63;
	x = (unsigned*)state + 1;
	srandom(seed);
	return old;
}

char *setstate(char *state) {
	void *old = savestate();
	loadstate((unsigned*)state);
	return old;
}

long random(void) {
	unsigned k;

	if (n == 0)
		return x[0] = lcg(x[0]);
	x[i] += x[j];
	k = x[i]>>1;
	if (++i == n)
		i = 0;
	if (++j == n)
		j = 0;
	return k;
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-23 13:25                     ` Szabolcs Nagy
@ 2011-06-23 14:16                       ` Szabolcs Nagy
  2011-06-23 18:50                         ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-23 14:16 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 44 bytes --]

modified a bit to use uint32_t and uint64_t

[-- Attachment #2: random.c --]
[-- Type: text/x-csrc, Size: 1638 bytes --]

#include <stdlib.h>
#include <stdint.h>

static uint32_t init[] = {
0x00000000,0x991539b1,0x16a5bce3,0x6774a4cd,
0x3e01511e,0x4e508aaa,0x61048c05,0xf5500617,
0x846b7115,0x6a19892c,0x896a97af,0xdb48f936,
0x14898454,0x37ffd106,0xb58bff9c,0x59e17104,
0xcf918a49,0x09378c83,0x52c7a471,0x8d293ea9,
0x1f4fc301,0xc3db71be,0x39b44e1c,0xf8a44ef9,
0x4c8b80b1,0x19edc328,0x87bf4bdd,0xc9b240e5,
0xe9ee4b1b,0x4382aee7,0x535b6b41,0xf3bec5da};

static int n = 31;
static int i = 3;
static int j = 0;
static uint32_t *x = init+1;

static uint32_t lcg(uint32_t x) {
	return (1103515245*x + 12345) & 0x7fffffff;
}

static uint32_t parkmiller(uint32_t x) {
	return (uint64_t)16807*x % 0x7fffffff;
}

static void *savestate() {
	x[-1] = (n<<16)|(i<<8)|j;
	return x-1;
}

static void loadstate(uint32_t *state) {
	x = state+1;
	n = x[-1]>>16;
	i = (x[-1]>>8)&0xff;
	j = x[-1]&0xff;
}

void srandom(uint32_t seed) {
	int k;

	i = n == 31 || n == 7 ? 3 : 1;
	j = 0;
	x[0] = seed ? seed : 1;
	for (k = 1; k < n; k++)
		x[k] = parkmiller(x[k-1]);
	for (k = 0; k < 10*n; k++)
		random();
}

char *initstate(unsigned seed, char *state, size_t size) {
	void *old = savestate();
	if (size < 8)
		return 0;
	else if (size < 32)
		n = 0;
	else if (size < 64)
		n = 7;
	else if (size < 128)
		n = 15;
	else if (size < 256)
		n = 31;
	else
		n = 63;
	x = (uint32_t*)state + 1;
	srandom(seed);
	return old;
}

char *setstate(char *state) {
	void *old = savestate();
	loadstate((uint32_t*)state);
	return old;
}

long random(void) {
	long k;

	if (n == 0)
		return x[0] = lcg(x[0]);
	x[i] += x[j];
	k = x[i]>>1;
	if (++i == n)
		i = 0;
	if (++j == n)
		j = 0;
	return k;
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-23 14:16                       ` Szabolcs Nagy
@ 2011-06-23 18:50                         ` Szabolcs Nagy
  2011-06-24 12:12                           ` Szabolcs Nagy
  0 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-23 18:50 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

* Szabolcs Nagy <nsz@port70.net> [2011-06-23 16:16:08 +0200]:
> modified a bit to use uint32_t and uint64_t

i changed the seeding

[-- Attachment #2: random.c --]
[-- Type: text/x-csrc, Size: 2048 bytes --]

#include <stdlib.h>
#include <stdint.h>

/*
this code uses the same lagged fibonacci generator as the
original bsd random implementation except for the seeding

different seeds produce different sequences with long period
(other libcs seed the state with a park-miller generator
when seed=0 some fail to produce good random sequence
others produce the same sequence as another seed)
*/

static uint32_t init[] = {
0x00000000,0x5851f42d,0xc0b18ccf,0xcbb5f646,
0xc7033129,0x30705b04,0x20fd5db4,0x9a8b7f78,
0x502959d8,0xab894868,0x6c0356a7,0x88cdb7ff,
0xb477d43f,0x70a3a52b,0xa8e4baf1,0xfd8341fc,
0x8ae16fd9,0x742d2f7a,0x0d1f0796,0x76035e09,
0x40f7702c,0x6fa72ca5,0xaaa84157,0x58a0df74,
0xc74a0364,0xae533cc4,0x04185faf,0x6de3b115,
0x0cab8628,0xf043bfa4,0x398150e9,0x37521657};

static int n = 31;
static int i = 3;
static int j = 0;
static uint32_t *x = init+1;

static uint32_t lcg31(uint32_t x) {
	return (1103515245*x + 12345) & 0x7fffffff;
}

static uint64_t lcg64(uint64_t x) {
	return 6364136223846793005ull*x + 1;
}

static void *savestate() {
	x[-1] = (n<<16)|(i<<8)|j;
	return x-1;
}

static void loadstate(uint32_t *state) {
	x = state+1;
	n = x[-1]>>16;
	i = (x[-1]>>8)&0xff;
	j = x[-1]&0xff;
}

void srandom(unsigned seed) {
	int k;
	uint64_t s = seed;

	if (n == 0) {
		x[0] = s;
		return;
	}
	i = n == 31 || n == 7 ? 3 : 1;
	j = 0;
	for (k = 0; k < n; k++) {
		s = lcg64(s);
		x[k] = s>>32;
	}
	/* make sure x contains at least one odd number */
	x[0] |= 1;
}

char *initstate(unsigned seed, char *state, size_t size) {
	void *old = savestate();
	if (size < 8)
		return 0;
	else if (size < 32)
		n = 0;
	else if (size < 64)
		n = 7;
	else if (size < 128)
		n = 15;
	else if (size < 256)
		n = 31;
	else
		n = 63;
	x = (uint32_t*)state + 1;
	srandom(seed);
	return old;
}

char *setstate(char *state) {
	void *old = savestate();
	loadstate((uint32_t*)state);
	return old;
}

long random(void) {
	long k;

	if (n == 0)
		return x[0] = lcg31(x[0]);
	x[i] += x[j];
	k = x[i]>>1;
	if (++i == n)
		i = 0;
	if (++j == n)
		j = 0;
	return k;
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-23 18:50                         ` Szabolcs Nagy
@ 2011-06-24 12:12                           ` Szabolcs Nagy
  0 siblings, 0 replies; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-24 12:12 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

* Szabolcs Nagy <nsz@port70.net> [2011-06-23 20:50:41 +0200]:
> * Szabolcs Nagy <nsz@port70.net> [2011-06-23 16:16:08 +0200]:
> > modified a bit to use uint32_t and uint64_t
> 
> i changed the seeding

added locking
(not tested)

[-- Attachment #2: random-lock.diff --]
[-- Type: text/x-diff, Size: 1715 bytes --]

diff --git a/src/prng/random.c b/src/prng/random.c
index 4b2daef..cc5702e 100644
--- a/src/prng/random.c
+++ b/src/prng/random.c
@@ -7,6 +7,7 @@
 
 #include <stdlib.h>
 #include <stdint.h>
+#include "libc.h"
 
 /*
 this code uses the same lagged fibonacci generator as the
@@ -32,6 +33,7 @@ static int n = 31;
 static int i = 3;
 static int j = 0;
 static uint32_t *x = init+1;
+static int lock;
 
 static uint32_t lcg31(uint32_t x) {
 	return (1103515245*x + 12345) & 0x7fffffff;
@@ -53,7 +55,7 @@ static void loadstate(uint32_t *state) {
 	j = x[-1]&0xff;
 }
 
-void srandom(unsigned seed) {
+static void __srandom(unsigned seed) {
 	int k;
 	uint64_t s = seed;
 
@@ -71,11 +73,20 @@ void srandom(unsigned seed) {
 	x[0] |= 1;
 }
 
+void srandom(unsigned seed) {
+	LOCK(&lock);
+	__srandom(seed);
+	UNLOCK(&lock);
+}
+
 char *initstate(unsigned seed, char *state, size_t size) {
-	void *old = savestate();
+	void *old;
+
 	if (size < 8)
 		return 0;
-	else if (size < 32)
+	LOCK(&lock);
+	old = savestate();
+	if (size < 32)
 		n = 0;
 	else if (size < 64)
 		n = 7;
@@ -86,26 +97,36 @@ char *initstate(unsigned seed, char *state, size_t size) {
 	else
 		n = 63;
 	x = (uint32_t*)state + 1;
-	srandom(seed);
+	__srandom(seed);
+	UNLOCK(&lock);
 	return old;
 }
 
 char *setstate(char *state) {
-	void *old = savestate();
+	void *old;
+
+	LOCK(&lock);
+	old = savestate();
 	loadstate((uint32_t*)state);
+	UNLOCK(&lock);
 	return old;
 }
 
 long random(void) {
 	long k;
 
-	if (n == 0)
-		return x[0] = lcg31(x[0]);
+	LOCK(&lock);
+	if (n == 0) {
+		k = x[0] = lcg31(x[0]);
+		goto end;
+	}
 	x[i] += x[j];
 	k = x[i]>>1;
 	if (++i == n)
 		i = 0;
 	if (++j == n)
 		j = 0;
+end:
+	UNLOCK(&lock);
 	return k;
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-08 23:58               ` Completeness " Rich Felker
  2011-06-21  1:46                 ` Szabolcs Nagy
@ 2011-06-25 18:31                 ` Szabolcs Nagy
  2011-06-26 10:30                   ` Szabolcs Nagy
  2011-06-29 21:14                 ` Rich Felker
  2 siblings, 1 reply; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-25 18:31 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

* Rich Felker <dalias@aerifal.cx> [2011-06-08 19:58:10 -0400]:
> Moderate-effort new code:
> - XSI search.h functionality

i did this as it seems fairly simple/harmless
unfortunately this api is quite useless in practice
but i tried to write a simple and conformant implementation

hsearch:
    i used open addressing hashtable (with doubling)
    (it is probably a bit bigger than a chained hash)

    i used a simple hash function (its output must be
    size_t so clever 32bit hash functions are not ok)

    standard is not clear if item.key==NULL is allowed
    to be put into the table (i assumed NULL is not allowed
    as it says strcmp is used on the key, so i mark empty
    entries with NULL key)

    standard is not clear if after an out of memory event
    should there be a usable state, so i made it to work
    (if an insert fails the table can still be searched)

    this api does not provide iterator, number of items
    cannot queried and only string keys with strcmp can
    be used

insque,remque:
    doubly linked list management without type safety..

lsearch,lfind:
    complicated api that can be replaced by a for loop

tsearch:
    i provided two different implementations: plain binary
    tree (as used in bsd) and a self balancing avl tree
    (glibc seems to use rb-tree)

    the first one is simple, but walking the tree may use
    large amount of memory (stack memory, as i used
    recursion there)

    the avl tree implementation uses recursive functions
    (max depth of an avl tree with 2^42 nodes is 60)

    implementing (and using) this api is a bit painful
    the functions return node pointers that the user
    cannot really use..

attached code is also available here temporarily:
http://port70.net/~nsz/musl/search/


[-- Attachment #2: search.h --]
[-- Type: text/x-chdr, Size: 1039 bytes --]

#ifndef	_SEARCH_H
#define	_SEARCH_H

// TODO: cplusplus, xopensource,..

#define __NEED_size_t
#include <bits/alltypes.h>

typedef enum { FIND, ENTER } ACTION;
typedef enum { preorder, postorder, endorder, leaf } VISIT;

typedef struct {
	char *key;
	void *data;
} ENTRY;

int hcreate(size_t nel);
void hdestroy(void);
ENTRY *hsearch(ENTRY item, ACTION action);

void insque(void *element, void *pred);
void remque(void *element);

void *lsearch(const void *key, void *base, size_t *nelp, size_t width,
	int (*compar)(const void *, const void *));
void *lfind(const void *key, const void *base, size_t *nelp,
	size_t width, int (*compar)(const void *, const void *));

void *tdelete(const void *restrict key, void **restrict rootp,
	int(*compar)(const void *, const void *));
void *tfind(const void *key, void *const *rootp,
	int(*compar)(const void *, const void *));
void *tsearch(const void *key, void **rootp,
	int (*compar)(const void *, const void *));
void twalk(const void *root, void (*action)(const void *, VISIT, int));

#endif

[-- Attachment #3: hsearch.c --]
[-- Type: text/x-csrc, Size: 1995 bytes --]

#include <stdlib.h>
#include <string.h>
#include <search.h>

/*
open addressing hash table with 2^n table size
quadratic probing is used in case of hash collision
tab indices and hash are size_t
after resize fails with ENOMEM the state of tab is still usable

with the posix api items cannot be iterated and length cannot be queried
*/

#define MINSIZE 8
#define MAXSIZE ((size_t)-1/2 + 1)

struct entry {
	ENTRY item;
	size_t hash;
};

static size_t mask;
static size_t used;
static struct entry *tab;

static size_t keyhash(char *k)
{
	unsigned char *p = (void *)k;
	size_t h = 0;

	while (*p)
		h = 31*h + *p++;
	return h;
}

static int resize(size_t nel)
{
	size_t newsize;
	size_t i, j;
	struct entry *e, *newe;
	struct entry *oldtab = tab;
	struct entry *oldend = tab + mask + 1;

	if (nel > MAXSIZE)
		nel = MAXSIZE;
	for (newsize = MINSIZE; newsize < nel; newsize *= 2);
	tab = calloc(newsize, sizeof *tab);
	if (!tab) {
		tab = oldtab;
		return 0;
	}
	mask = newsize - 1;
	if (!oldtab)
		return 1;
	for (e = oldtab; e < oldend; e++)
		if (e->item.key) {
			for (i=e->hash,j=1; ; i+=j++) {
				newe = tab + (i & mask);
				if (!newe->item.key)
					break;
			}
			*newe = *e;
		}
	free(oldtab);
	return 1;
}

int hcreate(size_t nel)
{
	mask = 0;
	used = 0;
	tab = 0;
	return resize(nel);
}

void hdestroy(void)
{
	free(tab);
	tab = 0;
	mask = 0;
	used = 0;
}

static struct entry *lookup(char *key, size_t hash)
{
	size_t i, j;
	struct entry *e;

	for (i=hash,j=1; ; i+=j++) {
		e = tab + (i & mask);
		if (!e->item.key ||
		    (e->hash==hash && strcmp(e->item.key, key)==0))
			break;
	}
	return e;
}

ENTRY *hsearch(ENTRY item, ACTION action)
{
	size_t hash = keyhash(item.key);
	struct entry *e = lookup(item.key, hash);

	if (e->item.key)
		return &e->item;
	if (action == FIND)
		return 0;
	e->item = item;
	e->hash = hash;
	if (++used > mask - mask/4) {
		if (!resize(2*used)) {
			used--;
			e->item.key = 0;
			return 0;
		}
		e = lookup(item.key, hash);
	}
	return &e->item;
}

[-- Attachment #4: insque.c --]
[-- Type: text/x-csrc, Size: 448 bytes --]

#include <search.h>

struct node {
	struct node *next;
	struct node *prev;
};

void insque(void *element, void *pred)
{
	struct node *e = element;
	struct node *p = pred;

	if (!p) {
		e->next = e->prev = 0;
		return;
	}
	e->next = p->next;
	e->prev = p;
	p->next = e;
	if (e->next)
		e->next->prev = e;
}

void remque(void *element)
{
	struct node *e = element;

	if (e->next)
		e->next->prev = e->prev;
	if (e->prev)
		e->prev->next = e->next;
}

[-- Attachment #5: lsearch.c --]
[-- Type: text/x-csrc, Size: 609 bytes --]

#include <search.h>
#include <string.h>

void *lsearch(const void *key, void *base, size_t *nelp, size_t width,
	int (*compar)(const void *, const void *))
{
	char (*p)[width] = base;
	size_t n = *nelp;
	size_t i;

	for (i = 0; i < n; i++)
		if (compar(p[i], key) == 0)
			return p[i];
	*nelp = n+1;
	return memcpy(p[n], key, width);
}

void *lfind(const void *key, const void *base, size_t *nelp,
	size_t width, int (*compar)(const void *, const void *))
{
	char (*p)[width] = (void *)base;
	size_t n = *nelp;
	size_t i;

	for (i = 0; i < n; i++)
		if (compar(p[i], key) == 0)
			return p[i];
	return 0;
}



[-- Attachment #6: tsearch_avl.c --]
[-- Type: text/x-csrc, Size: 3351 bytes --]

#include <stdlib.h>
#include <search.h>

struct node {
	const void *key;
	struct node *left;
	struct node *right;
	int height;
};

static int delta(struct node *n) {
	return (n->left ? n->left->height:0) - (n->right ? n->right->height:0);
}

static void updateheight(struct node *n) {
	n->height = 0;
	if (n->left && n->left->height > n->height)
		n->height = n->left->height;
	if (n->right && n->right->height > n->height)
		n->height = n->right->height;
	n->height++;
}

static struct node *rotl(struct node *n) {
	struct node *r = n->right;
	n->right = r->left;
	r->left = n;
	updateheight(n);
	updateheight(r);
	return r;
}

static struct node *rotr(struct node *n) {
	struct node *l = n->left;
	n->left = l->right;
	l->right = n;
	updateheight(n);
	updateheight(l);
	return l;
}

static struct node *balance(struct node *n) {
	int d = delta(n);

	if (d < -1) {
		if (delta(n->right) > 0)
			n->right = rotr(n->right);
		return rotl(n);
	} else if (d > 1) {
		if (delta(n->left) < 0)
			n->left = rotl(n->left);
		return rotr(n);
	}
	updateheight(n);
	return n;
}

static struct node *find(struct node *n, const void *k,
	int (*cmp)(const void *, const void *))
{
	int c;

	if (!n)
		return 0;
	c = cmp(k, n->key);
	if (c == 0)
		return n;
	if (c < 0)
		return find(n->left, k, cmp);
	else
		return find(n->right, k, cmp);
}

static struct node *insert(struct node **n, const void *k,
	int (*cmp)(const void *, const void *), int *new)
{
	struct node *r = *n;
	int c;

	if (!r) {
		*n = r = malloc(sizeof **n);
		if (r) {
			r->key = k;
			r->left = r->right = 0;
			r->height = 1;
		}
		*new = 1;
		return r;
	}
	c = cmp(k, r->key);
	if (c == 0)
		return r;
	if (c < 0)
		r = insert(&r->left, k, cmp, new);
	else
		r = insert(&r->right, k, cmp, new);
	if (*new)
		*n = balance(*n);
	return r;
}

static struct node *movr(struct node *n, struct node *r) {
	if (!n)
		return r;
	n->right = movr(n->right, r);
	return balance(n);
}

static struct node *remove(struct node **n, const void *k,
	int (*cmp)(const void *, const void *), struct node *parent)
{
	int c;

	if (!*n)
		return 0;
	c = cmp(k, (*n)->key);
	if (c == 0) {
		struct node *r = *n;
		*n = movr(r->left, r->right);
		free(r);
		return parent;
	}
	if (c < 0)
		parent = remove(&(*n)->left, k, cmp, *n);
	else
		parent = remove(&(*n)->right, k, cmp, *n);
	if (parent)
		*n = balance(*n);
	return parent;
}

void *tdelete(const void *restrict key, void **restrict rootp,
	int(*compar)(const void *, const void *))
{
	/* last argument is arbitrary non-null pointer
	   which is returned when the root node is deleted */
	return remove((void*)rootp, key, compar, *rootp);
}

void *tfind(const void *key, void *const *rootp,
	int(*compar)(const void *, const void *))
{
	return find(*rootp, key, compar);
}

void *tsearch(const void *key, void **rootp,
	int (*compar)(const void *, const void *))
{
	int new = 0;
	return insert((void*)rootp, key, compar, &new);
}

static void walk(const struct node *r, void (*action)(const void *, VISIT, int), int d)
{
	if (r == 0)
		return;
	if (r->left == 0 && r->right == 0)
		action(r, leaf, d);
	else {
		action(r, preorder, d);
		walk(r->left, action, d+1);
		action(r, postorder, d);
		walk(r->right, action, d+1);
		action(r, endorder, d);
	}
}

void twalk(const void *root, void (*action)(const void *, VISIT, int))
{
	walk(root, action, 0);
}

[-- Attachment #7: tsearch_simple.c --]
[-- Type: text/x-csrc, Size: 1780 bytes --]

#include <stdlib.h>
#include <search.h>

struct node {
	const void *key;
	struct node *left;
	struct node *right;
};

static struct node **lookup(const void *key, struct node **r,
	int (*compar)(const void *, const void *))
{
	while (*r) {
		int c = compar(key, (*r)->key);
		if (c < 0)
			r = &(*r)->left;
		else if (c > 0)
			r = &(*r)->right;
		else
			break;
	}
	return r;
}

void *tdelete(const void *restrict key, void **restrict rootp,
	int(*compar)(const void *, const void *))
{
	struct node **r = (void*)rootp;
	struct node *parent = *r; /* arbitrary non-null pointer */
	struct node *a;
	struct node *b;
	int c;

	for (;;) {
		if (!*r)
			return 0;
		c = compar(key, (*r)->key);
		if (c == 0)
			break;
		parent = *r;
		if (c < 0)
			r = &(*r)->left;
		else
			r = &(*r)->right;
	}
	a = (*r)->left;
	b = (*r)->right;
	free(*r);
	if (a) {
		*r = a;
		for (; a->right; a = a->right);
		a->right = b;
	} else
		*r = b;
	return parent;
}

void *tfind(const void *key, void *const *rootp,
	int(*compar)(const void *, const void *))
{
	return *lookup(key, (void*)rootp, compar);
}

void *tsearch(const void *key, void **rootp,
	int (*compar)(const void *, const void *))
{
	struct node **r = lookup(key, (void*)rootp, compar);
	if (*r)
		return *r;
	*r = malloc(sizeof **r);
	if (*r) {
		(*r)->left = (*r)->right = 0;
		(*r)->key = key;
	}
	return *r;
}

static void rec(const struct node *r, void (*action)(const void *, VISIT, int), int d) {
	if (r == 0)
		return;
	if (r->left == 0 && r->right == 0)
		action(r, leaf, d);
	else {
		action(r, preorder, d);
		rec(r->left, action, d+1);
		action(r, postorder, d);
		rec(r->right, action, d+1);
		action(r, endorder, d);
	}
}

void twalk(const void *root, void (*action)(const void *, VISIT, int))
{
	rec(root, action, 0);
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-25 18:31                 ` Szabolcs Nagy
@ 2011-06-26 10:30                   ` Szabolcs Nagy
  0 siblings, 0 replies; 20+ messages in thread
From: Szabolcs Nagy @ 2011-06-26 10:30 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]

* Szabolcs Nagy <nsz@port70.net> [2011-06-25 20:31:06 +0200]:
> tsearch:
>     i provided two different implementations: plain binary
>     tree (as used in bsd) and a self balancing avl tree
>     (glibc seems to use rb-tree)
> 
>     the avl tree implementation uses recursive functions
>     (max depth of an avl tree with 2^42 nodes is 60)

i was not sure about the performance of this
so i did some benchmarks now
it turns out my avl tree is a little bit faster at word
counting than glibc rb-tree

i had to change scanf("%s", buf) to custom getword(buf)
as musl scanf is slower than glibc's and it took
comparable amount of time to the actual tree operations

on a large text file (gcc info page ~ 30K different words)
musl vs glibc tsearch (best run out of several tries)

$ time ./words <gcc.info 
30617

real	0m0.261s
user	0m0.240s
sys	0m0.020s


$ time ./words-gnu <gcc.info 
30617

real	0m0.291s
user	0m0.284s
sys	0m0.008s


by comparision hsearch version gives

$ time ./words <gcc.info 
30617

real	0m0.116s
user	0m0.100s
sys	0m0.016s

(i could not test the glibc version of
hsearch as it segfaults after a while
even when allocate memory for every string
so i think it's a glibc bug)

[-- Attachment #2: words.c --]
[-- Type: text/x-csrc, Size: 869 bytes --]

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <search.h>

static void *root;

static int cmp(const void *a, const void *b) {
	return strcmp(a, b);
}

static char *sdup(char *s) {
	size_t n = strlen(s)+1;
	return memcpy(malloc(n), s, n);
}

static int add(char *s) {
	char **r = tsearch(s, &root, cmp);
	if (*r == s) {
		/* only do the string copy if s is a new string */
		*r = sdup(s);
		return 1;
	}
	return 0;
}

static int getword(char *s) {
	int c;

	for (;;) {
		c = getchar();
		if (c == EOF)
			return 0;
		if (!(c == ' ' || c == '\n' || c == '\r' || c == '\t'))
			break;
	}
	for (;;) {
		*s++ = c;
		c = getchar();
		if (c == EOF || c == ' ' || c == '\n' || c == '\r' || c == '\t')
			break;
	}
	*s = 0;
	return 1;
}

int main(void) {
	char buf[4096];
	int c = 0;

	while (getword(buf))
		c += add(buf);
	printf("%d\n", c);
	return 0;
}

[-- Attachment #3: words-hsearch.c --]
[-- Type: text/x-csrc, Size: 881 bytes --]

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <search.h>

static char *sdup(char *s) {
	size_t n = strlen(s)+1;
	return memcpy(malloc(n), s, n);
}

static int add(char *s) {
	ENTRY *e;
	e = hsearch((ENTRY){.key = s}, ENTER);
	if (e->key == s) {
		/* only do the string copy if s is a new string */
		e->key = sdup(s);
		return 1;
	}
	return 0;
}

static int getword(char *s) {
	int c;

	for (;;) {
		c = getchar();
		if (c == EOF)
			return 0;
		if (!(c == ' ' || c == '\n' || c == '\r' || c == '\t'))
			break;
	}
	for (;;) {
		*s++ = c;
		c = getchar();
		if (c == EOF || c == ' ' || c == '\n' || c == '\r' || c == '\t')
			break;
	}
	*s = 0;
	return 1;
}

int main(void) {
	char buf[4096];
	int c = 0;

	/* start with a small table so resize is tested */
	hcreate(64);
	while (getword(buf))
		c += add(buf);
//	hdestroy();
	printf("%d\n", c);
	return 0;
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-08 23:58               ` Completeness " Rich Felker
  2011-06-21  1:46                 ` Szabolcs Nagy
  2011-06-25 18:31                 ` Szabolcs Nagy
@ 2011-06-29 21:14                 ` Rich Felker
  2011-07-05 15:40                   ` Hiltjo Posthuma
  2 siblings, 1 reply; 20+ messages in thread
From: Rich Felker @ 2011-06-29 21:14 UTC (permalink / raw)
  To: musl

Some updates to the checklist:

The following are checked off:
> - Dynamic loader (dlopen/dlsym)
> - XSI search.h functionality
> - PRNG (random)
> - Floating point environment (fenv.h)

And what remains:

> - POSIX Asynchronous IO
> - Date parsing (strptime and getdate, etc.)
> - Network interface listing (if_nameindex)
> - Various minor XSI legacy/junk interfaces
> - C99 and some XSI-extension math functions
> - Old netent stuff (which will just be dummies)
> - Some locale_t functions (isw*_l)
> - Some CX wide string functions

The only really important stuff left seems to be date parsing, and
finding and getting proper implementations of the C99 math functions
integrated.

Rich


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Completeness status of musl
  2011-06-29 21:14                 ` Rich Felker
@ 2011-07-05 15:40                   ` Hiltjo Posthuma
  0 siblings, 0 replies; 20+ messages in thread
From: Hiltjo Posthuma @ 2011-07-05 15:40 UTC (permalink / raw)
  To: musl

On Wed, Jun 29, 2011 at 11:14 PM, Rich Felker <dalias@aerifal.cx> wrote:
>
> And what remains:
>
>> - POSIX Asynchronous IO
>> - Date parsing (strptime and getdate, etc.)
>> - Network interface listing (if_nameindex)
>> - Various minor XSI legacy/junk interfaces
>> - C99 and some XSI-extension math functions
>> - Old netent stuff (which will just be dummies)
>> - Some locale_t functions (isw*_l)
>> - Some CX wide string functions
>

I would love to see date parsing being implemented (strptime() specificly) fwiw.


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-07-05 15:40 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-28 23:41 Help assessing status of musl Rich Felker
2011-05-29 16:19 ` gs
2011-05-29 16:44   ` gs
2011-05-29 17:32     ` gs
2011-05-29 18:08       ` Szabolcs Nagy
2011-05-30 10:30         ` Szabolcs Nagy
2011-05-30 15:47           ` Rich Felker
2011-05-30 17:27             ` Szabolcs Nagy
2011-06-08 23:58               ` Completeness " Rich Felker
2011-06-21  1:46                 ` Szabolcs Nagy
2011-06-23  6:54                   ` Rich Felker
2011-06-23 13:25                     ` Szabolcs Nagy
2011-06-23 14:16                       ` Szabolcs Nagy
2011-06-23 18:50                         ` Szabolcs Nagy
2011-06-24 12:12                           ` Szabolcs Nagy
2011-06-25 18:31                 ` Szabolcs Nagy
2011-06-26 10:30                   ` Szabolcs Nagy
2011-06-29 21:14                 ` Rich Felker
2011-07-05 15:40                   ` Hiltjo Posthuma
2011-06-18 21:32               ` Help assessing " Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).