Put back the cygwin32 Configure fix of 3582 undone by 3597.
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 5d19c63..558d423 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -281,7 +281,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
  */
 
 /* define this once if either system, instead of cluttering up the src */
-#if defined(MSDOS) || defined(atarist) || defined(WIN32) || defined(CYGWIN32)
+#if defined(MSDOS) || defined(atarist) || defined(WIN32)
 #define DOSISH 1
 #endif
 
@@ -1580,6 +1580,18 @@ union any {
 #define ARGSproto
 #endif /* USE_THREADS */
 
+#if defined(CYGWIN32)
+/* 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 : FALSE)
+#endif
+
 typedef I32 (*filter_t) (pTHXo_ int, SV *, int);
 
 #define FILTER_READ(idx, sv, len)  filter_read(idx, sv, len)
@@ -2858,7 +2870,7 @@ typedef struct am_table_short AMTS;
 
 #define RESTORE_NUMERIC_LOCAL()                if ((PL_hints & HINT_LOCALE) && PL_numeric_standard) SET_NUMERIC_LOCAL()
 #define RESTORE_NUMERIC_STANDARD()     if ((PL_hints & HINT_LOCALE) && PL_numeric_local) SET_NUMERIC_STANDARD()
-#define Atof(s)                                Perl_my_atof(s)
+#define Atof                           my_atof
 
 #else /* !USE_LOCALE_NUMERIC */
 
@@ -2867,7 +2879,7 @@ typedef struct am_table_short AMTS;
 #define IS_NUMERIC_RADIX(c)            (0)
 #define RESTORE_NUMERIC_LOCAL()                /**/
 #define RESTORE_NUMERIC_STANDARD()     /**/
-#define Atof(s)                                atof(s)
+#define Atof                           atof
 
 #endif /* !USE_LOCALE_NUMERIC */