summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-02-07 03:15:11 +0000
committerwtc%netscape.com <devnull@localhost>2002-02-07 03:15:11 +0000
commit5cc066f9934fd27bae419279035919f79a48f7d2 (patch)
tree293436669e857dfc9479ab0d63ff238a27f1192c
parentd0648b5e9b66e801ff0ae9d66fa22ba66075b0c6 (diff)
downloadnspr-hg-5cc066f9934fd27bae419279035919f79a48f7d2.tar.gz
Bugzilla bug 117479: add the PR_ABS macro to NSPRPUB_PRE_4_2_CLIENT_BRANCH.
-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