2006-01-09 23:03:37 +01:00
|
|
|
$NetBSD: patch-ab,v 1.2 2006/01/09 22:03:37 joerg Exp $
|
2002-09-02 18:43:03 +02:00
|
|
|
|
|
|
|
Generalise for all *BSD (well, anything with Torek stdio, really)
|
|
|
|
|
|
|
|
--- rxfn.c 2002/09/02 08:50:31 1.1
|
|
|
|
+++ rxfn.c 2002/09/02 08:51:26
|
2006-01-09 23:03:37 +01:00
|
|
|
@@ -40,8 +40,10 @@
|
|
|
|
#ifndef _CNT
|
2002-09-02 18:43:03 +02:00
|
|
|
# ifdef linux
|
|
|
|
# define _CNT(fp) ((fp)->_IO_read_end - (fp)->_IO_read_ptr)
|
2006-01-09 23:03:37 +01:00
|
|
|
+# elif defined(__DragonFly__)
|
|
|
|
+# define _CNT(fp) (((struct __FILE_public *)fp)->_r)
|
2002-09-02 18:43:03 +02:00
|
|
|
# else
|
|
|
|
-# ifdef __FreeBSD__
|
|
|
|
+# if (defined(BSD) && BSD >= 199306)
|
|
|
|
# define _CNT(fp) ((fp)->_r)
|
|
|
|
# else
|
|
|
|
# define _CNT(fp) ((fp)->_cnt)
|