summaryrefslogtreecommitdiff
path: root/os2/os2ish.h
diff options
context:
space:
mode:
Diffstat (limited to 'os2/os2ish.h')
-rw-r--r--os2/os2ish.h10
1 files changed, 10 insertions, 0 deletions
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);