summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-03 05:12:03 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-03 05:12:03 (GMT)
commit89e38a2b7ca7a28a4bd8dc61ac88c2f9d853ecd1 (patch)
treede5299e48108794fba1e65452889ce29c56d9d0a /dir.c
parent8cbd501ed052962e35ffdc2966daa8d696a9a83b (diff)
dir.c: do_lstat alias
* dir.c (do_lstat): make an alias of do_stat instead of two same functions, when no lstat is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index 8a172d7..75c5f5f 100644
--- a/dir.c
+++ b/dir.c
@@ -63,10 +63,6 @@ char *strchr(char*,char);
#include "ruby/util.h"
-#if !defined HAVE_LSTAT && !defined lstat
-#define lstat stat
-#endif
-
/* define system APIs */
#ifdef _WIN32
#undef chdir
@@ -1045,6 +1041,7 @@ do_stat(const char *path, struct stat *pst, int flags)
return ret;
}
+#if defined HAVE_LSTAT || defined lstat
static int
do_lstat(const char *path, struct stat *pst, int flags)
{
@@ -1054,6 +1051,9 @@ do_lstat(const char *path, struct stat *pst, int flags)
return ret;
}
+#else
+#define do_lstat do_stat
+#endif
static DIR *
do_opendir(const char *path, int flags, rb_encoding *enc)