From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5716 invoked from network); 28 Mar 2000 22:31:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Mar 2000 22:31:44 -0000 Received: (qmail 18868 invoked by alias); 28 Mar 2000 22:31:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10303 Received: (qmail 18855 invoked from network); 28 Mar 2000 22:31:17 -0000 Date: Tue, 28 Mar 2000 17:31:14 -0500 From: Clint Adams To: zsh-workers@sunsite.auc.dk Subject: PATCH: 3.1.6-dev-20+10242: runtime determination of CPUTYPE Message-ID: <20000328173114.A1480@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i 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) )( 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));