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.
This commit is contained in:
Ranjith Kumaran 2000-06-09 01:13:36 +00:00
parent 518882f3a2
commit a68078cbb8
3 changed files with 12 additions and 1 deletions

View 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> Thu Jun 8 17:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/stdlib/rand_r.c: New algorithm that meets minimal * libc/stdlib/rand_r.c: New algorithm that meets minimal

View File

@ -37,7 +37,7 @@ typedef struct
#define EXIT_FAILURE 1 #define EXIT_FAILURE 1
#define EXIT_SUCCESS 0 #define EXIT_SUCCESS 0
#define RAND_MAX 0x7fffffff #define RAND_MAX __RAND_MAX
#if (defined(__CYGWIN__) || defined(__CYGWIN__)) && ! defined(_COMPILING_NEWLIB) #if (defined(__CYGWIN__) || defined(__CYGWIN__)) && ! defined(_COMPILING_NEWLIB)
extern __declspec(dllimport) int __mb_cur_max; extern __declspec(dllimport) int __mb_cur_max;

View File

@ -111,5 +111,11 @@ typedef unsigned int __uint32_t;
#define _POINTER_INT long #define _POINTER_INT long
#endif #endif
#undef __RAND_MAX
#if INT_MAX == 32767
#define __RAND_MAX 32767
#else
#define __RAND_MAX 0x7fffffff
#endif
#endif /* __SYS_CONFIG_H__ */ #endif /* __SYS_CONFIG_H__ */