From 7f9d69d6ea27607efe01e7513fd09a9a8319e5e5 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 14 Jun 2012 16:38:01 +0800 Subject: [PATCH] Usermode/libc - Implimented abs/labs for a ported game --- Usermode/Libraries/libc.so_src/stdlib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Usermode/Libraries/libc.so_src/stdlib.c b/Usermode/Libraries/libc.so_src/stdlib.c index 191f5261..ddd1234a 100644 --- a/Usermode/Libraries/libc.so_src/stdlib.c +++ b/Usermode/Libraries/libc.so_src/stdlib.c @@ -134,3 +134,7 @@ EXPORT int atoi(const char *str) if(neg) ret = -ret; return ret; } + +int abs(int j) { return j < 0 ? -j : j; } +long int labs(long int j) { return j < 0 ? -j : j; } + -- 2.20.1