[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 17/21] Workaround for D_INO_IN_DIRENT on OS/2 kLIBC
From: |
KO Myung-Hun |
Subject: |
[PATCH 17/21] Workaround for D_INO_IN_DIRENT on OS/2 kLIBC |
Date: |
Sun, 30 Nov 2014 13:20:19 +0900 |
d_ino is not supported correctly on OS/2 kLIBC 0.6. This will be fixed
in 0.7.
* lib/backupfile.c (REAL_DIR_ENTRY): Define to 1 on OS/2 kLIBC.
* lib/fts.c (D_INO): Define to NOT_AN_INODE_NUMBER on OS/2 kLIBC.
* lib/getcwd.c (MATCHING_INO): Define to true on OS/2 kLIBC.
Patches from coreutils 8.8 by Paul Smedley.
---
lib/backupfile.c | 2 +-
lib/fts.c | 2 +-
lib/getcwd.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/backupfile.c b/lib/backupfile.c
index 2ad030f..0fea336 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -39,7 +39,7 @@
#ifndef _D_EXACT_NAMLEN
# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name)
#endif
-#if D_INO_IN_DIRENT
+#if D_INO_IN_DIRENT && !defined(__KLIBC__) /* this will be fix in 0.7 and will
then be removed! */
# define REAL_DIR_ENTRY(dp) ((dp)->d_ino != 0)
#else
# define REAL_DIR_ENTRY(dp) 1
diff --git a/lib/fts.c b/lib/fts.c
index 9851c53..7f3cdc7 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -127,7 +127,7 @@ enum
NOT_AN_INODE_NUMBER = 0
};
-#ifdef D_INO_IN_DIRENT
+#if D_INO_IN_DIRENT && !defined(__KLIBC__) /* this will be fix in 0.7 and will
then be removed! */
# define D_INO(dp) (dp)->d_ino
#else
/* Some systems don't have inodes, so fake them to avoid lots of ifdefs. */
diff --git a/lib/getcwd.c b/lib/getcwd.c
index 1a013f4..c835927 100644
--- a/lib/getcwd.c
+++ b/lib/getcwd.c
@@ -73,7 +73,7 @@
# define PATH_MAX 8192
#endif
-#if D_INO_IN_DIRENT
+#if D_INO_IN_DIRENT && !defined(__KLIBC__) /* this will be fix in 0.7 and will
then be removed! */
# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino))
#else
# define MATCHING_INO(dp, ino) true
--
1.8.5.2
- [PATCH 13/21] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, (continued)
- [PATCH 13/21] w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 16/21] wcwidth: fix 'conflicting types' error for `__wcwidth' on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 18/21] Workaround for dirfd() on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 15/21] freopen: workaround freopen() on OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 17/21] Workaround for D_INO_IN_DIRENT on OS/2 kLIBC,
KO Myung-Hun <=
- [PATCH 20/21] fdopendir: port to OS/2 kLIBC, KO Myung-Hun, 2014/11/30
- [PATCH 21/21] bootstrap: fix 'find: missing argument to `-exec'', KO Myung-Hun, 2014/11/30
- [PATCH 19/21] utimens: define HAVE_WORKING_UTIMES to 1 on OS/2 kLIBC, KO Myung-Hun, 2014/11/30