浏览代码

[libc] Add abs()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 年前
父节点
当前提交
26f782bb41
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/include/stdlib.h

+ 4
- 0
src/include/stdlib.h 查看文件

93
  ****************************************************************************
93
  ****************************************************************************
94
  */
94
  */
95
 
95
 
96
+static inline __attribute__ (( always_inline )) int abs ( int value ) {
97
+	return __builtin_abs ( value );
98
+}
99
+
96
 extern int system ( const char *command );
100
 extern int system ( const char *command );
97
 extern __asmcall int main ( void );
101
 extern __asmcall int main ( void );
98
 
102
 

正在加载...
取消
保存