Tue Jun 20 14:30:00 2000 Jeff Johnston <jjohnstn@cygnus.com>

* libc/include/sys/reent.h (_rand_next): Added __extension__
        qualifier as long long type is not strict ANSI.
        * libc/stdlib/rand.c (rand): Added __extension__ qualifier
        to long long constant.
This commit is contained in:
Jeff Johnston
2000-06-20 18:34:57 +00:00
parent cfeb2c7d79
commit a704d94a86
3 changed files with 9 additions and 2 deletions

View File

@ -82,7 +82,7 @@ _DEFUN_VOID (rand)
Computer Programming," Vol 2, Seminumerical Algorithms, Third
Edition, Addison-Wesley, 1998, p. 106 (line 26) & p. 108 */
_REENT->_new._reent._rand_next =
_REENT->_new._reent._rand_next * 6364136223846793005LL + 1;
_REENT->_new._reent._rand_next * __extension__ 6364136223846793005LL + 1;
return (int)((_REENT->_new._reent._rand_next >> 32) & RAND_MAX);
}