Commit Graph

4807 Commits

Author SHA1 Message Date
Paul Eggert f9265a7efe * regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
reported by Andreas Schwab.
2006-06-05 05:21:46 +00:00
Paul Eggert e9eb2ad579 (small_open, large_open): New macros.
(__open, __open64) [!_LIBC]: Remove.
(__gen_tempname): Use small_open and large_open instead of __open
and __open64.  This fixes a portability bug on HP-UX 11.11i
reported by Simon Wing-Tang in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
2006-05-25 21:57:22 +00:00
Paul Eggert 8ebe82ae29 Fix misspelling. 2006-05-23 07:48:31 +00:00
Paul Eggert bd52082675 Note problem with string.h. 2006-05-23 07:48:12 +00:00
Paul Eggert 41f08b2239 filemode.c: Don't include <string.h>. 2006-05-23 07:47:51 +00:00
Paul Eggert 82008e43bd Don't include <string.h>; this include was
inadvertantly put into the previous patch.
2006-05-23 07:47:32 +00:00
Paul Eggert c512471974 * filemode.c (setst): Remove.
(strmode): Rewrite to avoid setst.  This makes the code shorter,
(arguably) clearer, and the generated code is a bit smaller on my
Debian GNU/Linux stable x86 host.
2006-05-22 20:11:45 +00:00
Paul Eggert 900b6598d1 Document the internals better. Most of this change
was written by Bruno Haible.
2006-05-22 18:01:48 +00:00
Jim Meyering 3e3aff9926 *** empty log message *** 2006-05-20 22:18:20 +00:00
Jim Meyering 8fb9de41d5 (fts_open): Fail with EINVAL if a caller violates this rule:
Either FTS_LOGICAL or FTS_PHYSICAL must be provided to the
fts_open() function.
2006-05-20 22:18:16 +00:00
Paul Eggert 86873e5082 Sync nanosleep from gnulib. 2006-05-19 18:03:25 +00:00
Jim Meyering db19f3df8b *** empty log message *** 2006-05-15 13:28:28 +00:00
Jim Meyering 212ffe61af (xfts_open): Always use FTS_CWDFD. 2006-05-15 13:28:24 +00:00
Jim Meyering 06918c9589 *** empty log message *** 2006-05-15 10:59:15 +00:00
Jim Meyering 63deb75831 Avoid the expense of an fstat, when possible.
(O_NOFOLLOW, STREQ): Define.
(diropen_fd): Remove function.  Merge it into sole caller...
(diropen): ...here.  Use O_NOFOLLOW when appropriate.
(fts_safe_changedir): Call fstat for dev/inode check, only if the
previous open/openat call may have opened the wrong directory.
2006-05-15 10:59:10 +00:00
Jim Meyering ad17714291 *** empty log message *** 2006-05-15 10:00:30 +00:00
Jim Meyering 7729ee5e68 Restore the parts of fts that were removed on 2006-01-17, so that
it's easier for legacy applications designed for the version
of fts in glibc or BSD to convert to this more robust version.
Add a new mode, FTS_CWDFD, by which to enable the improved
(openat- based -- aka no-chdir) semantics.

* fts_.h (FTS_CWDFD): Define.  Callers must use this fts_open
option to enable the more robust behavior.
(FTS_OPTIONMASK): Widen accordingly.
* fts.c: Restore removed code, reverting the default behavior.
2006-05-15 10:00:16 +00:00
Jim Meyering 0e3dfb2439 *** empty log message *** 2006-05-11 19:44:47 +00:00
Jim Meyering 3b136eec7b (sha1_buffer): Correct comment: s/MD5/SHA1/. From James Lemley. 2006-05-11 19:44:42 +00:00
Jim Meyering 9980147451 . 2006-05-06 15:52:56 +00:00
Jim Meyering 72049d2e2e *** empty log message *** 2006-05-04 10:33:39 +00:00
Jim Meyering b400a630ae Include "same-inode.h". 2006-05-03 10:13:07 +00:00
Paul Eggert 972d0198a9 (get_date): When adding relative date, start with the
initial time, not with the result of the first mktime call.
2006-04-25 10:29:47 +00:00
Paul Eggert ae5252e393 Document filemode changes. 2006-04-17 23:24:49 +00:00
Paul Eggert 99277ba7c6 Don't undef S_ISDOOR, since it's never buggy.
(S_ISDOOR): Don't bother with S_IFDOOR, since that code is never needed.
(S_ISPORT, S_ISWHT): New macros, if not already defined.
2006-04-17 23:22:01 +00:00
Paul Eggert dc536fbed1 (HAVE_DECL_STRMODE): Include <string.h> for strmode.
(strmode): Renamed from mode_string.
(filemodestring): New decl.
2006-04-17 23:21:30 +00:00
Paul Eggert ac2d45ce67 Include "filemode.h" first, to test the interface.
Assume that filemode.h includes sys/types.h and sys/stat.h.
(HAVE_ST_DM_MODE): New macro, moved here from ls.c.
(ftypelet): Reorder to put common cases first, for efficiency.
Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
to do 'M'.
(strmode): Renamed from mode_string, and now stores 12 bytes instead
of 10, for compatibility with FreeBSD.  All callers changed.
(filemodestring): Now stores 12 bytes instead of 10, and sets file types
that can't be deduced solely from st_mode.  First arg is now a const
pointer.
2006-04-17 23:21:14 +00:00
Jim Meyering 58fab28670 *** empty log message *** 2006-04-17 21:07:53 +00:00
Jim Meyering 415dddb568 *** empty log message *** 2006-04-17 20:53:20 +00:00
Paul Eggert ade4e95345 (openat_needs_fchdir) [defined __OPENAT_PREFIX]:
Turn this into a macro that always returns true.
2006-04-17 20:48:23 +00:00
Paul Eggert 39448a239a (futimens): glibc futimesat messes up if /proc isn't mounted. 2006-04-15 07:39:46 +00:00
Jim Meyering ca094485f9 *** empty log message *** 2006-04-14 20:33:42 +00:00
Jim Meyering 52f9cd6688 remove SPACEs before TAB 2006-04-14 16:36:34 +00:00
Jim Meyering ea26299816 *** empty log message *** 2006-04-14 16:35:44 +00:00
Jim Meyering 47d0eb8722 (fts_open): Don't allocate parent if *argv==NULL. Patch from glibc. 2006-04-14 16:35:41 +00:00
Jim Meyering 8085d02998 (fts_build): Free `head' before returning NULL, in two places,
to avoid leaks.  Patch from glibc.
2006-04-14 16:26:15 +00:00
Jim Meyering d657c35562 (fts_build): Remove just-#if-0'd code and the code that
declares and sets cderrno.
2006-04-14 16:21:21 +00:00
Jim Meyering 091c012089 (fts_build): #if-0-out a block of unused code. Patch via glibc. 2006-04-14 16:11:01 +00:00
Paul Eggert 52bb8bdd10 Don't use wchar_t or wctype_t; update comment. 2006-04-13 22:17:17 +00:00
Paul Eggert 3125c35bc7 (RE_DUP_MAX): Update comment to match current implementation. 2006-04-13 22:16:58 +00:00
Paul Eggert 372285b207 (init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N
is not defined.  Problem reported by Mark D. Baushke via Derek R. Price.
2006-04-13 22:16:43 +00:00
Paul Eggert e0637b5b68 Port to Interix. 2006-04-12 20:15:30 +00:00
Paul Eggert 2fc455e2d5 Include <inttypes.h> and <stdint.h> if they exist. 2006-04-12 20:13:13 +00:00
Paul Eggert 368bc94656 Don't include <inttypes.h> or <stdint.h>, since
fsusage.h now does that.  Include fsusage.h first, to test interface.
Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
at most one method (the old code could have generated decls that
didn't conform to C89, not that this was ever exercised).
2006-04-12 20:13:00 +00:00
Jim Meyering ba75c95164 remove useless spaces before TABs 2006-04-10 19:15:08 +00:00
Paul Eggert 72021730a8 Import latest regex module from gnulib. 2006-04-10 06:46:07 +00:00
Jim Meyering a35fc49153 . 2006-03-26 12:33:28 +00:00
Jim Meyering 864c4c28af *** empty log message *** 2006-03-26 12:20:59 +00:00
Jim Meyering 8773d59d55 (base_name): New semantics - malloc the result.
Preserve // when it is special.
Preserve relative files that look like drive letters.
(base_len): Preserve // when it is special.
(last_component): New method, similar to old base_name semantics.
2006-03-26 12:20:46 +00:00
Jim Meyering 8132c6e76e (dir_len): Determine when drive letters need a subsequent slash.
Preserve // when it is special.
(dir_name): Don't append dot when drive letter is absolute.
[TEST_DIRNAME]: Move into a full-blown gnulib test.
2006-03-26 12:20:24 +00:00