This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Android hints: Detect stub functions and mark them as undefined.
authorBrian Fraser <fraserbn@gmail.com>
Sun, 28 Apr 2013 00:01:44 +0000 (21:01 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:19 +0000 (14:44 -0300)
commit76d86663840bb992ca551935413517e058add768
tree1c58069cd158f5719fd7f1b3da7a6e6417726720
parentafae46ca68beaadf36a0c96b125c32bc27e5a83b
Android hints: Detect stub functions and mark them as undefined.

Bionic implements several functions as stumps that simply warn
and return null, which leads to situations like this:

FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:378

This commit introduces some probes for functions (getnetbyname,
getnetbyaddr, getmntent, getprotobyname, getprotobynumber, endpwent,
ttyname) that we use and are actually stubs in at least some
versions of Android.
If we find a stub, we pretend that the function is undefined, so
the above example becomes this:

Unsupported socket function "getprotobyname" called at -e line 1.

Note that this commit does not fix the modules that assume that
these functions are always available, so 'make test' still fails.
hints/linux-android.sh