raindrops 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/GIT-VERSION-GEN CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v0.4.0.GIT
4
+ DEF_VER=v0.4.1.GIT
5
5
 
6
6
  LF='
7
7
  '
data/GNUmakefile CHANGED
@@ -152,6 +152,7 @@ release: verify package $(release_notes) $(release_changes)
152
152
  # in case of gem downloads from RubyForge releases page
153
153
  -rubyforge add_file \
154
154
  $(rfproject) $(rfpackage) $(VERSION) $(pkggem)
155
+ $(RAKE) publish_news VERSION=$(VERSION)
155
156
  else
156
157
  gem install-gem: GIT-VERSION-FILE
157
158
  $(MAKE) $@ VERSION=$(GIT_VERSION)
data/Rakefile CHANGED
@@ -105,8 +105,21 @@ end
105
105
  desc "read news article from STDIN and post to rubyforge"
106
106
  task :publish_news do
107
107
  require 'rubyforge'
108
- IO.select([STDIN], nil, nil, 1) or abort "E: news must be read from stdin"
109
- msg = STDIN.readlines
108
+ spec = Gem::Specification.load('raindrops.gemspec')
109
+ tmp = Tempfile.new('rf-news')
110
+ _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
111
+ tmp.puts subject
112
+ tmp.puts
113
+ tmp.puts spec.description.strip
114
+ tmp.puts ""
115
+ tmp.puts "* #{spec.homepage}"
116
+ tmp.puts "* #{spec.email}"
117
+ tmp.puts "* #{git_url}"
118
+ tmp.print "\nChanges:\n\n"
119
+ tmp.puts body
120
+ tmp.flush
121
+ system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
122
+ msg = File.readlines(tmp.path)
110
123
  subject = msg.shift
111
124
  blank = msg.shift
112
125
  blank == "\n" or abort "no newline after subject!"
@@ -1,6 +1,5 @@
1
1
  require 'mkmf'
2
2
 
3
- # FIXME: test for GCC __sync_XXX builtins here, somehow...
4
3
  have_func('mmap', 'sys/mman.h') or abort 'mmap() not found'
5
4
  have_func('munmap', 'sys/mman.h') or abort 'munmap() not found'
6
5
 
@@ -18,6 +17,13 @@ int main(int argc, char * const argv[]) {
18
17
  SRC
19
18
 
20
19
  if try_run(src)
20
+ # some systems target GCC for i386 and don't get the atomic builtins
21
+ # when building shared objects
22
+ arch = `#{CONFIG['CC']} -dumpmachine`.split(/-/)[0]
23
+ if arch == "i386" && $CFLAGS !~ /\b-march=/
24
+ $CFLAGS += " -march=i486 "
25
+ end
26
+
21
27
  $defs.push(format("-DHAVE_GCC_ATOMIC_BUILTINS"))
22
28
  true
23
29
  else
@@ -1,4 +1,5 @@
1
1
  #include <ruby.h>
2
+ #ifdef __linux__
2
3
 
3
4
  /* Ruby 1.8.6+ macros (for compatibility with Ruby 1.9) */
4
5
  #ifndef RSTRING_PTR
@@ -7,11 +8,13 @@
7
8
  #ifndef RSTRING_LEN
8
9
  # define RSTRING_LEN(s) (RSTRING(s)->len)
9
10
  #endif
10
- #ifndef RSTRUCT_PTR
11
- # define RSTRUCT_PTR(s) (RSTRUCT(s)->ptr)
12
- #endif
13
- #ifndef RSTRUCT_LEN
14
- # define RSTRUCT_LEN(s) (RSTRUCT(s)->len)
11
+ #ifdef RSTRUCT
12
+ # ifndef RSTRUCT_PTR
13
+ # define RSTRUCT_PTR(s) (RSTRUCT(s)->ptr)
14
+ # endif
15
+ # ifndef RSTRUCT_LEN
16
+ # define RSTRUCT_LEN(s) (RSTRUCT(s)->len)
17
+ # endif
15
18
  #endif
16
19
 
17
20
  #ifndef HAVE_RB_STRUCT_ALLOC_NOINIT
@@ -85,11 +88,17 @@ struct nogvl_args {
85
88
  static VALUE rb_listen_stats(struct listen_stats *stats)
86
89
  {
87
90
  VALUE rv = rb_struct_alloc_noinit(cListenStats);
88
- VALUE *ptr = RSTRUCT_PTR(rv);
89
-
90
- ptr[0] = LONG2NUM(stats->active);
91
- ptr[1] = LONG2NUM(stats->queued);
91
+ VALUE active = LONG2NUM(stats->active);
92
+ VALUE queued = LONG2NUM(stats->queued);
92
93
 
94
+ #ifdef RSTRUCT_PTR
95
+ VALUE *ptr = RSTRUCT_PTR(rv);
96
+ ptr[0] = active;
97
+ ptr[1] = queued;
98
+ #else /* Rubinius */
99
+ rb_funcall(rv, rb_intern("active="), 1, active);
100
+ rb_funcall(rv, rb_intern("queued="), 1, queued);
101
+ #endif /* ! Rubinius */
93
102
  return rv;
94
103
  }
95
104
 
@@ -340,3 +349,4 @@ void Init_raindrops_linux_inet_diag(void)
340
349
 
341
350
  assert(OPLEN <= page_size && "bytecode OPLEN is not <= PAGE_SIZE");
342
351
  }
352
+ #endif /* __linux__ */
data/lib/raindrops.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # -*- encoding: binary -*-
2
2
  class Raindrops
3
3
 
4
- # Raindrops is currently at version 0.4.0
5
- VERSION = '0.4.0'
4
+ # Raindrops is currently at version 0.4.1
5
+ VERSION = '0.4.1'
6
6
 
7
7
  # Used to represent the number of +active+ and +queued+ sockets for
8
8
  # a single listen socket across all threads and processes on a
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raindrops
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - raindrops hackers
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-21 00:00:00 +00:00
18
+ date: 2010-09-26 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21