]> sourceware.org Git - newlib-cygwin.git/commitdiff
Thu Jun 8 21:18:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
authorRanjith Kumaran <ranjith@cygnus.com>
Fri, 9 Jun 2000 01:13:36 +0000 (01:13 +0000)
committerRanjith Kumaran <ranjith@cygnus.com>
Fri, 9 Jun 2000 01:13:36 +0000 (01:13 +0000)
* libc/include/stdlib.h: Set RAND_MAX to __RAND_MAX.
* libc/include/sys/config.h: Define __RAND_MAX.

newlib/ChangeLog
newlib/libc/include/stdlib.h
newlib/libc/include/sys/config.h

index 1f508d0228ab4bea9101a3a9fbb5ad747e04b2b9..a322e11435179baaa84a1709ae5c72b5be3ba44b 100644 (file)
@@ -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
index a61517f260bd31564cacfc29b23802414c8f8f0d..326213b3c5fe2966ab30c67c80e2c5bedfc0dd73 100644 (file)
@@ -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;
index e274119bc80bb9b0f0b09f636a815bc392695663..8420a8d865e2cfe99321916cc7bb384f579b5180 100644 (file)
@@ -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__ */
This page took 0.044044 seconds and 5 git commands to generate.