From 23b847786cf7d86c6da9c7a772a1aef6918eee65 Mon Sep 17 00:00:00 2001 From: Ilya Zakharevich Date: Mon, 1 Apr 2002 19:37:08 -0500 Subject: ASCII vs BINARY on OS/2 in perlio Message-ID: <20020402003708.A8648@math.ohio-state.edu> p4raw-id: //depot/perl@15682 --- os2/os2ish.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'os2') diff --git a/os2/os2ish.h b/os2/os2ish.h index d1c45ad86a..360da42aef 100644 --- a/os2/os2ish.h +++ b/os2/os2ish.h @@ -370,6 +370,16 @@ void *emx_realloc (void *, size_t); ? (--FILE_ptr(fp), ++FILE_cnt(fp), (int)c) : ungetc(c,fp)) #endif +#define PERLIO_IS_BINMODE_FD(fd) _PERLIO_IS_BINMODE_FD(fd) + +static inline bool +_PERLIO_IS_BINMODE_FD(int fd) +{ + int *pflags = _fd_flags(fd); + + return pflags && (*pflags) & O_BINARY; +} + /* ctermid is missing from emx0.9d */ char *ctermid(char *s); -- cgit v1.2.1