+ return -1L;
+}
+
+int
+Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int flag)
+{
+ if (flag != TRUE)
+ Perl_croak(aTHX_ "panic: unsetting binmode"); /* Not implemented yet */
+#ifdef DOSISH
+#if defined(atarist) || defined(__MINT__)
+ if (!PerlIO_flush(fp) && (fp->_flag |= _IOBIN))
+ return 1;
+ else
+ return 0;
+#else
+ if (PerlLIO_setmode(PerlIO_fileno(fp), OP_BINARY) != -1) {
+#if defined(WIN32) && defined(__BORLANDC__)
+ /* The translation mode of the stream is maintained independent
+ * of the translation mode of the fd in the Borland RTL (heavy
+ * digging through their runtime sources reveal). User has to
+ * set the mode explicitly for the stream (though they don't
+ * document this anywhere). GSAR 97-5-24
+ */
+ PerlIO_seek(fp,0L,0);
+ ((FILE*)fp)->flags |= _F_BIN;
+#endif
+ return 1;
+ }
+ else
+ return 0;
+#endif
+#else
+#if defined(USEMYBINMODE)
+ if (my_binmode(fp,iotype) != FALSE)
+ return 1;
+ else
+ return 0;
+#else
+ return 1;
+#endif
+#endif