summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2004-11-30[!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd.Jim Meyering
2004-11-30Renamed from chdir.h.Jim Meyering
2004-11-30Renamed from chdir.c.Jim Meyering
2004-11-30*** empty log message ***Jim Meyering
2004-11-30(O_DIRECTORY): Define, if necessary.Jim Meyering
(memchrcspn): Tiny wrapper around memchr. (rpl_chdir): Use memchrcspn rather than strcspn.
2004-11-28*** empty log message ***Jim Meyering
2004-11-28(rpl_openat): Also accept optional mode parameter.Jim Meyering
Adjust prototype
2004-11-28(rpl_openat): Also accept optional mode parameter.Jim Meyering
2004-11-28Don't let error uses in #if-0'd code trigger `make distcheck' failure.Jim Meyering
2004-11-28(main): Appease the gods.Jim Meyering
2004-11-28*** empty log message ***Jim Meyering
2004-11-28*** empty log message ***Jim Meyering
2004-11-28Include "chdir.h", so that if save_cwd/getcwdJim Meyering
saves a name longer than PATH_MAX, restore_cwd's chdir can use it.
2004-11-28.Jim Meyering
2004-11-28*** empty log message ***Jim Meyering
2004-11-28(libfetish_a_SOURCES): Add chdir.h and openat.h.Jim Meyering
2004-11-28*** empty log message ***Jim Meyering
2004-11-28*** empty log message ***Jim Meyering
2004-11-28This is a robust version of chdir, in that it can handle directoryJim Meyering
names longer than PATH_MAX.
2004-11-28add another FIXME, to make it obviousJim Meyering
2004-11-28This is a robust version of chdir, in that it can handle directoryJim Meyering
names longer than PATH_MAX.
2004-11-26Regenerate.Paul Eggert
2004-11-26Fix problems reported by Scott S. Tinsley for HP-UX 11.11 usingPaul Eggert
HP's ANSI C compiler.
2004-11-26(MIN) [defined MIN]: Don't define, since it's already defined.Paul Eggert
2004-11-26(statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.Paul Eggert
Declaring int functions causes warnings on some modern systems and shouldn't be needed to compile on ancient ones.
2004-11-26filesystems -> file systemsPaul Eggert
2004-11-25Recent getcwd fixes.Paul Eggert
2004-11-25David MacKenzie's old code was removed, so givePaul Eggert
credit only to Jim Meyering and adjust the copyright dates. Do not include <limits.h>, <stdio.h>, <sys/types.h>, <stdlib.h>, <unistd.h>, "pathmax.h". Instead, include "xgetcwd.h" (first) and "getcwd.h". (INITIAL_BUFFER_SIZE): Remove. (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
2004-11-25Replace by a copy of glibc/sysdeps/posix/getcwd.c, butPaul Eggert
with the following changes. (__set_errno): Parenthesize properly. Include <stdbool.h>. (MIN, MAX, MATCHING_INO): New macros. (__getcwd): Define with prototype, not K&R form. Use heuristics to allocate default buffer on stack if possible. If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2) behavior, and to avoid the PATH_MAX limit when computing ../../../../... Use MATCHING_INO to compare inode number to file. Check for arithmetic overflow in size calculations. Fix bug in reallocation of dot array that caused getcwd to fail on directories nested deeper than 75. Be more careful about saving errno on error. Do not use realloc; use only free+malloc, as this is a bit more flexible and avoids a needless copy operation. Do not inspect st_dev and st_ino for symbolic links; POSIX doesn't specify the latter. Check for closedir errors. Avoid needless casts. Use "#ifdef weak_alias" around weak_alias, to be like other glibc code. The following changes to getcwd.c have effect only when used in gnulib; they have no effect inside glibc proper. (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove, as alloca isn't used. (alloca, __alloca): Likewise. [!_LIBC]: Include "getcwd.h", "mempcpy.h". Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h> unconditionally, as gnulib assumes C89 or better. Do not include <sys/param.h>. (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or better. (NULL) [!defined NULL]: Remove; we assume C89 or better. Include <dirent.h> in a way that is compatible with modern Autoconf. (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN): New macros, if not already defined. Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__. Use "_LIBC", not "defined _LIBC", for consistency. (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has a mempcpy module. (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros. (GETCWD_RETURN_TYPE): Remove. All uses replaced by char *.
2004-11-25(libfetish_a_SOURCES): Add getcwd.h, mempcpy.h.Paul Eggert
2004-11-25Initial revision.Paul Eggert
2004-11-25Imported from gnulib.Paul Eggert
2004-11-23remove trailing blanksJim Meyering
2004-11-23Sync from gnulib.Paul Eggert
2004-11-23utimens upgrade to support futimes.Paul Eggert
2004-11-23(__attribute__, ATTRIBUTE_UNUSED): New macros.Paul Eggert
(futimens): New function, which uses futimes if available. (futimens, utimens): Support timespec==NULL, with same semantics as utime and utimens.
2004-11-23(futimens): New decl.Paul Eggert
2004-11-23add a commentJim Meyering
2004-11-23*** empty log message ***Jim Meyering
2004-11-23Revert last change, since it seems EBADF is always defined.Jim Meyering
2004-11-22*** empty log message ***Jim Meyering
2004-11-22(EBADF): Fail with `#error ...' if it's not defined,Jim Meyering
asking the user to report the problem.
2004-11-17Sync from gnulib.Paul Eggert
2004-11-17* xgetcwd.c: Work around Solaris 9 bug.Paul Eggert
2004-11-17Include <limits.h>, for PATH_MAX.Paul Eggert
(xgetcwd): Set errno correctly when failing. Work around Solaris 9 bug: getcwd sets errno==ERANGE even though the failure is actually due to a PATH_MAX problem.
2004-11-17Merge from gnulib.Paul Eggert
2004-11-17Recent checkins for getopt, canon-host.Paul Eggert
2004-11-17(_getopt_internal, _getopt_internal_r,Paul Eggert
_getopt_long_r, _getopt_long_only_r): argv is char **, not char *__getopt_argv_const *.
2004-11-17(getopt_long, _getopt_long_r, getopt_long_only,Paul Eggert
_getopt_long_only_r): Argv is now char**, not char *__getopt_argv_const*.
2004-11-17(getopt_long, _getopt_long_r, getopt_long_only,Paul Eggert
_getopt_long_only_r): Argv is now char **, not char *__getopt_argv_const*.