From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19122 invoked by alias); 10 Nov 2014 08:21:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33662 Received: (qmail 10798 invoked from network); 10 Nov 2014 08:20:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=9mPF7rLK6LLOSl1qbSg3fU0gq4TZhktBf2ULS+ABqv8=; b=kJNV+JGU00I1YE6w1Ow1EejUaQNFKVi556b7zA37uClij63lC+8weBItrjmFhHIMpy 2NOaE8ykDu7mRrv6zwb/m9zE1y/S8CU3N6B3BhUuSGQVFK+ghd967UqQxbXunfNuoFCE BY8BrzoJm6zU3mEz0bxL/o0/+cLeqqdL7F93WU6Nh25wwNtI6/dfjaL1gigy9OvRXU4Y l3LNlG1NQySf8+2K2ftEHVU5yo9ELrO/W5YnEmZS5u1vYLb2zLZfWgH+utn/xjNobe7u wqSY+yJvfFk6Ok8viBoyzwDCabwqO37M2RTD0ncFfq5jzyJKE3uJr5FcoI+GBsDiep+T uCTg== X-Gm-Message-State: ALoCoQmuGnyALoxvGDuj4jF43XWwxsWkY5Ug9kpKNovHGPD4UJnUp7yYZeYpUhVqtb9FEv7l1G08 MIME-Version: 1.0 X-Received: by 10.140.42.135 with SMTP id c7mr38614217qga.7.1415607641817; Mon, 10 Nov 2014 00:20:41 -0800 (PST) In-Reply-To: <546049D9.4030806@eastlink.ca> References: <545A6D66.3080500@eastlink.ca> <1458.1415209763@thecus.kiddle.eu> <20141105180035.22f6e9b1@pwslap01u.europe.root.pri> <141105204330.ZM2973@torch.brasslantern.com> <20141106211017.11b8848a@pws-pc.ntlworld.com> <20141108204123.1fcc698e@pws-pc.ntlworld.com> <141109105139.ZM27532@torch.brasslantern.com> <546049D9.4030806@eastlink.ca> Date: Mon, 10 Nov 2014 00:20:41 -0800 Message-ID: Subject: Re: 'whence' question and others From: Bart Schaefer To: Ray Andrews Cc: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On Sun, Nov 9, 2014 at 9:15 PM, Ray Andrews wrote: > > Does it matter if we 'make' from the Src directory vs. from it's parent? > It seems to work either way. > > How often does one have to './configure'? If you build from the parent directory, configure will be (re)run when necessary by "make". Also in that case, the documentation will be rebuilt when the .yo files are changed. > Rebuilding from virgin source, I ended up with a different size for zsh, > that's a bit scary, is it ok, or did I manage to farkle something? All sorts of things might account for a few bytes difference in the size of the executable. Unless it came out very different I wouldn't be concerned. > Where does one find function help in gcc? What exactly do you mean by "function help"? The documentation for the library functions? On most linux systems "info libc" will probably work (if you aren't familiar with the "info" viewer, type "?" after it starts up for help). There may also be a "tkinfo" which is a GUI for browsing info documentation. If "info" doesn't work try "man functionname" for whatever specific function you are seeking. You want the pages in sections 2 or 3 of the manual, not section1. > I managed to create a bit of a disaster with my 'printf()s' used for > tracing, several system files were trashed Oh dear. I didn't realize the zsh you were installing for regular use was the same one where you inserted tracing statements. I would strongly advise against doing that. > Would "fprintf(stderr, ..." be any safer? What's the standard > way of doing that sort of thing? I still think like a DOS man. Yes, stderr would be safer, though of course it can still be redirected. If you configure with --enable-zsh-debug then a function dputs() is available which writes messages to the file named by the $ZSH_DEBUG_LOG parameter. It's kind of a stripped-down printf() which accepts only a few %-formats: %s = string, %d = int, %L = long, %c = char (including multibyte), %e = error number [for strerror()], and %l which is for non-nul-terminated strings and accepts two arguments, the char* and the number of bytes to print. If you want to leave some kind of tracing on during normal use, I would recommend using dputs() and setting $ZSH_DEBUG_LOG. There are also a set of DPUTS() macros which are sort of like assert() wrappers for dputs(). Something akin to the above paragraph ought to be in zsh-development-guide somewhere. > utils.c:(.text+0x344e): warning: the use of `mktemp' is dangerous, better > use `mkstemp' or `mkdtemp' > > Anything to learn from the warning? Can it be got rid of? It's sort of spurious. Zsh uses mktemp() in a safe way. The warning is just letting you know that it can be a problem if you don't know what you're doing.