diff options
author | Michael Brown | 2014-01-07 04:53:56 +0100 |
---|---|---|
committer | Michael Brown | 2014-01-12 22:53:16 +0100 |
commit | 26f782bb41c5d4fce427e23aba3199c0fb4297d8 (patch) | |
tree | 9c371440d65d0a52e58f7b3bc978a2938f849743 /src/include/stdlib.h | |
parent | [deflate] Fix literal data length calculation (diff) | |
download | ipxe-26f782bb41c5d4fce427e23aba3199c0fb4297d8.tar.gz ipxe-26f782bb41c5d4fce427e23aba3199c0fb4297d8.tar.xz ipxe-26f782bb41c5d4fce427e23aba3199c0fb4297d8.zip |
[libc] Add abs()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/stdlib.h')
-rw-r--r-- | src/include/stdlib.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/stdlib.h b/src/include/stdlib.h index bca85a23..2951522b 100644 --- a/src/include/stdlib.h +++ b/src/include/stdlib.h @@ -93,6 +93,10 @@ static inline void srand ( unsigned int seed ) { **************************************************************************** */ +static inline __attribute__ (( always_inline )) int abs ( int value ) { + return __builtin_abs ( value ); +} + extern int system ( const char *command ); extern __asmcall int main ( void ); |