win32-xpath 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90f69c4379b494123344aafd8b6233c50517e0b4
4
- data.tar.gz: 4ef3203f711bfd16ef2a8584be510c3b13cf27d0
3
+ metadata.gz: 1b9e865187d194c9db58257a0750bd60968ef2e5
4
+ data.tar.gz: 72fdc11d85bad1b62711fe69349eed0bf0ba4e43
5
5
  SHA512:
6
- metadata.gz: 65817259cfad01b3cd2bd382168a9de2db81a83726181d44822ab2fc415d7e9ef987d895bbb4af1c37aa5863424ead5800492fdb9668e9f33f7d62b6ef1c771f
7
- data.tar.gz: 2efba9b2ed51ca12132e86f8914aa3d03ea8eea7dce3c8f947053eb6a6331976da7d89e82aa0371804a4b06a52483c0aa7e03da0c9efcda6d9d5779d070b17c9
6
+ metadata.gz: 77caf09f55a777500c810c2f533664e45282d396a627e1cf71097c061a2f9af3fd1c84c3c5b56c01fe8fbc32fb19999895a9817cedb44cc2bf5d95b8e4049c24
7
+ data.tar.gz: 7f8268eb83aac290fd6d99a935f43b973d4fedfd39fb7234f2a8059b3205e5254f69c8ad36c698b3417d56fd3bfd47e316c3a3d037062d70f3e4b25c872bccc6
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ = 1.0.2 - 17-Jun-2015
2
+ * Deal with non-standard swprintf issues so that it works with mingw compiler.
3
+
1
4
  = 1.0.1 - 2-Apr-2015
2
5
  * Altered internal handling of native C function failures.
3
6
 
@@ -4,6 +4,10 @@
4
4
  #include <shlwapi.h>
5
5
  #include <sddl.h>
6
6
 
7
+ #ifdef __MINGW32__
8
+ #define swprintf _snwprintf
9
+ #endif
10
+
7
11
  #define MAX_WPATH MAX_PATH * sizeof(wchar_t)
8
12
 
9
13
  // Equivalent to raise SystemCallError.new(string, errnum)
@@ -20,7 +24,7 @@ wchar_t* find_user(wchar_t* str){
20
24
  LPWSTR str_sid;
21
25
  LONG rv;
22
26
  HKEY phkResult;
23
- wchar_t subkey[MAX_PATH];
27
+ wchar_t subkey[MAX_WPATH];
24
28
  wchar_t* lpData;
25
29
  wchar_t* dom;
26
30
  wchar_t* ptr;
@@ -56,7 +60,7 @@ wchar_t* find_user(wchar_t* str){
56
60
  ruby_xfree(sid); // Don't need this any more
57
61
 
58
62
  // Mash the stringified SID onto our base key
59
- if(swprintf(subkey, MAX_PATH, L"%s%s", key_base, str_sid) < 0)
63
+ if(swprintf(subkey, MAX_WPATH, L"%s%s", key_base, str_sid) < 0)
60
64
  rb_raise_syserr("swprintf", GetLastError());
61
65
 
62
66
  // Get the key handle we need
@@ -105,7 +109,7 @@ wchar_t* expand_tilde(){
105
109
  if(!size){
106
110
  DWORD size2;
107
111
  wchar_t* temp;
108
- wchar_t* env2 = L"HOMEPATH";
112
+ const wchar_t* env2 = L"HOMEPATH";
109
113
  env = L"HOMEDRIVE";
110
114
 
111
115
  // If neither are found then raise an error
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-xpath'
5
- spec.version = '1.0.1'
5
+ spec.version = '1.0.2'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-xpath
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.4.5
85
+ rubygems_version: 2.4.7
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Revamped File.expand_path for Windows