build the Filter extension on windows
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index 43b3f66..2194653 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
 #   include <shadow.h>
 #endif
 
-/* XXX If this causes problems, set i_unistd=undef in the hint file.  */
-#ifdef I_UNISTD
-# include <unistd.h>
-#endif
-
 #ifdef HAS_SYSCALL
 #ifdef __cplusplus
 extern "C" int syscall(unsigned long,...);
@@ -302,6 +297,16 @@ PP(pp_backtick)
        mode = "rt";
     fp = PerlProc_popen(tmps, mode);
     if (fp) {
+       char *type = NULL;
+       if (PL_curcop->cop_io) {
+           type = SvPV_nolen(PL_curcop->cop_io);
+       }
+       else if (O_BINARY != O_TEXT) {
+           type = ":crlf";
+       }
+       if (type && *type)
+           PerlIO_apply_layers(aTHX_ fp,mode,type);
+
        if (gimme == G_VOID) {
            char tmpbuf[256];
            while (PerlIO_read(fp, tmpbuf, sizeof tmpbuf) > 0)
@@ -3719,6 +3724,9 @@ PP(pp_fork)
     if (childpid < 0)
        RETSETUNDEF;
     if (!childpid) {
+#ifdef SOCKS_64BIT_BUG
+       Perl_do_s64_init_buffer();
+#endif
        /*SUPPRESS 560*/
        if ((tmpgv = gv_fetchpv("$", TRUE, SVt_PV)))
            sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid());