aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-17 02:31:11 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-17 02:31:11 +0100
commitae942840140e38835e562e8d235578c017d00766 (patch)
treef71696eba1addd25ad0393926a3f0787f26a2e98 /src
parentsplit abs.c (diff)
downloadslibc-ae942840140e38835e562e8d235578c017d00766.tar.gz
slibc-ae942840140e38835e562e8d235578c017d00766.tar.bz2
slibc-ae942840140e38835e562e8d235578c017d00766.tar.xz
add macros for abs, labs, llabs, and imaxabs
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/inttypes/imaxabs.c2
-rw-r--r--src/stdlib/abs/abs.c2
-rw-r--r--src/stdlib/abs/labs.c2
-rw-r--r--src/stdlib/abs/llabs.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/inttypes/imaxabs.c b/src/inttypes/imaxabs.c
index 1f3b337..651452a 100644
--- a/src/inttypes/imaxabs.c
+++ b/src/inttypes/imaxabs.c
@@ -30,7 +30,7 @@
* @param value The integer.
* @return The absolute value of the integer.
*/
-intmax_t imaxabs(intmax_t value)
+intmax_t (imaxabs)(intmax_t value)
{
return value < 0 ? -value : value;
}
diff --git a/src/stdlib/abs/abs.c b/src/stdlib/abs/abs.c
index 9452a5b..9bc3bd4 100644
--- a/src/stdlib/abs/abs.c
+++ b/src/stdlib/abs/abs.c
@@ -30,7 +30,7 @@
* @param value The integer.
* @return The absolute value of the integer.
*/
-int abs(int value)
+int (abs)(int value)
{
return value < 0 ? -value : value;
}
diff --git a/src/stdlib/abs/labs.c b/src/stdlib/abs/labs.c
index 360122d..20d0ac6 100644
--- a/src/stdlib/abs/labs.c
+++ b/src/stdlib/abs/labs.c
@@ -30,7 +30,7 @@
* @param value The integer.
* @return The absolute value of the integer.
*/
-long int labs(long int value)
+long int (labs)(long int value)
{
return value < 0 ? -value : value;
}
diff --git a/src/stdlib/abs/llabs.c b/src/stdlib/abs/llabs.c
index 23ae2ed..71e5a1b 100644
--- a/src/stdlib/abs/llabs.c
+++ b/src/stdlib/abs/llabs.c
@@ -30,7 +30,7 @@
* @param value The integer.
* @return The absolute value of the integer.
*/
-long long int llabs(long long int value)
+long long int (llabs)(long long int value)
{
return value < 0 ? -value : value;
}