win32-api 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +3 -0
- data/Dockerfile.trunk +5 -5
- data/RELEASE.md +9 -0
- data/Rakefile +7 -7
- data/ext/win32/api.c +35 -29
- data/pkg/win32-api-1.9.1-universal-mingw32.gem +0 -0
- data/pkg/win32-api-1.9.2-universal-mingw32.gem +0 -0
- data/test/test_win32_api.rb +1 -1
- data/win32-api-1.9.1.gem +0 -0
- data/win32-api.gemspec +1 -1
- metadata +5 -8
- data/ext/Makefile +0 -267
- data/ext/api-x64-mingw32.def +0 -2
- data/ext/api.o +0 -0
- data/ext/api.so +0 -0
- data/ext/mkmf.log +0 -38
- data/ext/win32/api.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 032a6ef3e186d1e7f75d66aa491b1d6555911b7e6d06c3cef5574aa8cf1c9716
|
4
|
+
data.tar.gz: 06663e721eb60abfe6e5298eff49bfff2dcb47c50c24936053188672d8406ef0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc5b2840703fd15b8bab1745fe9a06d8364654163ef9887b90409074b2c9ebb9e63be59e9f2ba27ad3334d749393a88cb1c143f6f02da2413a82aaea9ed93b4
|
7
|
+
data.tar.gz: 8cfc35b23d169cdd12beba170cad6ca1a5c43c6f54adc57764c8d2046b11c7fdfd8ecb8bb6e07c9471f730b6ed5a2f5a72741988af881658d05e8814a1184493
|
data/CHANGES
CHANGED
data/Dockerfile.trunk
CHANGED
@@ -2,15 +2,15 @@ FROM cosmo0920/win32-api:latest
|
|
2
2
|
LABEL maintainer "Hiroshi Hatake <cosmo0920.wp@gmail.com>"
|
3
3
|
LABEL Description="win32-api building docker image"
|
4
4
|
|
5
|
-
# Ruby
|
5
|
+
# Ruby 3.0
|
6
6
|
RUN powershell \
|
7
7
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
8
|
-
Invoke-WebRequest -OutFile C:\rubyinstaller-head-x86-
|
9
|
-
RUN cmd /c "C:\rubyinstaller-head-x86-
|
8
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-head-x86-20200911.exe https://ci.appveyor.com/api/buildjobs/trvw8cisuqismasc/artifacts/packages%2Fri%2Frecipes%2Finstaller-inno%2Frubyinstaller-head-x86.exe
|
9
|
+
RUN cmd /c "C:\rubyinstaller-head-x86-20200911.exe" /silent /dir=c:\ruby30
|
10
10
|
RUN powershell \
|
11
11
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
12
|
-
Invoke-WebRequest -OutFile C:\rubyinstaller-head-x64-
|
13
|
-
RUN cmd /c "C:\rubyinstaller-head-x64-
|
12
|
+
Invoke-WebRequest -OutFile C:\rubyinstaller-head-x64-20200911.exe https://ci.appveyor.com/api/buildjobs/ufndgf49pysdvpt9/artifacts/packages%2Fri%2Frecipes%2Finstaller-inno%2Frubyinstaller-head-x64.exe
|
13
|
+
RUN cmd /c "C:\rubyinstaller-head-x64-20200911.exe" /silent /dir=c:\ruby30-x64
|
14
14
|
|
15
15
|
RUN mkdir C:\pkg
|
16
16
|
COPY build-gem.bat C:\\build-gem.bat
|
data/RELEASE.md
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
### Release step
|
6
6
|
|
7
|
+
#### Fat GEM
|
8
|
+
|
7
9
|
Check the latest ruby-head-YYYYmmDD image:
|
8
10
|
https://hub.docker.com/r/cosmo0920/win32-api/tags?page=1&name=ruby-head
|
9
11
|
|
@@ -30,3 +32,10 @@ Then, exit and push built gem:
|
|
30
32
|
> exit
|
31
33
|
> gem push win32-api-*.gem
|
32
34
|
```
|
35
|
+
|
36
|
+
#### Non Fat GEM
|
37
|
+
|
38
|
+
```cmd
|
39
|
+
> rake gem:create
|
40
|
+
> gem push win32-api-*.gem
|
41
|
+
```
|
data/Rakefile
CHANGED
@@ -59,7 +59,7 @@ namespace 'gem' do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
desc 'Build a binary gem'
|
62
|
-
task :binary, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64, :ruby22, :ruby22_64, :ruby23_32, :ruby23_64, :ruby24_32, :ruby24_64, :ruby25_32, :ruby25_64, :ruby_26_32, :ruby26_64, :ruby27_32, :ruby27_64, :
|
62
|
+
task :binary, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64, :ruby22, :ruby22_64, :ruby23_32, :ruby23_64, :ruby24_32, :ruby24_64, :ruby25_32, :ruby25_64, :ruby_26_32, :ruby26_64, :ruby27_32, :ruby27_64, :ruby30_32, :ruby30_64 do |task, args|
|
63
63
|
# These are just what's on my system at the moment. Adjust as needed.
|
64
64
|
# ri refers to RubyInstaller, ruby 2.3 and prev were built with RubyInstaller (:ri),
|
65
65
|
# 2.4 and later with RubyInstaller2 (:ri2)
|
@@ -98,8 +98,8 @@ namespace 'gem' do
|
|
98
98
|
:ruby26_64 => {:path => "#{pre}/ruby26-x64/bin", :ri => :ri2_64, :omit => false},
|
99
99
|
:ruby27_32 => {:path => "#{pre}/ruby27/bin", :ri => :ri2, :omit => true},
|
100
100
|
:ruby27_64 => {:path => "#{pre}/ruby27-x64/bin", :ri => :ri2_64, :omit => true},
|
101
|
-
:
|
102
|
-
:
|
101
|
+
:ruby30_32 => {:path => "#{pre}/ruby30/bin", :ri => :ri2, :omit => true},
|
102
|
+
:ruby30_64 => {:path => "#{pre}/ruby30-x64/bin", :ri => :ri2_64, :omit => true},
|
103
103
|
}
|
104
104
|
)
|
105
105
|
|
@@ -196,12 +196,12 @@ begin
|
|
196
196
|
require File.join(File.dirname(__FILE__), 'ruby27_32/win32/api')
|
197
197
|
end
|
198
198
|
end
|
199
|
-
|
200
|
-
if RbConfig::CONFIG['MINOR'] == '
|
199
|
+
when '3'
|
200
|
+
if RbConfig::CONFIG['MINOR'] == '0'
|
201
201
|
if RbConfig::CONFIG['arch'] =~ /x64/i
|
202
|
-
require File.join(File.dirname(__FILE__), '
|
202
|
+
require File.join(File.dirname(__FILE__), 'ruby30_64/win32/api')
|
203
203
|
else
|
204
|
-
require File.join(File.dirname(__FILE__), '
|
204
|
+
require File.join(File.dirname(__FILE__), 'ruby30_32/win32/api')
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
data/ext/win32/api.c
CHANGED
@@ -16,28 +16,34 @@
|
|
16
16
|
#define RARRAY_LEN(a) (RARRAY(a)->len)
|
17
17
|
#endif
|
18
18
|
|
19
|
-
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
19
|
+
/* Use Ruby defined macro definitions. */
|
20
|
+
#if !defined(NUM2SIZET) && !defined(NUM2SSIZET)
|
21
|
+
# if defined(HAVE_LONG_LONG) && SIZEOF_SIZE_T > SIZEOF_LONG
|
22
|
+
# define NUM2SIZET(x) ((size_t)NUM2ULL(x))
|
23
|
+
# define NUM2SSIZET(x) ((ssize_t)NUM2LL(x))
|
24
|
+
# else
|
25
|
+
# define NUM2SIZET(x) NUM2ULONG(x)
|
26
|
+
# define NUM2SSIZET(x) NUM2LONG(x)
|
27
|
+
# endif
|
25
28
|
#endif
|
26
29
|
|
27
|
-
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
30
|
+
/* Use Ruby defined macro definitions. */
|
31
|
+
#if !defined(SIZET2NUM) && !defined(SSIZET2NUM)
|
32
|
+
# if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
|
33
|
+
# define SIZET2NUM(v) ULL2NUM(v)
|
34
|
+
# define SSIZET2NUM(v) LL2NUM(v)
|
35
|
+
# elif SIZEOF_SIZE_T == SIZEOF_LONG
|
36
|
+
# define SIZET2NUM(v) ULONG2NUM(v)
|
37
|
+
# define SSIZET2NUM(v) LONG2NUM(v)
|
38
|
+
# else
|
39
|
+
# define SIZET2NUM(v) UINT2NUM(v)
|
40
|
+
# define SSIZET2NUM(v) INT2NUM(v)
|
41
|
+
# endif
|
36
42
|
#endif
|
37
43
|
|
38
44
|
|
39
45
|
#define MAX_BUF 1024
|
40
|
-
#define WINDOWS_API_VERSION "1.9.
|
46
|
+
#define WINDOWS_API_VERSION "1.9.2"
|
41
47
|
|
42
48
|
#define _T_VOID 0
|
43
49
|
#define _T_LONG 1
|
@@ -848,7 +854,7 @@ static VALUE api_call(int argc, VALUE* argv, VALUE self){
|
|
848
854
|
return_value = ptr->function();
|
849
855
|
}
|
850
856
|
else
|
851
|
-
{
|
857
|
+
{
|
852
858
|
switch(len)
|
853
859
|
{
|
854
860
|
case 0:
|
@@ -861,49 +867,49 @@ static VALUE api_call(int argc, VALUE* argv, VALUE self){
|
|
861
867
|
return_value = ptr->function(param.params[0], param.params[1]);
|
862
868
|
break;
|
863
869
|
case 3:
|
864
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
870
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
865
871
|
param.params[2]);
|
866
872
|
break;
|
867
873
|
case 4:
|
868
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
874
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
869
875
|
param.params[2], param.params[3]);
|
870
876
|
break;
|
871
877
|
case 5:
|
872
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
878
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
873
879
|
param.params[2], param.params[3], param.params[4]);
|
874
880
|
break;
|
875
881
|
case 6:
|
876
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
882
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
877
883
|
param.params[2], param.params[3], param.params[4], param.params[5]);
|
878
884
|
break;
|
879
885
|
case 7:
|
880
886
|
return_value = ptr->function(param.params[0], param.params[1],
|
881
|
-
param.params[2], param.params[3], param.params[4], param.params[5],
|
887
|
+
param.params[2], param.params[3], param.params[4], param.params[5],
|
882
888
|
param.params[6]);
|
883
889
|
break;
|
884
890
|
case 8:
|
885
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
891
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
886
892
|
param.params[2], param.params[3], param.params[4], param.params[5],
|
887
893
|
param.params[6], param.params[7]);
|
888
894
|
break;
|
889
895
|
case 9:
|
890
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
896
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
891
897
|
param.params[2], param.params[3], param.params[4], param.params[5],
|
892
898
|
param.params[6], param.params[7], param.params[8]);
|
893
899
|
break;
|
894
900
|
case 10:
|
895
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
896
|
-
param.params[2], param.params[3], param.params[4], param.params[5],
|
901
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
902
|
+
param.params[2], param.params[3], param.params[4], param.params[5],
|
897
903
|
param.params[6], param.params[7], param.params[8], param.params[9]);
|
898
904
|
break;
|
899
905
|
case 11:
|
900
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
901
|
-
param.params[2], param.params[3], param.params[4], param.params[5],
|
906
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
907
|
+
param.params[2], param.params[3], param.params[4], param.params[5],
|
902
908
|
param.params[6], param.params[7], param.params[8], param.params[9],
|
903
909
|
param.params[10]);
|
904
910
|
break;
|
905
911
|
case 12:
|
906
|
-
return_value = ptr->function(param.params[0], param.params[1],
|
912
|
+
return_value = ptr->function(param.params[0], param.params[1],
|
907
913
|
param.params[2], param.params[3], param.params[4], param.params[5],
|
908
914
|
param.params[6], param.params[7], param.params[8], param.params[9],
|
909
915
|
param.params[10], param.params[11]);
|
Binary file
|
Binary file
|
data/test/test_win32_api.rb
CHANGED
data/win32-api-1.9.1.gem
ADDED
Binary file
|
data/win32-api.gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'win32-api'
|
5
|
-
spec.version = '1.9.
|
5
|
+
spec.version = '1.9.2'
|
6
6
|
spec.authors = ['Daniel J. Berger', 'Park Heesob', 'Hiroshi Hatake']
|
7
7
|
spec.license = 'Artistic-2.0'
|
8
8
|
spec.email = 'djberg96@gmail.com'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-09-
|
13
|
+
date: 2020-09-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: test-unit
|
@@ -65,14 +65,10 @@ files:
|
|
65
65
|
- Rakefile
|
66
66
|
- appveyor.yml
|
67
67
|
- build-gem.bat
|
68
|
-
- ext/Makefile
|
69
|
-
- ext/api-x64-mingw32.def
|
70
|
-
- ext/api.o
|
71
|
-
- ext/api.so
|
72
68
|
- ext/extconf.rb
|
73
|
-
- ext/mkmf.log
|
74
69
|
- ext/win32/api.c
|
75
|
-
-
|
70
|
+
- pkg/win32-api-1.9.1-universal-mingw32.gem
|
71
|
+
- pkg/win32-api-1.9.2-universal-mingw32.gem
|
76
72
|
- test.rb
|
77
73
|
- test/test_win32_api.rb
|
78
74
|
- test/test_win32_api_callback.rb
|
@@ -615,6 +611,7 @@ files:
|
|
615
611
|
- vendor/bundle/ruby/2.7.0/specifications/power_assert-1.1.7.gemspec
|
616
612
|
- vendor/bundle/ruby/2.7.0/specifications/rake-13.0.1.gemspec
|
617
613
|
- vendor/bundle/ruby/2.7.0/specifications/test-unit-3.3.5.gemspec
|
614
|
+
- win32-api-1.9.1.gem
|
618
615
|
- win32-api.gemspec
|
619
616
|
homepage: http://github.com/cosmo0920/win32-api
|
620
617
|
licenses:
|
data/ext/Makefile
DELETED
@@ -1,267 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
# V=0 quiet, V=1 verbose. other values don't work.
|
5
|
-
V = 0
|
6
|
-
Q1 = $(V:1=)
|
7
|
-
Q = $(Q1:0=@)
|
8
|
-
ECHO1 = $(V:1=@ :)
|
9
|
-
ECHO = $(ECHO1:0=@ echo)
|
10
|
-
NULLCMD = :
|
11
|
-
|
12
|
-
#### Start of system configuration section. ####
|
13
|
-
|
14
|
-
srcdir = win32
|
15
|
-
topdir = /c/Ruby25-x64/include/ruby-2.5.0
|
16
|
-
hdrdir = $(topdir)
|
17
|
-
arch_hdrdir = c:/Ruby25-x64/include/ruby-2.5.0/x64-mingw32
|
18
|
-
PATH_SEPARATOR = :
|
19
|
-
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
20
|
-
prefix = $(DESTDIR)/c/Ruby25-x64
|
21
|
-
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
22
|
-
rubyarchprefix = $(rubylibprefix)/$(arch)
|
23
|
-
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
24
|
-
exec_prefix = $(prefix)
|
25
|
-
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
26
|
-
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
27
|
-
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
28
|
-
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
29
|
-
sitehdrdir = $(rubyhdrdir)/site_ruby
|
30
|
-
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
31
|
-
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
32
|
-
vendorlibdir = $(vendordir)/$(ruby_version)
|
33
|
-
vendordir = $(rubylibprefix)/vendor_ruby
|
34
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
35
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
36
|
-
sitedir = $(rubylibprefix)/site_ruby
|
37
|
-
rubyarchdir = $(rubylibdir)/$(arch)
|
38
|
-
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
39
|
-
sitearchincludedir = $(includedir)/$(sitearch)
|
40
|
-
archincludedir = $(includedir)/$(arch)
|
41
|
-
sitearchlibdir = $(libdir)/$(sitearch)
|
42
|
-
archlibdir = $(libdir)/$(arch)
|
43
|
-
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
44
|
-
mandir = $(datarootdir)/man
|
45
|
-
localedir = $(datarootdir)/locale
|
46
|
-
libdir = $(exec_prefix)/lib
|
47
|
-
psdir = $(docdir)
|
48
|
-
pdfdir = $(docdir)
|
49
|
-
dvidir = $(docdir)
|
50
|
-
htmldir = $(docdir)
|
51
|
-
infodir = $(datarootdir)/info
|
52
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
53
|
-
oldincludedir = $(DESTDIR)/usr/include
|
54
|
-
includedir = $(prefix)/include
|
55
|
-
localstatedir = $(prefix)/var
|
56
|
-
sharedstatedir = $(prefix)/com
|
57
|
-
sysconfdir = $(DESTDIR)
|
58
|
-
datadir = $(datarootdir)
|
59
|
-
datarootdir = $(prefix)/share
|
60
|
-
libexecdir = $(exec_prefix)/libexec
|
61
|
-
sbindir = $(exec_prefix)/sbin
|
62
|
-
bindir = $(exec_prefix)/bin
|
63
|
-
archdir = $(rubyarchdir)
|
64
|
-
|
65
|
-
|
66
|
-
CC = x86_64-w64-mingw32-gcc
|
67
|
-
CXX = x86_64-w64-mingw32-g++
|
68
|
-
LIBRUBY = lib$(RUBY_SO_NAME).dll.a
|
69
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
70
|
-
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
71
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
72
|
-
empty =
|
73
|
-
OUTFLAG = -o $(empty)
|
74
|
-
COUTFLAG = -o $(empty)
|
75
|
-
CSRCFLAG = $(empty)
|
76
|
-
|
77
|
-
RUBY_EXTCONF_H =
|
78
|
-
cflags = $(optflags) $(debugflags) $(warnflags)
|
79
|
-
cxxflags = $(optflags) $(debugflags) $(warnflags)
|
80
|
-
optflags = -O3 -fno-omit-frame-pointer
|
81
|
-
debugflags = -ggdb3
|
82
|
-
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wmisleading-indentation -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wimplicit-fallthrough=0 -Wduplicated-cond -Wrestrict
|
83
|
-
CCDLFLAGS =
|
84
|
-
CFLAGS = $(CCDLFLAGS) -O3 -fno-fast-math -fno-omit-frame-pointer $(ARCH_FLAG)
|
85
|
-
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
86
|
-
DEFS = -D_FILE_OFFSET_BITS=64
|
87
|
-
CPPFLAGS = -DHAVE_STRNCPY_S -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT $(DEFS) $(cppflags)
|
88
|
-
CXXFLAGS = $(CCDLFLAGS) -march=x86-64 -mtune=generic -O2 -pipe $(ARCH_FLAG)
|
89
|
-
ldflags = -L. -pipe -s
|
90
|
-
dldflags = -pipe -s -Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)
|
91
|
-
ARCH_FLAG =
|
92
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
93
|
-
LDSHARED = $(CC) -shared
|
94
|
-
LDSHAREDXX = $(CXX) -shared
|
95
|
-
AR = ar
|
96
|
-
EXEEXT = .exe
|
97
|
-
|
98
|
-
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
99
|
-
RUBY_SO_NAME = x64-msvcrt-ruby250
|
100
|
-
RUBYW_INSTALL_NAME = $(RUBYW_BASE_NAME)
|
101
|
-
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
102
|
-
RUBYW_BASE_NAME = rubyw
|
103
|
-
RUBY_BASE_NAME = ruby
|
104
|
-
|
105
|
-
arch = x64-mingw32
|
106
|
-
sitearch = x64-msvcrt
|
107
|
-
ruby_version = 2.5.0
|
108
|
-
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
109
|
-
RUBY = $(ruby)
|
110
|
-
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
|
111
|
-
|
112
|
-
RM = rm -f
|
113
|
-
RM_RF = $(RUBY) -run -e rm -- -rf
|
114
|
-
RMDIRS = rmdir --ignore-fail-on-non-empty -p
|
115
|
-
MAKEDIRS = /usr/bin/mkdir -p
|
116
|
-
INSTALL = /usr/bin/install -c
|
117
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
118
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
119
|
-
COPY = cp
|
120
|
-
TOUCH = exit >
|
121
|
-
|
122
|
-
#### End of system configuration section. ####
|
123
|
-
|
124
|
-
preload =
|
125
|
-
libpath = . $(libdir)
|
126
|
-
LIBPATH = -L. -L$(libdir)
|
127
|
-
DEFFILE = $(TARGET)-$(arch).def
|
128
|
-
|
129
|
-
CLEANFILES = mkmf.log $(DEFFILE)
|
130
|
-
DISTCLEANFILES =
|
131
|
-
DISTCLEANDIRS =
|
132
|
-
|
133
|
-
extout =
|
134
|
-
extout_prefix =
|
135
|
-
target_prefix = /win32
|
136
|
-
LOCAL_LIBS =
|
137
|
-
LIBS = $(LIBRUBYARG_SHARED) -lgmp -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi
|
138
|
-
ORIG_SRCS = api.c
|
139
|
-
SRCS = $(ORIG_SRCS)
|
140
|
-
OBJS = api.o
|
141
|
-
HDRS =
|
142
|
-
LOCAL_HDRS =
|
143
|
-
TARGET = api
|
144
|
-
TARGET_NAME = api
|
145
|
-
TARGET_ENTRY = Init_$(TARGET_NAME)
|
146
|
-
DLLIB = $(TARGET).so
|
147
|
-
EXTSTATIC =
|
148
|
-
STATIC_LIB =
|
149
|
-
|
150
|
-
TIMESTAMP_DIR = .
|
151
|
-
BINDIR = $(bindir)
|
152
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
153
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
154
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
155
|
-
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
156
|
-
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
157
|
-
TARGET_SO_DIR =
|
158
|
-
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
|
159
|
-
CLEANLIBS = $(TARGET_SO)
|
160
|
-
CLEANOBJS = *.o *.bak
|
161
|
-
|
162
|
-
all: $(DLLIB)
|
163
|
-
static: $(STATIC_LIB)
|
164
|
-
.PHONY: all install static install-so install-rb
|
165
|
-
.PHONY: clean clean-so clean-static clean-rb
|
166
|
-
|
167
|
-
clean-static::
|
168
|
-
clean-rb-default::
|
169
|
-
clean-rb::
|
170
|
-
clean-so::
|
171
|
-
clean: clean-so clean-static clean-rb-default clean-rb
|
172
|
-
-$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
173
|
-
|
174
|
-
distclean-rb-default::
|
175
|
-
distclean-rb::
|
176
|
-
distclean-so::
|
177
|
-
distclean-static::
|
178
|
-
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
179
|
-
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
180
|
-
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
181
|
-
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
182
|
-
|
183
|
-
realclean: distclean
|
184
|
-
install: install-so install-rb
|
185
|
-
|
186
|
-
install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.win32.time
|
187
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
188
|
-
clean-static::
|
189
|
-
-$(Q)$(RM) $(STATIC_LIB)
|
190
|
-
install-rb: pre-install-rb do-install-rb install-rb-default
|
191
|
-
install-rb-default: pre-install-rb-default do-install-rb-default
|
192
|
-
pre-install-rb: Makefile
|
193
|
-
pre-install-rb-default: Makefile
|
194
|
-
do-install-rb:
|
195
|
-
do-install-rb-default:
|
196
|
-
pre-install-rb-default:
|
197
|
-
@$(NULLCMD)
|
198
|
-
$(TIMESTAMP_DIR)/.sitearchdir.-.win32.time:
|
199
|
-
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
200
|
-
$(Q) $(TOUCH) $@
|
201
|
-
|
202
|
-
site-install: site-install-so site-install-rb
|
203
|
-
site-install-so: install-so
|
204
|
-
site-install-rb: install-rb
|
205
|
-
|
206
|
-
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
207
|
-
|
208
|
-
.cc.o:
|
209
|
-
$(ECHO) compiling $(<)
|
210
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
211
|
-
|
212
|
-
.cc.S:
|
213
|
-
$(ECHO) translating $(<)
|
214
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
215
|
-
|
216
|
-
.mm.o:
|
217
|
-
$(ECHO) compiling $(<)
|
218
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
219
|
-
|
220
|
-
.mm.S:
|
221
|
-
$(ECHO) translating $(<)
|
222
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
223
|
-
|
224
|
-
.cxx.o:
|
225
|
-
$(ECHO) compiling $(<)
|
226
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
227
|
-
|
228
|
-
.cxx.S:
|
229
|
-
$(ECHO) translating $(<)
|
230
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
231
|
-
|
232
|
-
.cpp.o:
|
233
|
-
$(ECHO) compiling $(<)
|
234
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
235
|
-
|
236
|
-
.cpp.S:
|
237
|
-
$(ECHO) translating $(<)
|
238
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
239
|
-
|
240
|
-
.c.o:
|
241
|
-
$(ECHO) compiling $(<)
|
242
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
243
|
-
|
244
|
-
.c.S:
|
245
|
-
$(ECHO) translating $(<)
|
246
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
247
|
-
|
248
|
-
.m.o:
|
249
|
-
$(ECHO) compiling $(<)
|
250
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
251
|
-
|
252
|
-
.m.S:
|
253
|
-
$(ECHO) translating $(<)
|
254
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
255
|
-
|
256
|
-
$(TARGET_SO): $(DEFFILE) $(OBJS) Makefile
|
257
|
-
$(ECHO) linking shared-object win32/$(DLLIB)
|
258
|
-
-$(Q)$(RM) $(@)
|
259
|
-
$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
$(DEFFILE):
|
264
|
-
$(ECHO) generating $(@)
|
265
|
-
$(Q) (echo EXPORTS && echo $(TARGET_ENTRY)) > $@
|
266
|
-
|
267
|
-
$(OBJS): $(HDRS) $(ruby_headers)
|
data/ext/api-x64-mingw32.def
DELETED
data/ext/api.o
DELETED
Binary file
|
data/ext/api.so
DELETED
Binary file
|
data/ext/mkmf.log
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
have_func: checking for strncpy_s()... -------------------- yes
|
2
|
-
|
3
|
-
"x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/Ruby25-x64/include/ruby-2.5.0/x64-mingw32 -Ic:/Ruby25-x64/include/ruby-2.5.0/ruby/backward -Ic:/Ruby25-x64/include/ruby-2.5.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-fast-math -fno-omit-frame-pointer conftest.c -L. -Lc:/Ruby25-x64/lib -L. -pipe -s -lx64-msvcrt-ruby250 -lgmp -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
|
4
|
-
checked program was:
|
5
|
-
/* begin */
|
6
|
-
1: #include "ruby.h"
|
7
|
-
2:
|
8
|
-
3: #include <winsock2.h>
|
9
|
-
4: #include <windows.h>
|
10
|
-
5: int main(int argc, char **argv)
|
11
|
-
6: {
|
12
|
-
7: return 0;
|
13
|
-
8: }
|
14
|
-
/* end */
|
15
|
-
|
16
|
-
"x86_64-w64-mingw32-gcc -o conftest.exe -Ic:/Ruby25-x64/include/ruby-2.5.0/x64-mingw32 -Ic:/Ruby25-x64/include/ruby-2.5.0/ruby/backward -Ic:/Ruby25-x64/include/ruby-2.5.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-fast-math -fno-omit-frame-pointer conftest.c -L. -Lc:/Ruby25-x64/lib -L. -pipe -s -lx64-msvcrt-ruby250 -lgmp -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
|
17
|
-
checked program was:
|
18
|
-
/* begin */
|
19
|
-
1: #include "ruby.h"
|
20
|
-
2:
|
21
|
-
3: #include <winsock2.h>
|
22
|
-
4: #include <windows.h>
|
23
|
-
5:
|
24
|
-
6: /*top*/
|
25
|
-
7: extern int t(void);
|
26
|
-
8: int main(int argc, char **argv)
|
27
|
-
9: {
|
28
|
-
10: if (argc > 1000000) {
|
29
|
-
11: printf("%p", &t);
|
30
|
-
12: }
|
31
|
-
13:
|
32
|
-
14: return 0;
|
33
|
-
15: }
|
34
|
-
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))strncpy_s; return !p; }
|
35
|
-
/* end */
|
36
|
-
|
37
|
-
--------------------
|
38
|
-
|
data/ext/win32/api.so
DELETED
Binary file
|