mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge -c 12210
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eee2a06bbe
commit
8d1d9260a2
3 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed May 23 04:22:57 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* dir.c (do_stat, do_lstat, do_opendir): should not warn ENOTDIR.
|
||||
[ruby-talk:248288]
|
||||
|
||||
Wed May 23 03:50:35 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (libpathflag): not to append RPATHFLAG to current
|
||||
|
|
12
dir.c
12
dir.c
|
@ -958,13 +958,19 @@ sys_warning_1(mesg)
|
|||
#define GLOB_ALLOC_N(type, n) (type *)malloc(sizeof(type) * (n))
|
||||
#define GLOB_JUMP_TAG(status) ((status == -1) ? rb_memerror() : rb_jump_tag(status))
|
||||
|
||||
/*
|
||||
* ENOTDIR can be returned by stat(2) if a non-leaf element of the path
|
||||
* is not a directory.
|
||||
*/
|
||||
#define to_be_ignored(e) ((e) == ENOENT || (e) == ENOTDIR)
|
||||
|
||||
/* System call with warning */
|
||||
static int
|
||||
do_stat(const char *path, struct stat *pst, int flags)
|
||||
|
||||
{
|
||||
int ret = stat(path, pst);
|
||||
if (ret < 0 && errno != ENOENT)
|
||||
if (ret < 0 && !to_be_ignored(errno))
|
||||
sys_warning(path);
|
||||
|
||||
return ret;
|
||||
|
@ -974,7 +980,7 @@ static int
|
|||
do_lstat(const char *path, struct stat *pst, int flags)
|
||||
{
|
||||
int ret = lstat(path, pst);
|
||||
if (ret < 0 && errno != ENOENT)
|
||||
if (ret < 0 && !to_be_ignored(errno))
|
||||
sys_warning(path);
|
||||
|
||||
return ret;
|
||||
|
@ -984,7 +990,7 @@ static DIR *
|
|||
do_opendir(const char *path, int flags)
|
||||
{
|
||||
DIR *dirp = opendir(path);
|
||||
if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
|
||||
if (dirp == NULL && !to_be_ignored(errno))
|
||||
sys_warning(path);
|
||||
|
||||
return dirp;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define RUBY_RELEASE_DATE "2007-05-23"
|
||||
#define RUBY_VERSION_CODE 186
|
||||
#define RUBY_RELEASE_CODE 20070523
|
||||
#define RUBY_PATCHLEVEL 18
|
||||
#define RUBY_PATCHLEVEL 19
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue