diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2016-06-30 20:26:57 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:31:18 +0200 |
commit | d31c50870d0bee042ce660e445c9294a59a3a65b (patch) | |
tree | 6bfc0de3c95267b401b620c2c67859557dc60f97 /source/ap/ksh93/patches/ksh-20120801-oldenvinit.patch | |
parent | 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff) | |
download | current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.xz |
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016
Slackware 14.2 x86_64 stable is released!
The long development cycle (the Linux community has lately been living in
"interesting times", as they say) is finally behind us, and we're proud to
announce the release of Slackware 14.2. The new release brings many updates
and modern tools, has switched from udev to eudev (no systemd), and adds
well over a hundred new packages to the system. Thanks to the team, the
upstream developers, the dedicated Slackware community, and everyone else
who pitched in to help make this release a reality.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
Have fun! :-)
Diffstat (limited to 'source/ap/ksh93/patches/ksh-20120801-oldenvinit.patch')
-rw-r--r-- | source/ap/ksh93/patches/ksh-20120801-oldenvinit.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/source/ap/ksh93/patches/ksh-20120801-oldenvinit.patch b/source/ap/ksh93/patches/ksh-20120801-oldenvinit.patch new file mode 100644 index 000000000..8ee086314 --- /dev/null +++ b/source/ap/ksh93/patches/ksh-20120801-oldenvinit.patch @@ -0,0 +1,95 @@ +diff -up ksh-20120801/src/cmd/ksh93/sh/init.c.fixset ksh-20120801/src/cmd/ksh93/sh/init.c +--- ksh-20120801/src/cmd/ksh93/sh/init.c.fixset 2014-11-03 15:45:36.510997271 +0100 ++++ ksh-20120801/src/cmd/ksh93/sh/init.c 2014-11-03 16:20:44.398917280 +0100 +@@ -2003,8 +2003,91 @@ static Dt_t *inittree(Shell_t *shp,const + * skip over items that are not name-value pairs + */ + ++ + static void env_init(Shell_t *shp) + { ++ register char *cp; ++ register Namval_t *np; ++ register char **ep=environ; ++ register char *next=0; ++#ifdef _ENV_H ++ shp->env = env_open(environ,3); ++ env_delete(shp->env,"_"); ++#endif ++ if(ep) ++ { ++ while(cp= *ep++) ++ { ++ if(*cp=='A' && cp[1]=='_' && cp[2]=='_' && cp[3]=='z' && cp[4]=='=') ++ next = cp+4; ++ else if(np=nv_open(cp,shp->var_tree,(NV_EXPORT|NV_IDENT|NV_ASSIGN|NV_NOFAIL))) ++ { ++ nv_onattr(np,NV_IMPORT); ++ np->nvenv = cp; ++ nv_close(np); ++ } ++ else /* swap with front */ ++ { ++ ep[-1] = environ[shp->nenv]; ++ environ[shp->nenv++] = cp; ++ } ++ } ++ while(cp=next) ++ { ++ if(next = strchr(++cp,'=')) ++ *next = 0; ++ np = nv_search(cp+2,shp->var_tree,NV_ADD); ++ if(np!=SHLVL && nv_isattr(np,NV_IMPORT|NV_EXPORT)) ++ { ++ int flag = *(unsigned char*)cp-' '; ++ int size = *(unsigned char*)(cp+1)-' '; ++ if((flag&NV_INTEGER) && size==0) ++ { ++ /* check for floating*/ ++ char *ep,*val = nv_getval(np); ++ strtol(val,&ep,10); ++ if(*ep=='.' || *ep=='e' || *ep=='E') ++ { ++ char *lp; ++ flag |= NV_DOUBLE; ++ if(*ep=='.') ++ { ++ strtol(ep+1,&lp,10); ++ if(*lp) ++ ep = lp; ++ } ++ if(*ep && *ep!='.') ++ { ++ flag |= NV_EXPNOTE; ++ size = ep-val; ++ } ++ else ++ size = strlen(ep); ++ size--; ++ } ++ } ++ nv_newattr(np,flag|NV_IMPORT|NV_EXPORT,size); ++ } ++ else ++ cp += 2; ++ } ++ } ++#ifdef _ENV_H ++ env_delete(shp->env,e_envmarker); ++#endif ++ if(nv_isnull(PWDNOD) || nv_isattr(PWDNOD,NV_TAGGED)) ++ { ++ nv_offattr(PWDNOD,NV_TAGGED); ++ path_pwd(shp,0); ++ } ++ if((cp = nv_getval(SHELLNOD)) && (sh_type(cp)&SH_TYPE_RESTRICTED)) ++ sh_onoption(SH_RESTRICTED); /* restricted shell */ ++ return; ++} ++ ++ ++static void env_init_backup(Shell_t *shp) ++{ + register char *cp; + register Namval_t *np,*mp; + register char **ep=environ; |