Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-06-20 22:34:57 +0400
committerJeff Johnston <jjohnstn@redhat.com>2000-06-20 22:34:57 +0400
commita704d94a8640a9e5291e33d47f6f528f569d18c9 (patch)
tree6ea259ced1e922609d55afeeae8433ea6d96925b /newlib/libc
parentcfeb2c7d797660a163f5edabe979641cf57e67e5 (diff)
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.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/sys/reent.h2
-rw-r--r--newlib/libc/stdlib/rand.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index d6aefed6e..760638676 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -182,7 +182,7 @@ struct _reent
char _asctime_buf[26];
struct tm _localtime_buf;
int _gamma_signgam;
- unsigned long long _rand_next;
+ __extension__ unsigned long long _rand_next;
} _reent;
/* Two next two fields were once used by malloc. They are no longer
diff --git a/newlib/libc/stdlib/rand.c b/newlib/libc/stdlib/rand.c
index 4cf7f2932..a085ef37c 100644
--- a/newlib/libc/stdlib/rand.c
+++ b/newlib/libc/stdlib/rand.c
@@ -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);
}