summaryrefslogtreecommitdiff
path: root/perlsfio.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2000-10-23 16:39:32 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-24 18:59:48 +0000
commita7ffa9b9a1a8caeff31a83d25b70b5aca6ba0d12 (patch)
tree43180689a571f5dc8ed050ed33678a7d835c73b6 /perlsfio.h
parent1724fb8e7df982f0fd79fb192e0146e474675132 (diff)
downloadperl-a7ffa9b9a1a8caeff31a83d25b70b5aca6ba0d12.tar.gz
Check if stdio supports tweaking lval and cnt simultaneously.
Subject: PATCH (Re: PerlIO - Configure tweak for Linux/glibc?) Message-ID: <20001023153932.A10786@plum.flirble.org> p4raw-id: //depot/perl@7427
Diffstat (limited to 'perlsfio.h')
-rw-r--r--perlsfio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/perlsfio.h b/perlsfio.h
index d0f6471659..a736371a32 100644
--- a/perlsfio.h
+++ b/perlsfio.h
@@ -52,10 +52,10 @@ extern int _stdprintf _ARG_((const char*, ...));
#define PerlIO_has_cntptr(f) 1
#define PerlIO_get_ptr(f) ((f)->next)
#define PerlIO_get_cnt(f) ((f)->endr - (f)->next)
-#define PerlIO_canset_cnt(f) 1
-#define PerlIO_fast_gets(f) 1
-#define PerlIO_set_ptrcnt(f,p,c) ((f)->next = (unsigned char *)(p))
-#define PerlIO_set_cnt(f,c) 1
+#define PerlIO_canset_cnt(f) 0
+#define PerlIO_fast_gets(f) 1
+#define PerlIO_set_ptrcnt(f,p,c) STMT_START {(f)->next = (unsigned char *)(p); assert(FILE_cnt(f) == (c))} STMT_END
+#define PerlIO_set_cnt(f,c) Perl_croak(aTHX_ "Cannot set 'cnt' of FILE * on this system");
#define PerlIO_has_base(f) 1
#define PerlIO_get_base(f) ((f)->data)