pike.git / src / modules / Perl / perlmod.c

version» Context lines:

pike.git/src/modules/Perl/perlmod.c:190:    }    THIS->env[d]=0;    } else {    /* Perl likes to be able to write in the environment block,    * give it it's own copy to protect ourselves.. /Hubbe    */    INT32 d;    int env_block_size=0;    char *env_blockp;    + #ifdef DECLARE_ENVIRON +  extern char **environ; + #endif +     for(d=0;environ[d];d++)    env_block_size+=strlen(environ[d])+1;       THIS->env_block=xalloc(env_block_size);    THIS->env=(char **)xalloc(d+1);       env_blockp=THIS->env_block;       for(d=0;environ[d];d++)    {    int l=strlen(environ[d]); -  THIS->env[d++]=env_blockp; +  THIS->env[d]=env_blockp;    MEMCPY(env_blockp,environ[d],l+1);    env_blockp+=l+1;    }    THIS->env[d]=0;    }       THREADS_ALLOW();    mt_lock(&perl_running);    if(!storage->parsed)    {