Replace unnecessary x86 uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

Change-Id: I9d016ee8e8329cccf244d27c336d9524348af996
Replace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

Change-Id: I193a35f9790b82c83fd3b5672e24ac1b2034d0b0
Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>.

For some reason, socketcalls.c was only being compiled for ARM, where
it makes no sense. For x86 we generate stubs for the socket functions
that use __NR_socketcall directly.

Change-Id: I84181e6183fae2314ae3ed862276eba82ad21e8e
Merge "Replace unnecessary x86 uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
Merge "Replace unnecessary MIPS uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
Merge "Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>."
Fix builds where _FORTIFY_SOURCE is off.

Also add a more intention-revealing guard so we don't have loads of
places checking whether our inlining macro is defined.

Change-Id: I168860cedcfc798b07a5145bc48a125700265e47
Merge "Fix builds where _FORTIFY_SOURCE is off."
Use the correct names for the __ARM_NR_* syscalls.

This lets us move all the ARM syscall stubs over to the kernel <asm/unistd.h>.
Our generated <sys/linux-syscalls.h> is now unused, but I'll remove that in a
later change.

Change-Id: Ie5ff2cc4abce1938576af7cbaef615a79c7f310d
Merge "Use the correct names for the __ARM_NR_* syscalls."
Use GCC's __attribute__((const)) to reduce code size

__attribute__((const)) is mainly intended for the compiler to optimize
away repeated calls to a function that the compiler knows will return
the same value repeatedly.

By adding __attribute__((const)), the compiler can choose to call the
function just once and cache the return value.  Therefore, this yields
code size reduction.

Here are the reference results by arm-eabi-size for crespo device:

[before]
   text    data     bss     dec     hex filename
 267715   10132   45948  323795   4f0d3

[after]
   text    data     bss     dec     hex filename
 267387   10132   45948  323467   4ef8b

Change-Id: I1d80465c0f88158449702d4dc6398a130eb77195
Merge branch 'master' of https://android.googlesource.com/platform/bionic