diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-11 07:30:08 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-11 07:30:08 +0000 |
commit | 521e077663cf9f26799cd47fe165c4819c1dbddb (patch) | |
tree | d7401ee6976c9c9493169426d6d562902541355d /perl.h | |
parent | 854b7fdb99d8a066c12e7ae6b6f01a0c32e60bb4 (diff) | |
download | perl-521e077663cf9f26799cd47fe165c4819c1dbddb.tar.gz |
binmode() support for cygwin32 (suggested by Steven Morlock
<newspost@morlock.net>)
p4raw-id: //depot/perl@2860
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1488,8 +1488,19 @@ union any { #endif /* USE_THREADS */ /* Work around some cygwin32 problems with importing global symbols */ -#if defined(CYGWIN32) && defined(DLLIMPORT) +#if defined(CYGWIN32) +# if defined(DLLIMPORT) # include "cw32imp.h" +# endif +/* USEMYBINMODE + * This symbol, if defined, indicates that the program should + * use the routine my_binmode(FILE *fp, char iotype) to insure + * that a file is in "binary" mode -- that is, that no translation + * of bytes occurs on read or write operations. + */ +# define USEMYBINMODE / **/ +# define my_binmode(fp, iotype) \ + (PerlLIO_setmode(PerlIO_fileno(fp), O_BINARY) != -1 ? TRUE : NULL) #endif #include "regexp.h" |