diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-21 07:15:54 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-21 07:15:54 +0000 |
commit | db15561cb83ed8e36f76d63e4283fc51c30fd71f (patch) | |
tree | 27633dd207e28c21b9b96dede3a5535513b13c37 /win32/perlhost.h | |
parent | 42d3a99d28b720322fc7b50bd358ea47c49a9722 (diff) | |
download | perl-db15561cb83ed8e36f76d63e4283fc51c30fd71f.tar.gz |
fixes to enable PERL_OBJECT build with mingw32/egcs-1.0.2
p4raw-id: //depot/perl@1612
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r-- | win32/perlhost.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h index b8a59e409c..57e0d2fd25 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -652,23 +652,19 @@ public: }; virtual char* GetBase(PerlIO* pf, int &err) { - FILE *f = (FILE*)pf; - return FILE_base(f); + return (PerlIO_has_base(pf) ? PerlIO_get_base(pf) : Nullch); }; virtual int GetBufsiz(PerlIO* pf, int &err) { - FILE *f = (FILE*)pf; - return FILE_bufsiz(f); + return PerlIO_get_bufsiz(pf); }; virtual int GetCnt(PerlIO* pf, int &err) { - FILE *f = (FILE*)pf; - return FILE_cnt(f); + return PerlIO_get_cnt(pf); }; virtual char* GetPtr(PerlIO* pf, int &err) { - FILE *f = (FILE*)pf; - return FILE_ptr(f); + return PerlIO_get_ptr(pf); }; virtual char* Gets(PerlIO* pf, char* s, int n, int& err) { @@ -738,14 +734,15 @@ public: }; virtual void SetCnt(PerlIO* pf, int n, int &err) { - FILE *f = (FILE*)pf; - FILE_cnt(f) = n; + if (PerlIO_canset_cnt(pf)) { + PerlIO_set_cnt(pf,n); + } }; virtual void SetPtrCnt(PerlIO* pf, char * ptr, int n, int& err) { - FILE *f = (FILE*)pf; - FILE_ptr(f) = ptr; - FILE_cnt(f) = n; + if (PerlIO_canset_cnt(pf)) { + PerlIO_set_ptrcnt(pf,ptr,n); + } }; virtual void Setlinebuf(PerlIO* pf, int &err) { |