Commit Graph

2133 Commits

Author SHA1 Message Date
Jim Meyering 29f888398d . 2001-09-26 07:55:04 +00:00
Jim Meyering ec6cab66bf *** empty log message *** 2001-09-25 13:01:36 +00:00
Jim Meyering 08575c4bce (rpl_gettimeofday): Declare local variable `result'. 2001-09-25 13:01:22 +00:00
Jim Meyering b310d2131d . 2001-09-23 15:47:00 +00:00
Jim Meyering 5e7630f24f *** empty log message *** 2001-09-23 08:56:27 +00:00
Jim Meyering 4bccf0b322 Remove useless parentheses in #if directives.
(MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
the deprecated MOUNTED symbol is no longer defined in mntent.h.
2001-09-23 08:56:11 +00:00
Jim Meyering b7b37133ac . 2001-09-22 16:39:57 +00:00
Jim Meyering e8d79c1502 *** empty log message *** 2001-09-22 15:08:51 +00:00
Jim Meyering 8d45c22c3c Update from latest gettext. 2001-09-22 15:08:35 +00:00
Jim Meyering 16aef05416 . 2001-09-22 13:27:04 +00:00
Jim Meyering 8000bd993e . 2001-09-22 13:18:57 +00:00
Jim Meyering b5fd786410 (strtoimax): Guard declaration with
`#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
have their own, conflicting declaration of strtoimax in sys/inttypes.h.
(strtoumax): Likewise, for completeness (it wasn't necessary).
2001-09-20 14:46:55 +00:00
Jim Meyering b6f0933da1 *** empty log message *** 2001-09-17 10:24:27 +00:00
Jim Meyering d6e1aff5e6 (HAVE_LONG_LONG): Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
(strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
to work around bug in IBM C compiler.
2001-09-17 10:24:20 +00:00
Jim Meyering dd5500c678 . 2001-09-16 12:43:33 +00:00
Jim Meyering e105aad760 *** empty log message *** 2001-09-16 12:42:14 +00:00
Jim Meyering 09026d5413 *** empty log message *** 2001-09-04 20:28:35 +00:00
Jim Meyering c01a38db4d Revert some of the previous change; intead,
fix the HAVE_GETCWD_NULL code to behave more like the
!HAVE_GETCWD_NULL code used to.

Include "xalloc.h".
(xgetcwd): Do not return NULL when memory is exhausted; instead,
invoke xalloc_die.
2001-09-04 20:28:31 +00:00
Jim Meyering 121f936e4f . 2001-09-04 20:22:47 +00:00
Jim Meyering 28526f7763 (xreadlink): Update prototype. 2001-09-04 20:21:54 +00:00
Jim Meyering beb34bac0a (xreadlink): Omit size_t* arg. All uses changed.
Use ssize_t, not int, to store result of readlink.
Check for ssize_t overflow as well as size_t overflow,
as POSIX says the result of readlink is implementation-defined
when ssize_t overflows.
Remove unnecessary cast to char*.
Use free+malloc instead of realloc, as the storage doesn't need
to be preserved and it's clearer and can be more efficient that way.
(SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
2001-09-04 20:20:16 +00:00
Jim Meyering 6ea18cc152 *** empty log message *** 2001-09-03 18:46:09 +00:00
Jim Meyering 5aa9a43b0c (fnmatch_no_wildcards): Fix confusion between
usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
spotted by Jim Meyering.
2001-09-03 18:45:20 +00:00
Jim Meyering f839ec4d47 include errno.h etc, too 2001-09-03 18:32:05 +00:00
Jim Meyering b2b3e046e7 *** empty log message *** 2001-09-03 18:26:58 +00:00
Jim Meyering f5d7ab79b8 tweak comment 2001-09-03 18:26:42 +00:00
Jim Meyering c9488ff0e1 (xreadlink): Preserve errno around `free' during failure. 2001-09-03 18:25:58 +00:00
Jim Meyering 8df5a2474c update comment re power of 2 2001-09-03 18:24:37 +00:00
Jim Meyering cb2a0f5e50 Fix the !HAVE_GETCWD_NULL code to behave more
like the HAVE_GETCWD_NULL code.
Include pathmax.h if not HAVE_GETCWD.
Do not include xalloc.h.
(INITIAL_BUFFER_SIZE): New symbol.
Do not use xmalloc / xrealloc, since the caller is responsible for
handling errors.  Preserve errno around `free' during failure.
Do not overrun buffer when using getwd.
2001-09-03 18:21:53 +00:00
Jim Meyering f5a12e3c11 *** empty log message *** 2001-09-03 07:43:54 +00:00
Jim Meyering ae60bce16e (xgetcwd): Use HAVE_GETCWD_NULL, not (defined __GLIBC__ && __GLIBC__ >= 2),
to decide whether to use getcwd (NULL, 0).
2001-09-03 07:43:44 +00:00
Jim Meyering cd8327ce2d *** empty log message *** 2001-09-02 13:22:33 +00:00
Jim Meyering 79a41c2f8b Update from GNU libc. 2001-09-02 13:22:25 +00:00
Jim Meyering 9e2ed8d97a . 2001-09-01 09:53:58 +00:00
Jim Meyering 4c419b468b *** empty log message *** 2001-09-01 09:53:48 +00:00
Jim Meyering 31555f918c *** empty log message *** 2001-09-01 09:50:48 +00:00
Jim Meyering 1d9ccbf010 (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h. 2001-09-01 09:50:21 +00:00
Jim Meyering 1db0824586 . 2001-09-01 07:43:13 +00:00
Jim Meyering 4d9bd13285 *** empty log message *** 2001-09-01 07:40:02 +00:00
Jim Meyering 6fd75407f4 (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
doesn't conflict with sparc-sun-solaris2.7's definition in
/usr/include/sys/int_types.h.
2001-09-01 07:39:56 +00:00
Jim Meyering 1d07c58db8 *** empty log message *** 2001-09-01 07:29:08 +00:00
Jim Meyering 847d1c0da7 Use ""', not <>' to #include non-system header files.
(fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
and strncasecmp as r-values.  Unixware didn't have declarations.
2001-09-01 07:28:51 +00:00
Jim Meyering 414d5f13be fix typo 2001-09-01 06:13:08 +00:00
Jim Meyering 985cae59cb *** empty log message *** 2001-08-31 11:41:46 +00:00
Jim Meyering 72ee797c44 (xgetcwd): Reorganize to avoid some duplication.
Use an initial, malloc'd, buffer of length 128 rather than
a statically allocated one of length 1024.
2001-08-31 11:39:16 +00:00
Jim Meyering 73caa61683 *** empty log message *** 2001-08-31 10:36:23 +00:00
Jim Meyering ee65e66c6c Don't include pathmax.h.
Include stdlib.h and unistd.h if available.
Include xalloc.h.
(xmalloc, xstrdup, free): Remove decls.
(xgetcwd): Don't assume sizes fit in unsigned.
Check for overflow when computing sizes.
Simplify reallocation code.
2001-08-31 10:36:12 +00:00
Jim Meyering d50c8903f9 *** empty log message *** 2001-08-31 09:39:22 +00:00
Jim Meyering b51a19058f Include strtoimax.c, not strtouxmax.c. 2001-08-31 09:39:10 +00:00
Jim Meyering c1845ef979 Renamed from strtoxmax.c, removing the old strtoimax.c.
Also, make the following further changes to make this file's
configuration more similar to that of strtol.c:
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
(strtoumax, uintmax_t, strtoull, strtol): Remove.
(intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
(strtoimax): Renamed from strtoumax.  All uses of unsigned values
changed to signed values.

And make the following changes as well:
Fix copyright notice, as 1999 was missing.
(verify): New macro.
(strtoimax): Check sizes at compile-time, not run-time.
Prefer strtol to strtoll if both work.
(main): Remove; it was not that useful and was a pain to maintain.
2001-08-31 09:37:58 +00:00