serialport 0.7.4 → 0.8.0
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/VERSION +1 -1
- data/extconf.rb +1 -0
- data/serialport.gemspec +2 -2
- data/src/posix_serialport_impl.c +5 -5
- data/src/serialport.h +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
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")
|
data/serialport.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{serialport}
|
8
|
-
s.version = "0.
|
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-
|
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"]
|
data/src/posix_serialport_impl.c
CHANGED
@@ -43,13 +43,13 @@ static char sIoctl[] = "ioctl";
|
|
43
43
|
int get_fd_helper(obj)
|
44
44
|
VALUE obj;
|
45
45
|
{
|
46
|
-
#
|
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
|
-
#
|
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
|
-
#
|
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
|
-
#
|
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
|
-
#
|
154
|
+
#ifdef RUBY_19
|
155
155
|
fp->fd = fd;
|
156
156
|
#else
|
157
157
|
fp->f = rb_fdopen(fd, "r+");
|
data/src/serialport.h
CHANGED
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.
|
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-
|
15
|
+
date: 2009-10-14 00:00:00 -07:00
|
16
16
|
default_executable:
|
17
17
|
dependencies: []
|
18
18
|
|