Skip to content

Commit

Permalink
[libc] Add abs()
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Jan 12, 2014
1 parent 97fd5cc commit 26f782b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/include/stdlib.h
Expand Up @@ -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 );

Expand Down

0 comments on commit 26f782b

Please sign in to comment.