ruby193.diff

patches used to build 1.9.3 on OpenBSD, take 2 - Jeremy Evans, 07/28/2011 09:50 AM

Download (7.21 KB)

View differences:

bootstraptest/test_thread.rb Wed Jul 27 16:38:28 2011
49 49
    end
50 50
  }
51 51
}
52
unless /openbsd/ =~ RUBY_PLATFORM
52 53
assert_equal %q{100}, %q{
53 54
  100.times{
54 55
    Thread.new{loop{Thread.pass}}
55 56
  }
56 57
}
58
end
57 59
assert_equal %q{ok}, %q{
58 60
  Thread.new{
59 61
    :ok
common.mk Wed Jul 27 14:12:54 2011
8 8
V = 0
9 9
Q1 = $(V:1=)
10 10
Q = $(Q1:0=@)
11
ECHO1 = $(V:1=@:)
11
ECHO1 = $(V:1=@)
12 12
ECHO = $(ECHO1:0=@echo)
13 13

  
14 14
RUBYLIB       = -
configure.in Wed Jul 27 13:31:05 2011
1817 1817
	[c],    [],
1818 1818
	[root], [],
1819 1819
	[c_r],  [MAINLIBS="-pthread $MAINLIBS"],
1820
	        [LIBS="-l$pthread_lib $LIBS"])
1820
		[AS_CASE(["$target_os"],
1821
		 [openbsd*], [LIBS="-pthread $LIBS"],
1822
			     [LIBS="-l$pthread_lib $LIBS"])])
1821 1823
    else
1822 1824
	AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
1823 1825
    fi
enc/Makefile.in Wed Jul 27 14:18:59 2011
1 1
V = 0
2 2
Q1 = $(V:1=)
3 3
Q = $(Q1:0=@)
4
ECHO1 = $(V:1=@:)
4
ECHO1 = $(V:1=@)
5 5
ECHO = $(ECHO1:0=@echo)
6 6

  
7 7
encsrcdir = @srcdir@
ext/extmk.rb Wed Jul 27 14:25:21 2011
595 595
    mf.puts "V = 0"
596 596
    mf.puts "Q1 = $(V:1=)"
597 597
    mf.puts "Q = $(Q1:0=@)"
598
    mf.puts "ECHO1 = $(V:1=@:)"
598
    mf.puts "ECHO1 = $(V:1=@)"
599 599
    mf.puts "ECHO = $(ECHO1:0=@echo)"
600 600
    mf.puts "MFLAGS = -$(MAKEFLAGS)" if $nmake
601 601
    mf.puts
ext/socket/lib/socket.rb Wed Jul 27 16:32:37 2011
513 513
          next if !a.ipv4?
514 514
          ip_list << Addrinfo.new(a.to_sockaddr, :INET, :DGRAM, 0);
515 515
        }
516
      elsif ai.ipv6? && ai.ip_address == "::" && !ipv6_recvpktinfo
516
      elsif ai.ipv6? && ai.ip_address == "::"
517 517
        local_addrs.each {|a|
518 518
          next if !a.ipv6?
519 519
          ip_list << Addrinfo.new(a.to_sockaddr, :INET6, :DGRAM, 0);
......
541 541
      end
542 542
    end
543 543

  
544
    pktinfo_sockets = {}
545 544
    sockets.each {|s|
546 545
      ai = s.local_address
547 546
      if ipv6_recvpktinfo && ai.ipv6? && ai.ip_address == "::"
548 547
        s.setsockopt(:IPV6, ipv6_recvpktinfo, 1)
549
        pktinfo_sockets[s] = true
550 548
      end
551 549
    }
552 550

  
lib/mkmf.rb Wed Jul 27 14:25:40 2011
1640 1640
V = 0
1641 1641
Q1 = $(V:1=)
1642 1642
Q = $(Q1:0=@)
1643
ECHO1 = $(V:1=@:)
1643
ECHO1 = $(V:1=@)
1644 1644
ECHO = $(ECHO1:0=@echo)
1645 1645

  
1646 1646
#### Start of system configuration section. ####
lib/test/unit.rb Wed Jul 27 16:04:54 2011
493 493
                end
494 494
            end
495 495
          end
496
          @workers.each do |worker|
497
            begin
498
              timeout(1) do
499
                worker.puts "quit"
496
          if @workers
497
            @workers.each do |worker|
498
              begin
499
                timeout(1) do
500
                  worker.puts "quit"
501
                end
502
              rescue Errno::EPIPE
503
              rescue Timeout::Error
500 504
              end
501
            rescue Errno::EPIPE
502
            rescue Timeout::Error
505
              worker.close
503 506
            end
504
            worker.close
505 507
          end
506 508
          begin
507
            timeout(0.2*@workers.size) do
508
              Process.waitall
509
            if @workers
510
              timeout(0.2*@workers.size) do
511
                Process.waitall
512
              end
509 513
            end
510 514
          rescue Timeout::Error
511 515
            @workers.each do |worker|
signal.c Wed Jul 27 16:37:16 2011
438 438

  
439 439
    newSS.ss_sp = th->altstack = malloc(ALT_STACK_SIZE);
440 440
    if (newSS.ss_sp == NULL)
441
	/* should handle error */
442
	rb_bug("rb_register_sigaltstack. malloc error\n");
441
	return;
442
    
443 443
    newSS.ss_size = ALT_STACK_SIZE;
444 444
    newSS.ss_flags = 0;
445 445

  
test/rake/helper.rb Wed Jul 27 15:48:16 2011
455 455
    rakefile <<-VERBOSE
456 456
task :standalone_verbose_true do
457 457
  verbose true
458
  sh "ruby -e '0'"
458
  sh "#{RUBY} -e '0'"
459 459
end
460 460

  
461 461
task :standalone_verbose_false do
462 462
  verbose false
463
  sh "ruby -e '0'"
463
  sh "#{RUBY} -e '0'"
464 464
end
465 465

  
466 466
task :inline_verbose_default do
467
  sh "ruby -e '0'"
467
  sh "#{RUBY} -e '0'"
468 468
end
469 469

  
470 470
task :inline_verbose_false do
471
  sh "ruby -e '0'", :verbose => false
471
  sh "#{RUBY} -e '0'", :verbose => false
472 472
end
473 473

  
474 474
task :inline_verbose_true do
475
  sh "ruby -e '0'", :verbose => true
475
  sh "#{RUBY} -e '0'", :verbose => true
476 476
end
477 477

  
478 478
task :block_verbose_true do
479 479
  verbose(true) do
480
    sh "ruby -e '0'"
480
    sh "#{RUBY} -e '0'"
481 481
  end
482 482
end
483 483

  
484 484
task :block_verbose_false do
485 485
  verbose(false) do
486
    sh "ruby -e '0'"
486
    sh "#{RUBY} -e '0'"
487 487
  end
488 488
end
489 489
    VERBOSE
test/rake/test_rake_functional.rb Wed Jul 27 15:49:18 2011
174 174

  
175 175
    rake "inline_verbose_default"
176 176

  
177
    assert_match(/ruby -e/, @err)
177
    assert_match(/#{RUBY} -e/, @err)
178 178
  end
179 179

  
180 180
  def test_inline_verbose_true_should_show_command
......
182 182

  
183 183
    rake "inline_verbose_true"
184 184

  
185
    assert_match(/ruby -e/, @err)
185
    assert_match(/#{RUBY} -e/, @err)
186 186
  end
187 187

  
188 188
  def test_inline_verbose_false_should_not_show_command
......
190 190

  
191 191
    rake "inline_verbose_false"
192 192

  
193
    refute_match(/ruby -e/, @err)
193
    refute_match(/#{RUBY} -e/, @err)
194 194
  end
195 195

  
196 196
  def test_block_verbose_false_should_not_show_command
......
198 198

  
199 199
    rake "block_verbose_false"
200 200

  
201
    refute_match(/ruby -e/, @err)
201
    refute_match(/#{RUBY} -e/, @err)
202 202
  end
203 203

  
204 204
  def test_block_verbose_true_should_show_command
......
206 206

  
207 207
    rake "block_verbose_true"
208 208

  
209
    assert_match(/ruby -e/, @err)
209
    assert_match(/#{RUBY} -e/, @err)
210 210
  end
211 211

  
212 212
  def test_standalone_verbose_true_should_show_command
......
214 214

  
215 215
    rake "standalone_verbose_true"
216 216

  
217
    assert_match(/ruby -e/, @err)
217
    assert_match(/#{RUBY} -e/, @err)
218 218
  end
219 219

  
220 220
  def test_standalone_verbose_false_should_not_show_command
......
222 222

  
223 223
    rake "standalone_verbose_false"
224 224

  
225
    refute_match(/ruby -e/, @err)
225
    refute_match(/#{RUBY} -e/, @err)
226 226
  end
227 227

  
228 228
  def test_dry_run
test/ruby/test_process.rb Wed Jul 27 17:17:00 2011
61 61
      write_file 's', <<-"End"
62 62
	result = 1
63 63
	begin
64
	  Process.setrlimit(Process::RLIMIT_NOFILE, 0)
64
	  Process.setrlimit(Process::RLIMIT_NOFILE, 1)
65 65
	rescue Errno::EINVAL
66 66
	  result = 0
67 67
	end