summaryrefslogtreecommitdiff
path: root/src/stdlib/llabs.c
blob: 6ccf9c49feaaa85a349a09d90f68b4e711b571f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdlib.h>
#include "limits.h"

long long int llabs(long long int j)
{
	if (j == LLONG_MIN) {
		/* undefined */
	}

	if (j < 0) {
		return -j;
	}

	return j;
}

/*
STDC(199901)
*/