summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-13 20:41:02 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-13 20:41:02 +0000
commit9a720a6c07f8db1084c8fde8da2829d09f6581c7 (patch)
tree8059ab5db826dcc0dae0e0a7239e81798777bd15 /io.c
parent8190c93409a02d0bf2b3e6d518d26b2a89fcecfe (diff)
* io.c (READ_DATA_PENDING, READ_DATA_PENDING_COUNT): defined
for DragonFly BSD 1.4.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/io.c b/io.c
index 4973efbf90..8e63af2d10 100644
--- a/io.c
+++ b/io.c
@@ -169,6 +169,10 @@ typedef struct _FILE64 {
# define READ_DATA_PENDING_COUNT(fp) ((unsigned int)(*(fp))->_cnt)
# define READ_DATA_PENDING(fp) (((unsigned int)(*(fp))->_cnt) > 0)
# define READ_DATA_BUFFERED(fp) 0
+#elif defined(__DragonFly__)
+/* FILE is an incomplete struct type since DragonFly BSD 1.4.0 */
+# define READ_DATA_PENDING(fp) (((struct __FILE_public *)(fp))->_r > 0)
+# define READ_DATA_PENDING_COUNT(fp) (((struct __FILE_public *)(fp))->_r)
#else
/* requires systems own version of the ReadDataPending() */
extern int ReadDataPending();