write some useful code for c lib, using glibc or other