* PATCH: 3.1.5-pws-12: getcwd
@ 1999-03-15 11:13 Peter Stephenson
1999-03-15 11:43 ` Andrej Borsenkow
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1999-03-15 11:13 UTC (permalink / raw)
To: Zsh hackers list
Another configure cock-up I made. For the last couple of weeks everybody's
been using the native getcwd() on every architecture. The fact nobody's
complained may be significant.
--- configure.in.cwd Mon Mar 15 09:57:52 1999
+++ configure.in Mon Mar 15 12:11:29 1999
@@ -847,8 +847,8 @@
AC_CACHE_CHECK(whether we should use the native getcwd,
zsh_cv_use_getcwd,
[case "${host_cpu}-${host_vendor}-${host_os}" in
- *QNX*) zsh_cv_use_getcwd=no ;;
- *) zsh_cv_use_getcwd=yes ;;
+ *QNX*) zsh_cv_use_getcwd=yes ;;
+ *) zsh_cv_use_getcwd=no ;;
esac])
if test $zsh_cv_use_getcwd = yes; then
AC_DEFINE(USE_GETCWD)
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: PATCH: 3.1.5-pws-12: getcwd
1999-03-15 11:13 PATCH: 3.1.5-pws-12: getcwd Peter Stephenson
@ 1999-03-15 11:43 ` Andrej Borsenkow
1999-03-15 12:32 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 1999-03-15 11:43 UTC (permalink / raw)
To: Peter Stephenson, Zsh hackers list
>
> Another configure cock-up I made. For the last couple of weeks
> everybody's
> been using the native getcwd() on every architecture. The fact nobody's
> complained may be significant.
>
What is wrong with native getcwd? (Apart, that it may use native malloc() to
allocate buffer)? If there are any known problems, is it possible to write a
configure check for them?
/andrej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: 3.1.5-pws-12: getcwd
1999-03-15 11:43 ` Andrej Borsenkow
@ 1999-03-15 12:32 ` Peter Stephenson
1999-03-20 8:00 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1999-03-15 12:32 UTC (permalink / raw)
To: Zsh hackers list
"Andrej Borsenkow" wrote:
> What is wrong with native getcwd? (Apart, that it may use native malloc() to
> allocate buffer)? If there are any known problems, is it possible to write a
> configure check for them?
The only problem I can see is that getcwd() is passed a fixed buffer size
which won't get reallocated if it's too small (the default is PATH_MAX
which should normally be enough), and there's no way to tell it to get as
much as it needs --- it always seems to use the size argument. This could
be fixed by checking for an ERANGE and reallocating. There's no record of
problems with real getcwd()s in the source, but I don't think it was used
at all till recently. Currently configure doesn't even check for getcwd().
Does anyone know more?
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-03-20 8:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-15 11:13 PATCH: 3.1.5-pws-12: getcwd Peter Stephenson
1999-03-15 11:43 ` Andrej Borsenkow
1999-03-15 12:32 ` Peter Stephenson
1999-03-20 8:00 ` Bart Schaefer
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).