Jim Meyering [Mon, 12 Jan 1998 08:13:39 +0000 (08:13 +0000)]
Include sys/param.h only #if HAVE_SYS_PARAM_H.
Move function-spanning `#if ...BSIZE' stmt to follow inclusion of
sys/param.h since BSIZE is sometimes defined in sys/param.h.
Based on a patch from Philippe De Muyter.
Jim Meyering [Tue, 6 Jan 1998 23:53:33 +0000 (23:53 +0000)]
Add %expect directive.
Move inclusion of getdate.h and dependent extern declarations down
so getdate.h's prototype follows the sometimes-enabled definition
of `const' to nothing. Otherwise, the prototype wouldn't match
the definition because of the defined-away `const'.
(get_date): ANSI-fy definition.
From Kaveh Ghazi.
Jim Meyering [Mon, 5 Jan 1998 17:33:54 +0000 (17:33 +0000)]
(PROPAGATE_ALL_ONES): New macro.
(get_fs_usage): If a value consists entirely of 1 bits,
propagate this info to the output by setting it to (uintmax_t) -1.
Jim Meyering [Fri, 2 Jan 1998 23:15:39 +0000 (23:15 +0000)]
(make_path): Try to change ownership only if we've just created the
directory. Fix latent bug (s/&&/||/ in two places -- also, note that
it could not be exercised via install or mkdir) whereby chown would
not be invoked when only one of owner/group is not -1.
Jim Meyering [Sun, 21 Dec 1997 11:17:20 +0000 (11:17 +0000)]
(rpl_chown): Rename from chown.
Undefine chown just after including config.h.
Include sys/stat.h.
Use correct ordering of uid and gid parameters both in function
definition and in call to chown.
With patches from Kaveh Ghazi.
Karl Heuer [Tue, 9 Dec 1997 23:01:27 +0000 (23:01 +0000)]
(TYPICAL_FAILURE_SIZE): Renamed from MAX_FAILURE_ITEMS.
Define it simply as a number.
(DOUBLE_FAIL_STACK, regex_compile): Set the limit at the size
TYPICAL_FAILURE_SIZE specifies, rather than at twice that much.
(re_max_failures): Double the initial values.
(INIT_FAIL_STACK): Use TYPICAL_FAILURE_SIZE so that INIT_FAILURE_ALLOC
counts in the proper units.
(INIT_FAILURE_ALLOC): Increase to 20.
(FAIL_STACK_GROWTH_FACTOR): New macro.
(GROW_FAIL_STACK): Renamed from DOUBLE_FAIL_STACK.
FAIL_STACK_GROWTH_FACTOR controls what ratio to increase size by.
Jim Meyering [Sun, 30 Nov 1997 10:24:41 +0000 (10:24 +0000)]
(savedir): Check for size zero before invoking
malloc; this can occur if st_size arg overflows on conversion to
unsigned int. All callers now cast st_size arg to unsigned int.
Jim Meyering [Sun, 30 Nov 1997 10:24:24 +0000 (10:24 +0000)]
Do all calculations using uintmax_t.
Include <inttypes.h> if available.
(adjust_blocks, CONVERT_BLOCKS): Remove.
(get_fs_usage): Set new member fsu_blocksize, and do not convert
numbers to 512-byte block units; this avoids overflow here.
Cast lseek arg to off_t, not long.
Jim Meyering [Sun, 30 Nov 1997 10:24:20 +0000 (10:24 +0000)]
(st_blocks): long -> off_t.
Avoid arithmetic overflow when size is near max.
Depend on _POSIX_SOURCE and BSIZE, not _POSIX_VERSION, for
compatibility with system.h.
(BSIZE): Remove definition, since if BSIZE is not defined
we're never invoked.
Jim Meyering [Sat, 15 Nov 1997 05:28:04 +0000 (05:28 +0000)]
Temporarily add a copy of this file from the automake
distribution. Update names to have jm_ prefix.
(irix_6_4_bug): New function based on code from Ariel Faigon.