aboutsummaryrefslogtreecommitdiffstats
path: root/lib/savedir.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert1-134/+0
2006-08-17Add/fix copyright notices and adjust to latest GNU FDL.Paul Eggert1-2/+2
2006-07-11Sync from gnulib.Paul Eggert1-6/+4
2006-07-09Update from gnulib.Paul Eggert1-9/+1
2006-06-28(CLOSEDIR): Remove. All uses changed to closedir.Paul Eggert1-9/+2
2006-01-10Sync from gnulib.Paul Eggert1-9/+31
2005-10-28(savedir): Don't assume that xrealloc etc. leave errno alone.Paul Eggert1-4/+10
2005-09-22Sync from gnulib.Paul Eggert1-1/+1
2005-06-02Don't use "path" or "filename" to mean "file name"Paul Eggert1-2/+2
in comments or local variable names.
2005-05-14Update FSF postal mail address.Jim Meyering1-1/+1
2004-08-02(errno): Remove decl; we now assume C89 or better.Paul Eggert1-3/+0
2004-06-30Use `file system', not filesystem in a comment.Jim Meyering1-3/+3
2003-09-10Include <stdlib.h>, <string.h> unconditionally.Jim Meyering1-5/+4
Include savedir.h first, to test interface.
2003-06-06Include <stddef.h>.Jim Meyering1-4/+2
(NULL): Don't define, since <stddef.h> does that.
2001-08-31(savedir): Remove size parameter, as POSIX says thatJim Meyering1-13/+5
a directory's st_size can have an arbitrary value, so the old usage could waste an arbitrary amount of memory. All uses changed.
2000-06-27savedir now sets errno on failure and invokes xmalloc to get memory.Jim Meyering1-45/+44
Fix a couple of other minor bugs while we're at it. (<unistd.h>): Do not include; there's no need. (NAMLEN): Remove macro. (malloc, realloc): Remove decls. (stpcpy): Likewise. ("xalloc.h"): Include. (NAME_SIZE_DEFAULT): New macro. (savedir): Use xmalloc / xrealloc to allocate memory. Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero. Skip "" directory entries. Use strlen to calculate directory entry length, since the old method is rarely used these days and isn't worth supporting. Don't use a pointer after freeing it. Check for integer overflow when calculating allocation size. Use memcpy to copy entries, instead of stpcpy. Set errno properly when returning NULL. Check for readdir error.
2000-03-08(savedir): Work even if directory size isJim Meyering1-1/+2
negative; this can happen with some screwy NFS configurations.
2000-01-04(savedir): Don't store past the end of an array ifJim Meyering1-1/+5
name_size is zero and the directory is empty.
1999-08-08fix typoJim Meyering1-1/+1
1999-08-08(savedir): Change type of name_size parameter to off_t.Jim Meyering1-3/+3
1998-12-07ansideclifyJim Meyering1-3/+1
1998-03-15Use #if, not #ifdef with HAVE_ macrosJim Meyering1-3/+3
1997-12-25Declare stpcpy only if not defined as macro.Jim Meyering1-0/+2
1997-11-30(savedir): Revert last change. malloc alwaysJim Meyering1-1/+1
works when called with zero, because we use the wrapper if the system version is lacking.
1997-11-30(savedir): Check for size zero before invokingJim Meyering1-1/+1
malloc; this can occur if st_size arg overflows on conversion to unsigned int. All callers now cast st_size arg to unsigned int.
1997-10-24Use unsigned int, not just unsigned.Jim Meyering1-1/+1
1997-10-04(savedir): Declare DIR parameter to be const.Jim Meyering1-9/+11
Include savedir.h.
1996-07-15update FSF address in copyrightJim Meyering1-2/+2
1994-10-20merge with 3.9pJim Meyering1-1/+1
1994-10-17.Jim Meyering1-17/+17
1994-10-02merge with 3.9hJim Meyering1-7/+0
1994-10-02.Jim Meyering1-10/+10
1994-07-30.Jim Meyering1-14/+27
1992-10-31Initial revisionJim Meyering1-0/+125