about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-08 03:00:06 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-08 03:00:06 +0000
commitc329332e73e86c669f5be363aef2fb18006b0c48 (patch)
treebb4d31868f3cd07ba590cda19b61af213a2705cc
parent5f7d74ab7164aec66e2aa1d6884d62d403eddaa7 (diff)
downloadglibc-c329332e73e86c669f5be363aef2fb18006b0c48.tar.gz
glibc-c329332e73e86c669f5be363aef2fb18006b0c48.tar.xz
glibc-c329332e73e86c669f5be363aef2fb18006b0c48.zip
Update.
	* iconvdata/tst-tables.sh: Add BIG5HKSCS.
-rw-r--r--ChangeLog2
-rwxr-xr-xiconvdata/tst-tables.sh2
-rw-r--r--manual/filesys.texi43
3 files changed, 46 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b4e2f0261..c24b95e2f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2000-09-07  Ulrich Drepper  <drepper@redhat.com>
 
+	* iconvdata/tst-tables.sh: Add BIG5HKSCS.
+
 	* iconvdata/tst-table-to.c (main): Correct cast in iconv call.
 	* iconvdata/tst-table-from.c: Include <string.h>.
 	(try): Correct cast in iconv call.
diff --git a/iconvdata/tst-tables.sh b/iconvdata/tst-tables.sh
index 8d2735a12e..202b52f09f 100755
--- a/iconvdata/tst-tables.sh
+++ b/iconvdata/tst-tables.sh
@@ -188,7 +188,7 @@ cat <<EOF |
   CP949
   #JOHAB                                No charmap exists
   BIG5
-  #BIG5HKSCS                            Broken, please fix it
+  BIG5HKSCS
   EUC-JP
   EUC-CN            GB2312
   #GBK                                  Converter uses private area characters
diff --git a/manual/filesys.texi b/manual/filesys.texi
index 3f62aa14a3..942eb7fb12 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -365,6 +365,49 @@ name is the maximum allowed size.  Modern systems all have the
 critical.  In any case there is no such problem with the @code{readdir}
 function, so that even on systems without the @code{d_reclen} member one
 could use multiple threads by using external locking.
+
+It is also important to look at the definition of the @code{struct
+dirent} type.  Simply passing a pointer to an object of this type for
+the second parameter of @code{readdir_r} might not be enough.  Some
+systems don't define the @code{d_name} element sufficiently long.  In
+this case the user has to provide additional space.  There must be room
+for at least @code{NAME_MAX + 1} characters in the @code{d_name} array.
+Code to call @code{readdir_r} could look like this:
+
+@smallexample
+  union
+  @{
+    struct dirent d;
+    char b[offsetof (struct dirent, d_name) + NAME_MAX + 1];
+  @} u;
+
+  if (readdir_r (dir, &u.d, &res) == 0)
+    ...
+@end smallexample
+@end deftypefun
+
+To support large filesystems on 32-bit machines there are LFS variants
+of the last two functions.
+
+@comment dirent.h
+@comment LFS
+@deftypefun {struct dirent64 *} readdir64 (DIR *@var{dirstream})
+The @code{readdir64} function is just like the @code{readdir} function
+except that it returns a pointer to a record of type @code{struct
+dirent64}.  Some of the members of this data type (notably @code{d_ino})
+might have a different size to allow large filesystems.
+
+In all other aspects this function is equivalent to @code{readdir}.
+@end deftypefun
+
+@comment dirent.h
+@comment LFS
+@deftypefun int readdir64_r (DIR *@var{dirstream}, struct dirent64 *@var{entry}, struct dirent64 **@var{result})
+The @code{readdir64_r} function is equivalent to the @code{readdir_r}
+function except that it takes parameters of base type @code{struct
+dirent64} instead of @code{struct dirent} in the second and third
+position.  The same precautions mentioned in the documentation of
+@code{readdir_r} also apply here.
 @end deftypefun
 
 @comment dirent.h