Commit Graph

2146 Commits

Author SHA1 Message Date
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
Jim Meyering
ed3076c1e3 . 2001-08-31 09:30:02 +00:00
Jim Meyering
436ab156b1 (libfetish_a_SOURCES): Remove strtoxmax.c. 2001-08-31 09:29:44 +00:00
Jim Meyering
2c63fed0e8 (savedir): Remove size parameter, as POSIX says that
a directory's st_size can have an arbitrary value, so the old
usage could waste an arbitrary amount of memory.  All uses
changed.
2001-08-31 09:09:53 +00:00
Jim Meyering
fab23e172d Update prototype. 2001-08-31 09:09:35 +00:00
Jim Meyering
45f197087d *** empty log message *** 2001-08-31 08:18:06 +00:00
Jim Meyering
2fb1f177d9 (strtoimax): New decl. 2001-08-31 08:17:45 +00:00
Jim Meyering
dc1f8d9a16 *** empty log message *** 2001-08-31 08:16:12 +00:00
Jim Meyering
2adb484d90 * lib/xstrtol.h: Add copyright notice.
(_DECLARE_XSTRTOL): Improve quality of diagnostic for
LONGINT_INVALID_SUFFIX_CHAR.
2001-08-31 08:15:10 +00:00
Jim Meyering
46abc467c6 *** empty log message *** 2001-08-31 07:52:28 +00:00
Jim Meyering
b1828eec81 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. 2001-08-31 07:51:13 +00:00
Jim Meyering
a6ad856b3b *** empty log message *** 2001-08-31 07:49:54 +00:00
Jim Meyering
8a7b2f0191 Remove '2001' from copyright notice. 2001-08-31 07:49:39 +00:00
Jim Meyering
7de89daf4d *** empty log message *** 2001-08-31 07:37:47 +00:00
Jim Meyering
4337731793 copyright 2001-08-31 07:35:47 +00:00
Jim Meyering
04b726d04d Include full-write.h. 2001-08-31 07:35:37 +00:00
Jim Meyering
16dc8023ae *** empty log message *** 2001-08-31 07:34:41 +00:00
Jim Meyering
c8ef0d4bbe (libfetish_a_SOURCES): Add full-write.h. 2001-08-31 07:34:13 +00:00
Jim Meyering
aee944ad9b Correct credits, as cccp.c no longer
exists and anyway it was so heavily changed from the old cccp
code as to be unrecognizable.  Include full-write.h.
(full_write) Return size_t, with short writes meaning failure.
All callers changed.  This fixes a bug with large buffers
on 64-bit hosts.
2001-08-31 07:29:05 +00:00
Jim Meyering
473f37a6c9 *** empty log message *** 2001-08-31 06:35:13 +00:00
Jim Meyering
90525ea340 (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): New macros.
(free_exclude): New decl.
(add_exclude, add_exclude_file): Now takes int options arg.
(excluded_filename): No longer requires options arg, as the options
are determined by add_exclude.  Now returns bool, not int.
2001-08-31 06:34:06 +00:00
Jim Meyering
083a5e420b Merge 'exclude' changes from tar 1.13.22.
This fixes one or two unlikely storage allocation overflow bugs,
but doesn't change user-visible behavior otherwise.

(bool): Declare, perhaps by including stdbool.h.
(<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
(<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
Include	if available.
(<xalloc.h>): Include
(SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
(verify): New macro.  Use it to verify that EXCLUDE macros do not
collide with FNM macros.
(struct patopts): New struct.
(struct exclude): Use it, as exclude patterns now come with options.
(new_exclude): Support above changes.
(new_exclude, add_exclude_file):
Initial size must now be a power of two to simplify overflow checking.
(free_exclude, fnmatch_no_wildcards): New function.
(excluded_filename): No longer requires options arg, as the options
are determined by add_exclude.  Now returns bool, not int.
(excluded_filename, add_exclude):
Add support for the fancy new exclusion options.
(add_exclude, add_exclude_file): Now takes int options arg.
Check for arithmetic overflow when computing sizes.
(add_exclude_file): xrealloc might modify errno, so don't
realloc until after errno might be used.
2001-08-31 06:33:42 +00:00
Jim Meyering
0f165cf273 *** empty log message *** 2001-08-30 19:19:10 +00:00
Jim Meyering
3b57acb098 (alloca): Arg is of type size_t, not unsigned. 2001-08-30 19:19:02 +00:00
Jim Meyering
aa69564e94 #define STRTOUXMAX_UNSIGNED 2001-08-27 21:25:15 +00:00
Jim Meyering
73dc52f0b9 whoops. Don't define anything here. imax is the default 2001-08-27 21:24:59 +00:00
Jim Meyering
fa9fc61ee6 . 2001-08-27 08:55:04 +00:00
Jim Meyering
7faf69c42d remove xstrtoxmax.c 2001-08-27 08:54:19 +00:00
Jim Meyering
61e5152b36 *** empty log message *** 2001-08-27 08:52:46 +00:00
Jim Meyering
301cc00d3b (libfetish_a_SOURCES): Add strtoxmax.c 2001-08-27 08:52:40 +00:00
Jim Meyering
1bd2ed97b2 Actually remove the definition of N_. 2001-08-27 08:50:19 +00:00
Jim Meyering
3a9d91bb57 (N_): Remove definition.
Revert most of last change.
Instead, simply don't mark the `Copyright...' string for translation.
Based on advice from Paul Eggert.
2001-08-27 08:50:04 +00:00
Jim Meyering
a26e5e37b8 *** empty log message *** 2001-08-27 08:46:16 +00:00
Jim Meyering
a2e87ae6d1 Tweak comment. 2001-08-27 08:46:08 +00:00
Jim Meyering
482dc4ee3c include strtoxmax.c 2001-08-27 08:44:27 +00:00
Jim Meyering
e698bc0929 renamed to strtoxmax.c 2001-08-27 08:43:54 +00:00
Jim Meyering
d64218ea47 renamed from strtouxmax.c 2001-08-27 08:31:30 +00:00
Jim Meyering
f86ac0a31d (version_etc_copyright_fmt): Replace literal year
of copyright with `%s' so translators don't get an untranslated message in 2002.
(COPYRIGHT_YEAR): Define.
(version_etc): Use fprintf rather than fputs.
2001-08-26 18:26:01 +00:00
Jim Meyering
52928277c2 . 2001-08-26 10:43:53 +00:00
Jim Meyering
a4b249905e . 2001-08-26 10:43:00 +00:00
Jim Meyering
de8c144109 Add xstrtoimax. 2001-08-26 10:42:50 +00:00
Jim Meyering
86c5732f05 *** empty log message *** 2001-08-26 10:41:57 +00:00
Jim Meyering
4a7159dc6c (libfetish_a_SOURCES): Add xstrtoimax.c. 2001-08-26 10:41:52 +00:00
Jim Meyering
84f5f8528f *** empty log message *** 2001-08-26 07:28:44 +00:00
Jim Meyering
a28d74d2d2 New file, from GNU libc. 2001-08-26 07:28:06 +00:00
Jim Meyering
a5a086c06e *** empty log message *** 2001-08-26 07:03:32 +00:00
Jim Meyering
ee356181ed *** empty log message *** 2001-08-26 07:03:07 +00:00
Jim Meyering
114c6c6af1 Stub. Just #define STRTOUXMAX_SIGNED, then
#include "strtouxmax.c"
2001-08-26 07:00:08 +00:00
Jim Meyering
96096e769d Now this file is just a stub. 2001-08-26 06:59:12 +00:00
Jim Meyering
b8d9cea40a Renamed from a factored strtoumax.c. 2001-08-26 06:58:10 +00:00
Jim Meyering
f9a905424f Factored to work both for unsigned and signed types, ... 2001-08-26 06:53:56 +00:00
Jim Meyering
3fcc2c725f . 2001-08-24 08:11:30 +00:00
Jim Meyering
e0f3ba1a46 update from libc 2001-08-24 06:39:29 +00:00
Jim Meyering
1683c6c470 update from glibc 2001-08-23 06:43:44 +00:00
Jim Meyering
f459045c8c . 2001-08-18 19:29:21 +00:00
Jim Meyering
af123efc85 . 2001-08-14 07:47:25 +00:00
Jim Meyering
6195ec1bc7 . 2001-08-14 06:59:30 +00:00
Jim Meyering
33795311ba whoops. remove the backslash, too. 2001-08-13 20:14:36 +00:00
Jim Meyering
60a8a47a86 *** empty log message *** 2001-08-13 20:11:15 +00:00
Jim Meyering
269f95aef7 (unlocked-io.h): Do not append "_unlocked" twice.
Port to Solaris 8, where 'sed' requires a space after the 'r'
command, and where sh dislikes "$/".  Clean up the spacing a bit.
Redirect output to $tmp just once.
2001-08-13 20:11:03 +00:00
Jim Meyering
c1c7368372 *** empty log message *** 2001-08-13 06:30:14 +00:00
Jim Meyering
7fda17ac4f (<errno.h>): Include.
(errno): Declare if not defined.
(addext): Work correctly when pathconf returns -1 and leaves
errno alone because there is no limit.  Also, work even if
pathconf returns a value greater than SIZE_MAX.
2001-08-13 06:30:10 +00:00
Jim Meyering
242256b45d *** empty log message *** 2001-08-12 20:11:49 +00:00
Jim Meyering
79dbd85e74 (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
Simply `return getcwd (NULL, 0);'.
[! (defined __GLIBC__ && __GLIBC__ >= 2)]:
Use 1300 as initial value for length, not PATH_MAX.
2001-08-12 20:11:39 +00:00
Jim Meyering
8982646a63 Clean up cpp syntax. 2001-08-12 18:49:13 +00:00
Jim Meyering
0b219591dd . 2001-08-12 17:50:42 +00:00
Jim Meyering
93696dfa49 update from libc 2001-08-12 13:02:20 +00:00
Jim Meyering
5bd7048dfe update from libc 2001-08-12 12:50:16 +00:00
Jim Meyering
43f4c1dfd6 update from libc 2001-08-12 12:49:11 +00:00
Jim Meyering
98950444e6 *** empty log message *** 2001-08-12 08:37:22 +00:00
Jim Meyering
1249a88daf (libfetish_a_SOURCES): Add gtod.h. 2001-08-12 08:33:25 +00:00
Jim Meyering
1d3ea9cba8 *** empty log message *** 2001-08-12 08:33:09 +00:00
Jim Meyering
34c138f62a *** empty log message *** 2001-08-04 17:52:45 +00:00
Jim Meyering
0e6ddcffef (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
to get in sync with glibc.
2001-08-04 17:52:38 +00:00
Jim Meyering
0017571134 *** empty log message *** 2001-08-04 17:07:43 +00:00
Jim Meyering
752fb79cac Don't include <limits.h>.
Include <stdlib.h> and <string.h> unconditionally.
(iswcntrl, mbsinit, ISCNTRL): New macros.
(mbsnwidth): Use K&R style function declarations.
Don't bother checking for MB_LEN_MAX == 1, since the compiler
can optimize it when MB_CUR_MAX == 1.
The width of control characters is zero, not 1.
2001-08-04 17:07:37 +00:00
Jim Meyering
465a0e3b5e (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
with inverted sense.  All uses changed.
2001-08-04 17:06:05 +00:00
Jim Meyering
86b6fbd90c . 2001-07-15 16:28:39 +00:00
Jim Meyering
b0e6b6a062 *** empty log message *** 2001-07-15 15:42:38 +00:00
Jim Meyering
b4f1cf7143 (all-local): Depend on unlocked-io.h, to ensure it is created. 2001-07-15 15:42:27 +00:00
Jim Meyering
24950c329b *** empty log message *** 2001-07-15 15:35:02 +00:00
Jim Meyering
c3db551fd7 (DISTCLEANFILES): Add unlocked-io.h. 2001-07-15 15:29:05 +00:00
Jim Meyering
70d3f1e772 *** empty log message *** 2001-07-15 15:17:12 +00:00
Jim Meyering
982d395b6a (EXTRA_DIST): Add unlocked-io.hin.
(BUILT_SOURCES): Add unlocked-io.h.
(io_functions): Define.
(unlocked-io.h): New rule.
2001-07-15 15:14:18 +00:00
Jim Meyering
11cfdfba16 *** empty log message *** 2001-07-15 15:13:14 +00:00
Jim Meyering
3cc73c9659 *** empty log message *** 2001-07-15 14:39:51 +00:00
Jim Meyering
82f4ea062b Update from glibc. 2001-07-15 14:39:46 +00:00
Jim Meyering
f1a6dd3dcc (__attribute__): Define it to be empty for compilers
that don't support that syntax.
2001-07-14 19:47:20 +00:00