summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/llabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/llabs.c')
-rw-r--r--lib/libc/stdlib/llabs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/stdlib/llabs.c b/lib/libc/stdlib/llabs.c
new file mode 100644
index 00000000..1fadcb98
--- /dev/null
+++ b/lib/libc/stdlib/llabs.c
@@ -0,0 +1,6 @@
+#include <stdlib.h>
+
+long long llabs(long long i)
+{
+ return (i < 0 ? -i : i);
+}