ffi-libc 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog.md +7 -0
- data/Gemfile +5 -5
- data/VERSION +1 -1
- data/ffi-libc.gemspec +2 -2
- data/lib/ffi/libc/libc.rb +7 -1
- metadata +4 -11
data/ChangeLog.md
CHANGED
data/Gemfile
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
source '
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
group
|
|
3
|
+
group(:runtime) do
|
|
4
4
|
gem 'ffi', '~> 0.6.0'
|
|
5
5
|
end
|
|
6
6
|
|
|
7
|
-
group
|
|
7
|
+
group(:development) do
|
|
8
8
|
gem 'bundler', '~> 0.9.25'
|
|
9
9
|
gem 'rake', '~> 0.8.7'
|
|
10
10
|
gem 'jeweler', '~> 1.4.0', :git => 'git://github.com/technicalpickles/jeweler.git'
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
group
|
|
13
|
+
group(:doc) do
|
|
14
14
|
case RUBY_PLATFORM
|
|
15
15
|
when 'java'
|
|
16
16
|
gem 'maruku', '~> 0.6.0'
|
|
@@ -18,7 +18,7 @@ group :doc do
|
|
|
18
18
|
gem 'rdiscount', '~> 1.6.3'
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
gem 'yard',
|
|
21
|
+
gem 'yard', '~> 0.5.3'
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
gem 'rspec', '~> 1.3.0', :group => [:development, :test]
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.3
|
data/ffi-libc.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{ffi-libc}
|
|
8
|
-
s.version = "0.0.
|
|
8
|
+
s.version = "0.0.3"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Postmodern"]
|
|
12
|
-
s.date = %q{2010-
|
|
12
|
+
s.date = %q{2010-08-03}
|
|
13
13
|
s.description = %q{Useful Ruby FFI bindings for libc.}
|
|
14
14
|
s.email = %q{postmodern.mod3@gmail.com}
|
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/ffi/libc/libc.rb
CHANGED
|
@@ -8,7 +8,7 @@ module FFI
|
|
|
8
8
|
module LibC
|
|
9
9
|
extend FFI::Library
|
|
10
10
|
|
|
11
|
-
ffi_lib 'c'
|
|
11
|
+
ffi_lib [FFI::CURRENT_PROCESS, 'c']
|
|
12
12
|
|
|
13
13
|
# errno.h
|
|
14
14
|
attach_variable :sys_errlist, :pointer
|
|
@@ -18,6 +18,12 @@ module FFI
|
|
|
18
18
|
# unistd.h
|
|
19
19
|
attach_function :brk, [:pointer], :int
|
|
20
20
|
attach_function :sbrk, [:pointer], :pointer
|
|
21
|
+
attach_function :getpid, [], :pid_t
|
|
22
|
+
attach_function :getppid, [], :pid_t
|
|
23
|
+
attach_function :getuid, [], :uid_t
|
|
24
|
+
attach_function :geteuid, [], :uid_t
|
|
25
|
+
attach_function :getgid, [], :gid_t
|
|
26
|
+
attach_function :getegid, [], :gid_t
|
|
21
27
|
|
|
22
28
|
# stdlib.h
|
|
23
29
|
attach_function :calloc, [:size_t, :size_t], :pointer
|
metadata
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ffi-libc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: 27
|
|
5
4
|
prerelease: false
|
|
6
5
|
segments:
|
|
7
6
|
- 0
|
|
8
7
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
8
|
+
- 3
|
|
9
|
+
version: 0.0.3
|
|
11
10
|
platform: ruby
|
|
12
11
|
authors:
|
|
13
12
|
- Postmodern
|
|
@@ -15,7 +14,7 @@ autorequire:
|
|
|
15
14
|
bindir: bin
|
|
16
15
|
cert_chain: []
|
|
17
16
|
|
|
18
|
-
date: 2010-
|
|
17
|
+
date: 2010-08-03 00:00:00 -07:00
|
|
19
18
|
default_executable:
|
|
20
19
|
dependencies:
|
|
21
20
|
- !ruby/object:Gem::Dependency
|
|
@@ -25,7 +24,6 @@ dependencies:
|
|
|
25
24
|
requirements:
|
|
26
25
|
- - ~>
|
|
27
26
|
- !ruby/object:Gem::Version
|
|
28
|
-
hash: 7
|
|
29
27
|
segments:
|
|
30
28
|
- 0
|
|
31
29
|
- 6
|
|
@@ -41,7 +39,6 @@ dependencies:
|
|
|
41
39
|
requirements:
|
|
42
40
|
- - ~>
|
|
43
41
|
- !ruby/object:Gem::Version
|
|
44
|
-
hash: 9
|
|
45
42
|
segments:
|
|
46
43
|
- 0
|
|
47
44
|
- 9
|
|
@@ -57,7 +54,6 @@ dependencies:
|
|
|
57
54
|
requirements:
|
|
58
55
|
- - ~>
|
|
59
56
|
- !ruby/object:Gem::Version
|
|
60
|
-
hash: 49
|
|
61
57
|
segments:
|
|
62
58
|
- 0
|
|
63
59
|
- 8
|
|
@@ -73,7 +69,6 @@ dependencies:
|
|
|
73
69
|
requirements:
|
|
74
70
|
- - ~>
|
|
75
71
|
- !ruby/object:Gem::Version
|
|
76
|
-
hash: 7
|
|
77
72
|
segments:
|
|
78
73
|
- 1
|
|
79
74
|
- 4
|
|
@@ -89,7 +84,6 @@ dependencies:
|
|
|
89
84
|
requirements:
|
|
90
85
|
- - ~>
|
|
91
86
|
- !ruby/object:Gem::Version
|
|
92
|
-
hash: 27
|
|
93
87
|
segments:
|
|
94
88
|
- 1
|
|
95
89
|
- 3
|
|
@@ -146,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
146
140
|
requirements:
|
|
147
141
|
- - ">="
|
|
148
142
|
- !ruby/object:Gem::Version
|
|
149
|
-
hash:
|
|
143
|
+
hash: -2959684172308845082
|
|
150
144
|
segments:
|
|
151
145
|
- 0
|
|
152
146
|
version: "0"
|
|
@@ -155,7 +149,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
155
149
|
requirements:
|
|
156
150
|
- - ">="
|
|
157
151
|
- !ruby/object:Gem::Version
|
|
158
|
-
hash: 3
|
|
159
152
|
segments:
|
|
160
153
|
- 0
|
|
161
154
|
version: "0"
|