summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoryamt <yamt@NetBSD.org>2008-04-07 12:24:52 +0000
committeryamt <yamt@NetBSD.org>2008-04-07 12:24:52 +0000
commite3372d31c3f849e72adfc381f2a09e2d8bc9948b (patch)
tree0fdea917e052dafadefbd810e9bb6b0d4fec0c05 /include
parente67567352166c0208b2a43481f316204b2c29788 (diff)
RANDOM_MAX: don't rely on integer overflow.
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 2ba9c2c9f1e..f1e990a974c 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.83 2008/04/01 19:23:28 drochner Exp $ */
+/* $NetBSD: stdlib.h,v 1.84 2008/04/07 12:24:52 yamt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -177,7 +177,7 @@ long random(void);
char *setstate(char *);
void srandom(unsigned long);
#ifdef _NETBSD_SOURCE
-#define RANDOM_MAX (((long)1 << 31) - 1)
+#define RANDOM_MAX 0x7fffffff /* (((long)1 << 31) - 1) */
#endif
char *mkdtemp(char *);