Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 3.1.6-dev-20+10242: runtime determination of CPUTYPE
- X-seq: zsh-workers 10303
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: 3.1.6-dev-20+10242: runtime determination of CPUTYPE
- Date: Tue, 28 Mar 2000 17:31:14 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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));
Messages sorted by:
Reverse Date,
Date,
Thread,
Author