summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/lib')
-rw-r--r--mdk-stage1/dietlibc/lib/abs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/lib/abs.c b/mdk-stage1/dietlibc/lib/abs.c
new file mode 100644
index 000000000..9d7055358
--- /dev/null
+++ b/mdk-stage1/dietlibc/lib/abs.c
@@ -0,0 +1,6 @@
+#include <stdlib.h>
+
+int abs(int j)
+{
+ return (j < 0) ? -j : j;
+}