diff options
Diffstat (limited to 'src/stdlib/llabs.c')
-rw-r--r-- | src/stdlib/llabs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/stdlib/llabs.c b/src/stdlib/llabs.c new file mode 100644 index 00000000..2f474fe9 --- /dev/null +++ b/src/stdlib/llabs.c @@ -0,0 +1,18 @@ +#include <stdlib.h> + +long long int llabs(long long int j) +{ + if (j == LLONG_MIN) { + /* undefined */ + } + + if (j < 0) { + return -j; + } + + return j; +} + +/* +STDC(199901) +*/ |