sys-proctable 0.9.2-universal-darwin → 0.9.3-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.9.3 - 17-Mar-2013
2
+ * Fixed a bug on OSX where a long command string arg could cause
3
+ a segfault. Thanks go to Nathaniel Bibler for the spot.
4
+ * Changed the gem platform from mingw to mingw32 for Windows.
5
+
1
6
  == 0.9.2 - 8-Oct-2012
2
7
  * Added cmdline support for OS X. Thanks go to Matthias Zirnstein for
3
8
  the patch.
data/Rakefile CHANGED
@@ -18,20 +18,31 @@ CLEAN.include(
18
18
 
19
19
  desc 'Build the sys-proctable library for C versions of sys-proctable'
20
20
  task :build => [:clean] do
21
+ if RUBY_PLATFORM == 'java'
22
+ if ENV['JRUBY_OPTS']
23
+ ENV['JRUBY_OPTS'] += ' -Xcext.enabled=true'
24
+ else
25
+ ENV['JRUBY_OPTS'] = '-Xcext.enabled=true'
26
+ end
27
+ end
28
+
21
29
  case CONFIG['host_os']
22
30
  when /bsd/i
23
31
  dir = 'ext/bsd'
32
+ ext = '.so'
24
33
  when /darwin/i
25
34
  dir = 'ext/darwin'
35
+ ext = '.bundle'
26
36
  when /hpux/i
27
37
  dir = 'ext/hpux'
38
+ ext = '.sl'
28
39
  end
29
40
 
30
41
  unless CONFIG['host_os'] =~ /win32|mswin|dos|cygwin|mingw|windows|linux|sunos|solaris/i
31
42
  Dir.chdir(dir) do
32
43
  ruby 'extconf.rb'
33
44
  sh 'make'
34
- cp 'proctable.' + CONFIG['DLEXT'], 'sys'
45
+ cp 'proctable' + ext, 'sys'
35
46
  end
36
47
  end
37
48
  end
@@ -152,7 +163,7 @@ namespace :gem do
152
163
  spec.files += ['lib/sunos/sys/proctable.rb']
153
164
  spec.test_files << 'test/test_sys_proctable_sunos.rb'
154
165
  when /mswin|win32|dos|cygwin|mingw|windows/i
155
- spec.platform = Gem::Platform.new(['universal', 'mingw'])
166
+ spec.platform = Gem::Platform.new(['universal', 'mingw32'])
156
167
  spec.require_paths = ['lib', 'lib/windows']
157
168
  spec.files += ['lib/windows/sys/proctable.rb']
158
169
  spec.test_files << 'test/test_sys_proctable_windows.rb'
@@ -16,13 +16,19 @@
16
16
  #include <stdio.h>
17
17
  #include <stdlib.h>
18
18
  #include <string.h>
19
+ #include <unistd.h>
20
+
19
21
  #define pid_of(pproc) pproc->kp_proc.p_pid
20
22
 
21
- #define SYS_PROCTABLE_VERSION "0.9.2"
23
+ #define SYS_PROCTABLE_VERSION "0.9.3"
22
24
 
23
25
  #define PROC_MIB_LEN 4
24
26
  #define ARGS_MIB_LEN 3
25
- #define ARGS_MAX_LEN 4096
27
+
28
+ #ifndef ARGS_MAX_LEN
29
+ #define ARGS_MAX_LEN sysconf(_SC_ARG_MAX)
30
+ #endif
31
+
26
32
  VALUE cProcTableError, sProcStruct;
27
33
 
28
34
  const char* fields[] = {
@@ -403,7 +409,7 @@ void Init_proctable(){
403
409
 
404
410
  /* Constants */
405
411
 
406
- /* 0.9.1: The version of the sys-proctable library */
412
+ /* 0.9.3: The version of the sys-proctable library */
407
413
  rb_define_const(cProcTable, "VERSION", rb_str_new2(SYS_PROCTABLE_VERSION));
408
414
 
409
415
  /* Structs */
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-proctable'
5
- spec.version = '0.9.2'
5
+ spec.version = '0.9.3'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -22,7 +22,7 @@ class TC_ProcTable_All < Test::Unit::TestCase
22
22
  end
23
23
 
24
24
  def test_version
25
- assert_equal('0.9.2', ProcTable::VERSION)
25
+ assert_equal('0.9.3', ProcTable::VERSION)
26
26
  end
27
27
 
28
28
  def test_fields
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-proctable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  prerelease:
6
6
  platform: universal-darwin
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-08 00:00:00.000000000 Z
12
+ date: 2013-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project: sysutils
79
- rubygems_version: 1.8.24
79
+ rubygems_version: 1.8.23
80
80
  signing_key:
81
81
  specification_version: 3
82
82
  summary: An interface for providing process table information