summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2004-12-02Assume <locale.h> exists.Paul Eggert
(human_readable): Assume localeconv exists.
2004-12-02Assume <locale.h> exists.Paul Eggert
Include "strdup.h". (GLIBC_VERSION): New macro. (hard_locale): Assume setlocale exists. Rewrite to avoid #ifdef. Use strdup rather than malloc + strcpy.
2004-12-01* getcwd.c: Use system getcwd first, if appropriate.Paul Eggert
2004-12-01(is_ENAMETOOLONG): New macro.Paul Eggert
(__getcwd.c): Don't restore errno; glibc doesn't. [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd first, falling back to our code only if its results look suspicious. Ensure that the resulting buffer is only as large as necessary.
2004-12-01Go back to including <sys/types.h> rather than <stddef.h>; this isPaul Eggert
needed on OpenBSD since its <utmp.h> needs time_t without making sure that time_t is defined.
2004-11-30Make readutmp more consistent among its client code.Paul Eggert
2004-11-30Don't include <sys/types.h>, <errno.h>,Paul Eggert
<sys/param.h>, <time.h>; not needed to establish interface. Include <stddef.h> instead. (errno): Remove decl. (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed. (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
2004-11-30Include readutmp.h first.Paul Eggert
Include <errno.h>, since readutmp.h no longer does that.
2004-11-30.Jim Meyering
2004-11-30renamed to chdir-long.[ch]Jim Meyering
2004-11-30*** empty log message ***Jim Meyering
2004-11-30(libfetish_a_SOURCES): Reflect name changes: chdir.[ch] -> chdir-long.[ch]Jim Meyering
2004-11-30Include chdir-long.h rather than chdir.h.Jim Meyering
(restore_cwd): Use chdir_long, not chdir.
2004-11-30*** empty log message ***Jim Meyering
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.