1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

43 commits

Author SHA1 Message Date
Nobuyoshi Nakada
715955ff27
Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
Nobuyoshi Nakada
dcb8c41a1e
Added depend files 2019-07-14 01:31:29 +09:00
Nobuyoshi Nakada
2bc09665ab
win32/registry.rb: fix potential infinite loop
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value):
  advance the index even if an error occurred in #read.
2019-06-07 02:00:48 +09:00
nobu
3be4550558 Win32API.rb: use uplevel option to warn
Also warns always regardless $VERBOSE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-02 12:39:01 +00:00
nobu
1c98a41ae3 win32/resolv.rb: call rb_w32_osid
* ext/win32/lib/win32/resolv.rb: call rb_w32_osid instead of
  direct GetVersionExA API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-18 01:10:22 +00:00
hsbt
6693e3e723 Fixed misspelling words.
These are detected by https://github.com/client9/misspell

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-22 11:27:06 +00:00
usa
f03f4c4216 Treat REG_NONE just like REG_BINARY
* ext/win32/lib/win32/registry.rb (read, write): treat REG_NONE just like
  REG_BINARY when reading and writing.
  cf. [Bug ]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21 12:12:52 +00:00
nobu
aded420d32 resolv9x.rb: fix typo
* ext/win32/lib/win32/resolv9x.rb (WsControl): fix missing close
  parenthesis at r22724.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-14 12:34:11 +00:00
nobu
70db4f6ecd win32/registry.rb: registry type names
* ext/win32/lib/win32/registry.rb (Win32::Registry#read): show
  registry type names instead of numeric values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04 11:06:16 +00:00
nobu
3047144ac2 win32/resolv.rb: ad hoc workaround
* ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc
  workaround for broken registry.  SearchList and other registry
  values must be REG_SZ, or Windows ignores anything in those
  values otherwise.  [ruby-dev:49924] [Bug ]
  https://github.com/rubygems/rubygems/issues/1700

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04 08:21:14 +00:00
nobu
5bb84ec7d8 extmk.rb: removed compiled? method [ci skip]
* ext/extmk.rb (compiled?): removed.

* ext/win32/extconf.rb: try to install libraries regardless
  fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 04:34:26 +00:00
nobu
27863a0ccd win32/resolv: fix for cygwin
* ext/win32/resolv/resolv.c: needs windows.h for iphlpapi.h on
  cygwin.  [ruby-core:76791] [Bug ]

* ext/win32/resolv/resolv.c (w32error_make_error): use
  Win32::Resolv::Error, an alias of Win32::Registry::Error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 11:11:36 +00:00
nobu
833ad92d18 win32/resolv: fix for cygwin
* ext/win32/resolv/resolv.c: needs windows.h for iphlpapi.h on
  cygwin.  [ruby-core:76791] [Bug ]
* ext/win32/resolv/resolv.c (w32error_make_error): use
  Win32::Resolv::Error, an alias of Win32::Registry::Error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 06:35:05 +00:00
nobu
647d2bc301 resolv.c: fix commit miss
* ext/win32/resolv/resolv.c (Init_resolv): remove dead code.
  [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-31 07:24:45 +00:00
nobu
925d48e496 win32/resolv: get_dns_server_list
* ext/win32/resolv/resolv.c (get_dns_server_list): [Win32] get DNS
  servers only for connected network devices by GetNetworkParams
  API.  [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-31 07:17:25 +00:00
nobu
06c5796870 Convert arguments first
* ext/win32/lib/Win32API.rb (Win32API#initialize): convert
  arguments before dlopen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-26 10:35:53 +00:00
nobu
1f2359000c Explicit ".dll" suffix
* ext/win32/lib/Win32API.rb (Win32API#initialize): Cygwin
  2.5.2-1 (perhaps) seems to no longer append ".dll" suffix
  implicitly.
* ext/win32/lib/win32/resolv.rb (Win32::Resolv): ditto.  Fix the
  error reported by yamataka AT u08.itscom.net in
  [ruby-list:50339], and pointed out and patched by cerberus AT
  m3.kcn.ne.jp in [ruby-list:50341].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-26 01:20:27 +00:00
nobu
21992b6cbd registry.rb: fix API names
* ext/win32/lib/win32/registry.rb (DeleteValue, DeleteKey): fix
  API names.  [ruby-core:74863] [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-10 11:54:17 +00:00
nobu
73e29d2cf1 win32/resolv.rb: invert the condition
* ext/win32/lib/win32/resolv.rb: invert the condition to return
  immediately in the future.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 04:23:15 +00:00
nobu
486f3f4270 win32/resolv.rb: check pointer size
* ext/win32/lib/win32/resolv.rb: check pointer size first, NT if
  it is larger than 4 as Windows 9X are 32-bit mode only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:42:09 +00:00
nobu
0f5a841881 avoid ruby-mode.el bug
* ext/win32/lib/win32/{resolv,resolv9x}.rb: get rid of
  ruby-mode.el of Emacs 24.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:29:00 +00:00
nobu
2ece5109d6 split win32/resolv9x.rb
* ext/win32/lib/win32/resolv9x.rb: split code for Windows 9x from
  resolv.rb.  now it is rarely used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:28:59 +00:00
naruse
c4fdfabcc8 handle ext/ as r53141
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts
fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&#
frozen_string_literal: false\n");f.rewind;f.write s}}'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:31:54 +00:00
nobu
c5196e249e win32/registry.rb: size in bytes
* ext/win32/lib/win32/registry.rb (API#SetValue): data size should
  be in bytes, not in chars.  [ruby-core:70365] [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-15 01:51:10 +00:00
nobu
51336edaae win32/registry.rb: terminator size
* ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
  size, not 1 byte.  [ruby-core:70365] [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-14 09:42:13 +00:00
nobu
cac0f9bedc win32/registry.rb: make @@type2name an array
* ext/win32/lib/win32/registry.rb (@@type2name): make an array
  instead of a hash, keys are sequential numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-14 09:40:31 +00:00
usa
dad59fcd12 * ext/win32/Win32API.rb (initialize): accept both a string and an array
for the arguments of the imported function.
  reported by Aaron Stone [ruby-core:68208] [Bug ] [Fixes GH-835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-25 13:08:01 +00:00
nobu
a6516ff5f7 registry.rb: wide versions
* ext/win32/lib/win32/registry.rb (Win32::Registry::API): use wide
  versions of RegDeleteValue and RegDeleteKey.
  [ruby-core:67958] [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 03:48:41 +00:00
nobu
802d4f9fb2 registry.rb: fix buffer overflow
* ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize):
  should not re-use sliced string as buffer, to get rid of buffer
  overflow.  [ruby-core:65295] [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 08:58:53 +00:00
nobu
ba3da9af7d registry.rb: try en_US message
* ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize):
  try en_US message if the default message cannot be encoded to
  locale.  [ruby-core:65295] [Bug ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 07:03:37 +00:00
usa
03021a6de6 * ext/win32/lib/Win32API.rb (Win32API#call): need to splat. hmm, when
was this broken?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-16 16:08:16 +00:00
nobu
0066d95fd6 win32/registry.rb: slice in WCHARs
* ext/win32/lib/win32/registry.rb (Win32::Registry::API#Enum{Value,Key):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 03:09:40 +00:00
usa
2e5610353f * ext/win32/lib/Win32API.rb: Fiddle::Importer is defined in
fiddle/import.rb and it's not loaded implicitly.

* ext/win32/lib/Win32API.rb (Win32API#initialize): `import` is a string.

* ext/win32/lib/Win32API.rb (Win32API#initialize):
  Fiddle::Importer::CALL_TYPE_TO_ABI is private constant.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 12:26:19 +00:00
nobu
dd3aec25d6 Win32API.rb: update message [ci skip]
* ext/win32/lib/Win32API.rb: update warning message for fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 05:25:41 +00:00
tenderlove
07308c4d30 * ext/dl/*: remove DL as it is replaced by Fiddle.
[Feature ] Thanks to Jonan Scheffler <jonanscheffler@gmail.com>
  for this patch

* test/dl/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 21:13:09 +00:00
nobu
360c66732c win32/registry.rb: size in bytes
* ext/win32/lib/win32/registry.rb (Win32::Registry#write): data size
  is in bytes, not chars.  terminators should be placed automatically.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 07:41:17 +00:00
nobu
79e880c90d win32/registry.rb: encode name
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): encode
  name.
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_key): ditto.
* ext/win32/lib/win32/registry.rb (Win32::Registry#export_string):
  encode to locale encoding if default internal is not set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 07:39:41 +00:00
nobu
14695c4c1a win32/registry.rb: fix runtime errors
* ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey):
  size of the name is in WCHARs, not in bytes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 07:35:12 +00:00
nobu
aaccbfeda1 win32/registry.rb: fix runtime errors
* ext/win32/lib/win32/registry.rb (Win32::Registry::API): need
  Constants.
* ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumValue):
  size of the name is in WCHARs, not in bytes

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 03:51:14 +00:00
usa
1b126277ed * ext/win32/lib/win32/registry.rb (Win32::Registry#values): added.
[Feature ] [ruby-core:51783]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 10:46:58 +00:00
nobu
792b6fd8a2 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 01:12:41 +00:00
nobu
265de6677c fix commit miss
* ext/win32/lib/win32/importer.rb: miss to add at r41936.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 07:56:38 +00:00
nobu
771d31ace2 ext/win32: move
* ext/win32: move from ext/dl and ext/fiddle.  since ext/extmk.rb
  builds extensions in alphabetical order, compiled?('fiddle') under
  ext/dl makes no sense.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 03:24:28 +00:00