ho visto che nella libreria
stdlib.h c'è scritto
codice:
#define RAND_MAX __RAND_MAX
La macro _RAND_MAX è definita in config.h e c'è scritto
codice:
/* This block should be kept in sync with GCC's limits.h. The point
of having these definitions here is to not include limits.h, which
would pollute the user namespace, while still using types of the
the correct widths when deciding how to define __int32_t and
__int64_t. */
#ifndef __INT_MAX__
# ifdef INT_MAX
# define __INT_MAX__ INT_MAX
# else
# define __INT_MAX__ 2147483647
# endif
#endif
[omissis]
#ifdef __frv__
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
#endif
#undef __RAND_MAX#if __INT_MAX__ == 32767
#define __RAND_MAX 32767
#else
#define __RAND_MAX 0x7fffffff
#endif
come posso risolvere?? cosa cambia??
il risultato di
printf("\nRAND_MAX=%d\nINT_MAX=%d\n",RAND_MAX,__IN T_MAX__);
è
RAND_MAX=2147483647
INT_MAX=2147483647