summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-09 17:39:58 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-09 17:39:58 +0000
commita86f945c8624e2adaf7e289c8e12e67db120e262 (patch)
treef3ff2ac74f436b26fa347b78d5a7c2cb63206bd6 /perl.h
parentbe901a27bf5e503fcfef5ab4e3a07eacacdc988a (diff)
downloadperl-a86f945c8624e2adaf7e289c8e12e67db120e262.tar.gz
support binmode(F,":crlf") and use open IN => ":raw", OUT => ":crlf"
semantics; the pragma sets defaults for both open() and qx// p4raw-id: //depot/perl@5628
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/perl.h b/perl.h
index d9dcbba26f..911b998a94 100644
--- a/perl.h
+++ b/perl.h
@@ -1778,13 +1778,13 @@ typedef pthread_key_t perl_key;
#if defined(__CYGWIN__)
/* USEMYBINMODE
* This symbol, if defined, indicates that the program should
- * use the routine my_binmode(FILE *fp, char iotype) to insure
+ * use the routine my_binmode(FILE *fp, char iotype, int mode) 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 : FALSE)
+# define my_binmode(fp, iotype, mode) \
+ (PerlLIO_setmode(PerlIO_fileno(fp), mode) != -1 ? TRUE : FALSE)
#endif
#ifdef UNION_ANY_DEFINITION
@@ -3225,6 +3225,14 @@ typedef struct am_table_short AMTS;
# define O_CREAT 0100
#endif
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+#ifndef O_TEXT
+# define O_TEXT 0
+#endif
+
#ifdef IAMSUID
#ifdef I_SYS_STATVFS