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 18:23
Subject:
Re: [ID 20001109.015] Not OK: perl v5.7.0 +DEVEL7594+Duseperlio on dos-djgpp djgpp
Message ID:
4.3.1.0.20001110211112.00ac5f00@pop5.banet.net
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, did that and perl.c compiles OK, then I got this error in util.c:

`sh  cflags libperl.a util.o`  util.c
           CCCMD =  gcc -DPERL_CORE -c -DPERL_EXTERNAL_GLOB 
-fno-strict-aliasing
-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2
util.c:2483: macro `popen' used without args
util.c:2791: macro `pclose' used without args
make.exe: *** [util.o] Error 1

Bsed on the errors I see, this seems to be similar to the perl.c 
"fclose" problem.  Is this another case where I need to add

#define PERLIO_NOT_STDIO 0

at the top of util.c?

The source of the first error is in the "#else" to this "#if":

     /* VMS' my_popen() is in VMS.c, same with OS/2. */
#if (!defined(DOSISH) || defined(HAS_FORK) || defined(AMIGAOS)) && 
!defined(VMS) && !defined(__OPEN_VM) && !defined(EPOC) && 
!defined(MACOS_TRADITIONAL)
...
#else
#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

The output for that section after cpp is this:

# 2481 "util.c"


struct _FILE  * "CANNOT"  _popen_ ;
PerlIO  *
Perl_my_popen(  char *cmd, char *mode)
{


     PerlIO_flush((PerlIO *)0 ) ;
     return "CANNOT"  _popen_ ;
}

The second error has this source:

#if defined(atarist) || defined(OS2) || defined(DJGPP)
int pclose();
#ifdef HAS_FORK
int                 /* Cannot prototype with I32
                        in os2ish.h. */
my_syspclose(PerlIO *ptr)
#else
I32
Perl_my_pclose(pTHX_ PerlIO *ptr)
#endif
{
     /* Needs work for PerlIO ! */
     FILE *f = PerlIO_findFILE(ptr);
     I32 result = pclose(f);
#if defined(DJGPP)
     result = (result << 8) & 0xff00;
#endif
     PerlIO_releaseFILE(ptr,f);
     return result;
}
#endif

And the cpp output at that section is this:

int "CANNOT"  _pclose_ ;





I32
Perl_my_pclose(  PerlIO  *ptr)

{

     struct _FILE  *f = PerlIO_findFILE(ptr);
     I32 result = "CANNOT"  _pclose_ ;

     result = (result << 8) & 0xff00;

     PerlIO_releaseFILE(ptr,f);
     return result;
}
---------------------------------------------------------
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