mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-12-28 16:15:02 +01:00
zsh-workers/10242
This commit is contained in:
parent
d8f7030273
commit
7e2d72fff4
2 changed files with 16 additions and 1 deletions
14
Src/params.c
14
Src/params.c
|
@ -453,6 +453,10 @@ createparamtable(void)
|
|||
char **new_environ, **envp, **envp2, **sigptr, **t;
|
||||
char buf[50], *str, *iname;
|
||||
int num_env, oae = opts[ALLEXPORT];
|
||||
#ifdef HAVE_UNAME
|
||||
struct utsname unamebuf;
|
||||
char *machinebuf;
|
||||
#endif
|
||||
|
||||
paramtab = realparamtab = newparamtable(151, "paramtab");
|
||||
|
||||
|
@ -538,7 +542,17 @@ createparamtable(void)
|
|||
|
||||
/* Add the standard non-special parameters */
|
||||
set_pwd_env();
|
||||
#ifdef HAVE_UNAME
|
||||
if(uname(&unamebuf)) setsparam("MACHTYPE", ztrdup(MACHTYPE));
|
||||
else
|
||||
{
|
||||
machinebuf = ztrdup(unamebuf.machine);
|
||||
setsparam("MACHTYPE", machinebuf);
|
||||
}
|
||||
|
||||
#else
|
||||
setsparam("MACHTYPE", ztrdup(MACHTYPE));
|
||||
#endif
|
||||
setsparam("OSTYPE", ztrdup(OSTYPE));
|
||||
setsparam("TTY", ztrdup(ttystrname));
|
||||
setsparam("VENDOR", ztrdup(VENDOR));
|
||||
|
|
|
@ -826,7 +826,8 @@ AC_CHECK_FUNCS(strftime difftime gettimeofday \
|
|||
mmap munmap msync \
|
||||
cap_get_proc \
|
||||
getrlimit \
|
||||
setlocale)
|
||||
setlocale \
|
||||
uname)
|
||||
AC_FUNC_STRCOLL
|
||||
|
||||
if test $ac_cv_func_setpgrp = yes; then
|
||||
|
|
Loading…
Reference in a new issue