aboutsummaryrefslogtreecommitdiffstats
path: root/win32
Commit message (Collapse)AuthorAgeFilesLines
* win32/Makefile.sub: fix typok0kubun2018-01-271-1/+1
| | | | | | | Other places are using RT_VER. So I guess this is correct. Currently AppVeyor CI is failing and I want to fix that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* need to declare the prototype of nan() if missingusa2018-01-261-0/+3
| | | | | | | | * include/ruby/missing.h (nan): need to declare the prototype of nan() if missing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.sub: missing/nan.objnobu2018-01-201-1/+1
| | | | | | * win32/Makefile.sub (MISSING): nan() is available since msvcrr120. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo.hsbt2018-01-151-1/+1
| | | | | | * win32/win32.c: wrok -> work git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* __alignof__ to take alignment of a typeshyouhei2018-01-151-0/+1
| | | | | | C11 and C++11 has this feature so why not use it when available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* __attibute__((__aligned__)) for RSTRING_PTR()shyouhei2018-01-151-0/+1
| | | | | | | | | | | | | | | | For instance array.c:rb_ary_product() uses RSTRING_PTR() as an array of int. So to avoid misaligned memory access RSTRING_PTR() must at least be sizeof(int)-aligned. However the type of RSTRING_PTR() is char*, which of course can expect alignment as much as 1. This is a problem. The reality is, there is no misaligned memory access because the memory region behind RSTRING_PTR() is allocated using malloc(). Memory regions returned from malloc() are always aligned appropriately. So let's tell the compiler about this information. It seems GCC, clang, and MSVC have such feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delete tool/instruction.rb (2nd try)shyouhei2018-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Previous commit changed insns.def format. Now is the time for its generators. In doing so I chose to modernize the system, not just patch. My attempt includes - extensive use of Onigumo regular expressions - split from one big file (instruction.rb) into separated MVC - partial view Also, let me take this opportunity to kill old unused features such as - stack caching - minsns / yasmdata which are never seriously used - yarvarch document generation (moved to doc/) - vast majority of unused arguments to insns2vm.rb This commit generates VM source codes that cleanly compile, and the generated binary passes tests. At least for me. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge revisions 61753:61750 61747:61740 61737:61728shyouhei2018-01-101-1/+1
| | | | | | | Revert all the VM generator rewrites; requested by naruse git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delete tool/instruction.rbshyouhei2018-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Previous commit changed insns.def format. Now is the time for its generators. In doing so I chose to modernize the system, not just patch. My attempt includes - extensive use of Onigumo regular expressions - split from one big file (instruction.rb) into separated MVC - partial view Also, let me take this opportunity to kill old unused features such as - stack caching - minsns / yasmdata which are never seriously used - yarvarch document generation (moved to doc/) - vast majority of unused arguments to insns2vm.rb This commit generates VM source codes that cleanly compile, and the generated binary passes tests. At least for me. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: remove dependecy on ruby/io.hnobu2018-01-091-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* set ino at `File.lstat` on Windowsusa2017-12-121-103/+24
| | | | | | | | | | | | | * win32/win32.c (winnt_stat): support symbolic link and others. * win32/win32.c (w32_stati128, wstati128, name_for_stat, rb_w32_{,ul}stati128, wutimensat): follow above change. [Feature #14169] From: Takehiro Kubo kubo@jiubao.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove unused variableusa2017-12-121-1/+0
| | | | | | | thanks kubo-san. c.f. [ruby-dev:50345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed typousa2017-12-111-2/+2
| | | | | | | * win32/win32.c (get_ino): forgotten to specify the member. thanks kubo-san. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support 128bit ino on Windows (if available)usa2017-12-101-99/+92
| | | | | | | | | | | | | | | * win32/win32.c, include/ruby/win32.h (stati128, rb_{,u,l,ul}stati128): rename from stati64ns, change the type of st_ino to 64bit and added st_inohigh. * dir.c, file.c (stat, lstat): follow above changes. * file.c (rb_stat_ino): support 128bit ino. * win32/win32.c (rb_{,u,l,ul}stati128): ditto. [Feature #13731] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: check error codenobu2017-12-081-1/+6
| | | | | | | * win32/win32.c (w32_io_info): check GetFileInformationByHandleEx error code to fallback to GetFileInformationByHandle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c: removed a stale commentnobu2017-12-071-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fallback to old APInobu2017-12-071-23/+27
| | | | | | | | * win32/win32.c (w32_io_info, rb_w32_file_identical_p): fallback to GetFileInformationByHandle if GetFileInformationByHandleEx failed. it seems not working on network drives. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix error on mingwnobu2017-12-041-1/+1
| | | | | | * win32/win32.c (FILE_ID_128): defined on mingw already. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support nanosec file timestamp on newer Windowsusa2017-12-041-82/+170
| | | | | | | | | | | | | Support nanosec file timestamp on Windows 8 or later. Original patches are written by kubo (Kubo Takehiro). Windows 7 and earlier also supports nanosec file timestamp, but it's too accurate than system time. so, this feature is disabled on such versions. [Feature #13726] this change also includes [Misc #13702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* try to pass compiling with VC12usa2017-12-041-3/+5
| | | | | | | | * win32/win32.c (FILE_ID_128): it's not defined in SDK with VC10, but seems to be defined in SDK with VC12. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support `File.identical?` on ReFSusa2017-12-042-0/+129
| | | | | | | | | | * file.c (rb_file_idenitical_p): move Windows dependent code to win32/win32.c. * win32/win32.c (rb_w32_file_identical_p): support ReFS. see [Feature #13731] [ruby-dev:50166] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* setup.mak: make Makefile stablenobu2017-12-031-15/+14
| | | | | | | * win32/setup.mak (-basic-vars-): moved BASERUBY and HAVE_BASERUBY definition to make Makefile stable when they have been defaulted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: vm_exit_handlernobu2017-11-201-13/+32
| | | | | | | | | | | | | * win32/win32.c (vm_exit_handler): separate exit handler for resources which must be released at exit of Ruby VM. * win32/win32.c (socklist_insert, constat_handle): install the VM exit handler. * gc.c (ENABLE_VM_OBJSPACE): no longer needs process global object space on Windows too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Localize EC functionsnobu2017-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: test-bundled-gem [ci skip]nobu2017-10-261-0/+7
| | | | | | | * common.mk (test-bundled-gems): moved from Makefile.in so it might work on nmake too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: unknown reparse tagsnobu2017-10-251-1/+4
| | | | | | | * win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse tags. [ruby-core:83539] [Bug #14047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sysconfdir on Windowsnobu2017-10-241-3/+3
| | | | | | | | | | | | | * ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * ext/etc/extconf.rb: define SYSCONFDIR only if sysconfdir is set in RbConfig::CONFIG and not empty. * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "sysconfdir on Windows"naruse2017-10-241-0/+1
| | | | | | | | This reverts commit r60279. This breaks mswin build: https://ci.appveyor.com/project/ruby/ruby/build/1.0.5571 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sysconfdir on Windowsnobu2017-10-211-1/+0
| | | | | | | | | | * ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use GetSystemTimePreciseAsFileTime on recent Windowsusa2017-10-211-2/+17
| | | | | | | | | | | * win32/win32.c (gettiemeofday, wutime): use GetSystemTimePreciseAsFileTime instead of GetSystemTimeAsFileTime if it is available. This patch is based on Takehiro Kubo <kubo@jiubao.org> 's one (change only the name of wrapper function). Thanks! and sorry to late [ruby-dev:50167] [Feature #13732] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac: LIBRUBY_SONAMEnobu2017-10-141-0/+2
| | | | | | | | * configure.ac (LIBRUBY_SONAME): add new variable for the name of the library name with compatibility version. [ruby-core:83208] [Bug #14002] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* LIBPATHENV on Windowsnobu2017-09-131-0/+2
| | | | | | | * configure.in, win32/Makefile.sub: set LIBPATHENV to PATH on Windows, for extra DLLs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: moved flagsnobu2017-09-081-1/+1
| | | | | | | | | | * configure.in (-DRUBY_DEVEL): moved from debugflags to XCFLAGS. this flags should be applied to the ruby core only. * configure.in (-fno-fast-math): moved from optflags to CFLAGS. this flag is not for optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix function pointernobu2017-08-281-1/+1
| | | | | | | | * win32/win32.c (rb_w32_set_thread_description): fix the condition if the API function pointer is found. [ruby-core:82494] [Bug #13845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fix return valuenobu2017-08-261-2/+1
| | | | | | | * win32/win32.c (rb_w32_set_thread_description_str): return the result when name is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_win32.c: set thread namenobu2017-08-261-0/+42
| | | | | | | | | | * thread_win32.c (native_set_another_thread_name): set thread name by SetThreadDescription. * win32/win32.c (rb_w32_set_thread_description): dynamically try SetThreadDescription. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo in help [ci skip]nobu2017-08-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Should show the entity of $PATH_SEPARATORusa2017-08-031-1/+1
| | | | | | | * win32/configure.bat (--help): should show the entity of $PATH_SEPARATOR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mention about `--with-opt-dir`usa2017-08-031-0/+1
| | | | | | | * win32/configure.bat (--help): mention about `--with-opt-dir`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: restrict cursor movenobu2017-07-031-10/+16
| | | | | | | * win32/win32.c (constat_apply): restrict cursor move in visible screen only. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: clear relative to screennobu2017-07-031-12/+36
| | | | | | | * win32/win32.c (constat_apply): clear visible screen only, not the entire buffer. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: cursor relative to screennobu2017-07-031-2/+4
| | | | | | | * win32/win32.c (constat_apply): move relative to visible screen, not the entire buffer. [ruby-core:81883] [Bug #13707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* RUBY_DEVEL flagnobu2017-06-212-0/+6
| | | | | | | | | | | * configure.in: define RUBY_DEVEL only in the trunk. * gc.c: enable runtime rgengc debug if RUBY_DEVEL * ruby.c (debug_option): enable RUBY_DEBUG in --debug option only if RUBY_DEVEL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: rb_dir_getwd_ospathnobu2017-06-121-4/+29
| | | | | | | * win32/win32.c (rb_dir_getwd_ospath): Windows implementation moved from dir.c. get rid of freeing malloced memory by xfree. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: no localenobu2017-06-051-2/+2
| | | | | | | * win32/win32.c (skipspace, w32_cmdvector): get rid of iswspace(), which is locale dependent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.sub: set ENABLE_SHARED [ci skip]nobu2017-05-311-0/+1
| | | | | | | * win32/Makefile.sub (LIBRUBY_LDSHARED): mswin build always enables shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rb_w32_ugetcwd: UTF-8 version getcwdnobu2017-05-162-17/+36
| | | | | | | | | * dir.c (rb_dir_getwd): convert from UTF-8. * win32/win32.c (w32_getcwd): codepage aware getcwd using GetCurrentDirectoryW. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* define RUBY_DEBUG_ENV only for main.cnobu2017-05-151-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* It seems that MSVCRT accepts negative time_tusa2017-05-121-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stale targetsnobu2017-05-071-26/+0
| | | | | | * common.mk (update-mspec, update-rubyspec): empty stale targets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e