* io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.
fixed: [ruby-dev:25273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bf48e22869
commit
f68ab9c2d9
@ -1,3 +1,8 @@
|
|||||||
|
Wed Dec 22 11:14:55 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (rb_io_mode_modenum): replace O_ACCMODE with O_RDWR.
|
||||||
|
fixed: [ruby-dev:25273]
|
||||||
|
|
||||||
Wed Dec 22 08:34:32 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Dec 22 08:34:32 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after
|
* ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after
|
||||||
|
6
io.c
6
io.c
@ -84,6 +84,10 @@ extern void Init_File _((void));
|
|||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
#ifndef O_ACCMODE
|
||||||
|
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
|
#if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
|
||||||
# error off_t is bigger than long, but you have no long long...
|
# error off_t is bigger than long, but you have no long long...
|
||||||
#endif
|
#endif
|
||||||
@ -2469,7 +2473,7 @@ rb_io_mode_modenum(mode)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
flags |= O_RDWR;
|
flags = (flags & ~O_ACCMODE) | O_RDWR;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user