Commit Graph

23 Commits

Author SHA1 Message Date
Jim Meyering
410f98fc2b Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally. 2005-07-02 08:41:46 +00:00
Paul Eggert
ab2edb9e33 Don't use "path" or "filename" to mean "file name"
in comments or local variable names.
2005-06-02 05:05:29 +00:00
Paul Eggert
0d3649e30d Include canonicalize.h first, to test interface.
Include <stddef.h> unconditionally, since we assume C89 now.
All uses of PTR_INT_TYPE replaced by ptrdiff_t.
2005-05-18 19:28:21 +00:00
Jim Meyering
116e6fb244 Update FSF postal mail address. 2005-05-14 07:58:06 +00:00
Jim Meyering
94155d37e8 Remove duplicate `#include "stat-macros.h"'. 2005-03-23 12:47:46 +00:00
Paul Eggert
fd0ca86dd2 (errno): Remove decl; we now assume C89 or better. 2004-08-02 22:41:37 +00:00
Jim Meyering
f1314a409c Don't infloop when MAXSYMLINKS is not defined.
Detect symlink loops much earlier (albeit lazily) on systems
with MAXSYMLINKS defined to a large value.

Include "cycle-check.h".
(canonicalize_filename_mode): Don't try to detect loops by counting
symlink-hops.  Instead, use the cycle-check module.
2004-07-07 15:54:51 +00:00
Jim Meyering
f7975d11d7 (canonicalize_filename_mode): Remove do-while(0) loop.
Replace each corresponding `break' stmt with `continue'.
2004-07-07 09:28:15 +00:00
Jim Meyering
2b19667f16 Include "stat-macros.h".
(canonicalize_filename_mode): Remove #ifdef S_ISLNK, now that
S_ISLNK is guaranteed to be defined (via stat-macros.h).
2004-07-06 17:00:36 +00:00
Jim Meyering
17b22ef83f Include "file-type.h".
(canonicalize_filename_mode): New function, based on
canonicalize_file_name, supports three canonicalize modes.
(canonicalize_file_name)
[!HAVE_CANONICALIZE_FILE_NAME && !HAVE_RESOLVEPATH]: Use it.
2004-07-06 16:55:26 +00:00
Jim Meyering
6ce20e8caa (canonicalize_file_name): Assume that path_concat never returns NULL. 2004-07-04 18:03:07 +00:00
Jim Meyering
90c0e02711 Remove all S_IS* and S_IF* definitions.
Instead, just include "stat-macros.h".
2004-06-19 12:28:02 +00:00
Jim Meyering
8c808cebf4 (canonicalize_file_name): Update use of xreadlink. 2004-06-01 13:24:12 +00:00
Jim Meyering
edf60899e0 [HAVE_UNISTD_H]: Include <unistd.h>, for resolvepath declaration. 2004-03-29 07:29:06 +00:00
Jim Meyering
35cad8ae05 (canonicalize_file_name) [!HAVE_RESOLVEPATH]:
A memory-allocation error could result in heap corruption.  Fix it
by also updating `dest' when rpath may be changed by xrealloc.
2003-05-02 21:42:51 +00:00
Jim Meyering
58b92bbeb2 Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values. 2003-04-11 12:20:35 +00:00
Jim Meyering
31c3844239 (canonicalize_file_name): NUL-terminate the result. 2003-04-10 17:03:26 +00:00
Jim Meyering
e02387ea57 (canonicalize_file_name): Always free `extra_buf' before returning. 2003-04-10 16:54:19 +00:00
Jim Meyering
ef6c004648 (canonicalize_file_name): Return NULL immediately if resolvepath fails.
Otherwise, `readlink --canonical /no-such-file' would exhaust
virtual memory on some systems (e.g. Solaris).
2003-04-10 16:47:35 +00:00
Jim Meyering
1b2123bba3 (canonicalize_file_name): Remove stray semicolon
that caused `readlink --canonical RELATIVE_NAME' to fail on e.g.,
Solaris systems.
2003-04-10 15:57:45 +00:00
Jim Meyering
dadc92d2a9 Include "path-concat.h". 2003-01-20 16:41:19 +00:00
Jim Meyering
c7463c38f8 Don't test HAVE_ERRNO_H. It's not necessary.
Don't test HAVE_STDDEF_H.  It's not necessary.
Use definition of PTR_INT_TYPE from obstack.h.
2003-01-11 09:32:48 +00:00
Jim Meyering
eb04d885c2 From Dmitry Levin. 2003-01-11 08:29:46 +00:00