diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-13 16:47:34 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-13 16:47:34 +0000 |
commit | 91cd9984f7a022fe75d70f20f989b7d3f470591d (patch) | |
tree | 8d96a1a26c35a6cdec57d7a67a7313d57d736b05 | |
parent | 1383c1eb2d2debd90225b1552aba01a51c508a52 (diff) |
Tue Jan 11 15:00:00 2006 Ville Mattila <mulperi@iki.fi>
* io.c (READ_PENDING*): Support solaris 64-bit enviroments.
Solaris defines a opaque FILE struct when compiling 64 bit
binaries. This means that we dont have access to _ptr etc.
members anymore. The solution by Steven Lumos is to define
FILE64 that has needed members available. I've modified
the origanal patch a bit so that it compiles both with gcc
and now free sun studio 11 compiler and both amd64 and sparc.
NOTE! We have to 64 bit solaris FILE structure time to time
otherwise we'll get breakage.
[ruby-core:7106]
Fri Jan 6 10:16:20 2006 Steven Lumos <steven@lumos.us>
* io.c (READ_DATA_PENDING): defined for 64bit Solaris on SPARC.
[ruby-core:7057]
(READ_DATA_PENDING_COUNT): ditto.
(READ_DATA_PENDING_PTR): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | io.c | 13 |
2 files changed, 33 insertions, 0 deletions
@@ -20,6 +20,19 @@ Thu Jan 12 11:53:08 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> [new feature] support 'command' option which is called just before popping up the balloon help. +Tue Jan 11 15:00:00 2006 Ville Mattila <mulperi@iki.fi> + + * io.c (READ_PENDING*): Support solaris 64-bit enviroments. + Solaris defines a opaque FILE struct when compiling 64 bit + binaries. This means that we dont have access to _ptr etc. + members anymore. The solution by Steven Lumos is to define + FILE64 that has needed members available. I've modified + the origanal patch a bit so that it compiles both with gcc + and now free sun studio 11 compiler and both amd64 and sparc. + NOTE! We have to 64 bit solaris FILE structure time to time + otherwise we'll get breakage. + [ruby-core:7106] + Tue Jan 10 19:42:33 2006 Tanaka Akira <akr@m17n.org> * gc.c (garbage_collect): mark ruby_current_node. @@ -65,6 +78,13 @@ Sat Jan 7 15:40:07 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (singleton): get rid of segfault on syntax error. fixed: [ruby-core:07070] +Fri Jan 6 10:16:20 2006 Steven Lumos <steven@lumos.us> + + * io.c (READ_DATA_PENDING): defined for 64bit Solaris on SPARC. + [ruby-core:7057] + (READ_DATA_PENDING_COUNT): ditto. + (READ_DATA_PENDING_PTR): ditto. + Sun Jan 1 17:07:59 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> * win32/win32.c (rb_w32_seekdir): should not segfault even if passed @@ -144,6 +144,19 @@ static VALUE lineno = INT2FIX(0); # define READ_DATA_PENDING_COUNT(fp) ((fp)->_egptr - (fp)->_gptr) # define READ_DATA_PENDING_PTR(fp) ((fp)->_gptr) # endif +#elif defined(_LP64) && (defined(__sun__) || defined(__sun)) +typedef struct _FILE64 { + unsigned char *_ptr; /* next character from/to here in buffer */ + unsigned char *_base; /* the buffer */ + unsigned char *_end; /* the end of the buffer */ + ssize_t _cnt; /* number of available characters in buffer */ + int _file; /* UNIX System file descriptor */ + unsigned int _flag; /* the state of the stream */ + char __fill[80]; /* filler to bring size to 128 bytes */ +} FILE64; +# define READ_DATA_PENDING(fp) (((FILE64*)(fp))->_cnt > 0) +# define READ_DATA_PENDING_COUNT(fp) (((FILE64*)(fp))->_cnt) +# define READ_DATA_PENDING_PTR(fp) ((char *)((FILE64*)(fp))->_ptr) #elif defined(FILE_COUNT) # define READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0) # define READ_DATA_PENDING_COUNT(fp) ((fp)->FILE_COUNT) |