summaryrefslogtreecommitdiff
path: root/pr/include/prtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'pr/include/prtypes.h')
-rw-r--r--pr/include/prtypes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h
index b01673d0..508b9299 100644
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -239,13 +239,15 @@
/***********************************************************************
** MACROS: PR_ROUNDUP
** PR_MIN
-** PR_MAX
+** PR_MAX
+** PR_ABS
** DESCRIPTION:
** Commonly used macros for operations on compatible types.
***********************************************************************/
#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
#define PR_MIN(x,y) ((x)<(y)?(x):(y))
#define PR_MAX(x,y) ((x)>(y)?(x):(y))
+#define PR_ABS(x) ((x)<0?-(x):(x))
PR_BEGIN_EXTERN_C