[ID 20001025.011] [PATCH] t/io/open.t perl@7369[ 7350] breaks VMS perl
[p5sagit/p5-mst-13.2.git] / perlsfio.h
index c4ed5c7..a736371 100644 (file)
@@ -3,6 +3,11 @@
 #include <sfio.h>
 #endif
 
+/* sfio 2000 changed _stdopen to _stdfdopen */
+#if SFIO_VERSION >= 20000101L
+#define _stdopen _stdfdopen 
+#endif
+
 extern Sfio_t* _stdopen _ARG_((int, const char*));
 extern int     _stdprintf _ARG_((const char*, ...));
 
@@ -47,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 = (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)