develooper Front page | perl.perl5.porters | Postings from November 2000

Re: [ID 20001109.015] Not OK: perl v5.7.0 +DEVEL7594+Duseperlio on dos-djgpp djgpp

Thread Previous | Thread Next
From:
Peter J. Farley III
Date:
November 10, 2000 21:23
Subject:
Re: [ID 20001109.015] Not OK: perl v5.7.0 +DEVEL7594+Duseperlio on dos-djgpp djgpp
Message ID:
4.3.1.0.20001111001718.00ae3980@pop5.banet.net
At 09:24 PM 11/10/00 -0500, Peter J. Farley III wrote:
 >At 10:06 AM 11/10/00 +0000, Nick Ing-Simmons wrote:
<Snipped>
 >#define PERLIO_NOT_STDIO 0
 >at top of perl.c and give it another try.

OK, on my own I decided to add the #define to util.c, just to see what 
would happen, and now we have this error (well, actually they're 
warnings, but I get a SIGSEGV later in the make when miniperl is 
executed for the first time, so I'm starting here):

`sh  cflags libperl.a util.o`  util.c
           CCCMD =  gcc -DPERL_CORE -c -DPERL_EXTERNAL_GLOB -DDEBUGGING 
-fno-stri
ct-aliasing -g
util.c: In function `Perl_my_popen':
util.c:2490: warning: passing arg 1 of `PerlIO_exportFILE' from 
incompatible pointer type
util.c:2490: warning: passing arg 1 of `popen' from incompatible 
pointer type
util.c:2490: warning: return from incompatible pointer type

In util.c, we have this source:

#if defined(atarist) || defined(DJGPP)
FILE *popen();
PerlIO *
Perl_my_popen(pTHX_ char *cmd, char *mode)
{
     /* Needs work for PerlIO ! */
     /* used 0 for 2nd parameter to PerlIO-exportFILE; apparently not 
used */
     PERL_FLUSHALL_FOR_CHILD;
     return popen(PerlIO_exportFILE(cmd, 0), mode);
}
#endif

And this is what comes out after cpp'ing util.c:

# 2481 "util.c"


FILE *popen();
PerlIO  *
Perl_my_popen(  char *cmd, char *mode)
{


     PerlIO_flush((PerlIO *)0 ) ;
     return popen(PerlIO_exportFILE(cmd, 0), mode);
}

It looks to me (if I understand anything at all about perlio, which I 
do not claim) as if that "popen" call inside of "Perl_my_popen" should 
maybe be "PerlIO_popen"?  Is that right?

---------------------------------------------------------
Peter J. Farley III (pjfarley@dorsai.org OR
                      pjfarley@banet.net)


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About