summaryrefslogtreecommitdiff
path: root/src/stdlib/labs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/labs.c')
-rw-r--r--src/stdlib/labs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stdlib/labs.c b/src/stdlib/labs.c
new file mode 100644
index 00000000..675b95b8
--- /dev/null
+++ b/src/stdlib/labs.c
@@ -0,0 +1,4 @@
+long labs(long a)
+{
+ return a>0 ? a : -a;
+}