zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: 3.1.6-dev-20+10242: runtime determination of CPUTYPE
Date: Tue, 28 Mar 2000 17:31:14 -0500	[thread overview]
Message-ID: <20000328173114.A1480@dman.com> (raw)

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));


             reply	other threads:[~2000-03-28 22:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-28 22:31 Clint Adams [this message]
2000-03-29  5:59 ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000328173114.A1480@dman.com \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).