testsuite_hooks.cc (__set_testsuite_memlimit): Use __typeof__ (r.rlim_cur), not rlim_t in declaration of limit.

* testsuite/testsuite_hooks.cc (__set_testsuite_memlimit): Use
	__typeof__ (r.rlim_cur), not rlim_t in declaration of limit.

From-SVN: r58512
This commit is contained in:
Hans-Peter Nilsson 2002-10-24 23:27:27 +00:00 committed by Hans-Peter Nilsson
parent d0af82b0ce
commit 2068a050ab
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-10-24 Hans-Peter Nilsson <hp@bitrange.com>
* testsuite/testsuite_hooks.cc (__set_testsuite_memlimit): Use
__typeof__ (r.rlim_cur), not rlim_t in declaration of limit.
2002-10-23 Jakub Jelinek <jakub@redhat.com>
* testsuite/22_locale/num_put_members_char.cc (test01): Swap size

View File

@ -38,7 +38,9 @@ void
__set_testsuite_memlimit(float __size)
{
struct rlimit r;
rlim_t limit = (rlim_t)(__size * 1048576);
// Cater to the absence of rlim_t.
__typeof__ (r.rlim_cur) limit
= (__typeof__ (r.rlim_cur))(__size * 1048576);
// Heap size, seems to be common.
#if _GLIBCPP_HAVE_MEMLIMIT_DATA