summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorHolden Green <holdenmgreen@gmail.com>2021-04-28 16:17:06 -0700
committerAndreas Kling <kling@serenityos.org>2021-04-29 09:34:27 +0200
commit18a641f3f84a9f72d719c3f79ed23b8f4223500d (patch)
treecac4474571e6d1a51f6626fef3b72d78995c916d /Userland
parent4ce17721e3375f88361a6b327ca3bb46ae68dae8 (diff)
downloadserenity-18a641f3f84a9f72d719c3f79ed23b8f4223500d.zip
Implemented llabs() in stdlib.h/cpp.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/stdlib.cpp5
-rw-r--r--Userland/Libraries/LibC/stdlib.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/stdlib.cpp b/Userland/Libraries/LibC/stdlib.cpp
index 477fe086c8..293e2ca77a 100644
--- a/Userland/Libraries/LibC/stdlib.cpp
+++ b/Userland/Libraries/LibC/stdlib.cpp
@@ -713,6 +713,11 @@ int abs(int i)
return i < 0 ? -i : i;
}
+long long int llabs(long long int i)
+{
+ return i < 0 ? -i : i;
+}
+
long int random()
{
return rand();
diff --git a/Userland/Libraries/LibC/stdlib.h b/Userland/Libraries/LibC/stdlib.h
index 7732ba55ef..fc029d2ce3 100644
--- a/Userland/Libraries/LibC/stdlib.h
+++ b/Userland/Libraries/LibC/stdlib.h
@@ -49,6 +49,7 @@ char* ptsname(int fd);
int ptsname_r(int fd, char* buffer, size_t);
int abs(int);
long labs(long);
+long long int llabs(long long int);
double atof(const char*);
int system(const char* command);
char* mktemp(char*);