delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/07/04/07:27:27

Sender: burgers AT ecn DOT nl
Message-ID: <3961CA0E.50A82A44@ecn.nl>
Date: Tue, 04 Jul 2000 13:27:10 +0200
From: Teun Burgers <burgers AT ecn DOT nl>
Organization: Netherlands Energy Research Foundation ECN
X-Mailer: Mozilla 4.51 [en] (X11; I; OSF1 V5.0 alpha)
X-Accept-Language: nl
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: DJGPP problem executing a script
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000704130715 DOT 2527A-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:

> On Tue, 4 Jul 2000, Teun Burgers wrote:
> 
> > The problem is not that c:\djgpp\bin/perl.exe does not get invocated.
> > Somehow internally in perl c:\djgpp\bin propagates to @INC,
> > messing up @INC.
> 
> I'm quite Perl-illiterate, so I don't really know what @INC is, and how
> does it relate to the variables defined by djgpp.env.  If it is derived
> from DJDIR, it should have forward slashes.

I think there is some interaction here with the following piece of
code that is in djgpp/djgpp.c from perl-5.6.0. I Assume this
is the same as in 5.00502. This piece of code is called
very early in the perl main program.

void
Perl_DJGPP_init (int *argcp,char ***argvp)
{
    char *p;

    perlprefix=strdup (**argvp);
    strlwr (perlprefix);
    if ((p=strrchr (perlprefix,'/'))!=NULL)
    {
        *p=0;
        if (strEQ (p-4,"/bin"))
            p[-4]=0;
    }
    else
        strcpy (perlprefix,"..");
}

here there is a test on the presence of a slash. argvp points to
argv.

Teun


-- 
Drs A.R. Burgers        Netherlands Energy Research Foundation ECN
Phone: +31-224-564959   Solar & Wind Energy, PV Cells & Modules
Fax  : +31-224-563214   P.O. Box 1
email: burgers AT ecn DOT nl   1755 ZG Petten, The Netherlands

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019