serialport 0.7.4 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.4
1
+ 0.8.0
data/extconf.rb CHANGED
@@ -5,6 +5,7 @@ STDOUT.flush
5
5
  os = /-([a-z]+)/.match(RUBY_PLATFORM)[1]
6
6
  puts(os)
7
7
  $CFLAGS += " -DOS_#{os.upcase}"
8
+ $CFLAGS += " -DRUBY_19" if RUBY_VERSION =~ /^1\.9/
8
9
 
9
10
  if !(os == 'mswin' or os == 'bccwin' or os == 'mingw')
10
11
  exit(1) if not have_header("termios.h") or not have_header("unistd.h")
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{serialport}
8
- s.version = "0.7.4"
8
+ s.version = "0.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Guillaume Pierronnet", "Alan Stern", "Daniel E. Shipton", "Tobin Richard"]
12
- s.date = %q{2009-10-13}
12
+ s.date = %q{2009-10-14}
13
13
  s.description = %q{Ruby/SerialPort is a Ruby library that provides a class for using RS-232 serial ports.}
14
14
  s.email = %q{hector@hectorparra.com}
15
15
  s.extensions = ["extconf.rb"]
@@ -43,13 +43,13 @@ static char sIoctl[] = "ioctl";
43
43
  int get_fd_helper(obj)
44
44
  VALUE obj;
45
45
  {
46
- #if RUBY_VERSION >= '1.9.0'
46
+ #ifdef RUBY_19
47
47
  rb_io_t *fptr;
48
48
  #else
49
49
  OpenFile *fptr;
50
50
  #endif
51
51
  GetOpenFile(obj, fptr);
52
- #if RUBY_VERSION >= '1.9.0'
52
+ #ifdef RUBY_19
53
53
  return (fptr->fd);
54
54
  #else
55
55
  return (fileno(fptr->f));
@@ -59,7 +59,7 @@ int get_fd_helper(obj)
59
59
  VALUE sp_create_impl(class, _port)
60
60
  VALUE class, _port;
61
61
  {
62
- #if RUBY_VERSION >= '1.9.0'
62
+ #ifdef RUBY_19
63
63
  rb_io_t *fp;
64
64
  #else
65
65
  OpenFile *fp;
@@ -106,7 +106,7 @@ VALUE sp_create_impl(class, _port)
106
106
 
107
107
  case T_STRING:
108
108
  Check_SafeStr(_port);
109
- #if RUBY_VERSION >= '1.9.0'
109
+ #ifdef RUBY_19
110
110
  port = RSTRING_PTR(_port);
111
111
  #else
112
112
  port = RSTRING(_port)->ptr;
@@ -151,7 +151,7 @@ VALUE sp_create_impl(class, _port)
151
151
  rb_sys_fail(sTcsetattr);
152
152
  }
153
153
 
154
- #if RUBY_VERSION >= '1.9.0'
154
+ #ifdef RUBY_19
155
155
  fp->fd = fd;
156
156
  #else
157
157
  fp->f = rb_fdopen(fd, "r+");
@@ -24,7 +24,7 @@
24
24
 
25
25
  #include <ruby.h> /* ruby inclusion */
26
26
 
27
- #if RUBY_VERSION >= '1.9.0'
27
+ #ifdef RUBY_19
28
28
  #include <ruby/io.h>
29
29
  #else
30
30
  #include <rubyio.h>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serialport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Pierronnet
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-10-13 00:00:00 -07:00
15
+ date: 2009-10-14 00:00:00 -07:00
16
16
  default_executable:
17
17
  dependencies: []
18
18