aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-02-20 12:56:55 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-02-20 12:56:55 +0100
commit7584a3f96de88d5eefe5d6c634515278cbfbf052 (patch)
tree7904460c019d1a398a7fa84d5a53e231bc2dc11e /posix
parent8d9c92017d85f23ba6a2b3614b2f2bcf1820d6f0 (diff)
downloadglibc-7584a3f96de88d5eefe5d6c634515278cbfbf052.zip
glibc-7584a3f96de88d5eefe5d6c634515278cbfbf052.tar.gz
glibc-7584a3f96de88d5eefe5d6c634515278cbfbf052.tar.bz2
Deprecate readdir_r, readdir64_r [BZ #19056]
Diffstat (limited to 'posix')
-rw-r--r--posix/tst-dir.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/posix/tst-dir.c b/posix/tst-dir.c
index 8897f8e..d0e4878 100644
--- a/posix/tst-dir.c
+++ b/posix/tst-dir.c
@@ -319,6 +319,10 @@ main (int argc, char *argv[])
exit (1);
}
+ /* The test below covers the deprecated readdir64_r function. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
/* Try to find the new directory. */
rewinddir (dir1);
while (readdir64_r (dir1, &direntbuf.d, &d) == 0 && d != NULL)
@@ -351,6 +355,8 @@ main (int argc, char *argv[])
}
}
+ DIAG_POP_NEEDS_COMMENT;
+
if (d == NULL)
{
printf ("haven't found new directory \"%s\"\n", buf);
@@ -439,6 +445,10 @@ main (int argc, char *argv[])
result = 1;
}
+ /* The test below covers the deprecated readdir64_r function. */
+ DIAG_PUSH_NEEDS_COMMENT;
+ DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
/* We now should have a directory and a file in the new directory. */
rewinddir (dir2);
while (readdir64_r (dir2, &direntbuf.d, &d) == 0 && d != NULL)
@@ -492,6 +502,8 @@ main (int argc, char *argv[])
}
}
+ DIAG_POP_NEEDS_COMMENT;
+
if (stat64 ("does-not-exist", &st1) >= 0)
{
puts ("stat for unexisting file did not fail");