Fix ancient RAND_MAX compiler warning
This commit is contained in:
parent
3e293e6cfc
commit
9c66df6de1
3 changed files with 10 additions and 5 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: random.h,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
||||
* @(#)$Id: random.h,v 1.2 2010/12/13 16:52:02 dak664 Exp $
|
||||
*/
|
||||
#ifndef __RANDOM_H__
|
||||
#define __RANDOM_H__
|
||||
|
@ -46,6 +46,8 @@ void random_init(unsigned short seed);
|
|||
*/
|
||||
unsigned short random_rand(void);
|
||||
|
||||
#define RANDOM_MAX 65535U
|
||||
/* In gcc int rand() uses RAND_MAX and long random() uses RANDOM_MAX */
|
||||
/* Since random_rand casts to unsigned short, we'll use this maxmimum */
|
||||
#define RANDOM_RAND_MAX 65535U
|
||||
|
||||
#endif /* __RANDOM_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue