X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=os2%2Fos2ish.h;h=a60e57326252ad01ebacfad2edaa907c8bcc4ad2;hb=9c75282ff8f4361bf940245aa2513c77d38c5f5c;hp=d1c45ad86a46eec5318cc7732381b8fe8e5b1332;hpb=30500b05e0cd7c98f3f3ddb34d343729aab7b8f7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/os2/os2ish.h b/os2/os2ish.h index d1c45ad..a60e573 100644 --- a/os2/os2ish.h +++ b/os2/os2ish.h @@ -357,6 +357,8 @@ void *emx_realloc (void *, size_t); #include /* before the following definitions */ #include /* before the following definitions */ +#include +#include #define chdir _chdir2 #define getcwd _getcwd2 @@ -370,6 +372,24 @@ 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) + +#ifdef __GNUG__ +# define HAS_BOOL +#endif +#ifndef HAS_BOOL +# define bool char +# define HAS_BOOL 1 +#endif + +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);