diff options
author | Michael Brown <mcb30@ipxe.org> | 2014-01-07 03:53:56 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2014-01-12 22:53:16 +0100 |
commit | 26f782bb41c5d4fce427e23aba3199c0fb4297d8 (patch) | |
tree | 9c371440d65d0a52e58f7b3bc978a2938f849743 /src/include/stdlib.h | |
parent | 97fd5ccdd86f4c84b128e905c663b2bd7e6397fe (diff) | |
download | ipxe-26f782bb41c5d4fce427e23aba3199c0fb4297d8.zip ipxe-26f782bb41c5d4fce427e23aba3199c0fb4297d8.tar.gz ipxe-26f782bb41c5d4fce427e23aba3199c0fb4297d8.tar.bz2 |
[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 bca85a2..2951522 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 ); |