bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] readdir_r: now obsolescent


From: Paul Eggert
Subject: [PATCH] readdir_r: now obsolescent
Date: Mon, 8 Feb 2016 18:46:36 -0800

* doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
* lib/mountlist.c (read_file_system_list): Add a FIXME.
---
 ChangeLog                          | 6 ++++++
 doc/posix-functions/readdir_r.texi | 3 +++
 lib/mountlist.c                    | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 5e47384..40bdd23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-02-08  Paul Eggert  <address@hidden>
+
+       readdir_r: now obsolescent
+       * doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
+       * lib/mountlist.c (read_file_system_list): Add a FIXME.
+
 2016-02-06  Paul Eggert  <address@hidden>
 
        misc: port better to gcc -fsanitize=address
diff --git a/doc/posix-functions/readdir_r.texi 
b/doc/posix-functions/readdir_r.texi
index 0eac1c3..d3512c3 100644
--- a/doc/posix-functions/readdir_r.texi
+++ b/doc/posix-functions/readdir_r.texi
@@ -9,6 +9,9 @@ Gnulib module: extensions
 Portability problems fixed by Gnulib:
 @itemize
 @item
+This function is planned to be removed from POSIX and to be deprecated
+in glibc.  Portable applications should use @code{readdir}.
address@hidden
 This function has an incompatible declaration on some platforms:
 Solaris 11 2011-11 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined).
 @end itemize
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 1e592d2..829b31d 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -1068,6 +1068,8 @@ read_file_system_list (bool need_fs_type)
         struct dirent entry;
         struct dirent *result;
 
+        /* FIXME: readdir_r is planned to be withdrawn from POSIX and
+           marked obsolescent in glibc.  Use readdir instead.  */
         if (readdir_r (dirp, &entry, &result) || result == NULL)
           break;
 
-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]