diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-05 11:41:04 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-05 11:41:04 +0000 |
commit | 4ce4f76ea90ddd8879f53d5ef4d9ff6bb82eb5f0 (patch) | |
tree | a84b60638550f8c515be135597948b09f565e1bb /win32/perlhost.h | |
parent | 7a958ec31151f9d03a26dcab8abdf5c57315dc96 (diff) | |
download | perl-4ce4f76ea90ddd8879f53d5ef4d9ff6bb82eb5f0.tar.gz |
windows build tweaks for Borland compiler
p4raw-id: //depot/perl@4654
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r-- | win32/perlhost.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h index dcc8adba5e..01ff73d0f3 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -782,6 +782,21 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, PerlIO* pf) int fileno = win32_dup(win32_fileno((FILE*)pf)); /* open the file in the same mode */ +#ifdef __BORLANDC__ + if(((FILE*)pf)->flags & _F_READ) { + mode[0] = 'r'; + mode[1] = 0; + } + else if(((FILE*)pf)->flags & _F_WRIT) { + mode[0] = 'a'; + mode[1] = 0; + } + else if(((FILE*)pf)->flags & _F_RDWR) { + mode[0] = 'r'; + mode[1] = '+'; + mode[2] = 0; + } +#else if(((FILE*)pf)->_flag & _IOREAD) { mode[0] = 'r'; mode[1] = 0; @@ -795,6 +810,7 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, PerlIO* pf) mode[1] = '+'; mode[2] = 0; } +#endif /* it appears that the binmode is attached to the * file descriptor so binmode files will be handled |