Denys Vlasenko wrote: > Hi, > > We have the following aliases witj __libc prefix: > > # grep -rh $'[ \t]__libc_[a-z_0-9]*;$' . | sort | uniq | grep __typeof > extern __typeof(accept) __libc_accept; > extern __typeof(close) __libc_close; > extern __typeof(connect) __libc_connect; > extern __typeof(creat) __libc_creat; > extern __typeof(creat64) __libc_creat64; > extern __typeof(fcntl) __libc_fcntl; > extern __typeof(fcntl64) __libc_fcntl64; > extern __typeof(fork) __libc_fork; > extern __typeof(fstatfs) __libc_fstatfs; > extern __typeof(fsync) __libc_fsync; > extern __typeof(getdomainname) __libc_getdomainname; > extern __typeof(getpid) __libc_getpid; > extern __typeof(lseek) __libc_lseek; > extern __typeof(lseek64) __libc_lseek64; > extern __typeof(msync) __libc_msync; > extern __typeof(nanosleep) __libc_nanosleep; > extern __typeof(open) __libc_open; > extern __typeof(open64) __libc_open64; > extern __typeof(pause) __libc_pause; > extern __typeof(poll) __libc_poll; > extern __typeof(pread) __libc_pread; > extern __typeof(pread64) __libc_pread64; > extern __typeof(pselect) __libc_pselect; > extern __typeof(pwrite) __libc_pwrite; > extern __typeof(pwrite64) __libc_pwrite64; > extern __typeof(read) __libc_read; > extern __typeof(readv) __libc_readv; > extern __typeof(recv) __libc_recv; > extern __typeof(recvfrom) __libc_recvfrom; > extern __typeof(recvmsg) __libc_recvmsg; > extern __typeof(select) __libc_select; > extern __typeof(send) __libc_send; > extern __typeof(sendmsg) __libc_sendmsg; > extern __typeof(sendto) __libc_sendto; > extern __typeof(sigaction) __libc_sigaction; > extern __typeof(sigsuspend) __libc_sigsuspend; > extern __typeof(statfs) __libc_statfs; > extern __typeof(system) __libc_system; > extern __typeof(tcdrain) __libc_tcdrain; > extern __typeof(wait) __libc_wait; > extern __typeof(waitpid) __libc_waitpid; > extern __typeof(write) __libc_write; > extern __typeof(writev) __libc_writev; > > I do not see any explanation what are these? > > I do see that some of them are used from libpthread, but > many are not (__libc_accept, __libc_getdomainname...). > > One purpose I might imagine if to make sure you are using > libc implementation of a function, not something from > another library... > IIRC, this is one of the reason.
> Anyone knows better? probably these were intended to be used with libc_hidden_proto/defs for avoing PLT entries when called from within libc itself... but now it should be the case any more. > -- > vda carmelo > _______________________________________________ > uClibc mailing list > [email protected] > http://busybox.net/cgi-bin/mailman/listinfo/uclibc > _______________________________________________ uClibc mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/uclibc
