summaryrefslogtreecommitdiff
path: root/mail/ja-mh/patches/patch-ar
blob: 49438d9189c9393b1f5cd4cd23347003ff07a1ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-ar,v 1.4 2010/09/27 12:01:49 taca Exp $

* Add Dragonfly support.

--- uip/scansbr.c.orig	2006-04-11 14:23:48.000000000 +0000
+++ uip/scansbr.c
@@ -253,6 +253,8 @@ register FILE   *inb;
 		while (state == BODY) {
 #ifdef _STDIO_USES_IOSTREAM
 		    if (scnout->_IO_write_ptr == scnout->_IO_write_end) {
+#elif defined(__DragonFly__)
+		    if (((struct __FILE_public *)scnout)->_r <= 0) {
 #else
 		    if (scnout->_cnt <= 0) {
 #endif
@@ -264,6 +266,11 @@ register FILE   *inb;
 				     (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end,
 				     inb);
 		    scnout->_IO_write_ptr += msg_count;
+#elif defined(__DragonFly__)
+		    state = m_getfld( state, name, ((struct __FILE_public *)scnout)->_p,
+				      -(((struct __FILE_public *)scnout)->_r), inb );
+		    ((struct __FILE_public *)scnout)->_r -= msg_count;
+		    ((struct __FILE_public *)scnout)->_p += msg_count;
 #else
 		    state = m_getfld( state, name, scnout->_ptr,
 				      -(scnout->_cnt), inb );