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

ruby-changes:42790

From: usa <ko1@a...>
Date: Sun, 1 May 2016 20:03:59 +0900 (JST)
Subject: [ruby-changes:42790] usa:r54864 (trunk): * win32/win32.c: drop Win2K support.

usa	2016-05-01 21:00:35 +0900 (Sun, 01 May 2016)

  New Revision: 54864

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54864

  Log:
    * win32/win32.c: drop Win2K support.

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54863)
+++ ChangeLog	(revision 54864)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun May  1 21:00:07 2016  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c: drop Win2K support.
+
 Sun May  1 20:39:47 2016  NAKAMURA Usaku  <usa@r...>
 
 	* cont.c, hash.c, random.c, win32/win32.c: cleanup some Win9x/ME/NT4
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 54863)
+++ win32/win32.c	(revision 54864)
@@ -59,10 +59,6 @@ https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L59
 # define CharNextExA(cp, p, flags) CharNextExA((WORD)(cp), (p), (flags))
 #endif
 
-#if _WIN32_WINNT < 0x0600
-DWORD WINAPI GetFinalPathNameByHandleW(HANDLE, LPWSTR, DWORD, DWORD);
-#endif
-
 static int w32_wopen(const WCHAR *file, int oflag, int perm);
 static int w32_stati64(const char *path, struct stati64 *st, UINT cp);
 static int w32_lstati64(const char *path, struct stati64 *st, UINT cp);
@@ -474,18 +470,6 @@ get_proc_address(const char *module, con https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L470
 }
 
 /* License: Ruby's */
-static UINT
-get_system_directory(WCHAR *path, UINT len)
-{
-    typedef UINT WINAPI wgetdir_func(WCHAR*, UINT);
-    FARPROC ptr =
-	get_proc_address("kernel32", "GetSystemWindowsDirectoryW", NULL);
-    if (ptr)
-	return (*(wgetdir_func *)ptr)(path, len);
-    return GetWindowsDirectoryW(path, len);
-}
-
-/* License: Ruby's */
 VALUE
 rb_w32_special_folder(int type)
 {
@@ -504,7 +488,7 @@ rb_w32_system_tmpdir(WCHAR *path, UINT l https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L488
     WCHAR *p;
 
     if (!get_special_folder(CSIDL_LOCAL_APPDATA, path)) {
-	if (get_system_directory(path, len)) return 0;
+	if (GetSystemWindowsDirectoryW(path, len)) return 0;
     }
     p = translate_wchar(path, L'\\', L'/');
     if (*(p - 1) != L'/') *p++ = L'/';
@@ -2361,8 +2345,7 @@ set_pioinfo_extra(void) https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L2345
 {
 #if RUBY_MSVCRT_VERSION >= 140
     /* get __pioinfo addr with _isatty */
-    HMODULE mod = GetModuleHandle("ucrtbase.dll");
-    char *p = (char*)GetProcAddress(mod, "_isatty");
+    char *p = (char*)get_proc_address("ucrtbase.dll", "_isatty", NULL);
     char *pend = p + 100;
     /* _osfile(fh) & FDEV */
 #if _WIN64

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

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