OSDN Git Service

syscall(3)'s return type should be long.
authorElliott Hughes <enh@google.com>
Mon, 28 Jul 2014 19:24:22 +0000 (12:24 -0700)
committerElliott Hughes <enh@google.com>
Mon, 28 Jul 2014 22:39:24 +0000 (15:39 -0700)
commit78e4f8fed2c162f8ada55180e48487ef2180cf93
tree0e1f582a61d455e1f3b1397d4a3305809f2bf66e
parentb1b60c30bf321c0fc02264b953b5c16c49d34457
syscall(3)'s return type should be long.

This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Bug: 16568314

(cherry picked from commit 21972b61ec0572395c5684eebc6cc7b3a4c9e3be)

Change-Id: Ifbc424be29e5650ec72a24df25dd35f24fdd5b3c
libc/include/sys/syscall.h
tests/unistd_test.cpp