This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Question about macro _GLIBCXX_RES_LIMITS in libstdc++ testsuite
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 17 May 2015 16:16:03 +0800
- Subject: Re: Question about macro _GLIBCXX_RES_LIMITS in libstdc++ testsuite
- Authentication-results: sourceware.org; auth=none
- References: <CAHFci2_nbpqa2_SkCgAKkWgKouudWz_avyvO6SrYo-sJV5kEOA at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1505160529340 dot 55480 at arjuna dot pair dot com>
On Sat, May 16, 2015 at 5:35 PM, Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Thu, 23 Apr 2015, Bin.Cheng wrote:
>> Hi,
>> In libstdc++ testsuite, I noticed that macro _GLIBCXX_RES_LIMITS is
>> checked/set by GLIBCXX_CHECK_SETRLIMIT, which is further guarded by
>> GLIBCXX_IS_NATIVE as below:
>>
>> AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
>> if $GLIBCXX_IS_NATIVE ; then
>> # Do checks for resource limit functions.
>> GLIBCXX_CHECK_SETRLIMIT
>>
>> # Look for setenv, so that extended locale tests can be performed.
>> GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
>> fi
>>
>> For cross toolchain like arm-linux, _GLIBCXX_RES_LIMITS isn't set. As
>> a result, function __gnu_test::set_file_limit is actually nullified
>> and causing case 27_io/fpos/14775.cc failed.
>>
>> My question is why we want to guard the check with GLIBCXX_IS_NATIVE?
>> Could we check it directly, if it's not supported, it's going to fail
>> and undef the macro anyway?
>>
>>
>> Thanks,
>> bin
>>
>
> Good question. I'm CC:ing the libstdc++ list, maybe that'll
> bring an answer before another 1.5 months.
Ah, thank you for helping, and I can wait another 1.5 months :)
Thanks,
bin
>
> brgds, H-P