소스 검색

[libc] Add abs()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 년 전
부모
커밋
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
 

Loading…
취소
저장