diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | include/ruby/win32.h | 1 | ||||
-rw-r--r-- | win32/win32.c | 6 |
3 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Wed Feb 20 23:55:19 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * win32/win32.c (rb_w32_map_errno): exported. + Wed Feb 20 23:28:43 2008 NAKAMURA Usaku <usa@ruby-lang.org> * ext/readline/extconf.rb (rl_event_hook): workaround for native diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 3b7b113133..43036b8dc8 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -240,6 +240,7 @@ extern char * rb_w32_getenv(const char *); extern int rb_w32_rename(const char *, const char *); extern char **rb_w32_get_environ(void); extern void rb_w32_free_environ(char **); +extern int rb_w32_map_errno(DWORD); #define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l) #define snprintf rb_w32_snprintf diff --git a/win32/win32.c b/win32/win32.c index d9178da13b..48be4df66e 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -166,8 +166,8 @@ static struct { { WSAEMFILE, EMFILE }, }; -static int -map_errno(DWORD winerr) +int +rb_w32_map_errno(DWORD winerr) { int i; @@ -187,6 +187,8 @@ map_errno(DWORD winerr) return EINVAL; } +#define map_errno rb_w32_map_errno + static char *NTLoginName; #ifdef WIN95 |