Zsh Mailing List Archive
Messages sorted by:
Re: 'whence' question and others
On Sun, Nov 9, 2014 at 9:15 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> 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
> 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
> 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.
Messages sorted by: