aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorRanjith Kumaran <ranjith@cygnus.com>2000-06-09 01:13:36 +0000
committerRanjith Kumaran <ranjith@cygnus.com>2000-06-09 01:13:36 +0000
commita68078cbb847a49092edff701b8df53c7f2d1128 (patch)
treee22ab404bab1a230876016e2ecb5aa34fadeac3f /newlib
parent518882f3a2d5257253e126590994108e30c3d2ce (diff)
downloadnewlib-a68078cbb847a49092edff701b8df53c7f2d1128.zip
newlib-a68078cbb847a49092edff701b8df53c7f2d1128.tar.gz
newlib-a68078cbb847a49092edff701b8df53c7f2d1128.tar.bz2
Thu Jun 8 21:18:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
* libc/include/stdlib.h: Set RAND_MAX to __RAND_MAX. * libc/include/sys/config.h: Define __RAND_MAX.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/include/stdlib.h2
-rw-r--r--newlib/libc/include/sys/config.h6
3 files changed, 12 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 1f508d0..a322e11 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 8 21:18:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/include/stdlib.h: Set RAND_MAX to __RAND_MAX.
+ * libc/include/sys/config.h: Define __RAND_MAX.
+
Thu Jun 8 17:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/stdlib/rand_r.c: New algorithm that meets minimal
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index a61517f..326213b 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -37,7 +37,7 @@ typedef struct
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
-#define RAND_MAX 0x7fffffff
+#define RAND_MAX __RAND_MAX
#if (defined(__CYGWIN__) || defined(__CYGWIN__)) && ! defined(_COMPILING_NEWLIB)
extern __declspec(dllimport) int __mb_cur_max;
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index e274119..8420a8d 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -111,5 +111,11 @@ typedef unsigned int __uint32_t;
#define _POINTER_INT long
#endif
+#undef __RAND_MAX
+#if INT_MAX == 32767
+#define __RAND_MAX 32767
+#else
+#define __RAND_MAX 0x7fffffff
+#endif
#endif /* __SYS_CONFIG_H__ */