zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: 'whence' question and others
Date: Mon, 10 Nov 2014 00:20:41 -0800	[thread overview]
Message-ID: <CAH+w=7Zbmr0rWSeY+tXWk0=qoi+moY7-9EDz86-dPTcjLttTig@mail.gmail.com> (raw)
In-Reply-To: <546049D9.4030806@eastlink.ca>

On Sun, Nov 9, 2014 at 9:15 PM, Ray Andrews <rayandrews@eastlink.ca> 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.


  reply	other threads:[~2014-11-10  8:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <545A6D66.3080500@eastlink.ca>
     [not found] ` <1458.1415209763@thecus.kiddle.eu>
     [not found]   ` <20141105180035.22f6e9b1@pwslap01u.europe.root.pri>
     [not found]     ` <141105204330.ZM2973@torch.brasslantern.com>
2014-11-06 21:10       ` 'whence' question Peter Stephenson
2014-11-06 21:58         ` Bart Schaefer
2014-11-08 20:41           ` Peter Stephenson
2014-11-09 18:51             ` Bart Schaefer
2014-11-10  5:15               ` 'whence' question and others Ray Andrews
2014-11-10  8:20                 ` Bart Schaefer [this message]
2014-11-10  8:23                   ` Bart Schaefer
2014-11-10 16:57                   ` Ray Andrews
2014-11-10 19:53                     ` Vin Shelton
2014-11-11 16:52               ` 'whence' question Ray Andrews
2014-11-11 19:14                 ` Bart Schaefer
2014-11-11 19:38                   ` Bart Schaefer
2014-11-11 20:22                   ` Ray Andrews
2014-11-11 18:16               ` Ray Andrews
2014-11-11 19:33                 ` Bart Schaefer
2014-11-11 20:40                   ` Ray Andrews
2014-11-08 21:55           ` Bart Schaefer
2014-11-10 10:04             ` Peter Stephenson

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='CAH+w=7Zbmr0rWSeY+tXWk0=qoi+moY7-9EDz86-dPTcjLttTig@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-workers@zsh.org \
    /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).