mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibC: Add some integer functionality needed for NASM.
This commit is contained in:
@@ -267,4 +267,20 @@ int system(const char* command)
|
||||
return execl("/bin/sh", "sh", "-c", command, nullptr);
|
||||
}
|
||||
|
||||
div_t div(int numerator, int denominator)
|
||||
{
|
||||
div_t result;
|
||||
result.quot = numerator / denominator;
|
||||
result.rem = numerator % denominator;
|
||||
return result;
|
||||
}
|
||||
|
||||
ldiv_t ldiv(long numerator, long denominator)
|
||||
{
|
||||
ldiv_t result;
|
||||
result.quot = numerator / denominator;
|
||||
result.rem = numerator % denominator;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user