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:
		| @@ -1,3 +1,10 @@ | |||||||
|  | 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. | ||||||
|  |  | ||||||
| Fri Jun 16 23:02:00 2000  Corinna Vinschen <corinna@vinschen.de> | Fri Jun 16 23:02:00 2000  Corinna Vinschen <corinna@vinschen.de> | ||||||
|  |  | ||||||
|         * libc/include/sys/unistd.h: Add prototypes for `seteuid' and |         * libc/include/sys/unistd.h: Add prototypes for `seteuid' and | ||||||
|   | |||||||
| @@ -182,7 +182,7 @@ struct _reent | |||||||
|           char _asctime_buf[26]; |           char _asctime_buf[26]; | ||||||
|           struct tm _localtime_buf; |           struct tm _localtime_buf; | ||||||
|           int _gamma_signgam; |           int _gamma_signgam; | ||||||
|           unsigned long long _rand_next; |           __extension__ unsigned long long _rand_next; | ||||||
|  |  | ||||||
|         } _reent; |         } _reent; | ||||||
|   /* Two next two fields were once used by malloc.  They are no longer |   /* Two next two fields were once used by malloc.  They are no longer | ||||||
|   | |||||||
| @@ -82,7 +82,7 @@ _DEFUN_VOID (rand) | |||||||
|      Computer Programming," Vol 2, Seminumerical Algorithms, Third |      Computer Programming," Vol 2, Seminumerical Algorithms, Third | ||||||
|      Edition, Addison-Wesley, 1998, p. 106 (line 26) & p. 108 */ |      Edition, Addison-Wesley, 1998, p. 106 (line 26) & p. 108 */ | ||||||
|   _REENT->_new._reent._rand_next =  |   _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); |   return (int)((_REENT->_new._reent._rand_next >> 32) & RAND_MAX); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user