* PATCH: 3.1.6-dev-20+10242: runtime determination of CPUTYPE
@ 2000-03-28 22:31 Clint Adams
2000-03-29 5:59 ` Andrej Borsenkow
0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2000-03-28 22:31 UTC (permalink / raw)
To: zsh-workers
This goes on top of 10242. It reverts MACHTYPE to its original
behavior (of which I still don't see the point), and adds CPUTYPE
as the runtime equivalent of uname -m. Probably a poor name choice,
considering the inconsistencies of uname.
Index: Doc/Zsh/params.yo
===================================================================
RCS file: /cvs/zsh/zsh/Doc/Zsh/params.yo,v
retrieving revision 1.1.1.19
diff -u -r1.1.1.19 params.yo
--- Doc/Zsh/params.yo 1999/12/20 11:24:40 1.1.1.19
+++ Doc/Zsh/params.yo 2000/03/28 22:20:58
@@ -293,6 +293,11 @@
Also, this parameter is set in the environment of every command
executed to the full pathname of the command.
)
+vindex(CPUTYPE)
+item(tt(CPUTYPE))(
+The machine type (microprocessor class or machine model),
+as determined at run time.
+)
vindex(EGID)
item(tt(EGID) <S>)(
The effective group ID of the shell process. If you have sufficient
Index: Src/params.c
===================================================================
RCS file: /cvs/zsh/zsh/Src/params.c,v
retrieving revision 1.1.1.49
diff -u -r1.1.1.49 params.c
--- Src/params.c 2000/03/25 18:05:03 1.1.1.49
+++ Src/params.c 2000/03/28 22:20:58
@@ -543,16 +543,17 @@
/* Add the standard non-special parameters */
set_pwd_env();
#ifdef HAVE_UNAME
- if(uname(&unamebuf)) setsparam("MACHTYPE", ztrdup(MACHTYPE));
+ if(uname(&unamebuf)) setsparam("CPUTYPE", ztrdup("unknown"));
else
{
machinebuf = ztrdup(unamebuf.machine);
- setsparam("MACHTYPE", machinebuf);
+ setsparam("CPUTYPE", machinebuf);
}
#else
- setsparam("MACHTYPE", ztrdup(MACHTYPE));
+ setsparam("CPUTYPE", ztrdup("unknown"));
#endif
+ setsparam("MACHTYPE", ztrdup(MACHTYPE));
setsparam("OSTYPE", ztrdup(OSTYPE));
setsparam("TTY", ztrdup(ttystrname));
setsparam("VENDOR", ztrdup(VENDOR));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-29 5:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-28 22:31 PATCH: 3.1.6-dev-20+10242: runtime determination of CPUTYPE Clint Adams
2000-03-29 5:59 ` Andrej Borsenkow
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).