summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-21 10:26:01 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-21 10:26:01 +0000
commit2bd2b9e04a68ec86766c4219cf4da7f0d3168395 (patch)
treefeb11c93f6fed81991107bc208769dbb695ece5a /win32/perlhost.h
parentdb15561cb83ed8e36f76d63e4283fc51c30fd71f (diff)
downloadperl-2bd2b9e04a68ec86766c4219cf4da7f0d3168395.tar.gz
final tweaks before beta2
p4raw-id: //depot/perl@1613
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h43
1 files changed, 33 insertions, 10 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 57e0d2fd25..729dd57670 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -652,19 +652,39 @@ public:
};
virtual char* GetBase(PerlIO* pf, int &err)
{
- return (PerlIO_has_base(pf) ? PerlIO_get_base(pf) : Nullch);
+#ifdef FILE_base
+ FILE *f = (FILE*)pf;
+ return FILE_base(f);
+#else
+ return Nullch;
+#endif
};
virtual int GetBufsiz(PerlIO* pf, int &err)
{
- return PerlIO_get_bufsiz(pf);
+#ifdef FILE_bufsize
+ FILE *f = (FILE*)pf;
+ return FILE_bufsiz(f);
+#else
+ return (-1);
+#endif
};
virtual int GetCnt(PerlIO* pf, int &err)
{
- return PerlIO_get_cnt(pf);
+#ifdef USE_STDIO_PTR
+ FILE *f = (FILE*)pf;
+ return FILE_cnt(f);
+#else
+ return (-1);
+#endif
};
virtual char* GetPtr(PerlIO* pf, int &err)
{
- return PerlIO_get_ptr(pf);
+#ifdef USE_STDIO_PTR
+ FILE *f = (FILE*)pf;
+ return FILE_ptr(f);
+#else
+ return Nullch;
+#endif
};
virtual char* Gets(PerlIO* pf, char* s, int n, int& err)
{
@@ -734,15 +754,18 @@ public:
};
virtual void SetCnt(PerlIO* pf, int n, int &err)
{
- if (PerlIO_canset_cnt(pf)) {
- PerlIO_set_cnt(pf,n);
- }
+#ifdef STDIO_CNT_LVALUE
+ FILE *f = (FILE*)pf;
+ FILE_cnt(f) = n;
+#endif
};
virtual void SetPtrCnt(PerlIO* pf, char * ptr, int n, int& err)
{
- if (PerlIO_canset_cnt(pf)) {
- PerlIO_set_ptrcnt(pf,ptr,n);
- }
+#ifdef STDIO_PTR_LVALUE
+ FILE *f = (FILE*)pf;
+ FILE_ptr(f) = ptr;
+ FILE_cnt(f) = n;
+#endif
};
virtual void Setlinebuf(PerlIO* pf, int &err)
{