This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH][libstdc++-v3] Add _GLIBCXX_HAVE_LIMIT_FSIZE to guard 27_io/fpos/14775.cc
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Renlin Li <renlin dot li at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Date: Mon, 1 Jun 2015 16:58:54 +0100
- Subject: Re: [PATCH][libstdc++-v3] Add _GLIBCXX_HAVE_LIMIT_FSIZE to guard 27_io/fpos/14775.cc
- Authentication-results: sourceware.org; auth=none
- References: <5549CC2E dot 2060605 at arm dot com>
On 06/05/15 09:09 +0100, Renlin Li wrote:
Hi all,
This is a simple patch to add _GLIBCXX_HAVE_LIMIT_FSIZE to guard the test.
In libstdc++-v3/testsuite/util/testsuite_hooks.cc. set_file_limit()
function is nullified when either _GLIBCXX_RES_LIMITS or
_GLIBCXX_HAVE_LIMIT_FSIZE is not defined.
_GLIBCXX_USE_LFS can cover _GLIBCXX_RES_LIMITS, however,
_GLIBCXX_HAVE_LIMIT_FSIZE is not checked.
The complete condition for correct execution of this test case is
that, those two macros are both defined.
Is Okay to commit?
OK.
Regards,
Renlin Li
libstdc++-v3/ChangeLog:
2015-05-06 Renlin Li <renlin.li@arm.com>
* testsuite/27_io/fpos/14775.cc: Add _GLIBCXX_HAVE_LIMIT_FSIZE check.
diff --git a/libstdc++-v3/testsuite/27_io/fpos/14775.cc b/libstdc++-v3/testsuite/27_io/fpos/14775.cc
index b700868..69c0a6a 100644
--- a/libstdc++-v3/testsuite/27_io/fpos/14775.cc
+++ b/libstdc++-v3/testsuite/27_io/fpos/14775.cc
@@ -27,7 +27,7 @@
// Basic test for LFS support.
void test01()
{
-#ifdef _GLIBCXX_USE_LFS
+#if defined (_GLIBCXX_USE_LFS) && defined (_GLIBCXX_HAVE_LIMIT_FSIZE)
using namespace std;
bool test __attribute__((unused)) = true;