Przeglądaj źródła

[libc] Add abs()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 lat temu
rodzic
commit
26f782bb41
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4
    0
      src/include/stdlib.h

+ 4
- 0
src/include/stdlib.h Wyświetl plik

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
 

Ładowanie…
Anuluj
Zapisz