[前][次][番号順一覧][スレッド一覧]

ruby-changes:29655

From: nobu <ko1@a...>
Date: Sun, 30 Jun 2013 10:59:38 +0900 (JST)
Subject: [ruby-changes:29655] nobu:r41707 (trunk): win32.c: rb_w32_udln_find_exe_r,

nobu	2013-06-30 10:59:12 +0900 (Sun, 30 Jun 2013)

  New Revision: 41707

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41707

  Log:
    win32.c: rb_w32_udln_find_exe_r,
    
     rb_w32_udln_find_file_r
    * win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
      codepage independent versions.

  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/win32/win32.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41706)
+++ ChangeLog	(revision 41707)
@@ -1,4 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Sun Jun 30 10:59:04 2013  Nobuyoshi Nakada  <nobu@r...>
+Sun Jun 30 10:59:09 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	 rb_w32_udln_find_file_r
+
+	* win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
+	  codepage independent versions.
 
 	* win32/win32.c (w32_spawn): extract codepage aware code from
 	  rb_w32_spawn().
Index: common.mk
===================================================================
--- common.mk	(revision 41706)
+++ common.mk	(revision 41707)
@@ -831,7 +831,8 @@ unicode.$(OBJEXT): {$(VPATH)}unicode.c { https://github.com/ruby/ruby/blob/trunk/common.mk#L831
 utf_8.$(OBJEXT): {$(VPATH)}utf_8.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
   {$(VPATH)}oniguruma.h {$(VPATH)}missing.h $(RUBY_H_INCLUDES)
 
-win32/win32.$(OBJEXT): {$(VPATH)}win32/win32.c $(RUBY_H_INCLUDES) $(PLATFORM_D)
+win32/win32.$(OBJEXT): {$(VPATH)}win32/win32.c {$(VPATH)}dln.h {$(VPATH)}dln_find.c \
+  $(RUBY_H_INCLUDES) $(PLATFORM_D)
 win32/file.$(OBJEXT): {$(VPATH)}win32/file.c $(RUBY_H_INCLUDES) $(PLATFORM_D)
 
 $(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 41706)
+++ win32/win32.c	(revision 41707)
@@ -21,7 +21,6 @@ https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L21
 
 #include "ruby/ruby.h"
 #include "ruby/encoding.h"
-#include "dln.h"
 #include <fcntl.h>
 #include <process.h>
 #include <sys/stat.h>
@@ -52,6 +51,22 @@ https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L51
 static int w32_stati64(const char *path, struct stati64 *st, UINT cp);
 static char *w32_getenv(const char *name, UINT cp);
 
+#undef getenv
+#define DLN_FIND_EXTRA_ARG_DECL ,UINT cp
+#define DLN_FIND_EXTRA_ARG ,cp
+#define rb_w32_stati64(path, st) w32_stati64(path, st, cp)
+#define getenv(name) w32_getenv(name, cp)
+#define dln_find_exe_r rb_w32_udln_find_exe_r
+#define dln_find_file_r rb_w32_udln_find_file_r
+#include "dln.h"
+#include "dln_find.c"
+#undef MAXPATHLEN
+#undef rb_w32_stati64
+#undef dln_find_exe_r
+#undef dln_find_file_r
+#define dln_find_exe_r(fname, path, buf, size) rb_w32_udln_find_exe_r(fname, path, buf, size, cp)
+#define dln_find_file_r(fname, path, buf, size) rb_w32_udln_find_file_r(fname, path, buf, size, cp)
+
 #undef stat
 #undef fclose
 #undef close

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]