summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2000-01-31 21:41:08 +0000
committerwtc%netscape.com <devnull@localhost>2000-01-31 21:41:08 +0000
commit89b0e2515fbded9795deee0cad337c8adffb5d21 (patch)
treed0b5e87cc4a84da6b7dca5d59f6d5680d953ecc4
parent6f5e35fe7e55f358871e3384f06f73305fcd1d3c (diff)
downloadnspr-hg-89b0e2515fbded9795deee0cad337c8adffb5d21.tar.gz
Bugzilla bug #21428: fixed LL_CMP and LL_UCMP so that they can be usedANDREAS_URL2_BASE
with the <= and >= operators when HAVE_LONG_LONG is not defined. The fix is contributed by John G. Myers <jgmyers@netscape.com>. r=wtc@netscape.com.
-rw-r--r--pr/include/prlong.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/pr/include/prlong.h b/pr/include/prlong.h
index 1f2ad727..0d98622a 100644
--- a/pr/include/prlong.h
+++ b/pr/include/prlong.h
@@ -188,10 +188,10 @@ NSPR_API(PRInt64) LL_Zero(void);
#define LL_NE(a, b) (((a).hi != (b).hi) || ((a).lo != (b).lo))
#define LL_GE_ZERO(a) (((a).hi >> 31) == 0)
-#define LL_CMP(a, op, b) (((PRInt32)(a).hi op (PRInt32)(b).hi) || \
- (((a).hi == (b).hi) && ((a).lo op (b).lo)))
-#define LL_UCMP(a, op, b) (((a).hi op (b).hi) || \
- (((a).hi == (b).hi) && ((a).lo op (b).lo)))
+#define LL_CMP(a, op, b) (((a).hi == (b).hi) ? ((a).lo op (b).lo) : \
+ ((PRInt32)(a).hi op (PRInt32)(b).hi))
+#define LL_UCMP(a, op, b) (((a).hi == (b).hi) ? ((a).lo op (b).lo) : \
+ ((a).hi op (b).hi))
#define LL_AND(r, a, b) ((r).lo = (a).lo & (b).lo, \
(r).hi = (a).hi & (b).hi)