1 2004-05-13 Paul Eggert <eggert@cs.ucla.edu>
3 * nanosleep.c (suspended): Change its type from int to
5 (first_call): Make it private to rpl_nanosleep, and have it
6 be zero initially as that's a bit faster.
7 (my_usleep): Round up fractional times instead of truncating them,
8 as this is the usual meaning for 'sleep'.
10 * gettime.c (gettime): Fall back on `time' if `gettimeofday'
12 * settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
13 (ENOSYS): Define if not defined.
14 (settime): Fall back on stime if it exists and settimeofday fails.
15 But don't bother with fallbacks if a method fails with errno == EPERM.
17 2004-05-11 Jim Meyering <jim@meyering.net>
19 Prior to this change, the save_cwd caller required read access to the
20 current directory on most systems (ones with the fchdir function).
22 * save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23 fails, try write-only, and finally, resort to using xgetcwd.
25 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
27 * obstack.c, obstack.h: Import changes from libc.
29 2004-04-28 Bruno Haible <bruno@clisp.org>
31 * findprog.c (find_in_path): Treat Cygwin like Windows, since it also
32 implicitly appends .exe to executables.
33 * localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
34 accepts Windows pathnames.
35 * pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
36 Cygwin like Windows, since it now accepts Windows pathnames.
37 * progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
38 Cygwin like Windows, since it now accepts Windows pathnames.
39 Reported by Derek Robert Price <derek@ximbiot.com>.
41 2004-04-20 Jim Meyering <jim@meyering.net>
43 * getndelim2.c (getndelim2): Upon realloc failure, don't leak memory.
45 2004-04-20 Jim Meyering <jim@meyering.net>
46 Bruno Haible <bruno@clisp.org>
48 * localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
49 memory when realloc fails.
51 2004-04-18 Jim Meyering <jim@meyering.net>
53 * readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc failure,
54 don't leak memory and do call END_UTMP_ENT.
56 2004-04-11 Paul Eggert <eggert@twinsun.com>
58 * inttostr.h: Include <limits.h> unconditionally, since we assume C89.
59 (CHAR_BIT): Remove, since we assume C89.
60 Include <stdint.h> if available, as per current Autoconf CVS advice.
62 2004-03-30 Paul Eggert <eggert@twinsun.com>
64 * cloexec.h, cloexec.c (set_cloexec_flag): Return int
65 not bool, to be more consistent with Unix conventions.
66 Suggested by Bruno Haible.
70 * imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
73 * getdate.h: Include stdbool.h, and timespec.h instead of
74 the usual <time.h> dance.
75 (get_date): Change signature to support fractional time stamps.
77 * getdate.y: Include "getdate.h" first, as we can now
78 assume C89 and don't need to worry about 'const'.
79 Similarly, include "unlocked-io.h" near start, not in middle.
81 (textint.value): Use long int rather than int.
82 (textint.digits): Use size_t rather than int.
83 (BILLION, LOG10_BILLION): New constants.
84 (parser_control): New member rel_ns. Members day_ordinal,
85 time_zone, month, day, hour, minutes, rel_year, rel_month,
86 rel_day, rel_hour, rel_minutes, rel_seconds
87 are now long int, not int. Member seconds is now struct timespec,
88 not int. New member timespec_seen. Members dates_seen, days_seen,
89 local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
91 (%union.intval): Now long int, not int.
93 (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
94 (seconds, signed_seconds, unsigned_seconds): New nonterminals.
95 (spec): Now is a timespec or an item list.
96 (timespec, items): New nonterminals.
97 (time, rel, relunit, number, get_date):
98 Add support for fractional seconds.
99 (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
100 (gmtime, localtime, mktime): Remove decls; not needed with C89.
101 (to_hour): First arg is now long int, not int.
102 (to_year): Returns long int, not int.
103 Don't treat year -70 like 70.
104 (tm_diff): Returns long int, not int.
105 (lookup_word): Use bool instead of int when appropriate.
106 (yylex): Use size_t for count, not int.
107 Detect overflow when parsing large integer constants.
108 Add support for fractions.
109 (get_date): Make pointers 'const' if possible.
110 Use more-portable code to detect integer overflow.
111 (main) [TEST]: Adjust to above changes. Test for localtime failure.
112 Don't use ctime; it's not reliable if the year has >4 digits.
114 * human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
115 This is for compatibility with BSD.
117 * timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
118 (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
119 From coreutils' system.h.
121 * userspec.c: Don't include "posixver.h".
122 (parse_user_spec): Fall back on USER.GROUP parsing, regardless
123 of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
124 compatible extension. Simplify code by removing a boolean int
125 that was always nonzero if a string was nonnull.
127 2004-03-30 Jim Meyering <jim@meyering.net>
129 Merge from coreutils.
131 * mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
133 * readtokens.c (readtoken): Don't leak 64 bytes when reading
134 an empty input stream.
136 * readtokens.c: Include <stdbool.h>.
137 (readtoken): Use `size_t' rather than int/long.
138 All callers adjusted.
139 Use `bool' rather than `int' where appropriate.
140 Use memset rather than an explicit loop.
141 Use x2nrealloc rather than xrealloc.
142 Allow the use of `\0' as a delimiter.
143 (readtokens): Likewise.
144 * readtokens.h (readtoken, readtokens): Update prototypes.
146 2004-03-30 Bruno Haible <bruno@clisp.org>
148 * getloadavg.c (getloadavg): Don't assume setlocale returns
151 2004-03-29 Paul Eggert <eggert@twinsun.com>
153 Merge changes to getloadavg.c from coreutils and Emacs.
155 * getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
156 Define to an expression, not to the empty string.
157 Include cloexec.h and xalloc.h.
158 (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
159 Use set_cloexec_flag rather than rolling our own.
160 * cloexec.c, cloexec.h: New files.
162 2004-03-18 Paul Eggert <eggert@twinsun.com>
164 * getopt.h: Sync with libc CVS.
166 2004-03-18 Paul Eggert <eggert@twinsun.com>
167 Bruno Haible <bruno@clisp.org>
169 * mbswidth.h: Include <wchar.h> only if HAVE_DECL_MBSWIDTH_IN_WCHAR_H,
170 not on all platforms that have <wchar.h>.
171 * mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
173 2004-03-09 Paul Eggert <eggert@twinsun.com>
175 * argp-parse.c, getopt.c, getopt.h, getopt1.c:
177 * getopt_int.h: New file, also synced from libc.
179 2004-03-07 Paul Eggert <eggert@twinsun.com>
181 * c-stack.c (SIGACTION_WORKS): New macro. Use it instead of long
182 '#if' expressions. Unlike the code it replaces, it does not
183 depend on (defined _SC_PAGESIZE). However, it does depend on
184 HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
185 first reported by Jason Andrade in
186 <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
188 2004-01-18 Simon Josefsson <jas@extundo.com>
190 * strdup.h: New file.
191 * strdup.c: Include it.
192 * path-concat.c: Include strdup.h. Drop strdup declaration.
193 * userspec.c: Include strdup.h. Drop strdup declaration.
195 2004-02-06 Karl Berry <karl@gnu.org>
197 * config.charset: update from gettext 0.14.1.
199 2004-02-05 Paul Eggert <eggert@twinsun.com>
201 Add comments and code, prompted by suggestions from Bruno Haible
203 * quotearg.h (quotearg_alloc): New decl. Improve the comments
204 describing the enum quoting_style values.
205 * quotearg.c (quotearg_alloc): New function.
206 (quotearg_buffer_restyled): Treat lone { and } as special.
207 Treat = as special. Work around bug with older shells
208 that "see" a '\' that is really the 2nd byte of a multibyte char.
209 Quote empty string with shell_quoting_style.
211 2004-02-03 Bruno Haible <bruno@clisp.org>
213 * pipe.h: New file, from GNU gettext.
214 * pipe.c: New file, from GNU gettext.
216 2004-01-27 Bruno Haible <bruno@clisp.org>
218 * execute.h: New file, from GNU gettext.
219 * execute.c: New file, from GNU gettext.
220 * w32spawn.h: New file, from GNU gettext.
222 2004-01-23 Paul Eggert <eggert@twinsun.com>
224 Exit-status fix from coreutils.
226 Use exit_failure consistently in place of EXIT_FAILURE,
227 so that program exit statuses are consistent on failure.
229 * argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
230 Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
231 * argmatch.h: Comment fix to match the above.
232 * obstack.c (obstack_exit_failure) [!defined _LIBC]:
233 Now a macro referring to exit_failure, instead of a separate
234 variable. Include "exitfail.h" to get it.
235 * xstrtol.h: Include "exitfail.h".
236 (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
238 * long-options.c (parse_long_options): Use prototype
239 for usage function arg. Pass it EXIT_SUCCESS rather than 0,
242 2004-01-21 Jim Meyering <jim@meyering.net>
244 * mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
245 so as not to conflict with a different-sized __mktime_internal
246 function in GNU libc.
247 * timegm.c (__mktime_internal) [!_LIBC]: Likewise.
248 Problem building statically-linked `ls' reported by Michael Brunnbauer.
250 2004-01-18 Paul Eggert <eggert@twinsun.com>
252 Merge from diffutils.
254 * file-type.c (file_type): Add typed memory objects.
255 * file-type.h (S_TYPEISTMO): New macro.
257 * c-stack.h (c_stack_action): Remove argv argument.
258 * c-stack.c (c_stack_action): Likewise. All uses changed.
259 (die): Don't calculate message unless segv_action returns.
260 (get_stack_location, min_address_from_argv, max_address_from_argv,
261 volatile stack_base, volatile_stack_size): Remove.
262 (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
263 that every segmentation violation is a stack overflow. (Ouch!)
264 See Debian bug 136249 (still outstanding) for more info about why
265 HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
267 2003-11-30 Bruno Haible <bruno@clisp.org>
269 Safer stack allocation.
270 * setenv.c: Include allocsa.h.
271 (alloca): Remove fallback definition.
272 (freea): Remove macro.
273 (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
276 2003-10-17 Bruno Haible <bruno@clisp.org>
278 * binary-io.h: Avoid warnings on Cygwin.
280 2003-12-28 Bruno Haible <bruno@clisp.org>
282 * wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
283 * wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE specially.
285 2003-11-28 Bruno Haible <bruno@clisp.org>
287 * wait-process.c (cleanup_slaves): Use ANSI C declaration.
289 2003-11-27 Bruno Haible <bruno@clisp.org>
291 * wait-process.c: On Windows, include windows.h. Needed on mingw.
293 2003-11-17 Bruno Haible <bruno@clisp.org>
295 * wait-process.c (wait_process): Disable the 2003-10-31 waitid() patch.
297 2003-11-24 Bruno Haible <bruno@clisp.org>
299 * xallocsa.h: New file, from GNU gettext.
300 * xallocsa.c: New file, from GNU gettext.
302 2003-11-24 Bruno Haible <bruno@clisp.org>
304 * allocsa.h: New file, from GNU gettext.
305 * allocsa.c: New file, from GNU gettext.
307 2003-11-24 Bruno Haible <bruno@clisp.org>
309 * eealloc.h: New file.
311 2004-01-15 Jim Meyering <jim@meyering.net>
313 Merge from coreutils.
315 * md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code. These
316 days, gcc-3.x does better all by itself. Patch from Dean Gaudet:
317 http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
319 * posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
320 optional configure-time default.
322 * version-etc.c (version_etc_copyright): Update copyright date.
324 * xreadlink.c (xreadlink): Correct outdated comment.
326 2004-01-15 Paul Eggert <eggert@twinsun.com>
328 Merge from coreutils.
330 * posixver.c: Include posixver.h.
332 * same.c: Include <stdbool.h>, <limits.h>.
333 (_POSIX_NAME_MAX): Define if not defined.
335 (same_name): If file names are silently truncated, report
336 that the file names are the same if they are the same after
337 the silent truncation.
339 * xstrtod.h (xstrtod): Accept an extra arg, specifying the
341 * xstrtod.c (xstrtod): Likewise. All callers changed to
342 include c-strtod.h and use c_strtod. Don't include stdlib.h; no
345 2004-01-14 Paul Eggert <eggert@twinsun.com>
347 * fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
348 with like-named macro in fnmatch.c.
349 (EXT): Use an internal constant instead.
351 Merge fnmatch patches from glibc.
352 * fnmatch.c (mbsinit): Remove define.
353 Add libc_hidden_ver (__fnmatch, fnmatch).
354 * fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
355 Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
357 2003-12-14 Karl Berry <karl@gnu.org>
359 * config.charset: update from gettext-runtime.
361 2003-12-03 Paul Eggert <eggert@twinsun.com>
363 * getgroups.c (getgroups): xmalloc takes one argument, not two.
364 Bug reported by Alfred M. Szmidt.
366 2003-11-29 Karl Berry <karl@gnu.org>
368 * argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
370 2003-11-23 Paul Eggert <eggert@twinsun.com>
371 Bruno Haible <bruno@clisp.org>
373 * printf-parse.h: Don't include sys/types.h.
374 (ARG_NONE): New macro.
375 (char_directive): Change type of *arg_index fields to size_t.
376 * printf-parse.c: Don't include sys/types.h.
377 (SSIZE_MAX): Remove macro.
378 (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
379 Remove unnecessary overflow check.
380 * vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
383 2003-11-24 Paul Eggert <eggert@twinsun.com>
385 * alloca.c: Remove dependency on xalloc module.
386 (xalloc_die): Remove.
387 (memory_full) [!defined emacs]: New macro.
388 [!defined emacs]: Don't include xalloc.h.
389 (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
390 address arithmetic overflows. Change datatypes a bit to avoid
393 2003-11-22 Jim Meyering <jim@meyering.net>
395 * xmalloc.c (x2nrealloc_inline): Fix typos in comments: s/size/size_t/.
397 2003-11-17 Bruno Haible <bruno@clisp.org>
399 * vasnprintf.c (alloca): Remove fallback definition.
400 (freea): Remove definition.
401 (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
402 Reported by Paul Eggert.
404 2003-11-17 Jim Meyering <jim@meyering.net>
406 On systems without utime and without a utimes function capable of
407 dealing with a NULL struct utimbuf* argument, this utime replacement
408 could -- in unusual circumstances -- leak a file descriptor.
409 * utime.c: Include <unistd.h> and <errno.h>.
410 (utime_null): Be sure to close `fd' and to preserve errno.
411 Reported by Geoff Collyer via Arnold Robbins.
413 2003-11-16 Paul Eggert <eggert@twinsun.com>
414 Bruno Haible <bruno@clisp.org>
416 Protect against address arithmetic overflow.
417 * printf-args.h: Include stddef.h.
418 (arguments): Change type of field 'count' to size_t.
419 * printf-args.c (printf_fetchargs): Use size_t instead of
420 'unsigned int' where appropriate.
421 * printf-parse.h: Include sys/types.h.
422 (char_directive): Change type of *arg_index fields to ssize_t.
423 (char_directives): Change type of fields 'count', max_*_length to
425 * printf-parse.c: Include sys/types.h and xsize.h.
426 (SSIZE_MAX): Define fallback value.
427 (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
428 instead of 'int' where appropriate. Check a_allocated, d_allocated
429 against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
430 * vasnprintf.c: Include xsize.h.
431 (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
432 Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
433 overflow. Avoid wraparound when converting a width or precision from
436 2003-11-16 Bruno Haible <bruno@clisp.org>
438 Update from GNU gettext.
439 * printf-parse.c: Generalize to it can be compiled for wide strings.
440 (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
441 * vasnprintf.c: Generalize to it can be compiled for wide strings.
442 (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
443 SNPRINTF): New macros.
444 Don't include <alloca.h> if the file is used inside libintl.
445 (local_wcslen): New function, for Solaris 2.5.1.
446 (VASNPRINTF): Use it instead of wcslen.
448 2003-11-16 Bruno Haible <bruno@clisp.org>
450 * xsize.h (xmax): New function.
451 (xsum, xsum3, xsum4): Declare as "pure" functions.
453 2003-11-12 Paul Eggert <eggert@twinsun.com>
455 * xalloc.h: Do not include <limits.h> or <stdint.h>.
456 (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
457 the heuristic, rather than PTRDIFF_MAX and SIZE_MAX. This
458 heuristic is just as accurate as far as we know, and it removes a
459 dependency on size_max.m4 and ptrdiff_max.m4.
461 2003-11-12 Paul Eggert <eggert@twinsun.com>
463 * xstrtol.c (__xstrtol): Remove "break" immediately after
464 "return", to pacify some unknown compiler. Problem reported
467 2003-11-11 Bruno Haible <bruno@clisp.org>
469 * xsize.h (SIZE_MAX): Remove fallback definition.
470 * xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
473 2003-11-10 Paul Eggert <eggert@twinsun.com>
475 * xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
476 PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
477 rejected some allocations of exactly SIZE_MAX - 2 bytes.
479 [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
480 not (size_t) -1, since it's defined here.
482 2003-11-06 Paul Eggert <eggert@twinsun.com>
484 * xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
485 (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
486 Reject sizes of exactly SIZE_MAX bytes.
487 * xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
488 is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
490 2003-11-05 Bruno Haible <bruno@clisp.org>
492 * xsize.h: Include limits.h, to avoid a possible collision with
493 SIZE_MAX defined in <limits.h> on Solaris.
495 2003-11-04 Bruno Haible <bruno@clisp.org>
498 * linebreak.c: Include xsize.h.
499 (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
500 argument for overflow.
501 Suggested by Paul Eggert.
503 2003-10-31 Bruno Haible <bruno@clisp.org>
505 * wait-process.c (wait_process): Use waitid with WNOWAIT if available,
506 to avoid (extremely rare) race condition.
507 Suggested by Paul Eggert.
509 2003-11-03 Jim Meyering <jim@meyering.net>
511 * userspec.c: Include "userspec.h".
512 * userspec.h: New file.
514 2003-10-31 Paul Eggert <eggert@twinsun.com>
516 * mountlist.h (struct mount_entry.me_type_malloced): New member.
517 * mountlist.c (SIZE_MAX): Define if not defined already.
518 (read_filesystem_list): Set and use me_type_malloced.
519 Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
520 whatever the type happens to be), for brevity and consistency.
521 Check for size calculation overflow on Alphas running OSF/1.
523 2003-10-31 Jim Meyering <jim@meyering.net>
525 * hash.c: Include "xalloc.h" for use of xalloc_oversized.
527 * linebuffer.c: Include <string.h> for declaration of memset.
529 2003-10-30 Paul Eggert <eggert@twinsun.com>
530 Bruno Haible <bruno@clisp.org>
532 * vasprintf.c: Include <limits.h>, <stdlib.h>.
533 (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
535 2003-10-29 Paul Eggert <eggert@twinsun.com>
537 * xalloc.h (xalloc_oversized): Now a macro, not a function,
538 so that it works even if SIZE_MAX < N. Do not include <stdbool.h>;
540 * quotearg.c (quotearg_n_options): Use it.
541 * group-member.c: Include <stdbool.h>.
542 (free_group_info): Arg is now const *; don't free arg.
543 (get_group_info): Now returns bool and accepts struct group_info *,
544 rather than returning a malloc'ed struct group_info *.
545 All uses changed. Check for overflow in internal size calculation.
547 * getusershell.c (readname): Simplify the code by using x2nrealloc
548 rather than xmalloc/xrealloc.
549 * linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
550 using x2realloc rather than xmalloc/xrealloc. Also, fix a C
551 conformance bug: the old code used a pointer after freeing the
552 storage that it addressed.
553 * hash.c (hash_initialize): Simplify the code by using xalloc_oversized
554 rather than doing it by hand.
555 * getgroups.c (getgroups): Don't use xrealloc, since we don't need
556 the buffer preserved. Use free and xmalloc instead.
557 * quotearg.c (quotearg_n_options): Likewise.
558 Use a simpler test for size overflow. Don't use xalloc_oversized
559 because unsigned int might be wider than size_t (!); this suggests
560 that we should switch from unsigned int to size_t for slot numbers.
562 2003-10-27 Bruno Haible <bruno@clisp.org>
564 * stdbool_.h: Better support for BeOS.
566 2003-10-27 Paul Eggert <eggert@twinsun.com>
568 * exclude.c (new_exclude): Use xzalloc rather than xmalloc
569 to allocate the returned structure. Do not allocate a subarray,
570 as x2nrealloc will do that.
571 (add_exclude): Use x2nrealloc to reallocate ex->exclude,
572 instead of xnrealloc.
573 (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
575 2003-10-26 Paul Eggert <eggert@twinsun.com>
577 * xalloc.h (xalloc_oversized): New static inline function, for
578 callers that want to do their own size-overflow checking. Include
579 <stdbool.h>, since xalloc_oversized returns bool.
580 * xalloc.c (array_size_overflow): Remove. All callers changed
581 to use xalloc_oversized.
583 Add two functions x2realloc, x2nrealloc, for programs that grow
584 arrays dynamically by doubling their sizes.
585 * xalloc.h (x2realloc, x2nrealloc): New decls.
586 * xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
589 Port to C99 semantics for 'inline' of external functions.
590 Bug reported by Bruno Haible.
591 * xmalloc.c (xnmalloc_inline): New static inline function,
592 with the old contents of xnmalloc.
593 (xnmalloc, xmalloc): Use it.
594 (xnrealloc_inline): New static inline function,
595 with the old contents of xnrealloc.
596 (xnrealloc, xrealloc): Use it.
598 * alloc.c (alloca): xmalloc cannot return NULL, so don't test for that.
600 2003-10-25 Paul Eggert <eggert@twinsun.com>
602 Fix several address-calculation bugs in the hash modules,
603 plus some minor code cleanup.
605 * hash.h: Include <stdbool.h>, for bool.
606 * hash.c: Don't include <stdbool.h>, since hash.h does it now.
607 * hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
608 hash_get_n_entries, hash_get_max_bucket_length,
609 hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
610 hash_rehash): Use size_t rather than unsigned.
611 * hash.c (struct hash_table, hash_get_n_buckets,
612 hash_get_n_buckets_used, hash_get_n_entries,
613 hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
614 hash_get_entries, hash_do_for_each, hash_string, is_prime,
615 next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
617 (SIZE_MAX): Define if not defined.
618 (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
619 hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
621 Use const * when possible.
622 (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
623 (check_tuning): Fix bug: if tuning parameters were very close to
624 0 or 1, rounding errors could have caused subscript violations.
625 (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
626 (hash_initialize): Add 'fail:' label
627 to free table and return NULL, and use it to simplify code.
628 Use calloc rather than clearing the storage ourself.
629 (hash_initialize, hash_rehash): Check for arithmetic overflow in
630 buffer size calculations.
631 * hash-pjw.h (hash_pjw): Use size_t, not unsigned.
632 Include <stddef.h>, for size_t.
633 * hash-pjw.c (hash_pjw): Likewise.
634 Switch to method described by Bruno Haible.
635 Include <limits.h>, for CHAR_BIT.
636 (SIZE_BITS): New macro.
638 2003-10-21 Paul Eggert <eggert@twinsun.com>
640 * getndelim2.c (getndelim2): When size calculation overflows,
641 ceiling the allocation at NMAX bytes rather than silently
642 discarding input bytes before NMAX is reached. This makes
643 a difference only if NMAX exceeds SIZE_MAX / 2.
645 * obstack.c: Merge from glibc.
646 [defined _LIBC]: Include <obstack.h>, not "obstack.h".
647 Add libc_hidden_def (_obstack_newchunk).
648 (_obstack_free) [! defined _LIBC]: Remove.
649 [defined _LIBC]: Make a strong alias from obstack_free, rather than
650 a clone of the function body.
651 (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
652 [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
654 * obstack.h: Indenting cleanup, to make it easier to merge with glibc.
655 (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
658 * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
659 (obstack_ptr_grow_fast, obstack_int_grow_fast):
660 Don't use lvalue casts, as GCC plans to remove support for them
661 in GCC 3.5. Reported by Joseph S. Myers. This bug
662 was also present in the non-GCC version, indicating that this
663 code had always been buggy and had never been widely used.
664 (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
665 Use the fast variant of each macro, rather than copying the
666 definiens of the fast variant; that way, we'll be more likely to
667 catch future bugs in the fast variants.
669 2003-10-20 Bruno Haible <bruno@clisp.org>
671 * wait-process.h: New file, from GNU gettext.
672 * wait-process.c: New file, from GNU gettext.
674 2003-10-19 Jim Meyering <jim@meyering.net>
676 * vasnprintf.c (vasnprintf): Work around losing snprintf on HPUX 10.20.
678 2003-10-16 Paul Eggert <eggert@twinsun.com>
680 * getgroups.c: Include <errno.h>, <stdlib.h>.
681 (getgroups): First arg is int, not size_t.
682 Don't let 'free' mangle errno.
684 2003-10-16 Jim Meyering <jim@meyering.net>
686 * xmalloc.c: Include <string.h>, for declarations of memset and memcpy.
688 2003-10-15 Paul Eggert <eggert@twinsun.com>
690 * exclude.c: Do not include <inttypes.h> or <stdint.h>.
692 (new_exclude, add_exclude_file): Initial size no longer needs to
694 (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
695 our own address arithmetic overflow checking.
697 * fnmatch.c (SIZE_MAX): Define if standard headers don't.
698 (fnmatch): Do not alloca more than 2000 wide characters;
699 instead, use malloc for large buffers.
700 Check for address arithmetic overflow, and return -1
701 with errno set to ENOMEM in that case.
702 * fnmatch_loop.c (ALLOCA_LIMIT): New macro.
703 (NEW_PATTERN): Do not alloca more than 8000 bytes;
704 instead, return -1. Check for address arithmetic overflow.
706 2003-10-14 Paul Eggert <eggert@twinsun.com>
708 Handle invalid suffixes and overflow independently, so that
709 callers can treat them independently as needed. Fix some bugs in
710 suffix handling, e.g., "100k@" was not diagnosed as an invalid
711 suffix for a human-readable blocksize. The major caller-visible
712 change is the addition of a new
713 LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
714 that both overflow and suffix chars were found.
716 * human.c (humblock): Don't check separately for invalid suffix
717 char; that is xstrtoumax's job (now that its bug is fixed).
718 * xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
719 INTMAX_MAX]: New macros.
720 * xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
721 TYPE_MAXIMUM): New macros.
722 (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
723 (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
724 if overflow occurs, as it's what __strtol does and it's more useful
726 (__xstrtol): If __strtol reports some error other than ERANGE,
727 reflect it to the caller as LONGINT_INVALID. If it reports
728 ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
729 | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
730 * xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
732 (_STRTOL_ERROR): Handle it. Abort when given unknown error codes.
733 * xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
734 * xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
735 [defined UINTMAX_MAX]: New macros.
737 2003-10-14 Bruno Haible <bruno@clisp.org>
739 * fatal-signal.h: Improved comments. Suggested by Paul Eggert.
740 * fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
741 Also use volatile where needed.
743 2003-10-12 Paul Eggert <eggert@twinsun.com>
745 * xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
746 (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
747 and define in terms of the other primitives.
748 * xmalloc.c: Include stdbool.h; do not include exit.h.
749 (SIZE_MAX): Define if not already defined.
750 (array_size_overflow): New function.
751 (xalloc_die): Abort instead of exiting if 'error' returns.
752 (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
753 (xmalloc, xrealloc): Use them.
754 (xcalloc): Check for address arithmetic overflow.
755 * xstrdup.c (xstrdup): Use xclone, since memcpy should be
756 a bit faster than strcpy.
758 2003-10-08 Paul Eggert <eggert@twinsun.com>
760 Merge getpass from libc, plus a few fixes.
762 * getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
764 Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
765 __fsetlocking to empty.
766 [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
767 do include <bits/libc-lock.h>.
768 Do not include <fcntl.h>; not needed.
769 [_LIBC]: Include <wchar.h>.
770 (NOTCANCEL_MODE): New macro.
771 (flockfile, funlockfile) [_LIBC]: New macros.
772 (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
773 [!_LIBC]: New macros.
774 (call_fclose): New function.
775 (getpass): Use it. Save tty stream separately; this simplifies the
776 code and makes it more reliable if stdin happens to equal stdout.
777 Invoke __fsetlocking on tty.
778 Handle thread cancellation if needed.
779 Namespace cleanup (use __tcgetattr, __getline).
780 Use bool for Booleans.
781 [USE_IN_LIBIO]: Handle wide streams.
782 [!_LIBC]: Unconditionally do the fseek, since we don't know what
783 stream might go where.
785 * unlocked-io.h: Include <stdio.h>, so that the caller
786 doesn't have to include <stdio.h> before us.
787 (clearerr_unlocked, feof_unlocked, ferror_unlocked,
788 fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
789 fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
790 putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
791 if not declared, so that we can use getpass.c code from libc without
793 (flockfile, ftrylockfile, funlockfile): New macros.
795 2003-10-06 Bruno Haible <bruno@clisp.org>
797 * version-etc-2.h: Remove file.
798 * version-etc-2.c: Remove file.
800 2003-09-25 Jim Meyering <jim@meyering.net>
801 Bruno Haible <bruno@clisp.org>
803 This lets translators provide better translations for the
804 "Written by ..." part of --version output.
805 * version-etc.h: Include stdarg.h.
806 (version_etc_copyright): Declare as readonly.
807 (version_etc): Make this function variadic with a NULL-terminated list
808 of author name strings.
809 (version_etc_va): New declaration.
810 * version-etc.c: Include stdarg.h, stdlib.h.
811 (version_etc_copyright): Declare as readonly.
812 (version_etc_va): New function. Provide a different translatable string
813 for each possible number of authors < 10. Abbreviate when there are 10
815 (version_etc): Make this function variadic. Call version_etc_va.
816 Suggestion from Gary V. Vaughan.
818 * long-options.h (parse_long_options): Change prototype: the authors
819 string is moved to the end and becomes variadic.
820 * long-options.c: Include stdarg.h.
821 (parse_long_options): Make this function variadic, too.
822 Call version_etc_va, not version_etc.
824 2003-10-06 Bruno Haible <bruno@clisp.org>
826 * fatal-signal.h: New file, from GNU gettext.
827 * fatal-signal.c: New file, from GNU gettext.
829 2003-10-04 Karl Berry <karl@gnu.org>
831 * argp*: update from libc.
833 2003-10-01 Larry Jones <lawrence.jones@eds.com>
835 * getpass.c (getpass): Use a no-op fseek when switching from input to
836 output mode on the same stream.
838 2003-09-29 Paul Eggert <eggert@twinsun.com>
840 * strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
841 Fix arg typo in previous patch.
843 2003-09-28 Jim Meyering <jim@meyering.net>
845 * error.c: Correct cpp indentation.
847 2003-09-27 Paul Eggert <eggert@twinsun.com>
849 * minmax.h (MIN, MAX) [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
850 Omit the special code that used __typeof__, since we worry that
851 it could be more trouble than it's worth. See:
852 http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
853 http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
857 2003-09-26 Jim Meyering <jim@meyering.net>
859 * error.c (error_tail): Move some declarations
860 into inner scope where the local variables are used.
862 2003-09-26 Bruno Haible <bruno@clisp.org>
864 * stpncpy.h (gnu_stpncpy): New declaration.
865 (stpncpy): Define as alias for gnu_stpncpy.
866 * stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
868 2003-09-26 Paul Eggert <eggert@twinsun.com>
870 * error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
871 (error_tail): Do not loop, reallocating temporary buffer, since
872 the output cannot contain more wide characters than the input
873 contains bytes, the size must be big enough already. This avoids
874 one potential size overflow calculation. Check for size overflow
875 when calculating temporary buffer size. Free temporary buffer
876 when done, if it was allocated with malloc; this plugs a memory
877 leak. Remove casts from void * to pointers, that are no longer
878 needed now that we're assuming C89 or better.
880 Merge error changes from glibc.
882 * error.c, error.h: Update copyright notice header to match glibc.
883 * error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
884 (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
885 Disable cancellation while printing error.
886 * error.h: Prepend __ to parameter names.
888 2003-09-25 Karl Berry <karl@gnu.org>
890 * argp-fmtstream.c, argp-help.c: update from libc.
892 2003-09-25 Bruno Haible <bruno@clisp.org>
894 * version-etc-2.h: New file, from version-etc.h with modifications.
895 * version-etc-2.c: New file, from version-etc.c with modifications.
897 2003-09-25 Simon Josefsson <jas@extundo.com>
899 * xgetdomainname.h: New file.
900 * xgetdomainname.c: New file.
902 2003-09-25 Simon Josefsson <jas@extundo.com>
903 Bruno Haible <bruno@clisp.org>
905 * getdomainname.h: New file.
906 * getdomainname.c: New file.
908 2003-09-24 Paul Eggert <eggert@twinsun.com>
910 * linebuffer.c (freebuffer): Don't free the argument, just
911 the buffer associated with the argument. Bug reported by
914 2003-09-19 Karl Berry <karl@gnu.org>
916 * argp.h: update from libc.
918 2003-09-16 Paul Eggert <eggert@twinsun.com>
920 * linebuffer.c (readlinebuffer): Return NULL immediately upon
921 input error, instead of returning NULL the next time we are called
922 (and therefore losing track of errno).
924 2003-09-15 Paul Eggert <eggert@twinsun.com>
926 * getndelim2.c (getndelim2): Don't trash errno when a read
927 fails, so that the caller gets the proper errno.
929 * readutmp.c (read_utmp): Likewise.
930 Check for fstat error. Close stream and free storage
933 2003-09-14 Bruno Haible <bruno@clisp.org>
935 * fwriteerror.h: New file.
936 * fwriteerror.c: New file.
938 2003-09-14 Jim Meyering <jim@meyering.net>
940 * getloadavg.c: Correct cpp indentation.
941 * strdup.c: Likewise.
942 * vasnprintf.c: Likewise.
944 2003-09-12 Paul Eggert <eggert@twinsun.com>
946 * argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
947 * obstack.c [!defined _LIBC]: Likewise.
948 * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
949 * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
950 * exitfail.c: Don't include stdlib.h; no longer needed.
952 More changes to assume C89 or better.
954 * error.c (error_tail): Assume vprintf.
956 * argmatch.c (getenv): Remove decl.
957 * progreloc.c (get_full_program_name): Define via prototype.
958 * setenv.c (clearenv): Likewise.
959 * stpncpy.c: Do not include <string.h> or <sys/types.h>; not
961 * strdup.c: Include <stdlib.h>, <string.h> unconditionally.
962 (malloc, memcpy): Remove decls.
963 * strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
964 (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
965 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
966 (memcpy): Remove macro.
967 (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
968 (__P): Remove. All uses removed.
969 (PTR): Remove. All uses changed to void *.
970 (CHAR_BIT, NULL): Remove.
971 (spaces, zeros, memset_space, memset_zero)
972 [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
974 (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
975 (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
976 Define with prototype.
977 Remove now-unnecessary prototype decl.
978 (extra_args_spec): Assume ANSI C. All uses changed.
979 (extra_args_spec_iso): Remove.
980 (my_strftime, emacs_strftimeu): Define via prototype.
981 * strtod.c: Include <float.h>, <stdlib.h>, <string.h>
983 (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
984 * strtoimax.c: Include <stdlib.h> unconditionally.
985 (strtoul, strtol): Remove decls.
986 * strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
988 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
989 (LOCALE_PARAM_DECL): Remove. All uses changed to LOCALE_PARAM_PROTO.
990 (LOCALE_PARAM_PROTO): New macro.
991 (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
992 (INTERNAL (strtol), strtol): Define with a prototype.
993 (PARAMS): Remove. All uses removed.
994 * tempname.c: Include <string.h> unconditionally.
995 * userspec.c: Include <stdlib.h>, <string.h> unconditionally.
996 * xgethostname.c (main): Define with a prototype.
997 * xmalloc.c: Include "xalloc.h" first, to check interface.
998 Include <stdlib.h> unconditionally.
999 (calloc, malloc, realloc, free): Remove decls.
1000 * xstrtod.c: Include "xstrtod.h" first, to check interface.
1001 Include <stdlib.h> unconditionally. Sort include file names.
1003 (xstrtod): Define with a prototype.
1004 * xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
1005 (strtol, strtoul): Remove decls.
1007 2003-09-11 Paul Eggert <eggert@twinsun.com>
1009 * strndup.c: Don't include <stdio.h>, <sys/types.h>.
1010 Include <stdlib.h>, <string.h> unconditionally.
1011 Remove now-unnecessary cast to char *.
1012 * strnlen.c: Include <string.h> unconditionally.
1013 * yesno.c (yesno): Define with a prototype.
1015 2003-09-10 Bruno Haible <bruno@clisp.org>
1017 * strcspn.c: Include <string.h> unconditionally.
1018 * strpbrk.c: Include <string.h> unconditionally.
1019 * strstr.c: Include <string.h> unconditionally.
1020 * unicodeio.c: Include <string.h> unconditionally.
1021 * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
1022 * unsetenv.c: Likewise.
1023 * xreadlink.c: Include <stdlib.h> unconditionally.
1024 * yesno.c: Include <stdlib.h> unconditionally.
1025 (rpmatch): Add prototype.
1027 2003-09-10 Jim Meyering <jim@meyering.net>
1029 * error.c: Correct indentation of cpp directives.
1031 2003-09-09 Paul Eggert <eggert@twinsun.com>
1035 * acosl.c (main): Use a prototype.
1036 * asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
1039 * getloadavg.c (getloadavg, main): Define via prototypes.
1041 * getopt.h (struct option.name): Assume C89, and use 'const'.
1042 (getopt, etopt_long, getopt_long_only, _getopt_internal)
1043 [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
1045 * getopt.c (const): Remove macro.
1046 Include <string.h> unconditionally.
1047 (my_index): Remove; all uses changed to strchr.
1048 (strlen): Remove decl.
1049 (exchange): Remove forward decl; no longer needed.
1050 (exchange, _getopt_initialize, _getopt_internal, getopt, main):
1051 Define with prototype.
1052 * getopt1.c (const): Remove macro.
1053 (getopt_long, getopt_long_only, main): Define with prototype.
1055 * getugroups.c: Include <string.h> unconditionally.
1057 * getusershell.c: Include <stdlib.h> unconditionally.
1058 (getusershell, setusershell, endusershell, readname, main):
1059 Define with prototypes.
1061 * group-member.c: Include group-member.h first.
1062 Include <stdlib.h> unconditionally.
1064 * hard-locale.c: Include hard-locale.h first.
1065 Include <stdlib.h>, <string.h> unconditionally.
1067 * hash.c (free, malloc): Remove decls.
1068 Include <stdlib.h> unconditionally.
1070 * human.c: Include <stdlib.h>, <string.h> unconditionally.
1071 (getenv): Do not declare.
1073 * idcache.c: Include <string.h> unconditionally.
1075 * long-options.c: Include long-options.h first, to test interface.
1076 Include <stdlib.h> unconditionally.
1078 * makepath.c: Include makepath.h first, to test interface.
1079 Include <stdlib.h> and <string.h> unconditionally.
1081 * linebuffer.c: Include <stdlib.h>.
1082 (free): Remove decl.
1084 * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h.
1085 rpl_malloc returns void *, not char *.
1086 * realloc.c (rpl_realloc): Likewise. Also, define with a prototype.
1088 * md5.h: Include <limits.h> unconditionally.
1089 (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
1090 (__P): Remove; all uses removed.
1091 * md5.c: Include "md5.h" first.
1092 (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
1093 md5_buffer, md5_process_bytes, md5_process_block):
1094 Define with prototypes.
1095 * sha.h (__P): Remove all uses. (It wasn't defined??)
1096 * sha.c: Include "sha.h" first.
1097 Include <stdlib.h>, <string.h> unconditionally.
1099 * memchr.c (__ptr_t): Remove; all uses changed to void *.
1100 * memcmp.c (__ptr_t): Likewise.
1101 * memrchr.c (__ptr_t): Likewise.
1102 * memchr.c, memcmp.c, memcoll.c, memrchr.c:
1103 Include <string.h> unconditionally.
1104 * memchr.c, memrchr.c: Include <limits.h> unconditionally.
1105 * memchr.c: Include <stdlib.h> unconditionally.
1106 * memchr.c (LONG_MAX): Remove.
1107 * memrchr.c (LONG_MAX): Likewise.
1108 * memchr.c (__memchr): Define via a prototype.
1109 * memrchr.c (__memrchr): Likewise.
1110 * memcmp.c (__P): Remove, and remove all uses.
1111 (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
1112 Remove forward decls; no longer needed.
1113 * memcpy.c, memmove.c, memset.c: Include <stddef.h>.
1114 Use types required by C89 in prototype.
1116 * mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
1117 * savedir.c: Likewise.
1118 * mkdir.c (free): Remove decl.
1119 * rmdir.c (rmdir): Define with a prototype.
1120 * savedir.c: Include savedir.h first, to test interface.
1122 * mktime.c (STDC_HEADERS): Remove.
1123 Include <stdlib.h>, <string.h> unconditionally.
1125 * modechange.c: Include <stdlib.h> unconditionally.
1126 (malloc): Remove decl.
1128 * mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
1129 (free): Remove decl.
1131 * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
1132 Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
1133 (This type really should be intptr_t, but that's a C99ism.)
1134 (_obstack_memcpy): Remove: all uses changed to memcpy.
1135 Include <string.h> unconditionally.
1136 (struct obstack): Assume __STDC__ for types of members
1137 chunkfun, freefun, extra_arg.
1138 (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
1139 _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
1140 obstack_begin, obstack_specify_allocation,
1141 obstack_specify_allocation_with_arg, obstack_chunkfun,
1142 obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
1143 Remove unprototyped decls and the macros that use them.
1144 * obstack.c (POINTER): Remove. All uses changed to void *.
1145 (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
1146 _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
1147 (defined __STDC__ && __STDC__)]:
1148 Remove nonprototyped code.
1149 Include <stdlib.h> unconditionally.
1150 (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
1151 _obstack_allocated_p, _obstack_free, obstack_free,
1152 _obstack_memory_used, print_and_abort):
1153 Define using prototypes.
1154 (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
1155 obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
1156 obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
1157 obstack_next_free, obstack_object_size, obstack_room) [0]:
1158 Remove unused, unprototyped code.
1160 * path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
1162 * physmem.c (physmem_total, physmem_available, main): Define
1165 * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
1166 (main): Define with a prototype.
1168 * posixver.c (getenv): Remove decl.
1170 * putenv.c (malloc): Returns void *, not char *.
1171 Include <string.h> unconditionally.
1172 (strchr, memcpy, NULL): Do not define.
1174 * readtokens.c: Include readtokens.h first, to test interface.
1175 Include <stdlib.h>, <string.h> unconditionally.
1176 (init_tokenbuffer): Define with a prototype.
1178 * regex.c (PARAMS): Remove. All uses removed.
1179 All uses of _RE_ARGS removed, too.
1180 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
1182 (bzero): Assume memset exists.
1183 (memcmp, memcpy, NULL): Remove.
1184 (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
1185 char, or assignments to local vars of type signed char.
1186 (init_syntax_once, PREFIX(extract_number_and_incr),
1187 PREFIX(print_partial_compiled_pattern),
1188 PREFIX(print_compiled_pattern), PREFIX(print_double_string),
1189 convert_mbs_to_wcs, print_fastmap, re_set_syntax,
1190 PREFIX(regex_grow_registers), PREFIX(regex_compile),
1191 PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
1192 PREFIX(insert_op2), PREFIX(at_begline_loc_p),
1193 PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
1194 wcs_compile_range, byte_compile_range, truncate_wchar,
1195 PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
1196 re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
1197 count_mbs_length, wcs_re_match_2_internal,
1198 byte_re_match_2_internal, PREFIX(group_match_null_string_p),
1199 PREFIX(alt_match_null_string_p),
1200 PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
1201 re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
1202 regfree, PREFIX(extract_number)): Define with prototype. Remove
1203 now-unnecessary declaration, if any.
1204 (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
1206 Remove now-unnecessary casts among pointer types.
1207 * regex.h (_RE_ARGS): Remove. All uses removed.
1209 * rename.c: Include <stdlib.h>, <string.h> unconditionally.
1210 (free): Remove decl.
1212 * rpmatch.c: Include <stdlib.h> unconditionally.
1214 * same.c: Include <stdlib.h>, <string.h> unconditionally.
1215 (free): Remove decl.
1217 * save-cwd.c: Include <stdlib.h> unconditionally.
1218 * xgetcwd.c: Likewise.
1220 * stat.c: Include <stdlib.h>, <string.h> unconditionally.
1221 (free): Remove decl.
1223 * strchrnul.c (strchrnul): Define with a prototype.
1224 Fix bug: c_in was not converted to char before searching.
1226 The following changes are not K&R related:
1228 * group-member.h: Include <sys/types.h>, so that this file is
1230 * makepath.h: Likewise.
1232 * getusershell.c (readname, default_index, line_size, readname):
1233 Use size_t, not int, for sizes.
1234 (readname): If the size overflows, report an error instead of
1237 2003-09-09 Derek Robert Price <derek@ximbiot.com>
1239 * getndelim2.c: Assume stdlib.h per the C89 spec.
1241 2003-09-08 Paul Eggert <eggert@twinsun.com>
1243 Assume C89 or better; remove K&R cruft.
1244 A few of these changes were first proposed by Derek Robert Price
1245 in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
1247 * addext.c: Include <string.h> unconditionally.
1248 * backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
1249 Don't declare getenv or malloc.
1251 * alloca.c: Include <string.h>, <stdlib.h> unconditionally.
1252 (POINTER_TYPE, pointer): Remove; all uses changed to void *.
1254 (find_stack_direction, alloca): Use prototypes.
1256 * atexit.c (atexit): Define using a prototype.
1258 * basename.c, dirname.c, stripslash.c:
1259 Include <string.h> unconditionally.
1261 * bcopy.c: Include <stddef.h>.
1262 (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
1264 * canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
1266 * error.h (error, error_at_line, error_print_progname)
1267 [! (defined (__STDC__) && __STDC__)]: Remove decls.
1268 * error.c: Include error.h first, to check interface.
1269 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
1270 (VA_START): Remove; all uses changeed to va_start.
1271 (exit, strerror): Remove decls.
1272 (error_print_progname): Prototype uncondionally.
1273 Don't include <errno.h>; no longer needed.
1274 (private_strerror): Remove.
1275 (error_tail): Always define.
1276 (error, error_at_line): Assume C89 or better; always use prototypes.
1277 * fatal.c: Include "fatal.h" first, to test interface.
1278 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
1279 (VA_START): Remove; all uses changed to va_start.
1280 [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
1282 (exit): Remove decl.
1283 (fatal): Prototype unconditionally. Assume va_start works.
1284 Abort at end, to pacify gcc.
1286 * euidaccess.c (main): Define with a prototype.
1288 * exclude.c: Include <stdlib.h>, <string.h> unconditionally.
1290 * exitfail.c: Include <stdlib.h> unconditionally.
1292 * fnmatch_.h (__P): Remove. All uses changed to assume
1294 * fnmatch.c: Include fnmatch.h first, to test interface.
1295 Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
1296 (getenv): Remove decl.
1297 (fnmatch): Define using a prototype.
1298 * fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
1299 (FCT): Define using a prototype.
1301 * getdate.y: Include <stdlib.h>, <string.h> unconditionally.
1303 * gethostname.c: Include <stddef.h>.
1304 (gethostname): Define with prototype. Length is size_t, not int.
1306 2003-09-08 Paul Eggert <eggert@twinsun.com>
1308 * getversion.c: Remove; was migrated to backupfile.c in 1997.
1309 getversion.c should have been removed then, but was accidentally
1312 * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
1313 (utime_null): Fix typo: 'st' was sometimes called 'sb'.
1315 2003-09-07 Paul Eggert <eggert@twinsun.com>
1317 * time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
1318 copy_tm_result. Bug reported by Simon Josefsson in
1319 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
1321 2003-09-06 Paul Eggert <eggert@twinsun.com>
1323 * time_r.c, time_r.h: New files.
1325 * mktime.c (my_mktime_localtime_r): Remove; all uses changed to
1327 (__localtime_r) [!defined _LIBC]: New macro. Include <time_r.h>.
1328 (__mktime_internal) [!defined _LIBC]: Now extern, not static.
1330 * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
1332 (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
1333 (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
1336 * timegm.c: Switch to glibc implementation, with the following changes:
1337 [defined HAVE_CONFIG_H]: Include <config.h>.
1338 [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
1339 (__mktime_internal) [!defined _LIBC]: New decl.
1340 (__gmtime_r) [!defined _LIBC]: New macro and function.
1341 (timegm): Use a prototype, since gnulib assumes C89.
1342 Do not bother declaring tmp to be const, as it's not really usefu.
1343 * timegm.h: Hoist "#include <time.h>" out of #ifdef.
1344 (timegm): Declare only if HAVE_DECL_TIMEGM.
1346 2003-09-03 Paul Eggert <eggert@twinsun.com>
1348 * human.c (human_readable): Fix bug that rounded 10501 to 10k.
1349 Bug reported by Lute Kamstra in
1350 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
1352 * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
1353 "yesterday", "today", and "now" rather than tMINUTE_UNIT. Of
1354 course with correspondingly smaller numbers for tomorrow and
1355 yesterday. From Tadayoshi Funaba. Originally installed into
1356 sh-utils on 1999-08-07, but the patch got lost (I guess during the
1359 2003-08-31 Simon Josefsson <jas@extundo.com>
1361 * timegm.h: New file.
1362 * timegm.c: New file. Based on wget-1.8.2/src/http.c:mktime_from_utc.
1364 2003-08-31 Karl Berry <karl@gnu.org>
1366 * argp.h: update from libc.
1368 2003-08-28 Bruno Haible <bruno@clisp.org>
1370 * binary-io.h: Undefine O_BINARY before defining it. This avoids a
1371 warning on QNX, which defines O_BINARY to 000000.
1373 2003-08-24 Bruno Haible <bruno@clisp.org>
1375 * binary-io.h: Include <stdio.h>, to avoid a compilation error when
1376 MSVC7 <stdio.h> is included later.
1378 2003-08-20 Bruno Haible <bruno@clisp.org>
1380 * progname.h: New file, from GNU gettext.
1381 * progname.c: New file, from GNU gettext.
1382 * progreloc.c: New file, from GNU gettext.
1384 2003-08-19 Bruno Haible <bruno@clisp.org>
1386 * xstrdup.c: Assume <string.h> exists.
1388 2003-08-18 Jim Meyering <jim@meyering.net>
1390 * setenv.h: Indent nested cpp directive.
1391 * vasnprintf.c: Remove trailing blanks.
1393 2003-08-17 Simon Josefsson <jas@extundo.com>
1394 Bruno Haible <bruno@clisp.org>
1396 * xstrndup.h: New file.
1397 * xstrndup.c: New file.
1399 2003-08-17 Bruno Haible <bruno@clisp.org>
1401 * strndup.h: New file.
1403 2003-08-16 Paul Eggert <eggert@twinsun.com>
1405 * regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
1406 space, undoing this 2003-08-12 change:
1407 <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
1409 2003-08-16 Jim Meyering <jim@meyering.net>
1411 Merge from coreutils.
1412 * xstrtoimax.c: #else #if -> #elif.
1413 * xstrtoumax.c: Likewise.
1415 2003-08-15 Paul Eggert <eggert@twinsun.com>
1417 * config.charset, ref-add.sin, ref-del.sin: Use three spaces,
1418 rather than tab, after '#' in shell-script copyright notices.
1419 Suggested by Bruno Haible.
1421 2003-08-15 Jim Meyering <jim@meyering.net>
1422 and Paul Eggert <eggert@twinsun.com>
1424 Merge from coreutils.
1425 * readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
1426 member but strut utmpx does not. Needed for AIX 4.3.3.
1427 (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
1429 2003-08-15 Jim Meyering <jim@meyering.net>
1431 Merge from coreutils.
1432 * xgethostname.c: Include <stdlib.h>.
1433 (xghostname): Don't exit for anything other than memory-related
1434 failure; just return NULL.
1435 * userspec.c: Include "posixver.h".
1436 (parse_user_spec): Accept `.' as a separator only
1437 in pre-POSIX-200112 mode.
1438 * strtoimax.c: Use #elif rather than #else #if.
1439 * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
1440 Remove function, now that we can rely on a working tzset function.
1441 [!_LIBC]: Ensure that the required autoconf test has been run.
1442 [!defined _NL_CURRENT && HAVE_STRFTIME]:
1443 Use underlying_strftime for %r.
1444 * sha.c: Merge in some clean-up and optimization changes from glibc.
1445 * sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
1446 Ensure that it is a multiple of 64.
1447 Rearrange loop exit tests so as to avoid performing an
1448 additional fread after encountering an error or EOF.
1449 * realloc.c: Update copyright date.
1451 2003-08-14 Jim Meyering <jim@meyering.net>
1453 Merge from coreutils.
1454 * obstack.h: Whitespace changes.
1455 * mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
1456 and xcalloc return values.
1457 (read_filesystem_list) [MOUNTED_GETFSSTAT]:
1458 Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could
1459 hang on OSF/1 5.1 for DIR on both local and remote file systems.
1460 Reported by (and fix confirmed by) Nelson H. F. Beebe.
1461 (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
1463 Use mntctl's return value to drive the entry-processing loop, since
1464 we can't rely on the value of the vmt_length member in the last
1465 entry. On some systems doing so could result in exhausting
1466 virtual memory. Based in part on a patch from Mike Jetzer.
1468 2003-08-14 Jim Meyering <jim@meyering.net>
1469 and Paul Eggert <eggert@twinsun.com>
1471 Merges from coreutils, plus other fixes.
1472 * physmem.c: Merge in portability changes from gcc/libiberty
1473 to support AIX, IRIX, Tru64, and Windows. See the ChangeLog there
1474 for credits and details. Thanks to Kaveh Ghazi for helping
1475 to keep these files in sync.
1476 (ARRAY_SIZE): Define it.
1477 (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
1478 * memcasecmp.c: Remove unnecessary parentheses after 'defined'.
1479 (memcasecmp): Don't assume size_t fits in unsigned int.
1480 Remove casts and duplicate code.
1481 * md5.c: Include <string.h> and <stdlib.h> unconditionally.
1482 (memcpy): Remove definition.
1483 Merge in some clean-up and optimization changes from glibc.
1484 [BLOCKSIZE]: Move definition to top of file.
1485 Ensure that it is a multiple of 64.
1486 Rearrange loop exit tests so as to avoid performing an
1487 additional fread after encountering an error or EOF.
1488 * md5.h (md5_uintptr): Define.
1489 * makepath.c (CLEANUP_CWD): Report an error if we failed to
1490 return to the initial working directory. Preserve errno
1492 * idcache.c: Include "xalloc.h".
1493 (xmalloc, xrealloc): Remove decls.
1494 (getuser): Remove casts no longer required in C89.
1495 * human.c: Include stdio.h, for sprintf.
1496 * group-member.c: Include "xalloc.h".
1497 (xmalloc, xrealloc): Remove decls.
1498 (get_group_info): Remove casts no longer required in C89.
1499 * getusershell.c (readname): Remove casts no longer required in C89.
1500 * gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
1501 * getline.c: Whitespace fix, from coreutils.
1503 2003-08-13 Paul Eggert <eggert@twinsun.com>
1505 * exclude.c: Include <ctype.h>
1506 (IN_CTYPE_DOMAIN): New macro.
1508 (add_exclude_file): If LINE_END is a space, ignore trailing spaces
1511 * argp-help.c, argp-parse.c, config.charset, getopt.h:
1512 Undo previous (whitespace-only) change.
1514 2003-08-12 Paul Eggert <eggert@twinsun.com>
1516 * argp-help.c, argp-parse.c, config.charset, getopt.h:
1517 Normalize leading white space and remove trailing white space.
1518 * ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
1519 notice, as per ../config/srclist-update.
1521 Merge from coreutils.
1522 * euidaccess.h: New file.
1523 * euidaccess.c: Include it.
1524 * .cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
1525 vasnprintf.h, vasprintf.h. Remove strdup.c, gettext.h.
1526 * regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
1528 2003-08-11 Bruno Haible <bruno@clisp.org>
1530 * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
1531 (vasnprintf): Use it instead of wcslen.
1533 2003-08-11 Bruno Haible <bruno@clisp.org>
1535 * stdbool_.h (_Bool): Undo last change; instead use a negative enum
1536 value to ensure that _Bool promotes to int. Use #define for _Bool when
1537 using the Solaris C compiler. Adds comments suggested by Paul Eggert.
1539 2003-08-10 Karl Berry <karl@gnu.org>
1541 * regex.h: update from libc (whitespace fix).
1543 2003-08-09 Paul Eggert <eggert@twinsun.com>
1545 Merge some files from coreutils. These changes were
1546 originally made by Jim Meyering.
1547 * acl.c: Include <sys/types.h> before <sys/stat.h>;
1548 many older Unixes require this.
1549 * alloca.c (alloca): Remove cast to argument of free;
1550 no longer needed in C89.
1551 * alloca_.h, regex.h: Fix white space to match
1552 what GNU indent does.
1554 2003-08-05 Paul Eggert <eggert@twinsun.com>
1556 * bumpalloc.h: Remove.
1558 2003-08-04 Paul Eggert <eggert@twinsun.com>
1560 * getloadavg.c: Change copyright notice and spacing to conform to
1563 Merge from coreutils.
1564 * error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
1566 * getdate.y (date): Also accept dates like May-23-2003; suggestion
1567 from Karl Berry, implemented by Jim Meyering.
1568 * getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
1569 from Dmitry V. Levin.
1570 Remove anachronistic cast of xrealloc.
1571 * fnmatch_.h (__const): Remove. Use 'const'.
1572 * fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
1573 type. Otherwise, it wouldn't compile with at least /bin/cc on
1574 ymp-cray-unicos9.0.2.X.
1575 Combine two mostly-identical uses of alloca into one.
1576 Thanks to the Cray-Cyber project for access to a Cray Y-MP.
1578 2003-08-04 Dave Love <d.love@dl.ac.uk>
1582 * getloadavg.c: Check `__unix' as well as `unix'. Use #ifdef, not
1583 #if. Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE. Check
1584 F_SETFD, not FD_SETFD. Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
1585 obsolete NLIST_NAME_UNION.
1586 [__GNU__]: Undef BSD and FSCALE.
1587 [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
1589 2003-08-03 Paul Eggert <eggert@twinsun.com>
1591 * stdbool_.h (_Bool): Make it signed char, instead of
1592 an enum type, so that it's guaranteed to promote to int. See:
1593 <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
1595 2003-07-31 Paul Eggert <eggert@twinsun.com>
1597 * strerror.c: Include config.h, limits.h. Declare sprintf.
1598 (strerror): Don't assume that a printable int fits in 14 bytes.
1600 2003-07-24 Derek Robert Price <derek@ximbiot.com>
1601 Bruno Haible <bruno@clisp.org>
1603 * getline.h (getline, getdelim): Change return type to ssize_t.
1604 * getline.c (getline, getdelim): Likewise.
1605 Remove _GNU_SOURCE define; now it's defined in config.h through
1608 2003-07-22 Paul Eggert <eggert@twinsun.com>
1610 * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
1611 over-parenthesization in macros.
1613 Sync with coreutils.
1615 * xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
1618 Use `exit_failure' for xalloc and xmemcoll instead of their own
1619 private exit-failure variables.
1620 * xalloc.h (xalloc_exit_failure): Remove.
1621 * xmalloc.c: Likewise. Include exitfail.h.
1622 (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
1623 * xmemcoll.h (xmemcoll_exit_failure): Remove.
1624 * xmemcoll.c: Likewise. Include exitfail.h.
1625 (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
1627 2003-07-18 Paul Eggert <eggert@twinsun.com>
1629 * closeout.h (close_stdout_set_status, close_stdout_status): Remove.
1630 * closeout.c: Likewise. Include "closeout.h" right after config.h,
1631 to test that it can stand by itself. Include "exitfail.h".
1632 Clients should set exit_failure instead.
1633 (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
1635 2003-07-18 Andreas Schwab <schwab@suse.de>
1637 * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
1639 2003-07-18 Bruno Haible <bruno@clisp.org>
1641 * getndelim2.h: New file.
1642 * getndelim2.c: Make into a module of its own. Include config.h,
1644 (getndelim2): Make non-static. Change return type to ssize_t.
1645 * getline.h: Change argument names.
1646 * getline.c: Include getndelim2.h instead of getndelim2.c.
1647 * getnline.c: Include getndelim2.h.
1649 2003-07-17 Bruno Haible <bruno@clisp.org>
1651 * Makefile.am: Remove file.
1652 * Makefile.in: Remove file.
1654 2003-07-17 Bruno Haible <bruno@clisp.org>
1656 * getnline.h: New file.
1657 * getnline.c: New file.
1658 * getndelim2.c: New file, extracted from getline.c.
1659 (getndelim2): Renamed from getdelim2, with added nmax argument.
1660 * getline.c: Include getndelim2.c.
1661 (getdelim2): Moved out to getndelim2.c.
1662 (getline, getdelim): Update.
1664 2003-07-15 <karl@gnu.org>
1666 * vasnprintf.c: update from gettext.
1668 2003-07-15 Jim Meyering <jim@meyering.net>
1670 * makepath.c (make_path): Enclose diagnostic in _(...).
1672 2003-07-14 Paul Eggert <eggert@twinsun.com>
1674 * asnprintf.c, asprintf.c, config.charset, gettext.h,
1675 localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
1676 printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
1677 ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
1678 vasprintf.c, vasprintf.h: Regenerate. These files are now being
1679 updated automatically by ../config/srclist-update. This changes
1680 their license from LPGL to GPL.
1682 2003-07-14 Jim Meyering <jim@meyering.net>
1684 Don't emit diagnostics. Let callers do that.
1685 * save-cwd.c: Don't include "error.h".
1686 (save_cwd): Don't call error. Ensure that errno is valid
1687 when returning nonzero.
1689 * save-cwd.h (restore_cwd): Update prototype.
1690 * save-cwd.c (restore_cwd): Remove two parameters.
1691 Simplify. Don't call error upon failure. Let callers do that.
1692 (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
1693 when auditing is enabled. But don't bother updating the #if.
1695 2003-07-14 Simon Josefsson <jas@extundo.com>
1697 * mempcpy.h: New file.
1698 * mempcpy.c: New file.
1700 2003-07-14 Paul Eggert <eggert@twinsun.com>
1702 * ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
1703 sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
1704 unicodeio.c, unicodeio.h, unlocked-io.h:
1705 Switch from LGPL to GPL.
1707 2003-07-11 Alexandre Duret-Lutz <adl@gnu.org>
1709 * obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
1710 it breaks C++ compilation.
1711 [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
1713 2003-07-10 Jim Meyering <jim@meyering.net>
1715 * vasnprintf.c: Remove trailing blanks.
1716 Make cpp indentation consistent.
1718 2003-07-09 Paul Eggert <eggert@twinsun.com>
1720 * alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
1721 posixver.c, strftime.c, strnlen.c, strverscmp.c:
1722 Switch from LGPL to GPL.
1724 2003-07-07 Paul Eggert <eggert@twinsun.com>
1726 * mktime.c: Fix some boundary cases and remove need for floating point.
1728 Issue a compile-time diagnostic if time_t is floating point, or if
1729 two's complement arithmetic is not in effect, or if arithmetic
1730 right shift does not propagate the sign. These assumptions were
1731 all in the original code but they weren't checked.
1733 (TIME_T_MIDPOINT, verify): New macros.
1734 (__isleap): Remove; it has integer overflow problems.
1735 (leapyear): New function, without those problems.
1736 (ydhms_tm_diff): Remove; splitting into two parts.
1737 (ydhms_diff): New function, containing the arithmetic part of
1738 the old ydhms_tm_diff function. Issue a compile-time
1739 diagnostic if we are not using C99 integer division.
1740 Avoid casts when possible.
1741 (guess_time_tm): New function, containing the checking part of
1742 the old ydhms_tm_diff function. Return the new value, rather than
1743 the difference between it and the old. Accept a new argument T
1744 so that *T specifies the old value. Check for overflow in the result.
1746 (__mktime_internal): Use a time_t offset, not a long int offset.
1747 This undoes the 2003-06-04 change, which is no longer needed now
1748 that we have better overflow checking.
1749 (localtime_offset): Likewise.
1751 (__mktime_internal): Avoid harmful overflow on hosts where time_t
1752 and long are 64-bit but int is only 32-bit.
1753 (ydhms_diff): Use long int to store year1 and yday1.
1754 Issue a compile-time diagnostic if long int is not wide enough.
1756 (__mktime_internal): Use long int to store adjusted year and yday.
1757 Use plain C rather than preprocessor commands, if that doesn't
1759 Check for overflow (and try to repair) after each probe
1760 rather than checking only at the very end. This avoids some bugs
1761 (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
1762 does not equal GMT offset at maximum time).
1763 Use integer to check for overflow rather than floating point; this
1764 is more portable to non-IEEE hosts, and is a tad faster.
1765 When we detect that we are oscillating between two values,
1766 don't check whether tm_isdst has the requested value, since
1767 we already know the answer. When tm_isdst has the wrong value,
1768 use a different heuristic to find the right one, based on the
1769 extreme values actually observed in practice in tz2003a,
1770 rather than the (overly optimistic) "previous 3 calendar quarters".
1772 (not_equal_tm, print_tm, check_result): Use "const T" rather than
1773 "T const" to accommodate glibc style.
1774 (check_result): Use less-confusing report format. "long" -> "long int.
1776 Don't loop if the iteration overflows time_t.
1777 Allow a negative step in the iteration.
1779 2003-07-01 Paul Eggert <eggert@twinsun.com>
1781 * xreadlink.c: Include <sys/types.h> unconditionally, instead of
1782 having it depend on HAVE_SYS_TYPES_H.
1784 2003-06-25 Bruno Haible <bruno@clisp.org>
1786 * readlink.c: New file.
1788 2003-06-20 Bruno Haible <bruno@clisp.org>
1790 Assume C89, so PARAMS isn't needed.
1791 * unicodeio.h (PARAMS): Remove.
1792 * unicodeio.c: Don't use PARAMS.
1794 2003-06-18 Jim Meyering <jim@meyering.net>
1796 Merge changes from coreutils.
1797 * readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
1798 Remove explicit declarations of xmalloc and realloc.
1800 (read_utmp): Remove anachronistic cast of xmalloc.
1802 2003-06-17 Paul Eggert <eggert@twinsun.com>
1804 Assume C89, so PARAMS isn't needed.
1805 * backupfile.h (PARAMS): Remove. All uses removed.
1806 * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
1807 group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
1808 makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
1809 path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
1810 save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
1811 unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
1812 xstrtol.h: Likewise.
1813 * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h,
1814 same.h, strverscmp.h: Do not include config.h; no longer needed.
1815 Anyway, config.h should always be included before any other file.
1817 2003-06-11 Simon Josefsson <jas@extundo.com>
1819 * sysexit_.h: New file.
1821 2003-05-20 Derek Price <derek@ximbiot.com>
1823 * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
1825 2003-06-10 Simon Josefsson <jas@extundo.com>
1827 * strchrnul.h: New file.
1828 * strchrnul.c: New file.
1830 2003-06-10 Simon Josefsson <jas@extundo.com>
1832 * argp.h: New file, from glibc.
1833 * argp-ba.c: New file, from glibc.
1834 * argp-eexst.c: New file, from glibc.
1835 * argp-fmtstream.c: New file, from glibc.
1836 * argp-fmtstream.h: New file, from glibc.
1837 * argp-fs-xinl.c: New file, from glibc.
1838 * argp-help.c: New file, from glibc.
1839 * argp-namefrob.h: New file, from glibc.
1840 * argp-parse.c: New file, from glibc.
1841 * argp-pv.c: New file, from glibc.
1842 * argp-pvh.c: New file, from glibc.
1843 * argp-xinl.c: New file, from glibc.
1845 2003-06-07 Jim Meyering <jim@meyering.net>
1847 * readtokens.h: Put `Free Software Foundation, Inc.'
1848 in place of my name in the copyright comment.
1849 Remove definition and uses of __P.
1852 * stat.c: Don't declare xmalloc explicitly.
1853 Instead, include "xalloc.h".
1854 * readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
1855 xrealloc, and xcalloc return values.
1856 * xgetcwd.c (xgetcwd): Include "xgetcwd.h".
1858 * xgetcwd.h: Remove definition/uses of PARAMS.
1860 2003-06-06 Jim Meyering <jim@meyering.net>
1862 * stdbool_.h: Renamed from stdbool.h.in.
1864 2003-06-06 Jim Meyering <jim@meyering.net>
1866 Merge from coreutils.
1867 * same.c: (same_name): Declare *_basename locals to be `const'.
1868 Consolidate declarations and initializations of *_base* locals.
1870 Merge from coreutils.
1871 This avoids a core dump on systems without GNU putenv,
1872 when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
1873 * putenv.c (__set_errno, LOCK, UNLOCK): Define.
1874 (unsetenv): New static function, from GNU libc.
1875 (rpl_putenv): Use it.
1877 * modechange.c: Remove trailing blanks.
1879 Merge from coreutils.
1880 * fsusage.c: Remove declaration of statfs.
1881 It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
1883 * posixtm.c: Include <stdbool.h> unconditionally.
1885 2003-06-05 Paul Eggert <eggert@twinsun.com>
1887 * mktime.c (__mktime_internal): When resolving a tm_isdst
1888 mismatch, look in future quarters as well as past. This fixes a
1889 bug when processing fall-backwards gaps immediately after a long
1890 period of daylight-saving time.
1892 * mktime.c: Assume freestanding C89 or better.
1893 (HAVE_LIMITS_H): Remove. Assume it's 1.
1894 (__P): Remove; not used.
1895 (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
1896 (mktime, not_equal_tm, print_tm, check_result,
1897 main): Use prototypes. Use const * where appropriate.
1898 (main): Fix typo in testing code that uncovered by above changes.
1899 (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
1901 2003-06-04 Paul Eggert <eggert@twinsun.com>
1903 * mktime.c: Fix Debian bug 177940
1904 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
1905 (localtime_offset): Now long int, not time_t, because we want it
1906 to be guaranteed to be signed. All uses changed.
1907 (__mktime_internal): If overflow would occur when adding offset,
1910 Merge 'human' changes from coreutils. Rewrite to support
1911 locale-specific notations like thousands separators.
1912 * human.c: Simplify authorship notice.
1913 Include human.h immediately after config.h.
1914 <sys/types.h>, <stdio.h>: Do not include; no longer needed.
1915 <limits.h>: Do not include, since human.h does.
1916 (SIZE_MAX, UINTMAX_MAX): New macros.
1917 <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
1918 <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
1919 (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
1920 (power_letter): Renamed from suffixes.
1921 (generate_suffix_backwards): Remove.
1922 (adjust_value): Now takes int style (because of human.h changes)
1923 and long double value (for greater precision on some platforms).
1924 (group_number): New function.
1925 (human_readable): Use it. Use integer options, not enum.
1926 Put the options before the sizes in the arg list.
1927 Support all the new options.
1928 The old human_readable function has been removed;
1929 use inttostr.h instead.
1930 (human_readable, default_block_size, humblock):
1931 Use uintmax_t, not int, for block sizes.
1932 (human_readable_inexact, block_size_types): Remove.
1933 (block_size_opts): New constant.
1934 (human_options): Renamed from human_block_size, with new signature
1935 that allows block sizes up to UINTMAX_MAX. All callers changed.
1936 * human.h: Add copyright and authorship notice.
1937 Include <limits.h> and <stdbool.h> unconditionally.
1938 (PARAMS): Remove. All uses removed.
1939 (LONGEST_HUMAN_READABLE): Add support for thousands separator.
1940 (enum human_inexact_style): Remove tag; now a nameless enum.
1941 (human_floor, human_ceiling, human_round_to_even): Now have
1942 values 2, 0, 1 rather than -1, 1, 0.
1943 (human_group_digits, human_suppress_point_zero, human_autoscale,
1944 human_base_1024, human_SI, human_B): New constants.
1945 (human_readable_inexact, human_block_size): Remove.
1946 (human_readable): Size args are now uintmax_t, not int.
1947 (human_options): New decl.
1949 * exclude.c: (new_exclude, add_exclude): Remove casts that are
1950 unnecessary now that we assume C89 or better. This change
1951 imported from coreutils.
1953 * mktime.c (__mktime_internal): Do not reject negative timestamps
1954 arbitrarily. This is the same patch as 2003-05-28, but it got lost
1955 in the 2003-05-30 sync from glibc.
1957 .h files should stand alone, but we shouldn't include <sys/types.h>
1958 if we can get away with just <stddef.h>.
1960 * __fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
1961 malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
1962 rather than <sys/types.h>, as we merely need size_t.
1963 * dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
1965 * hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
1966 Include <stdio.h>, to get FILE.
1967 * memcasecmp.c: Don't include <sys/types.h>, as we can assume
1968 memcasecmp.h has included <stddef.h> and all we need is size_t.
1969 * memcoll.c: Include "memcoll.h", which gets us size_t and checks
1970 our interface, instead of including <sys/types.h>
1972 2003-06-02 Paul Eggert <eggert@twinsun.com>
1975 Fix some minor time-related bugs with POSIX time arguments.
1976 Some valid time stamps were being rejected (notably -1, and
1977 time stamps before 1900 on 64-bit hosts). And some invalid
1978 time stamps were being accepted, e.g. September 31.
1980 * posixtm.h (posixtime): Return bool instead of time_t, so
1981 that we can return (time_t) -1 successfully.
1982 * posixtm.c: Likewise.
1983 [HAVE_STDBOOL_H]: Include <stdbool.h>.
1984 (bool, false, true) [!HAVE_STDBOOL_H]: New type.
1985 (t): Remove static var.
1986 (year, posix_time_parse): Now takes struct tm * arg to modify, instead
1987 of static var. All uses changed.
1988 (year): Do not reject years before 1900; they can occur with
1990 (posix_time_parse): Do not check for out-of-range components;
1991 that is now the caller's responsibility, since our checks were
1992 only approximations.
1993 (posixtime): Use mktime to check for out-of-range components,
1994 since it knows them exactly.
1995 If mktime returns (time_t) -1, check whether an error actually occurred
1996 by invoking localtime on -1.
1997 (main) [TEST_POSIXTIME]: Check for input data errors, and report
1998 posixtime failures better.
1999 Improve the test data (in comments only).
2001 2003-05-30 <karl@gnu.org>
2003 * mktime.c: update from libc.
2005 2003-05-30 Bruno Haible <bruno@clisp.org>
2007 * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
2008 * localcharset.h: Likewise.
2009 * localcharset.c: Likewise.
2011 2003-05-28 Paul Eggert <eggert@twinsun.com>
2013 Assume the headers required for C89 freestanding compilers.
2014 * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
2015 rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
2016 without checking for HAVE_LIMITS_H.
2017 * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
2018 xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
2020 * fatal.c: Include <stdarg.h> without checking for __STDC__.
2021 * exclude.c: Include <stdbool.h> unconditionally.
2022 * tempname.c: Include <stddef.h> unconditionally.
2023 * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
2024 * modechange.c, rpmatch.c (NULL): Don't define, since
2025 <stddef.h> does that.
2026 * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
2027 * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
2028 * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
2029 * xstrtol.c: Likewise.
2030 * safe-read.c: Remove TYPE_SIGNED; no longer needed.
2031 * savedir.c: Include <stddef.h> instead of defining NULL.
2033 * addext.c (addext): Use assignment rather than cast, to avoid
2034 warnings on some platforms.
2036 * mktime.c (__mktime_internal): Do not reject negative timestamps
2039 2003-05-10 Bruno Haible <bruno@clisp.org>
2041 * linebreak.c (iconv_string_length): Don't return -1 just because the
2042 string is longer than 4 KB.
2044 2003-05-12 Jim Meyering <jim@meyering.net>
2046 * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
2047 the space-padded-by-default conversion specifiers, %e, %k, %l.
2049 2003-05-03 Bruno Haible <bruno@clisp.org>
2051 Upgrade to Unicode-4.0.
2052 * linebreak.c (nonspacing_table_data): Change width of U+00AD,
2053 U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
2054 U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
2055 U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
2056 from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
2057 (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
2058 of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
2059 Change width of U+E0100..U+E01EF from 1 to 0.
2061 2003-04-25 Bruno Haible <bruno@clisp.org>
2063 * copy-file.c: Include <stddef.h>, for size_t.
2065 2003-04-25 Jim Meyering <jim@meyering.net>
2067 * copy-file.c (copy_file_preserving): Declare buf_size to be
2068 of type size_t, not int.
2070 2003-04-11 Jim Meyering <jim@meyering.net>
2072 Merge changes from Coreutils.
2074 2003-03-22 Jim Meyering <jim@meyering.net>
2076 * strftime.c (widen): Cast alloca return value to proper type.
2078 2003-01-19 Ulrich Drepper <drepper@redhat.com>
2081 * strftime.c (my_strftime): Handle very large width
2082 specifications for numeric values correctly. Improve checks for
2085 2003-01-19 Jim Meyering <jim@meyering.net>
2087 * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
2088 (nl_get_alt_digit) [! defined my_strftime]: Define.
2089 (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
2090 _nl_get_alt_digit and _nl_get_walt_digit.
2092 * strftime.c (my_strftime): Merge in locale-related changes from libc.
2093 These changes have no effect outside of _LIBC.
2095 2003-04-10 Bruno Haible <bruno@clisp.org>
2097 * findprog.h: New file, from GNU gettext.
2098 * findprog.c: New file, from GNU gettext.
2100 2003-04-05 Jim Meyering <jim@meyering.net>
2102 Merge changes from Coreutils.
2104 * exclude.h (PARAMS): Remove definition and uses.
2105 * exclude.c: Remove uses of `PARAMS'.
2107 * dirname.c [TEST_DIRNAME]: Update build instructions for test.
2108 Add test-cases for DOS filenames. Declare program_name.
2109 (main): Set up program_name. Patch by Rich Dawe.
2111 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
2113 Use mntctl's return value to drive the entry-processing loop, since
2114 we can't rely on the value of the vmt_length member in the last
2115 entry. On some systems doing so could result in exhausting
2116 virtual memory. Based in part on a patch from Mike Jetzer.
2118 2003-04-04 Bruno Haible <bruno@clisp.org>
2120 * linebreak.h: New file, from GNU gettext.
2121 * linebreak.c: New file, from GNU gettext with slight modifications.
2122 * lbrkprop.h: New file, from GNU gettext.
2124 2003-04-03 Bruno Haible <bruno@clisp.org>
2126 * utf8-ucs4.h: New file, from GNU gettext.
2127 * utf16-ucs4.h: New file, from GNU gettext.
2128 * ucs4-utf8.h: New file, from GNU gettext.
2129 * ucs4-utf16.h: New file, from GNU gettext.
2131 2003-04-02 Bruno Haible <bruno@clisp.org>
2133 * binary-io.h: New file, from GNU gettext.
2135 2003-04-01 Bruno Haible <bruno@clisp.org>
2137 * pathname.h: New file, from GNU gettext.
2138 * concatpath.c: New file, from GNU gettext.
2140 2003-03-30 Bruno Haible <bruno@clisp.org>
2142 * copy-file.c (copy_file_preserving): Don't set owner if the function
2143 chown() doesn't exist.
2145 2003-03-28 Bruno Haible <bruno@clisp.org>
2147 * copy-file.h: New file, from GNU gettext.
2148 * copy-file.c: New file, from GNU gettext.
2150 2003-03-18 Jim Meyering <jim@meyering.net>
2152 * quote.c (quote_n): Fix typo in comment.
2154 2003-03-14 Jim Meyering <jim@meyering.net>
2156 Merge changes from Coreutils.
2157 * obstack.h (obstack_object_size): Declare temporary, __o,
2158 to be const, in order to avoid warnings.
2159 (obstack_room): Likewise.
2160 (obstack_empty_p): Likewise.
2162 2003-03-13 Paul Eggert <eggert@twinsun.com>
2164 Merge changes from Bison.
2165 * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
2166 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
2167 when compiling Bison 1.875's `bitset bset = obstack_alloc
2168 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
2169 * hash.c: Include <stdbool.h> unconditionally.
2171 2003-03-09 Paul Eggert <eggert@twinsun.com>
2173 * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
2174 Reported by Bruce Becker; see:
2175 http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
2177 2003-03-03 Paul Eggert <eggert@twinsun.com>
2178 Bruno Haible <bruno@clisp.org>
2180 * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
2181 Reported by John Hughes, see
2182 http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
2184 2003-02-19 Paolo Bonzino <bonzini@gnu.org>
2186 * poll_.h: New file.
2189 2003-02-18 Paolo Bonzino <bonzini@gnu.org>
2191 * mathl.h: New file.
2192 * acosl.c: New file.
2193 * asinl.c: New file.
2194 * atanl.c: New file.
2195 * ceill.c: New file.
2198 * floorl.c: New file.
2199 * frexpl.c: New file.
2200 * ldexpl.c: New file.
2202 * sincosl.c: New file.
2204 * sqrtl.c: New file.
2206 * trigl.c: New file.
2207 * trigl.h: New file.
2209 2003-02-17 Bruno Haible <bruno@clisp.org>
2211 * mkdtemp.h: New file, from GNU gettext.
2212 * mkdtemp.c: New file, from GNU gettext.
2214 2003-01-31 Bruno Haible <bruno@clisp.org>
2216 * rename.c: #undef rename before defining rpl_rename.
2217 * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
2219 2003-01-30 Bruno Haible <bruno@clisp.org>
2221 * printf-args.h: New file, from GNU gettext.
2222 * printf-args.c: New file, from GNU gettext.
2223 * printf-parse.h: New file, from GNU gettext.
2224 * printf-parse.c: New file, from GNU gettext.
2225 * vasnprintf.h: New file, from GNU gettext.
2226 * vasnprintf.c: New file, from GNU gettext.
2227 * asnprintf.c: New file, from GNU gettext.
2228 * vasprintf.h: New file, from GNU gettext with modifications.
2229 * vasprintf.c: New file, from GNU gettext.
2230 * asprintf.c: New file, from GNU gettext.
2232 2003-01-29 Bruno Haible <bruno@clisp.org>
2234 * stpncpy.h: New file, from GNU gettext with modifications.
2235 * stpncpy.c: New file, from GNU gettext with modifications.
2237 2003-01-28 Bruno Haible <bruno@clisp.org>
2239 * c-ctype.h: New file, from GNU gettext, with changes suggested by
2241 * c-ctype.c: New file, from GNU gettext, with changes suggested by
2244 2003-01-27 Bruno Haible <bruno@clisp.org>
2246 * xsetenv.h: New file, from GNU gettext.
2247 * xsetenv.c: New file, from GNU gettext.
2249 2003-01-23 Bruno Haible <bruno@clisp.org>
2251 * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
2253 2003-01-22 Bruno Haible <bruno@clisp.org>
2255 * exit.h: New file, from GNU gettext.
2257 2003-01-11 Bruno Haible <bruno@clisp.org>
2259 * stpcpy.h (stpcpy): Use ANSI C function declarations.
2260 * strcase.h (strcasecmp, strncasecmp): Likewise.
2262 2003-01-14 Jim Meyering <jim@meyering.net>
2264 * same.c (same_name): Tweak a comment.
2266 2003-01-11 Bruno Haible <bruno@clisp.org>
2268 * same.c (same_name): Reorder tests so as to avoid calling stat()
2269 when a string comparison is sufficient.
2271 2003-01-11 Bruno Haible <bruno@clisp.org>
2273 * readtokens.c (readtoken): Cast character to 'unsigned char', not
2276 2003-01-11 Bruno Haible <bruno@clisp.org>
2278 * hash-pjw.c: Add comment about low quality of this function.
2280 2003-01-12 Paul Eggert <eggert@twinsun.com>
2282 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
2283 to avoid collisions with libcurses and libreadline.
2285 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
2286 * getstr.h, getstr.c: Remove.
2287 * getline.c: Include "getline.h", to check interface.
2288 Move body of old getstr.c here: this defines MIN_CHUNK and
2289 declares getdelim2, which is renamed from getstr.
2290 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
2292 * linebuffer.c (readlinebuffer): Renamed from readline.
2294 * linebuffer.h: Likewise.
2295 (readline): Remove backward-compatibility macro.
2297 2003-01-12 Jim Meyering <jim@meyering.net>
2299 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
2301 2003-01-10 Bruno Haible <bruno@clisp.org>
2303 * alloca_.h: New file.
2304 * getdate.y: Unconditionally include alloca.h.
2305 * makepath.c: Likewise.
2306 * setenv.c: Likewise.
2307 * userspec.c: Likewise.
2309 2003-01-09 Bruno Haible <bruno@clisp.org>
2311 * stdbool.h.in: New file.
2313 2003-01-08 Bruno Haible <bruno@clisp.org>
2315 * safe-read.c: Include specification header first, to ensure its
2317 * full-write.c: Likewise.
2319 2003-01-08 Jim Meyering <jim@meyering.net>
2321 * full-write.c: Undefine and define-away `const' after inclusion
2322 of errno.h, not before. Suggestion from Bruno Haible.
2324 2003-01-07 Jim Meyering <jim@meyering.net>
2326 * full-write.c: Rework so that it may serve to define full_read, too.
2327 * full-read.c: Simply #define FULL_READ and include full-write.c.
2329 2003-01-06 Jim Meyering <jim@meyering.net>
2331 * version-etc.c: Update year in translatable copyright string.
2333 2002-12-25 Bruno Haible <bruno@clisp.org>
2335 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
2336 * xstrtol.h: Likewise.
2337 * xstrtoimax.c: Likewise.
2338 * xstrtoumax.c: Likewise.
2339 * human.h: Likewise.
2341 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
2342 on systems that have <inttypes.h> but not <stdint.h>.
2344 2002-12-31 Paul Eggert <eggert@twinsun.com>
2346 * memcoll.c (memcoll): Fall back on a simple algorithm using
2347 memcmp if strcoll doesn't work.
2349 2002-12-23 Bruno Haible <bruno@clisp.org>
2351 * localcharset.h: New file.
2352 * localcharset.c: Include it.
2353 * unicodeio.c: Likewise.
2355 2002-12-22 Bruno Haible <bruno@clisp.org>
2357 * utime.c (utime_null): No need to call ftruncate if the file was
2360 2002-12-23 Bruno Haible <bruno@clisp.org>
2362 * memcoll.c (STRCOLL): New macro.
2365 2002-12-22 Bruno Haible <bruno@clisp.org>
2367 * getstr.h (getstr): Define, to avoid clash with libcurses.
2368 * linebuffer.h (readline): Define, to avoid clash with libreadline.
2370 2002-12-22 Bruno Haible <bruno@clisp.org>
2372 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
2374 2002-12-23 Bruno Haible <bruno@clisp.org>
2376 * getline.h: Include <stddef.h>, for size_t.
2378 * unicodeio.h: Include <stddef.h>, for size_t.
2379 * unicodeio.c: Don't include <stddef.h>.
2381 2002-12-17 Bruno Haible <bruno@clisp.org>
2383 * canon-host.c (strdup): Remove unused declaration.
2385 * fsusage.c: Include full_read.h.
2386 (get_fs_usage): Use full_read instead of safe_read.
2388 * utime.c (utime_null): Use SAFE_READ_ERROR.
2390 2002-12-11 Bruno Haible <bruno@clisp.org>
2392 * setenv.h: Rewritten to cope with systems that have setenv() but not
2394 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
2397 2002-12-11 Bruno Haible <bruno@clisp.org>
2399 * setenv.c (alloca): Fall back to malloc.
2401 (setenv): Use freea() to free memory allocated with alloca().
2403 2002-11-13 Bruno Haible <bruno@clisp.org>
2405 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
2406 function declarations.
2407 * unsetenv.c (unsetenv): Likewise.
2409 2002-03-04 Bruno Haible <bruno@clisp.org>
2411 Portability to AIX 4.3.3.
2412 * unsetenv.c: New file, extracted from setenv.c.
2413 * setenv.c: Move the unsetenv() function to unsetenv.c.
2415 2001-12-20 Bruno Haible <bruno@clisp.org>
2417 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
2418 use malloc instead. For SunOS 4.
2420 2001-12-11 Bruno Haible <bruno@clisp.org>
2422 * setenv.c: Declare alloca.
2423 (compar_fn_t): New typedef.
2424 (KNOWN_VALUE, STORE_VALUE): Use it.
2426 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
2429 2002-12-10 Paul Eggert <eggert@twinsun.com>
2431 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
2432 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
2433 Choose values that are less likely to collide with system fnmatch
2435 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
2436 defined (e.g., a pure POSIX system).
2437 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
2438 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
2440 2002-12-06 Jim Meyering <jim@meyering.net>
2442 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
2444 Merge in changes from libc's misc/error.c, in preparation
2445 for the merge of gnulib's changes back into libc.
2447 * error.c (_): Define only if not already defined.
2448 Move definition to follow all #include directives.
2449 Include unlocked-io.h only if !_LIBC.
2450 [_LIBC]: Include <libio/libioP.h>.
2451 [USE_IN_LIBIO]: Include <libio/iolibio.h>
2452 (fflush): Tweak definition to use INTUSE.
2455 2002-12-05 Paul Eggert <eggert@twinsun.com>
2457 * alloca.c [defined emacs]: Include "lisp.h".
2458 (xalloc_die) [defined emacs]: New macro.
2459 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
2460 [! defined emacs]: Include <xalloc.h>.
2461 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
2462 (pointer): Typedef to POINTER_TYPE *.
2463 (malloc): Remove decl; we now always use xmalloc.
2464 (alloca): Use old-style definition, since Emacs needs this.
2465 Check for arithmetic overflow when computing combined size.
2467 2002-12-04 Paul Eggert <eggert@twinsun.com>
2469 Do not generate unlocked-io.h automatically, since it's easier to
2470 maintain it by hand.
2472 * unlocked-io.h: New file, from GNU diffutils,
2473 but with proper copyright notice and attribution.
2475 * Makefile.am: Add copyright notice.
2476 (libfetish_a_SOURCES): Add unlocked-io.h.
2477 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
2478 (DISTCLEANFILES, io_functions): Remove macros.
2479 (EXTRA_DIST): Remove gen_uio.
2480 (unlocked-io.h): Remove rule.
2482 2002-12-04 Jim Meyering <jim@meyering.net>
2484 Reflect the fact that stat.c and lstat.c are no longer generated.
2485 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
2486 (DISTCLEANFILES): Likewise.
2487 (EXTRA_DIST): Likewise.
2488 (all_local): Don't depend on stat.c or lstat.c.
2489 (stat.c, lstat.c): Remove rules.
2490 (EXTRA_DIST): Remove xstat.in.
2492 * xstat.in: Remove file. Contents moved into stat.c.
2493 * stat.c: New file. Contents mostly from xstat.in.
2494 * stat.c: Rework so that it may serve to define rpl_lstat, too.
2495 * lstat.c: New file. Simply #define LSTAT and include stat.c.
2497 * safe-read.c: Rework so that it may serve to define safe_write, too.
2498 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
2500 2002-12-03 Jim Meyering <jim@meyering.net>
2502 * safe-read.c, safe-write.c: Change variable names and comments, but
2503 not semantics, to minimize the differences between these two files.
2504 (safe_read): Change comment to mention SAFE_READ_ERROR.
2506 * safe-read.c (IS_EINTR): Define.
2507 (safe_read): Use IS_EINTR in place of in-function cpp directives.
2509 2002-12-02 Bruno Haible <bruno@clisp.org>
2511 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
2512 Define, taken from safe-read.c.
2513 (INT_MAX): Provide fallback.
2514 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
2515 * safe-write.h (SAFE_WRITE_ERROR): Define.
2517 * safe-read.c (EINTR): Remove definition.
2518 (safe_read): Don't use EINTR if it is absent.
2520 2002-12-02 Jim Meyering <jim@meyering.net>
2522 * safe-read.c (EINTR): Define.
2523 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
2524 (INT_MAX): Provide fallback.
2525 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
2527 * safe-read.h (SAFE_READ_ERROR): Define.
2529 2002-12-01 Jim Meyering <jim@meyering.net>
2531 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
2532 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
2534 2002-11-27 Paul Eggert <eggert@twinsun.com>
2536 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
2537 hash_rehash): Replace `if (limit <= value) abort ();' with
2538 `if (! (value < limit)) abort ();', for readability.
2540 2002-11-26 <karl@gnu.org>
2542 * strdup.c: copy from libc again, with jim's ok.
2543 * .cppi-disable: re-add strdup.c
2545 2002-11-25 <karl@gnu.org>
2547 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
2548 instead of "strtol.c".
2550 2002-11-25 Jim Meyering <jim@meyering.net>
2552 * mktime.c: Sync from libc, now that it has the latest fix.
2554 2002-11-24 <karl@gnu.org>
2556 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
2557 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
2559 2002-11-24 Jim Meyering <jim@meyering.net>
2561 Update from coreutils:
2563 * mktime.c: Merge in changes from libc.
2565 Avoid a link-time failure on some Linux systems.
2566 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
2567 (__mon_yday): Declare with the STATIC attribute.
2568 (__mktime_internal): Likewise.
2569 Based on a report from Greg Schafer.
2571 2002-11-23 Jim Meyering <jim@meyering.net>
2573 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
2574 Use `unsigned', not `int', as type of index.
2576 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
2578 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
2580 2002-11-22 Paul Eggert <eggert@twinsun.com>
2582 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
2583 hint that one should use `if (! x) abort ();' rather than `assert
2584 (x);', and anyway it's one less thing to worry about configuring.
2585 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
2586 hash_rehash, hash_insert): Use abort rather than assert.
2588 2002-11-22 Paul Eggert <eggert@twinsun.com>
2590 * quotearg.h: Allow multiple inclusion by surrounding with
2591 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
2592 so that we can be included first.
2593 (PARAMS): Remove; we now assume C89 or later. All uses removed.
2594 * quotearg.c: Include quotearg.h immediately after config.h.
2595 No need to include stddef.h or sys/types.h any more.
2596 Surround local include files with "", not "<>".
2597 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
2598 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
2599 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
2600 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2601 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2602 (ISPRINT): Remove; no longer needed now that we assume C89.
2604 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
2607 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
2608 quotearg_char): Use SIZE_MAX rather than
2609 (size_t) -1 when we are talking about "infinity".
2611 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
2613 2002-11-22 Bruno Haible <bruno@clisp.org>
2615 * safe-read.h: Assume C89. Add comments.
2616 (safe_read): Change return type to size_t.
2617 * safe-read.c (safe_read): Change return type to size_t. Handle byte
2618 counts > SSIZE_MAX correctly.
2619 * safe-write.h: New file.
2620 * safe-write.c: New file.
2621 * full-read.h: New file.
2622 * full-read.c: New file.
2623 * full-write.h: Assume C89. Add comments.
2624 * full-write.c: Include safe-write.h.
2625 (full_write): Rewritten to use safe_write.
2626 Suggested by Jim Meyering and Paul Eggert.
2628 2002-11-21 Bruno Haible <bruno@clisp.org>
2630 Remove case insensitive option matching.
2631 * argmatch.h (argcasematch): Remove declaration.
2632 (ARGCASEMATCH): Remove macro.
2633 (__xargmatch_internal): Remove case_sensitive argument.
2634 (XARGMATCH): Update.
2635 (XARGCASEMATCH): Remove macro.
2636 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
2637 case_sensitive argument.
2638 (argcasematch): Remove function.
2639 (__xargmatch_internal): Remove case_sensitive argument.
2640 (main): Use XARGMATCH instead of XARGCASEMATCH.
2642 * xmalloc.c: Change compile-time error message. Add comment about
2643 required autoconf version.
2645 2002-11-21 Jim Meyering <jim@meyering.net>
2647 * strdup.c (strdup): Tweak comment and initial #if/#include.
2649 Merge in changes from the coreutils.
2651 2002-09-25 Paul Eggert <eggert@twinsun.com>
2652 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
2653 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
2654 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
2655 int. Work more efficiently if X is the same width as uintmax_t.
2656 Do not compare X to -1, to avoid bogus compiler warning.
2657 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
2658 Don't assume that f_frsize and f_bsize are the same type.
2660 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
2663 * makepath.c (make_path): Restore umask *before* creating the final
2665 (make_path): Minor reformatting.
2667 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
2668 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
2670 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
2671 ones. At least on GNU/Linux systems, `auto' means something else.
2674 2002-11-20 Paul Eggert <eggert@twinsun.com>
2676 Merge argmatch cleanups from Bison. Assume C89.
2678 * argmatch.c: Include config.h here, not in argmatch.h.
2679 Include stdlib.h, for EXIT_FAILURE.
2680 Always include <string.h>, since we assume C89.
2681 (EXIT_FAILURE): Remove pre-C89 bug workaround.
2682 * argmatch.h: Do not include <config.h> or <sys/types.h>.
2683 Include <stddef.h> instead, since it's all we need for size_t.
2684 (PARAMS): Remove. All uses removed.
2685 (ARRAY_CARDINALITY): Do not bother to #undef.
2686 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
2687 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
2688 Remove unnecessary parentheses.
2689 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
2690 Insert necessary parentheses.
2691 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
2692 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
2694 2002-11-19 Bruno Haible <bruno@clisp.org>
2696 * mbswidth.c: Include mbswidth.h right at the beginning.
2697 * mbswidth.h: Include <stddef.h>, for size_t.
2699 * mbswidth.h (PARAMS): Remove macro.
2700 (mbswidth, mbsnwidth): Use ANSI C function declarations.
2701 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
2703 * gcd.h (PARAMS): Remove macro.
2704 (gcd): Use ANSI C function declarations.
2705 * gcd.c (gcd): Likewise.
2707 2002-11-15 Bruno Haible <bruno@clisp.org>
2709 * strcspn.c: Include <stddef.h>.
2710 (strcspn): Use ANSI C function declaration. Change return type to
2712 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
2713 (strpbrk): Use NULL.
2714 * strpbrk.h (PARAMS): Remove macro.
2715 (strpbrk): Use ANSI C function declaration.
2716 * strstr.c: Don't include <sys/types.h>.
2717 * strstr.h (PARAMS): Remove macro.
2718 (strstr): Use ANSI C function declarations.
2720 2002-11-06 Bruno Haible <bruno@clisp.org>
2722 * gcd.h (gcd): Change argument type to 'unsigned long'.
2723 * gcd.c (gcd): Likewise.
2725 2002-11-05 Bruno Haible <bruno@clisp.org>
2727 * gcd.h: New file, from gettext-0.11.5.
2728 * gcd.c: New file, from gettext-0.11.5.
2730 2002-11-05 Bruno Haible <bruno@clisp.org>
2732 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2733 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2734 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2735 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2737 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
2738 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
2740 * closeout.c: Include gettext.h instead of <libintl.h>.
2741 * human.c: Include gettext.h instead of <libintl.h>.
2742 * quotearg.c: Include gettext.h instead of <libintl.h>.
2743 * rpmatch.c: Include gettext.h instead of <libintl.h>.
2744 * unicodeio.c: Include gettext.h instead of <libintl.h>.
2745 * userspec.c: Include gettext.h instead of <libintl.h>.
2746 * version-etc.c: Include gettext.h instead of <libintl.h>.
2747 * xmalloc.c: Include gettext.h instead of <libintl.h>.
2748 (textdomain): Remove definition.
2749 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
2751 * long-options.c: Remove include of <libintl.h> and definition of _.
2752 * same.c: Remove include of <libintl.h> and definition of _.
2754 2002-11-04 Bruno Haible <bruno@clisp.org>
2756 * stpcpy.h: New file, from GNU gettext-0.11.5.
2757 * strcase.h: New file, from GNU gettext-0.11.5.
2758 * strpbrk.h: New file, from GNU gettext-0.11.5.
2759 * strstr.h: New file, from GNU gettext-0.11.5.
2760 * xgetcwd.h: New file, from GNU gettext-0.11.5.
2762 2002-05-09 Bruno Haible <bruno@clisp.org>
2764 * config.charset: Update for newest glibc. Add canonical names
2765 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
2767 2002-05-09 Bruno Haible <bruno@clisp.org>
2769 * localcharset.c (get_charset_aliases): Add more Windows specific
2772 2002-05-08 Owen Taylor <otaylor@redhat.com>
2774 * config.charset: A few additions for Solaris.
2776 2001-12-05 Bruno Haible <bruno@clisp.org>
2778 * localcharset.c (locale_charset): Don't return an empty string.
2780 2001-10-23 Bruno Haible <haible@clisp.cons.org>
2782 * config.charset: msdos in uk_UA uses CP1125.
2784 2001-08-05 Bruno Haible <haible@clisp.cons.org>
2786 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
2787 * localcharset.c (locale_charset): Declare as extern "C".
2789 2002-02-15 Bruno Haible <bruno@clisp.org>
2791 * config.charset [msdosdjgpp]: For Russian, use CP866.
2793 2002-02-11 Bruno Haible <bruno@clisp.org>
2795 * config.charset: Add support for NetBSD.
2797 2002-09-25 <karl@gnu.org>
2799 * strdup.c: copy from libc/string (via ../config/srclist*).
2800 * getopt*: copy from libc/posix.
2801 * gettext.h: copy from gettext.
2802 * .cppi-disable: add strdup.c, gettext.h.
2804 2002-07-01 Jim Meyering <meyering@lucent.com>
2806 * c-stack.c: Include sys/time.h.
2807 From Volker Borchert.
2809 2002-06-11 Paul Eggert <eggert@twinsun.com>
2811 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
2812 New macro. Use it uniformly instead of
2813 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
2814 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
2815 reported by Vin Shelton.
2817 2002-06-22 Jim Meyering <meyering@lucent.com>
2819 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
2820 redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
2822 2002-06-22 Paul Eggert <eggert@twinsun.com>
2824 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
2825 Do not assume SA_SIGINFO behavior.
2826 Bug reported by Jim Meyering on NetBSD 1.5.2.
2828 2002-06-22 Jim Meyering <meyering@lucent.com>
2830 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
2832 * exitfail.c, exitfail.h: Likewise.
2833 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
2835 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
2837 (EXTRA_DIST): Add fnmatch_loop.c.
2838 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
2840 * fnmatch_loop.c: New file, from diffutils-2.8.2.
2841 * fnmatch.c: Update from diffutils-2.8.2.
2842 * fnmatch_.h: New file. From diffutils-2.8.2.
2843 * fnmatch.h: Remove file.
2845 2002-06-18 Paul Eggert <eggert@twinsun.com>
2847 * file-type.h: Report an error if neither S_ISREG nor
2848 S_IFREG is defined, instead of using a test specific to glibc
2849 2.2. This should be safe, since POSIX requires S_ISREG and
2850 Unix Version 7 had S_IFREG. We don't need to check for
2851 <sys/types.h> since we don't use any symbols that it defines.
2853 2002-06-15 Jim Meyering <meyering@lucent.com>
2855 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
2856 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
2857 have been included before this file.
2859 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
2861 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
2862 so that each temporary file name is unique and valid in the first
2863 8 characters, for operation under DOS.
2865 2002-06-15 Jim Meyering <meyering@lucent.com>
2867 Work even with DJGPP 2.03, which lacks support for symlinks.
2869 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
2871 * lchown.c (S_ISLNK): Likewise.
2873 2002-06-14 Jim Meyering <meyering@lucent.com>
2875 * file-type.h: Use the version from diffutils-2.8.2.
2876 * file-type.c: Likewise.
2878 2002-05-27 Jim Meyering <meyering@lucent.com>
2880 Fix a problem seen only on nonconforming systems whereby ls.c's
2881 use of localtime, and then of gettimeofday would cause trouble:
2882 the localtime call used to initialize rpl_gettimeofday's save
2883 mechanism would clobber ls's current local time information so
2884 that in any long listing the first file would always be listed
2885 with date 1970-01-01. Analysis by Volker Borchert.
2887 * gettimeofday.c (localtime): Undefine.
2888 (rpl_localtime): New function.
2890 2002-05-22 Jim Meyering <meyering@lucent.com>
2892 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
2893 * file-type.h: New file.
2894 * file-type.c (file_type): New file/function. Extracted from diffutils.
2896 2002-04-29 Paul Eggert <eggert@twinsun.com>
2898 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
2900 2002-04-28 Paul Eggert <eggert@twinsun.com>
2902 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
2903 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
2904 of 127, since 64 is the largest conceivable number for ancient
2906 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
2908 2002-04-28 Jim Meyering <meyering@lucent.com>
2910 * sig2str.c (WTERMSIG): Remove definition (unused).
2912 2002-04-28 Paul Eggert <eggert@twinsun.com>
2914 * sig2str.h, sig2str.c: New files.
2915 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
2917 2002-04-24 Jim Meyering <meyering@lucent.com>
2919 * gettext.h: New file, from Gettext.
2920 * Makefile.am (INCLUDES): Remove -I../intl.
2921 (libfetish_a_SOURCES): Add gettext.h.
2923 2002-04-16 Jim Meyering <meyering@lucent.com>
2925 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
2926 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
2927 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
2929 2002-04-12 Jim Meyering <meyering@lucent.com>
2931 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
2933 2002-03-10 Jim Meyering <meyering@lucent.com>
2935 * makepath.c (make_path): Remove a comma from a diagnostic.
2936 Suggestion from Santiago Vila.
2938 2002-03-08 Jim Meyering <meyering@lucent.com>
2940 * rename.c: Mention that this wrapper is needed also on
2941 mips-dec-ultrix4.4 systems.
2943 2002-03-02 Jim Meyering <meyering@lucent.com>
2945 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
2946 not HAVE_CLOCK_SETTIME.
2948 2002-02-27 Paul Eggert <eggert@twinsun.com>
2950 * nanosleep.h: Rename to....
2951 * timespec.h: New name for nanosleep.h. All uses changed.
2953 * gettime.c: New file.
2954 * settime.c: New file.
2957 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
2958 timespec.h. Remove nanosleep.h.
2960 2002-02-25 Paul Eggert <eggert@twinsun.com>
2962 * acl.c, acl.h: New files.
2963 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
2965 2002-02-24 Jim Meyering <meyering@lucent.com>
2967 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
2968 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
2969 cause trouble. Reported by Nelson Beebe.
2971 2002-02-23 Paul Eggert <eggert@twinsun.com>
2973 * path-concat.c (xpath_concat): Reorder code to pacify
2974 compilers that don't know that xalloc_die never returns.
2976 2002-02-20 Jim Meyering <meyering@lucent.com>
2978 * getdate.c: Regenerate using bison-1.33.
2980 2002-02-15 Paul Eggert <eggert@twinsun.com>
2982 * posixver.c, posixver.h: New files.
2983 * Makefile.am (libfetish_a_SOURCES): Add them.
2985 2002-02-02 Paul Eggert <eggert@twinsun.com>
2986 Bruno Haible <bruno@clisp.org>
2988 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
2989 (fwrite_success_callback): New declaration.
2990 * unicodeio.c (unicode_to_mb): New function, extracted from
2991 print_unicode_char. Call failure callback instead of error.
2992 (fwrite_success_callback): New function.
2993 (exit_failure_callback): New function.
2994 (fallback_failure_callback): New function.
2995 (print_unicode_char): Call unicode_to_mb.
2997 2002-01-26 Jim Meyering <meyering@lucent.com>
2999 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
3001 2002-01-22 Jim Meyering <meyering@lucent.com>
3003 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
3004 Otherwise, some versions of automake would omit the rule that makes
3005 Makefile from Makefile.in.
3007 2001-01-21 Paul Eggert <eggert@twinsun.com>
3009 * xmemcoll.h, xmemcoll.c: New files.
3010 * Makefile.am (libfetish_a_SOURCES): Add them.
3011 * memcoll.c: Include errno.h, and declare errno if not defined.
3012 (memcoll): Set errno to zero if there is no error.
3014 * quotearg.c (quotearg_buffer_restyled):
3015 Fix bug with quoting buffers containing NUL when backslashing escapes.
3016 This bug was exposed by the other changes in this patch.
3017 (quotearg_n_options): New arg ARGSIZE.
3018 All callers changed.
3019 (quoting_options_from_style): New function.
3020 (quotearg_n_style): Use it.
3021 (quotearg_n_style_mem): New function.
3023 * quotearg.h (quotearg_n_style_mem): New function.
3025 2002-01-16 Jim Meyering <meyering@lucent.com>
3027 * getdate.y: Add three semicolons, each just before a closing brace.
3028 Bison (as of version 1.31) no longer papers over that mistake.
3030 2002-02-14 Paul Eggert <eggert@twinsun.com>
3032 * backupfile.c (ISDIGIT): Comment fix.
3033 * getdate.y (ISDIGIT): Likewise.
3034 * posixtm.c (ISDIGIT, year): Likewise.
3035 * strverscmp.c (ISDIGIT): Likewise.
3036 * userspec.c (ISDIGIT): Likewise.
3038 2002-01-05 Jim Meyering <meyering@lucent.com>
3040 * version-etc.c (version_etc_copyright): Update copyright year.
3042 2001-01-19 Paul Eggert <eggert@twinsun.com>
3044 * closeout.c (close_stdout_status): If ferror (stdout), do
3045 not silently exit merely because the output buffer happens to
3046 have nothing pending.
3048 2001-12-18 Paul Eggert <eggert@twinsun.com>
3050 See the big note in ../ChangeLog.
3051 * human.c (suffixes): Prefer K to k for 1024.
3052 (generate_suffix_backwards): New function.
3053 (human_readable_inexact): Use it.
3054 * xstrtol.c (__xstrtol): If there is no number but there
3055 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
3056 Accept 'K' as well as 'k'.
3058 2001-12-15 Jim Meyering <meyering@lucent.com>
3060 * regex.h (__restrict_arr): Update from libc.
3062 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
3063 as `remote' if the name starts with `//'. Suggested by Michael Stone.
3066 2001-12-10 Jim Meyering <meyering@lucent.com>
3068 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
3069 Instead, include "xalloc.h".
3070 (initbuffer): Don't cast xmalloc return value to char*.
3071 (readline): Reword comment.
3072 Don't cast xrealloc return value to char*
3075 2001-12-09 Jim Meyering <meyering@lucent.com>
3077 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
3078 `signed and unsigned type in conditional expression'.
3079 * posixtm.c (posix_time_parse): Likewise.
3081 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
3083 * readtokens.c (readtoken): Declare an index to be of type unsigned
3084 to avoid a pedantic warning.
3086 * getstr.c: Don't include assert.h.
3087 (getstr): Remove warning-evoking assertions.
3088 Return -1 if offset parameter is out of bounds.
3089 Change the type of a local from int to size_t.
3091 * strftime.c (my_strftime_localtime_r): Include this function
3092 definition in the `#if ! HAVE_TM_GMTOFF' block.
3094 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
3095 Include xalloc.h instead.
3097 2001-12-02 Jim Meyering <meyering@lucent.com>
3099 * tempname.c: Don't declare getenv, thus reverting the change of
3100 2001-11-18. It's no longer necessary, now that stdlib.h is always
3103 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
3104 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
3106 2001-11-30 Akim Demaille <akim@epita.fr>
3108 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
3109 before being defined.
3111 2001-11-27 Paul Eggert <eggert@twinsun.com>
3113 * quotearg.h (quotearg_n, quotearg_n_style):
3114 First arg is int, not unsigned.
3115 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
3116 (SIZE_MAX, UINT_MAX): New macros.
3117 (quotearg_n_options): Abort if N is negative.
3118 Avoid overflow check on hosts where size_t is 64 bits and int
3119 is 32 bits, as overflow is impossible there.
3120 Fix off-by-one typo that caused unnecessary reallocation.
3122 2001-11-27 Jim Meyering <meyering@lucent.com>
3124 * tempname.c: Merge with version from libc.
3125 * regex.c: Likewise.
3127 * tempname.c: Include stdlib.h unconditionally. On some old systems
3128 for which STDC_HEADERS is 0, it was not included, resulting in a
3129 warning about an integer-to-pointer conversion problem with getenv.
3130 Reported by Volker Borchert.
3132 2001-11-26 Jim Meyering <meyering@lucent.com>
3134 * gtod.h: Remove file.
3135 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
3136 * gettimeofday.c: Don't include gtod.h.
3137 (GTOD_init): Remove function.
3138 (rpl_gettimeofday): Do its job here instead, rather than aborting.
3139 Suggestion from Volker Borchert.
3141 2001-11-23 Jim Meyering <meyering@lucent.com>
3143 * hash.h (struct hash_table): Don't define here. Merely declare it.
3144 * hash.c (struct hash_table): Define it here instead.
3146 2001-11-22 Jim Meyering <meyering@lucent.com>
3148 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
3150 2001-11-18 Paul Eggert <eggert@twinsun.com>
3152 * tempname.c (TMP_MAX): Remove; no longer needed.
3153 (TEMPORARIES): New macro.
3154 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
3155 removes an artificial limitation (e.g. HP-UX 10.20, where
3158 2001-11-18 Jim Meyering <meyering@lucent.com>
3160 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
3163 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
3164 files will be created before anything else.
3166 2001-11-17 Jim Meyering <meyering@lucent.com>
3168 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
3169 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
3170 rather than group writable. Patch by Juan F. Codagnone.
3172 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
3173 Instead, include "xalloc.h".
3175 * mountlist.c: Include unlocked-io.h after all system headers.
3176 Remove explicit declarations of xmalloc, xrealloc,
3177 and xstrdup. Instead, include "xalloc.h".
3179 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
3180 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
3181 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
3183 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
3184 Reported by Padraig Brady.
3186 * mkstemp.c: #undef mkstemp.
3188 (rpl_mkstemp): Rename from mkstemp.
3191 2001-11-16 Jim Meyering <meyering@lucent.com>
3193 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
3194 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
3195 determine the amount of total physical memory, use pstat_getstatic.
3196 HPUX-11 doesn't define _SC_PHYS_PAGES.
3197 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
3198 If sysconf couldn't be used to determine the amount of available
3199 physical memory, use both pstat_getstatic and pstat_getdynamic.
3200 Based on a patch from Bob Proulx.
3202 2001-11-05 Jim Meyering <meyering@lucent.com>
3204 * xstat.in (slash_aware_lstat): Correct a misleading comment.
3206 2001-11-03 Jim Meyering <meyering@lucent.com>
3208 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
3209 in argmatch_to_argument call.
3211 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
3214 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
3215 e.g., a fault due to an attempt to free a NULL pointer.
3217 2001-11-01 Jim Meyering <meyering@lucent.com>
3219 * dirfd.c, dirfd.h: New files.
3220 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
3222 * hash.c (hash_print) [TESTING]: Clean up.
3224 2001-10-22 Paul Eggert <eggert@twinsun.com>
3226 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
3227 to avoid a warning if -Wall.
3229 2001-10-21 Paul Eggert <eggert@twinsun.com>
3231 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
3233 2001-10-21 Jim Meyering <meyering@lucent.com>
3235 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
3236 this code would end up calling gettext even in packages built
3238 * getopt.c (_): Likewise.
3239 * regex.c (_): Likewise.
3241 2001-10-20 Paul Eggert <eggert@twinsun.com>
3243 * error.c (strerror_r): Do not declare unless !_LIBC.
3244 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
3245 Use strerror_r that is only a macro, even if it is not a function.
3246 (strerror): Check for HAVE_DECL_STRERROR before declaring.
3247 (private_strerror): Use prototypes, not old-style function definition.
3248 (print_errno_message): New function.
3249 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
3251 (error_tail, error, error_at_line): Use it.
3253 2001-10-11 Jim Meyering <meyering@lucent.com>
3255 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
3256 and quote_n (1, ... to avoid clobbering a buffer.
3258 2001-10-05 Jim Meyering <meyering@lucent.com>
3260 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
3261 * hash-pjw.c: New file (factored out of fileutils' remove.c).
3262 * hash-pjw.h: New file.
3264 2001-09-30 Jim Meyering <meyering@lucent.com>
3266 * mountlist.c [MOUNTED_GETFSSTAT]:
3267 Include <sys/ucred.h>, for Apple Darwin.
3268 Include sys/mount.h and sys/fs_types.h only if available.
3270 (read_filesystem_list): Use FS_TYPE.
3272 2001-09-29 Paul Eggert <eggert@twinsun.com>
3274 * exclude.c (excluded_filename): 0 -> false, since it's
3277 2001-09-28 Paul Eggert <eggert@twinsun.com>
3279 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
3280 #defines strtoimax. Also treat the other strto* functions
3283 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
3284 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
3285 (strtoimax, strtoumax): Do not declare if already defined as a macro.
3287 2001-09-26 Jim Meyering <meyering@lucent.com>
3289 Most macros in unlocked-io.h had the wrong number of arguments.
3290 * gen-uio: New script.
3291 (USE_UNLOCKED_IO): Define to 1 if not already defined.
3292 * unlocked-io.hin: Remove file.
3293 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
3294 rather than trying to embed it here.
3295 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
3296 Reported by Padraig Brady.
3298 2001-09-25 Volker Borchert <bt@teknon.de>
3300 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
3302 2001-09-23 Jim Meyering <meyering@lucent.com>
3304 * mountlist.c: Remove useless parentheses in #if directives.
3305 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
3306 the deprecated MOUNTED symbol is no longer defined in mntent.h.
3308 2001-09-22 Jim Meyering <meyering@lucent.com>
3310 * localcharset.c: Update from latest gettext.
3311 * config.charset: Likewise.
3313 2001-09-20 Jim Meyering <meyering@lucent.com>
3315 * xstrtol.c (strtoimax): Guard declaration with
3316 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
3317 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
3318 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
3319 (strtoumax): Likewise, for completeness (it wasn't necessary).
3321 2001-09-06 Paul Eggert <eggert@twinsun.com>
3323 * strtoimax.c (HAVE_LONG_LONG):
3324 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
3325 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
3326 to work around bug in IBM C compiler.
3328 2001-09-16 Jim Meyering <meyering@lucent.com>
3330 * mkdir.c: New file.
3332 2001-09-04 Paul Eggert <eggert@twinsun.com>
3334 * xgetcwd.c: Revert some of the previous change; intead,
3335 fix the HAVE_GETCWD_NULL code to behave more like the
3336 !HAVE_GETCWD_NULL code used to.
3339 (xgetcwd): Do not return NULL when memory is exhausted; instead,
3342 2001-09-04 Paul Eggert <eggert@twinsun.com>
3344 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
3345 Use ssize_t, not int, to store result of readlink.
3346 Check for ssize_t overflow as well as size_t overflow,
3347 as POSIX says the result of readlink is implementation-defined
3348 when ssize_t overflows.
3349 Remove unnecessary cast to char*.
3350 Use free+malloc instead of realloc, as the storage doesn't need
3351 to be preserved and it's clearer and can be more efficient that way.
3352 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
3353 * xreadlink.h (xreadlink): Update prototype.
3355 2001-09-03 Paul Eggert <eggert@twinsun.com>
3357 * exclude.c (fnmatch_no_wildcards): Fix confusion between
3358 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
3359 spotted by Jim Meyering.
3361 2001-09-03 Jim Meyering <meyering@lucent.com>
3363 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
3365 2001-09-03 Paul Eggert <eggert@twinsun.com>
3367 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
3368 like the HAVE_GETCWD_NULL code.
3369 Include pathmax.h if not HAVE_GETCWD.
3370 Do not include xalloc.h.
3371 (INITIAL_BUFFER_SIZE): New symbol.
3372 Do not use xmalloc / xrealloc, since the caller is responsible for
3373 handling errors. Preserve errno around `free' during failure.
3374 Do not overrun buffer when using getwd.
3376 2001-09-03 Paul Eggert <eggert@twinsun.com>
3378 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
3379 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
3381 2001-09-02 Jim Meyering <meyering@lucent.com>
3383 * error.c: Update from GNU libc.
3385 2001-09-01 Jim Meyering <meyering@lucent.com>
3387 * xreadlink.c: New file.
3388 * xreadlink.h: New file.
3389 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
3391 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
3392 doesn't conflict with sparc Solaris 7's definition in
3393 /usr/include/sys/int_types.h.
3395 * exclude.c: Use `""', not `<>' to #include non-system header files.
3396 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
3397 and strncasecmp as r-values. Unixware didn't have declarations.
3399 2001-08-31 Jim Meyering <meyering@lucent.com>
3401 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
3402 Use an initial, malloc'd, buffer of length 128 rather than
3403 a statically allocated one of length 1024.
3405 2001-08-30 Paul Eggert <eggert@twinsun.com>
3407 * xgetcwd.c: Don't include pathmax.h.
3408 Include stdlib.h and unistd.h if available.
3410 (xmalloc, xstrdup, free): Remove decls.
3411 (xgetcwd): Don't assume sizes fit in unsigned.
3412 Check for overflow when computing sizes.
3413 Simplify reallocation code.
3415 2001-08-28 Paul Eggert <eggert@twinsun.com>
3417 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
3419 * strtoimax.c: Renamed from strtoxmax.c, removing the
3422 Also, make the following further changes to make this file's
3423 configuration more similar to that of strtol.c:
3424 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
3425 (strtoumax, uintmax_t, strtoull, strtol): Remove.
3426 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
3427 (strtoimax): Renamed from strtoumax. All uses of unsigned values
3428 changed to signed values.
3430 And make the following changes as well:
3431 Fix copyright notice, as 1999 was missing.
3432 (verify): New macro.
3433 (strtoimax): Check sizes at compile-time, not run-time.
3434 Prefer strtol to strtoll if both work.
3435 (main): Remove; it was not that useful and was a pain to maintain.
3437 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
3439 2001-08-30 Paul Eggert <eggert@twinsun.com>
3441 * savedir.c (savedir): Remove size parameter, as POSIX says that
3442 a directory's st_size can have an arbitrary value, so the old
3443 usage could waste an arbitrary amount of memory. All uses
3445 * savedir.h: Update prototype.
3447 2001-08-30 Paul Eggert <eggert@twinsun.com>
3449 * xstrtol.c (strtoimax): New decl.
3451 2001-08-28 Paul Eggert <eggert@twinsun.com>
3453 * xstrtol.h: Add copyright notice.
3454 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
3455 LONGINT_INVALID_SUFFIX_CHAR.
3457 2001-08-30 Paul Eggert <eggert@twinsun.com>
3459 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3462 2001-08-30 Paul Eggert <eggert@twinsun.com>
3464 * hash.c: Remove '2001' from copyright notice.
3466 2001-08-30 Paul Eggert <eggert@twinsun.com>
3468 * full-write.h: New file.
3469 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
3470 * full-write.c: Correct credits, as cccp.c no longer
3471 exists and anyway it was so heavily changed from the old cccp
3472 code as to be unrecognizable. Include full-write.h.
3473 (full_write) Return size_t, with short writes meaning failure.
3474 All callers changed. This fixes a bug with large buffers
3476 * utime.c: Include full-write.h.
3478 2001-08-30 Paul Eggert <eggert@twinsun.com>
3480 Merge 'exclude' changes from tar 1.13.22.
3481 This fixes one or two unlikely storage allocation overflow bugs,
3482 but doesn't change user-visible behavior otherwise.
3484 2001-08-30 Paul Eggert <eggert@twinsun.com>
3486 * exclude.c (bool): Declare, perhaps by including stdbool.h.
3487 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
3488 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
3489 Include if available.
3490 (<xalloc.h>): Include
3491 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
3492 (verify): New macro. Use it to verify that EXCLUDE macros do not
3493 collide with FNM macros.
3494 (struct patopts): New struct.
3495 (struct exclude): Use it, as exclude patterns now come with options.
3496 (new_exclude): Support above changes.
3497 (new_exclude, add_exclude_file):
3498 Initial size must now be a power of two to simplify overflow checking.
3499 (free_exclude, fnmatch_no_wildcards): New function.
3500 (excluded_filename): No longer requires options arg, as the options
3501 are determined by add_exclude. Now returns bool, not int.
3502 (excluded_filename, add_exclude):
3503 Add support for the fancy new exclusion options.
3504 (add_exclude, add_exclude_file): Now takes int options arg.
3505 Check for arithmetic overflow when computing sizes.
3506 (add_exclude_file): xrealloc might modify errno, so don't
3507 realloc until after errno might be used.
3509 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
3511 (free_exclude): New decl.
3512 (add_exclude, add_exclude_file): Now takes int options arg.
3513 (excluded_filename): No longer requires options arg, as the options
3514 are determined by add_exclude. Now returns bool, not int.
3516 2001-08-30 Paul Eggert <eggert@twinsun.com>
3518 * alloca.c (alloca): Arg is of type size_t, not unsigned.
3520 2001-08-27 Jim Meyering <meyering@lucent.com>
3522 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
3524 * version-etc.c (N_): Remove definition.
3525 Revert most of last change.
3526 Instead, simply don't mark the `Copyright...' string for translation.
3527 Based on advice from Paul Eggert.
3529 * strtoxmax.c: Tweak comment.
3531 2001-08-26 Jim Meyering <meyering@lucent.com>
3533 * version-etc.c (version_etc_copyright_fmt): Replace literal year
3534 of copyright with `%s' so translators don't get an untranslated
3536 (COPYRIGHT_YEAR): Define.
3537 (version_etc): Use fprintf rather than fputs.
3538 Suggestion from Ulrich Drepper.
3540 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
3542 * strtoll.c: New file, from GNU libc.
3543 * xstrtoimax.c: New file.
3545 * xstrtol.h: Add xstrtoimax.
3546 * strtoumax.c: New file. Simply include "strtoumax.c".
3547 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
3549 * strtoumax.c: Factor to work both for unsigned and signed types, ...
3550 * strtoxmax.c: ... then renamed to this.
3552 2001-08-13 Paul Eggert <eggert@twinsun.com>
3554 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
3555 Port to Solaris 8, where 'sed' requires a space after the 'r'
3556 command, and where sh dislikes "$/". Clean up the spacing a bit.
3557 Redirect output to $tmp just once.
3559 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
3561 * addext.c (<errno.h>): Include.
3562 (errno): Declare if not defined.
3563 (addext): Work correctly when pathconf returns -1 and leaves
3564 errno alone because there is no limit. Also, work even if
3565 pathconf returns a value greater than SIZE_MAX.
3567 2001-08-12 Jim Meyering <meyering@lucent.com>
3569 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
3570 Simply `return getcwd (NULL, 0);'.
3571 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
3572 Use 1300 as initial value for length, not PATH_MAX.
3574 * pathmax.h: Clean up cpp syntax.
3576 2001-08-12 Jim Meyering <meyering@lucent.com>
3578 * gettimeofday.c: New file.
3580 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
3582 2001-08-04 Jim Meyering <meyering@lucent.com>
3584 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
3585 to get in sync with glibc.
3587 2001-08-03 Paul Eggert <eggert@twinsun.com>
3589 The following changes are from gettext 0.10.39 as maintained by
3592 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
3593 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
3594 with inverted sense. All uses changed.
3596 * mbswidth.c: Don't include <limits.h>.
3597 Include <stdlib.h> and <string.h> unconditionally.
3598 (iswcntrl, mbsinit, ISCNTRL): New macros.
3599 (mbsnwidth): Use K&R style function declarations.
3600 Don't bother checking for MB_LEN_MAX == 1, since the compiler
3601 can optimize it when MB_CUR_MAX == 1.
3602 The width of control characters is zero, not 1.
3604 2001-07-15 Jim Meyering <meyering@lucent.com>
3606 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
3607 (BUILT_SOURCES): Add unlocked-io.h.
3608 (io_functions): Define.
3609 (unlocked-io.h): New rule.
3610 (DISTCLEANFILES): Add unlocked-io.h.
3611 (all-local): Depend on unlocked-io.h, to ensure it is created.
3613 * unlocked-io.hin: New file
3615 * regex.c: Update from glibc.
3617 2001-07-05 Jim Meyering <meyering@lucent.com>
3619 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
3621 (libfetish_a_SOURCES): Put all .h files here instead.
3622 Remove a thus-exposed (better checks in automake) duplicate and
3623 two unnecessary .h files.
3625 2001-06-11 Jim Meyering <meyering@lucent.com>
3627 * regex.c: Update from GNU libc.
3629 2001-05-27 Jim Meyering <meyering@lucent.com>
3631 * readutmp.h (UT_TYPE): Define.
3633 2001-05-24 Jim Meyering <meyering@lucent.com>
3635 * argmatch.c: Include "quote.h".
3636 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
3637 quote function. Reported by Göran Uddeborg.
3639 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
3641 * dirname.c (dir_name): Compute append_dot using path, not newpath
3642 which is not yet declared.
3644 2001-05-11 Paul Eggert <eggert@twinsun.com>
3646 * Makefile.am (libfetish_a_SOURCES):
3647 Add strftime.c, since we now compile it on all hosts.
3649 * strftime.c (my_strftime):
3650 Define to nstrftime if emacs, but only if my_strftime is not defined.
3651 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
3652 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
3653 Add one more extra argument: a nanoseconds value.
3656 (my_strftime function): Add %N format.
3657 (emacs_strftimeu): Renamed from emacs_strftime,
3658 with extra ut argument.
3660 2001-05-11 Paul Eggert <eggert@twinsun.com>
3662 dirname code cleanup. base_name now behaves more compatibly
3663 with POSIX basename when given file names that have trailing
3664 slashes, and similarly for dir_name. Add new primitives
3665 base_len and dir_len. Put the directory-name-related decls
3668 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
3669 * backupfile.c (base_name): Likewise.
3670 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
3671 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
3672 * makepath.c (strip_trailing_slashes): Likewise.
3673 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
3675 * rename.c (strip_trailing_slashes): Likewise.
3676 * same.c (base_name): Likewise.
3677 * stripslash.c (ISSLASH): Likewise.
3679 * addext.c: Include <dirname.h> after size_t is defined.
3680 * backupfile.c: Likewise.
3682 * addext.c (addext): Use base_len to trim redundant
3683 trailing slashes instead of doing it ourselves.
3684 But do not trim the last slash if it is not redundant.
3686 * backupfile.c (find_backup_file_name,
3687 max_backup_version): Use base_len instead of rolling it ourselves.
3688 Handle the case of "" and (on DOS) "C:" correctly.
3690 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
3691 Include <string.h>, <dirname.h>.
3692 (base_name): Allow file names ending in slashes, other than names
3693 that are all slashes. In this case, return the basename followed
3694 by the slashes. This is more general, and can be used in places
3695 where the original base_name purposely had an assertion failure.
3696 (base_len): New function.
3698 * dirname.c: Include <string.h> instead of <stdlib.h>.
3699 Do not include <assert.h>; no longer needed.
3701 (memrchr): Remove decl.
3702 (dir_name_r): Remove.
3703 (dir_len): Renamed from dirlen. All callers changed.
3704 Rewrite in terms of base_name, for simplicity and consistency.
3705 (dir_name): Never return NULL. All callers changed.
3706 Do not include <stdlib.h> in test program; no longer needed.
3707 return 0; is fine for test program.
3709 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
3711 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
3713 * path-concat.c (path_concat): Use base_len to compute
3714 base length, not strlen; this means we cannot rely on memcpy
3717 * same.c (STREQ): Remove.
3718 (same_name): Handle the case where the basename ends in trailing '/'.
3720 * stripslash.c (strip_trailing_slashes): Return nonzero if
3721 a slash was stripped. Do not strip the last slash after a
3724 2001-04-08 Jim Meyering <meyering@lucent.com>
3726 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
3727 recomputed; that's necessary when the offset spans a DST transition.
3728 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
3730 2001-04-02 Jim Meyering <meyering@lucent.com>
3732 * regex.h, regex.c: Update from GNU libc.
3734 2001-03-19 Paul Eggert <eggert@twinsun.com>
3736 * version-etc.c (version_etc_copyright): Update to 2001.
3738 2001-03-16 Paul Eggert <eggert@twinsun.com>
3740 * tempname.c (uint64_t): Define to uintmax_t if
3741 not defined, and if UINT64_MAX is not defined.
3742 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
3743 Reported by John David Anglin.
3745 2001-03-10 Bruno Haible <haible@clisp.cons.org>
3747 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
3748 alias if codeset is empty.
3749 * config.charset (BeOS): Use wildcard syntax.
3751 2001-03-13 Jim Meyering <meyering@lucent.com>
3753 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
3754 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
3757 2001-03-06 Bruno Haible <haible@clisp.cons.org>
3759 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
3761 * unicodeio.c (print_unicode_char): Simplify accordingly.
3763 2001-03-06 Bruno Haible <haible@clisp.cons.org>
3765 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
3766 support for DOS/DJGPP.
3768 2001-02-28 Paul Eggert <eggert@twinsun.com>
3770 * Makefile.am (libfetish_a_SOURCES):
3771 Add dup-safer.c, fopen-safer.c.
3772 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
3774 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
3776 2001-02-25 Paul Eggert <eggert@twinsun.com>
3778 The mkstemp replacement is taken from glibc 2.2.2, with some
3779 portability fixes for use outside glibc, as follows:
3781 * tempname.c (struct_stat64): New macro.
3782 (direxists, __gen_tempname): Use it.
3783 This avoids a portability problem with Solaris 8.
3785 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
3786 (<stddef.h>, <stdint.h>, <string.h>):
3787 Include only if STDC_HEADERS || _LIBC.
3788 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
3789 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
3790 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
3791 (__set_errno): Define this macro if <errno.h> doesn't.
3792 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
3793 Define these macros if <stdio.h> doesn't.
3794 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
3795 Define these macros if <sys/stat.h>
3796 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
3797 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
3798 __xstat64): Define if not _LIBC.
3799 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
3800 (__gen_tempname): Invoke gettimeofday only if
3801 HAVE_GETTIMEOFDAY || _LIBC;
3802 otherwise, fall back on plain "time".
3803 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
3805 * mkstemp.c (__GT_FILE): Define to zero if not defined.
3807 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
3809 2001-02-17 Jim Meyering <meyering@lucent.com>
3811 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
3812 around included file name.
3814 * strnlen.c (__strnlen): Merge in a change from GNU libc.
3816 * strftime.c: Update from GNU libc (the only changes were to comments).
3818 2001-02-13 Bruno Haible <haible@clisp.cons.org>
3820 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
3822 2001-02-17 Paul Eggert <eggert@twinsun.com>
3824 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
3825 Remove workaround macros for hosts that have mbrtowc but not
3826 mbstate_t, as we now insist on proper declarations for both
3827 before using mbrtowc.
3829 2001-02-17 Jim Meyering <meyering@lucent.com>
3831 * regex.c: Update from libc.
3833 2001-02-16 Paul Eggert <eggert@twinsun.com>
3835 * alloca.c (malloc): Undef before defining, since stdlib.h
3836 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
3837 Reported by Mark Hounschell via Paul Eggert.
3839 2001-01-30 Bruno Haible <haible@clisp.cons.org>
3841 * config.charset: Update for FreeBSD 4.2.
3843 2001-01-26 Jim Meyering <meyering@lucent.com>
3845 * quotearg.c: Include stddef.h.
3846 * quote.c: Include stddef.h.
3847 Reported by Axel Kittenberger.
3849 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
3850 line in double quotes so that it evokes a better diagnostic.
3851 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
3852 Reported by Axel Kittenberger.
3854 2001-01-15 Bruno Haible <haible@clisp.cons.org>
3856 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
3857 to avoid a warning. Add back 'const' to inptr.
3859 2001-01-16 Jim Meyering <meyering@lucent.com>
3861 * basename.c: Include <stdio.h>, needed by assert on SunOS 4.
3864 2001-01-14 Jim Meyering <meyering@lucent.com>
3866 * rename.c: New file. From Volker Borchert.
3867 Include stdlib.h, string.h or strings.h, and xalloc.h.
3868 Use strip_trailing_slashes rather than open-coding it.
3870 2001-01-03 Paul Eggert <eggert@twinsun.com>
3872 * strftime.c: Sync with glibc time/strftime.c 1.81.
3874 2001-01-03 Jim Meyering <meyering@lucent.com>
3876 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
3877 local `inptr' to avoid warning with some system declarations of iconv.
3879 2000-12-29 Paul Eggert <eggert@twinsun.com>
3881 * modechange.c: Do not assume that mode_t uses the
3882 traditional octal encoding. E.g. "chmod 1 FOO" should set
3883 the other-execute bit of FOO even if S_IXOTH != 1.
3885 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
3886 WOTH, XOTH, ALLM): New macros.
3887 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
3888 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
3890 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
3891 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
3893 No need to use uintmax_t; unsigned long is long enough.
3894 Don't bother to get suffix since we don't use it.
3896 2000-12-24 Jim Meyering <meyering@lucent.com>
3898 * hash.c (is_prime): Return explicit boolean values.
3899 (hash_get_first): Return NULL to appease Irix5.6's 89.
3900 Reported by Nelson Beebe.
3902 2000-10-31 Bruno Haible <haible@clisp.cons.org>
3904 * localcharset.c (locale_charset): Add support for Win32.
3906 2000-12-18 Paul Eggert <eggert@twinsun.com>
3908 * physmem.h, physmem.c: New files.
3910 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
3911 (noinst_HEADERS): Add physmem.h.
3913 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
3914 't' for compatibility with Solaris 8 sort.
3916 2000-12-18 Bruno Haible <haible@clisp.cons.org>
3918 * config.charset: Add support for BeOS.
3920 2000-12-16 Jim Meyering <meyering@lucent.com>
3922 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
3923 SHELLS_FILE to a file name that's useful on djgpp systems.
3925 (ADDITIONAL_DEFAULT_SHELLS): Define.
3926 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
3927 Based mostly on a patch from Prashant TR.
3929 2000-12-16 Jim Meyering <meyering@lucent.com>
3931 This bug had a serious impact on chown: `chown N:M FILE' (for integer
3932 N and M) would have treated it like `chown N:N FILE'.
3934 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
3936 2000-10-31 Bruno Haible <haible@clisp.cons.org>
3938 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
3939 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
3940 to the list of canonical encodings. Rename EUC-CN to GB2312.
3942 2000-12-08 Andreas Schwab <schwab@suse.de>
3944 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
3945 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
3947 2000-12-07 Jim Meyering <meyering@lucent.com>
3949 * stripslash.c (ISSLASH): Define.
3950 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
3953 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
3954 (dir_name_r): Declare this function as static.
3955 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
3956 manifest itself on a name containing a mix of slashes and
3958 Make this function work with names starting with a DOS-style
3959 drive letter and colon prefix.
3960 (dir_name): Append `.' if necessary.
3961 Based mostly on patches from Prashant TR and Eli Zaretskii.
3963 * dirname.h (dir_name_r): Remove prototype.
3965 2000-12-05 Jim Meyering <meyering@lucent.com>
3967 * dirname.c (dir_name_r): Add `const' in a few local declarations.
3969 2000-12-04 Jim Meyering <meyering@lucent.com>
3971 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
3972 Also include memory.h, stdlib.h, unistd.h if appropriate.
3973 Reported by Andreas Jaeger (conflicting declaration of malloc).
3975 2000-12-02 Jim Meyering <meyering@lucent.com>
3977 * closeout.h: Make idempotent, to avoid some obscure warnings.
3979 2000-12-01 Paul Eggert <eggert@twinsun.com>
3981 * memrchr.c: Include <config.h> before any system include file.
3983 2000-11-29 Paul Eggert <eggert@twinsun.com>
3985 * dirname.c (dir_name_r): Fix typo: int -> size_t.
3987 2000-11-26 Jim Meyering <meyering@lucent.com>
3989 * memcoll.c: Include sys/types.h. From Werner Almesberger.
3991 2000-11-22 Paul Eggert <eggert@twinsun.com>
3993 * strftime.c (my_strftime): Do not invoke mbrlen with a
3994 size of (size_t) -1; it's not portable.
3996 2000-11-17 Akim Demaille <akim@epita.fr>
3998 * obstack.h: Formatting changes.
3999 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
4000 prevent type checking.
4001 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4002 cast the value to (void *): assigning a `foo *' to a `void *'
4004 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4006 2000-11-17 Jim Meyering <meyering@lucent.com>
4008 * strstr.c: Update from GNU libc.
4010 2000-11-16 Jim Meyering <meyering@lucent.com>
4012 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
4014 2000-11-11 Jim Meyering <meyering@lucent.com>
4016 * error.c: Add a couple #includes, merging from GNU libc version.
4018 2000-11-10 Jim Meyering <meyering@lucent.com>
4020 * obstack.h: Update from GNU libc.
4021 * obstack.c: Likewise.
4023 2000-11-06 Paul Eggert <eggert@twinsun.com>
4025 * getusershell.c (setusershell): Use rewind rather than
4026 fseek/fseeko, to avoid configuration hassles with fseeko.
4027 Don't bother opening SHELLS_FILE if shellstream is NULL;
4030 2000-11-05 Jim Meyering <meyering@lucent.com>
4032 * makepath.h (make_dir): Declare.
4033 * makepath.c (make_dir): Remove `static' attribute.
4036 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
4038 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
4039 last one in a bucket, advance to the next bucket.
4041 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
4043 * fnmatch.c: Do not comment out all the code if we are using
4044 the GNU C library, because in some cases we are replacing buggy
4045 code in the GNU C library itself.
4047 2000-10-30 Paul Eggert <eggert@twinsun.com>
4049 * error.h, getline.h, modechange.h:
4050 Remove "2000" from Copyright line, as the file hasn't been
4051 changed this year other than in the copyright notice.
4053 * xalloc.h: Add "2000" to Copyright line, as this file
4054 was changed this year.
4056 2000-10-30 Paul Eggert <eggert@twinsun.com>
4058 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
4059 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
4060 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
4062 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
4064 * regex.h (__restrict_arr): Move definition out of #ifndef block.
4065 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
4066 doesn't define __restrict_arr.
4068 2000-10-29 Jim Meyering <meyering@lucent.com>
4070 * xstat.in: Fix grammar in comment.
4072 2000-10-28 Jim Meyering <meyering@lucent.com>
4074 * memchr.c: Update from libc.
4075 Adjust for portability:
4076 [HAVE_STDLIB_H]: Include stdlib.h.
4077 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
4078 Undef __memchr, too.
4079 [!weak_alias]: Define __memchr to memchr.
4081 * regex.c: Update from libc.
4082 * regex.h: Likewise.
4083 * getopt1.c: Likewise.
4084 * memcmp.c: Likewise.
4086 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
4087 Avoid using fseek, when possible -- it's broken by design.
4088 Patch by Ulrich Drepper.
4090 2000-10-26 Jim Meyering <meyering@lucent.com>
4092 * strftime.c: Update from libc.
4094 2000-10-25 Jim Meyering <meyering@lucent.com>
4096 * obstack.c: Update from libc.
4098 2000-10-23 Jim Meyering <meyering@lucent.com>
4100 * hard-locale.c (hard_locale): Revert last change -- it was simply
4101 wrong. That set_locale call must not have any side effects.
4104 2000-10-22 Jim Meyering <meyering@lucent.com>
4106 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
4107 [CYCLIC]: Remove now-unused definition.
4109 * save-cwd.c (O_DIRECTORY): Define, if needed.
4110 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
4111 Suggestion from Ulrich Drepper.
4113 2000-10-21 Jim Meyering <meyering@lucent.com>
4115 * dirname.c (dir_name_r): New function, factored out of dir_name.
4116 (dir_name): Use dir_name_r.
4117 * dirname.h (dir_name_r): Declare it.
4119 2000-10-21 Jim Meyering <meyering@lucent.com>
4121 * dirname.c (memrchr): Declare if necessary.
4122 (dir_name): Remove the restriction that there be no
4123 trailing slashes. Now, this code skips past them, effectively
4125 [TEST_DIRNAME] (main): New unit tests.
4127 * memrchr.c: New file from GNU libc.
4128 Undef __memrchr, too.
4129 [!weak_alias]: Define __memrchr to memrchr.
4130 Guard weak_alias use with `#ifdef weak_alias'.
4132 2000-10-17 Jim Meyering <meyering@lucent.com>
4134 * quote.h (PARAMS): Define and use.
4135 Reported by Akim Demaille.
4137 * getopt.c: Update from libc.
4139 2000-10-16 Jim Meyering <meyering@lucent.com>
4141 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
4144 2000-09-25 Jim Meyering <meyering@lucent.com>
4146 * md5.h (rol): Define (from GnuPG).
4148 * sha.c: Give credit (GnuPG) where due.
4149 (M): Use rol rather than open-coding it.
4150 Add a FIXME comment.
4152 2000-09-21 Jim Meyering <meyering@lucent.com>
4154 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
4155 Reported by Michael Stone.
4157 2000-09-20 Jim Meyering <meyering@lucent.com>
4159 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
4160 (noinst_HEADERS): Add sha.h.
4161 Based on code from Scott G. Miller and from GnuPG.
4163 2000-09-15 Jim Meyering <meyering@lucent.com>
4165 * regex.c: Update from libc.
4167 2000-09-10 Jim Meyering <meyering@lucent.com>
4169 * getopt.c (_getopt_internal): Update from glibc.
4171 2000-09-09 Jim Meyering <meyering@lucent.com>
4173 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
4174 think it should be used as a general replacement for isascii.
4175 * fnmatch.c: Likewise.
4176 * mbswidth.c: Likewise
4177 * regex.c: Likewise.
4180 * userspec.c: Include sys/param.h and limits.h.
4182 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
4183 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
4184 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
4185 UID, GID. Check range.
4187 2000-09-06 Jim Meyering <meyering@lucent.com>
4189 * getopt.c (_getopt_internal): Update from glibc.
4191 2000-08-30 Jim Meyering <meyering@lucent.com>
4193 * strftime.c: Merge in changes from GNU libc.
4195 2000-08-26 Jim Meyering <meyering@lucent.com>
4197 * closeout.c: Include "__fpending.h".
4198 (close_stdout_status): Return right away if there's nothing to flush.
4200 * Makefile.am (noinst_HEADERS): Add __fpending.h.
4201 * __fpending.c: New file.
4202 * __fpending.h: New file.
4204 2000-08-07 Paul Eggert <eggert@twinsun.com>
4206 Standardize on "memory exhausted" instead of "Memory exhausted"
4207 or "virtual memory exhausted".
4208 * obstack.c (print_and_abort): Use "memory exhausted", not
4209 "virtual memory exhausted".
4210 * same.c (same_name): Invoke xalloc_die instead of printing
4212 * userspec.c (parse_user_spec): Likewise.
4213 * bumpalloc.h: comment fix
4214 * same.c, userspec.c: Include xalloc.h.
4216 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
4217 not char *const and pointing to a constant array.
4218 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
4219 (xrealloc): Comment fix.
4221 * userspec.c (parse_user_spec):
4222 Don't translate a message until just before returning,
4223 to avoid unnecessary translation.
4225 2000-08-07 Jim Meyering <meyering@lucent.com>
4227 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
4228 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
4229 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
4230 getgroups.c, gethostname.c, getopt.h, group-member.c,
4231 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
4232 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
4233 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
4234 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
4235 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
4236 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
4237 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
4238 yesno.c: Back out Copyright date changes for each file with no change
4239 this year. This eases coordination with other programs using the same
4240 source code modules. From Paul Eggert.
4242 2000-08-03 Greg McGary <greg@mcgary.org>
4244 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
4245 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
4246 (EXTEND_BUFFER): Use them.
4248 2000-08-01 Jim Meyering <meyering@lucent.com>
4250 * dirname.c (ISSLASH): Define.
4251 (BACKSLASH_IS_PATH_SEPARATOR): Define.
4252 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
4253 both `\' and `/' may be use as path separators.
4254 Based on a patch from Prashant TR.
4256 2000-07-31 Paul Eggert <eggert@twinsun.com>
4258 * quotearg.c (quotearg_n_options): Don't make the initial
4259 slot vector a constant, since it might get modified.
4261 2000-07-31 Jim Meyering <meyering@lucent.com>
4263 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
4264 * obstack.c (print_and_abort): Likewise.
4266 2000-07-30 Paul Eggert <eggert@twinsun.com>
4268 * quotearg.c (quotearg_n_options): Preallocate a slot 0
4269 buffer, so that the caller can always quote one small
4270 component of a "memory exhausted" message in slot 0.
4271 From a suggestion by Jim Meyering.
4273 2000-07-30 Jim Meyering <meyering@lucent.com>
4275 * makepath.c (make_path): Quote the other instance, too.
4277 * quotearg.c (N_STATIC_SLOTVECS): Define.
4278 (STATIC_BUF_SIZE): Define.
4279 (quotearg_n_options): Use only statically allocated storage when
4280 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
4281 than STATIC_BUF_SIZE.
4283 2000-07-29 Jim Meyering <meyering@lucent.com>
4285 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
4286 * dirname.c (dir_name): Likewise.
4288 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
4290 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
4291 (dir_name): Assert that there are no trailing slashes.
4293 2000-07-18 Bruno Haible <haible@clisp.cons.org>
4295 * mbswidth.h (mbswidth): Add a flags argument.
4296 (mbswidth): New declaration.
4297 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
4298 * mbswidth.c (mbswidth): Add a flags argument.
4299 (mbsnwidth): New function.
4301 2000-07-24 Jim Meyering <meyering@lucent.com>
4303 * mbswidth.c: Remove useless #else. From Bruno Haible.
4305 2000-07-23 Paul Eggert <eggert@twinsun.com>
4307 * mbswidth.c (_XOPEN_SOURCE):
4308 Don't define; this causes problems on Solaris 7.
4309 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
4311 2000-07-23 Paul Eggert <eggert@twinsun.com>
4314 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
4315 so that mbstate_t is always defined.
4317 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
4318 be 1 in at least one GCC installation, and this configuration
4319 error is likely to be common. Ignoring MB_LEN_MAX hurts
4320 performance on hosts that have mbrtowc but have only unibyte
4321 locales, but I assume these hosts are rare.
4323 2000-07-23 Paul Eggert <eggert@twinsun.com>
4325 * quotearg.c: Streamline by invoking multibyte code only if needed.
4326 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
4327 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
4328 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
4329 invoke multibyte primitives.
4331 2000-07-23 Jim Meyering <meyering@lucent.com>
4333 * basename.c (base_name): Add an assertion.
4335 2000-07-15 Bruno Haible <clisp.cons.org>
4337 * quotearg.c: When the system forces us to redefine mbstate_t,
4338 shadow its mbsinit function.
4340 2000-07-16 Bruno Haible <haible@clisp.cons.org>
4342 * mbswidth.h: New file.
4343 * mbswidth.c: New file.
4344 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
4345 (noinst_HEADERS): Add mbswidth.h.
4347 2000-07-17 Bruno Haible <haible@clisp.cons.org>
4349 * config.charset: Add support for FreeBSD. Improve support for HP-UX
4352 2000-07-15 Jim Meyering <meyering@lucent.com>
4354 * makepath.c: Include quote.h.
4355 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
4356 corresponding argument in a `quote (...)' call.
4357 Give better diagnostics.
4359 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
4360 (noinst_HEADERS): Add quote.h.
4362 * quote.c (quote, quote_n): New file. Two functions taken verbatim
4363 from tar's src/misc.c.
4364 * quote.h: New file. Prototypes for same.
4366 2000-07-10 Paul Eggert <eggert@twinsun.com>
4368 From a suggestion by Bruno Haible.
4369 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
4370 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
4371 to decide whether to define the BeOS workaround macro;
4372 this adjusts to the change to AC_MBSTATE_T.
4374 2000-07-13 Paul Eggert <eggert@twinsun.com>
4376 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
4378 * quotearg.c (quoting_style_args, quoting_style_vals,
4379 quotearg_buffer_restyled): Add support for
4380 clocale_quoting_style. Undo previous change to
4381 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
4382 and "{RIGHT QUOTATION MARK}" msgids.
4384 2000-07-05 Paul Eggert <eggert@twinsun.com>
4386 The old behavior of quoting `like this' doesn't look good with
4387 newer, ISO-style fonts. See:
4388 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
4390 Instead, quote "like this" by default. Let the translator
4391 tailor the locale-specific quoting behavior by providing
4392 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
4394 * quotearg.c (N_): New macro.
4395 (gettext_default): New function.
4396 (quotearg_buffer_restyled): Use
4397 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
4398 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
4400 2000-07-09 Jim Meyering <meyering@lucent.com>
4402 * Most files: Update copyright dates to include 2000.
4404 2000-07-08 Jim Meyering <meyering@lucent.com>
4406 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
4408 (xgethostname): Remove now-unnecessary #ifdef.
4409 Move declaration of `err' into loop where it's used.
4411 2000-07-05 Bruno Haible <haible@clisp.cons.org>
4413 * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
4414 by allocating a larger buffer. Test the gethostname return value for
4415 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
4416 returns an error and ENAMETOOLONG isn't defined.
4418 2000-07-05 Paul Eggert <eggert@twinsun.com>
4419 and Bruno Haible <haible@clisp.cons.org>
4421 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
4423 2000-07-05 Bruno Haible <haible@clisp.cons.org>
4425 * quotearg.c (struct quoting_options): Simplify quote_these_too
4428 2000-07-03 Jim Meyering <meyering@lucent.com>
4430 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
4431 Reported by Bruno Haible.
4433 2000-07-04 Jim Meyering <meyering@lucent.com>
4435 * quotearg.c: Make inclusion of <wchar.h> independent of whether
4436 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
4439 2000-07-03 Paul Eggert <eggert@twinsun.com>
4440 and Bruno Haible <haible@clisp.cons.org>
4442 * quotearg.c (mbrtowc):
4443 Assign to *pwc, and return 1 only if result is nonzero.
4444 (iswprint): Use ISPRINT when substituting our own mbrtowc.
4446 2000-07-03 Jim Meyering <meyering@lucent.com>
4448 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
4449 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
4452 2000-07-02 Jim Meyering <meyering@lucent.com>
4454 * quotearg.c (mbstate_t): Don't define here.
4456 2000-07-02 Jim Meyering <meyering@lucent.com>
4458 * nanosleep.c (SIGCONT): Define if not already defined.
4460 2000-06-17 Bruno Haible <haible@clisp.cons.org>
4462 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
4463 per change in ../m4/ls-mntd-fs.m4.
4464 (read_filesystem_list): Ignore symbolic links.
4466 2000-06-29 Jim Meyering <meyering@lucent.com>
4468 * same.c: Include <string.h> or <strings.h>, as appropriate,
4469 for declaration of strcmp.
4471 * long-options.c: Include <stdlib.h>, for declaration of exit.
4473 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
4474 Avoid warning by casting result to `char *' to remove `const'.
4476 2000-06-17 Bruno Haible <haible@clisp.cons.org>
4478 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
4480 2000-06-26 Paul Eggert <eggert@twinsun.com>
4482 savedir now sets errno on failure and invokes xmalloc to get memory.
4483 Fix a couple of other minor bugs while we're at it.
4485 * savedir.c (<unistd.h>): Do not include; there's no need.
4486 (NAMLEN): Remove macro.
4487 (malloc, realloc): Remove decls.
4489 ("xalloc.h"): Include.
4490 (NAME_SIZE_DEFAULT): New macro.
4491 (savedir): Use xmalloc / xrealloc to allocate memory.
4492 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
4493 Skip "" directory entries.
4494 Use strlen to calculate directory entry length, since the old method
4495 is rarely used these days and isn't worth supporting.
4496 Don't use a pointer after freeing it.
4497 Check for integer overflow when calculating allocation size.
4498 Use memcpy to copy entries, instead of stpcpy.
4499 Set errno properly when returning NULL.
4500 Check for readdir error.
4502 2000-06-26 Jim Meyering <meyering@lucent.com>
4504 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
4506 2000-06-17 Bruno Haible <haible@clisp.cons.org>
4508 * getusershell.c (xmalloc, xrealloc): Remove functions.
4510 Don't include <stdlib.h>. Don't declare malloc, realloc.
4512 2000-06-23 Bruno Haible <haible@clisp.cons.org>
4514 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
4516 2000-06-24 Jim Meyering <meyering@lucent.com>
4518 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
4520 2000-06-21 Jim Meyering <meyering@lucent.com>
4522 * getpass.c: New file, from Bruno Haible. Required for BeOS.
4524 2000-06-19 Paul Eggert <eggert@twinsun.com>
4526 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
4527 (mbrtowc, mbstate_t): Define substitutes if
4528 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
4529 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
4530 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
4532 2000-06-17 Bruno Haible <haible@clisp.cons.org>
4534 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
4535 than 1024, return a memory chunk of least possible size, instead
4536 of size PATH_MAX + 2. In the loop, increment the size proportionally.
4537 Use free/xmalloc instead of xrealloc to avoid copying for very long
4540 2000-06-17 Bruno Haible <haible@clisp.cons.org>
4542 * canon-host.c (canon_host): Use malloc and memcpy to copy an
4543 address, not strdup. Include <stdlib.h> and don't declare free().
4545 2000-06-17 Bruno Haible <haible@clisp.cons.org>
4547 * path-concat.c (path_concat): Don't access dir[-1] if dir is
4550 2000-06-21 Jim Meyering <meyering@lucent.com>
4552 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
4553 (noinst_HEADERS): Add getstr.h.
4555 * getline.c (getstr): Move into a separate file.
4556 * getstr.c (getstr): New file, extracted from getline.c, with
4557 the following changes: new parameter, delim2; both delim[12]
4558 parameters have type `int', not `char'. The latter would lose
4559 with 8-bit delimiters.
4560 * getstr.h: New file.
4562 2000-06-19 Jim Meyering <meyering@lucent.com>
4564 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
4566 2000-06-18 Jim Meyering <meyering@lucent.com>
4568 * mkdir.c: Remove file, due mainly to copyright incompatibility.
4569 Besides, these days every porting target provides a mkdir function.
4571 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
4572 (this snippet comes from src/system.h).
4574 2000-06-15 Paul Eggert <eggert@twinsun.com>
4576 * human.c (adjust_value): New function.
4577 (human_readable_inexact): Apply rounding style even when
4578 printing approximate values.
4580 2000-06-14 Paul Eggert <eggert@twinsun.com>
4582 * human.c (human_readable_inexact): Allow an input block
4583 size that is not a multiple of the output block size, and vice versa.
4584 Reported by Piergiorgio Sartor.
4586 2000-06-14 Paul Eggert <eggert@twinsun.com>
4588 * getdate.y (get_date): Apply relative times after time
4589 zone indicator, not before. Reported by Todd A. Jacobs.
4591 2000-06-13 Jim Meyering <meyering@lucent.com>
4593 * Makefile.am (all-local): Depend on lstat.c and stat.c.
4595 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
4597 2000-06-12 Paul Eggert <eggert@twinsun.com>
4599 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
4601 2000-06-04 Paul Eggert <eggert@twinsun.com>
4603 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
4605 2000-06-04 Jim Meyering <meyering@lucent.com>
4607 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
4608 SunOS 4.1.4 for which gid_t is an unsigned type.
4610 2000-06-03 Jim Meyering <meyering@lucent.com>
4612 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
4614 2000-05-26 Bruno Haible <haible@clisp.cons.org>
4616 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
4617 newer, don't install charset.alias.
4618 * config.charset: Change the Linux/glibc rules so they become empty
4619 on glibc-2.1 or newer.
4621 2000-06-02 Jim Meyering <meyering@lucent.com>
4623 * mountlist.c: Back out last change. Instead, do this...
4624 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
4625 member using the same `ignore'-testing code.
4626 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
4630 2000-05-29 Jim Meyering <meyering@lucent.com>
4632 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
4633 with the `ignore' attribute. Based on a patch from Mark D. Roth.
4635 2000-05-22 Jim Meyering <meyering@lucent.com>
4637 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
4639 2000-05-18 Jim Meyering <meyering@lucent.com>
4641 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
4642 back, too, since it may have been modified by allocate_entry.
4643 (hash_delete): Rewrite to use neither the assignment operator
4644 nor the comma operator in an if-expression.
4646 2000-05-15 Paul Eggert <eggert@twinsun.com>
4649 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
4650 Remove; no longer needed.
4651 "quotearg.h": Add include.
4652 (file_name): Do not bother to explicitly initialize to NULL; it's less
4653 efficient on some hosts.
4654 (close_stdout_status): Remove test as to whether stdout was already
4655 closed; it breaks for the case "echo x | sort >&-".
4656 Quote file name colons.
4657 Do not assume that _("write error") lacks format strings.
4659 2000-05-15 Jim Meyering <meyering@lucent.com>
4661 * version-etc.c (version_etc_copyright): Update the copyright string
4662 used in all --version output.
4664 2000-05-14 Jim Meyering <meyering@lucent.com>
4666 * closeout.c (close_stdout_set_file_name): New function.
4667 (close_stdout_status): Use new file-scoped global.
4668 Return right away if fstat says the stdout file descriptor is invalid.
4669 * closeout.h (close_stdout_set_file_name): Declare.
4671 2000-05-10 Jim Meyering <meyering@lucent.com>
4673 * closeout.c [default_exit_status]: New file-scoped variable.
4674 (close_stdout_set_status): New function.
4675 * closeout.h (close_stdout_set_status): Declare.
4677 2000-05-08 Jim Meyering <meyering@lucent.com>
4679 * long-options.c: Don't include closeout.h.
4680 (parse_long_options): Don't call close_stdout for --version.
4682 2000-05-06 Jim Meyering <meyering@lucent.com>
4684 * strnlen.c: Undefine __strnlen and strnlen.
4685 [!weak_alias]: Define __strnlen to strnlen.
4687 * atexit.c: New file, from libiberty.
4689 2000-05-06 Jim Meyering <meyering@lucent.com>
4691 * closeout.c (close_stdout_status): Also check for errors on the
4694 2000-05-05 Bruno Haible <haible@clisp.cons.org>
4696 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
4697 instead of xmalloc, xrealloc, path_concat.
4698 (locale_charset): Treat empty environment variables as absent.
4699 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
4701 2000-05-04 Jim Meyering <meyering@lucent.com>
4703 * getopt.c: Update from glibc.
4704 * obstack.c: Likewise.
4705 * obstack.h: Likewise.
4706 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
4708 * regex.h: Likewise.
4709 * strndup.c: Likewise.
4710 * strnlen.c: New file, from glibc.
4712 2000-05-01 Jim Meyering <meyering@lucent.com>
4714 * full-write.c (full_write): Remove `FIXME' part of comment.
4716 2000-04-29 Jim Meyering <meyering@lucent.com>
4718 * path-concat.c: Declare strdup only if it's not defined.
4719 * canon-host.c: Likewise.
4721 2000-04-28 Jim Meyering <meyering@lucent.com>
4723 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
4724 redefinition warning on some systems (HPUX). Otherwise, regex.h is
4725 included first, then limits.h is included by locale.h by libintl.h.
4726 From John David Anglin.
4728 2000-04-25 Jim Meyering <meyering@lucent.com>
4730 * makepath.c (S_IRWXUGO): Define.
4731 (make_path): Always perform explicit chmod if MODE specifies any
4732 of the `special' permission bits. Prompted by a bug report against
4733 install from Mate Wierdl and Joost van Baal.
4735 2000-04-18 Jim Meyering <meyering@lucent.com>
4739 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
4740 getpagesize. For BeOS. Based on a patch from Bruno Haible.
4742 2000-04-17 Jim Meyering <meyering@lucent.com>
4744 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
4745 the definition of it to rpl_strftime also defined-away the system's
4748 2000-04-15 Jim Meyering <meyering@lucent.com>
4750 Use `C' to denote so-called `contiguous' files, the same way
4752 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
4753 (ftypelet): Use S_ISCTG.
4754 From Michael Deutschmann.
4756 2000-04-14 Jim Meyering <meyering@lucent.com>
4758 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
4760 2000-04-08 Jim Meyering <meyering@lucent.com>
4762 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
4763 names don't conflict. Reported by Eli Zaretskii.
4765 2000-03-28 Bruno Haible <haible@clisp.cons.org>
4767 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
4768 bug. Deal with the different error behavior of Irix iconv.
4770 2000-04-07 Jim Meyering <meyering@lucent.com>
4772 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
4773 to work around system header problems on AIX 3.2.5. From Bruno Haible.
4775 2000-04-05 Jim Meyering <meyering@lucent.com>
4777 Portability tweaks required for ultrix4.3.
4778 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
4779 * readutmp.c: Include sys/types.h before sys/stat.h.
4780 * canon-host.c: Declare strdup.
4781 * path-concat.c: Likewise.
4782 From John David Anglin.
4784 2000-04-04 Jim Meyering <meyering@lucent.com>
4786 Be more DOS 8.3-friendly.
4787 * ref-add.sin: Renamed from ref-add.sed.in.
4788 * ref-del.sin: Renamed from ref-del.sed.in.
4789 * Makefile.am: Reflect renaming.
4790 Reported by Eli Zaretskii.
4792 Use a temporary file name that won't clash with `charset.alias'
4793 in the DOS 8.3 name space.
4794 * Makefile.am (charset_tmp): Define.
4795 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
4796 (uninstall-local): Likewise.
4797 Reported by Eli Zaretskii.
4799 2000-03-29 Paul Eggert <eggert@twinsun.com>
4801 * time/strftime.c (my_strftime): Make sure we call the system
4802 strftime, not ourselves, when invoking the underlying strftime.
4804 2000-03-24 Jim Meyering <meyering@lucent.com>
4806 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
4807 (charset_alias): Define.
4808 (install-exec-local): Factor out common code.
4809 (uninstall-local): Split lines longer than 80.
4810 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
4812 (.sed.in.sed): New rule. Don't redirect directly to $@.
4813 (CLEANFILES): Add ref-add.sed and ref-del.sed.
4815 2000-03-19 Bruno Haible <haible@clisp.cons.org>
4817 * config.charset: Output a line containing "Packages using this file".
4818 * ref-add.sed.in, ref-del.sed.in: New files.
4819 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
4820 ref-del.sed): New rules.
4822 2000-03-17 Jim Meyering <meyering@lucent.com>
4824 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
4825 Otherwise, include <strings.h>
4827 2000-03-17 Bruno Haible <haible@clisp.cons.org>
4829 * unicodeio.c (utf8_wctomb): New function.
4830 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
4831 format instead of in UCS-4 with platform dependent endianness.
4833 2000-03-07 Paul Eggert <eggert@twinsun.com>
4835 * savedir.c (savedir): Work even if directory size is
4836 negative; this can happen with some screwy NFS configurations.
4838 2000-03-06 Jim Meyering <meyering@lucent.com>
4840 * localcharset.c (get_charset_aliases): Don't try to free file_name
4841 if it's NULL (because we ran out of memory). From Bruno Haible.
4843 2000-03-05 Jim Meyering <meyering@lucent.com>
4845 * localcharset.c ("path-concat.h"): Include.
4846 (get_charset_aliases): Use path_concat instead of ANSI string
4849 * unicodeio.h (PARAMS): Define.
4850 Use it to guard prototype.
4852 2000-03-04 Jim Meyering <meyering@lucent.com>
4854 * Makefile.am (install-exec-local): Create $(libdir) before installing
4856 (uninstall-local): Uncomment this rule so `make distcheck' works
4859 * unicodeio.c (<errno.h>): Include it.
4860 (errno): Declare if not defined.
4862 * localcharset.c: Add Bruno's comment justifying use of volatile.
4864 * config.charset: New version, incorporating remarks from a linux
4865 i18n mailing list. From Bruno Haible.
4867 2000-03-02 Jim Meyering <meyering@lucent.com>
4869 * Makefile.am (EXTRA_DIST): Add config.charset.
4871 2000-03-01 Jim Meyering <meyering@lucent.com>
4873 * localcharset.c: Guard some #includes with `#if HAVE_...'.
4874 * unicodeio.c: Likewise.
4876 2000-02-02 Bruno Haible <haible@clisp.cons.org>
4878 * config.charset: New file.
4879 * localcharset.c: New file.
4880 * unicodeio.h, unicodeio.c: New files.
4881 * Makefile.am (DEFS): Add -DLIBDIR=...
4882 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
4883 (noinst_HEADERS): Add unicodeio.h.
4884 (all-local, install-exec-local, charset.alias): New targets.
4886 2000-02-28 Paul Eggert <eggert@twinsun.com>
4888 * quotearg.c (ALERT_CHAR): New macro.
4889 (quotearg_buffer_restyled): Use it.
4891 2000-02-27 Jim Meyering <meyering@lucent.com>
4893 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
4894 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
4896 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
4897 not `#if STDC_HEADERS'.
4898 Declare malloc if needed.
4900 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
4901 now that autoconf always defines the HAVE_DECL_ symbols.
4902 * human.c: Likewise.
4904 * strtoumax.c: Likewise.
4906 * backupfile.c: Arrange for cpp to fail if the configure-time
4907 declaration check was not run.
4909 * human.c: Likewise.
4911 * strtoumax.c: Likewise.
4913 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
4914 then first look up the entire `.'-containing string as a login name.
4916 2000-02-18 Paul Eggert <eggert@twinsun.com>
4918 * getdate.y: Handle two-digit years with leading zeros correctly.
4919 (textint): New typedef.
4920 (parser_control): Member year changed from int to textint.
4922 (YYSTYPE): Removed; replaced by %union with int and textint members.
4923 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
4924 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
4925 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
4926 (tSNUMBER, tUNUMBER): Now of type <textintval>.
4927 (date, number, to_year): Use width of number in digits, not its value,
4928 to determine whether it's a 2-digit year, or a 2-digit time.
4929 (yylex): Store number of digits of numeric tokens.
4930 Reported by John Kendall.
4932 (parser_control): Changed from struct parser_control to typedef (for
4933 consistency). All uses changed.
4935 (tID): Removed; not used.
4936 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
4938 2000-02-14 Paul Eggert <eggert@twinsun.com>
4940 * getpagesize.h (getpagesize): Port to VMS for Alpha;
4941 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
4943 2000-02-12 Jim Meyering <meyering@lucent.com>
4945 * userspec.c (ISDIGIT): Define it.
4946 (isdigit): Remove definition.
4947 (is_number): Use ISDIGIT, not isdigit.
4948 <libintl.h>: Include.
4950 (parse_user_spec): Mark translatable strings.
4952 2000-02-10 Jim Meyering <meyering@lucent.com>
4954 With these changes, nanosleep.[ch] are finally enough like the other
4955 lib/* replacement files to compile on a few more losing systems.
4957 * nanosleep.h: Don't include config.h.
4958 Remove prototype from declaration of nanosleep.
4959 (PARAMS): Remove now-unneeded definition.
4960 * nanosleep.c: #undef nanosleep.
4961 (rpl_nanosleep): Rename from nanosleep.
4963 2000-02-03 Jim Meyering <meyering@lucent.com>
4965 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
4966 rather than with `#if HAVE_UTMPNAME'.
4968 2000-02-01 Jim Meyering <meyering@lucent.com>
4970 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
4972 2000-01-31 Jim Meyering <meyering@lucent.com>
4974 * nanosleep.h (nanosleep): Guard declaration with
4975 `#if ! HAVE_DECL_NANOSLEEP'.
4976 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
4977 the declaration in that vendor's sys/timers.h.
4978 Reported by Christian Krackowizer.
4980 * quotearg.c (ISASCII): Add #undef and move definition to follow
4981 inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
4982 (ISPRINT): Likewise.
4983 Reported by Tom Tromey.
4985 2000-01-30 Jim Meyering <meyering@lucent.com>
4987 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
4988 uses of ->ut_name. The latter doesn't work with new Linux header files
4989 where only utmpx.ut_user is declared.
4991 * readutmp.h (UT_USER): Define.
4993 2000-01-23 Jim Meyering <meyering@lucent.com>
4995 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
4998 2000-01-22 Jim Meyering <meyering@lucent.com>
5000 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
5001 [! HAVE_DECL_STRTOULL]: Declare strtoull.
5002 Required for some AIX systems. Reported by Christian Krackowizer.
5003 [TESTING] (main): New function.
5005 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
5006 * dirname.c (dir_name): Support for DOS-style file names with drive
5009 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
5011 * strverscmp.c (ISDIGIT): Define.
5012 (strverscmp): Use ISDIGIT, not isdigit.
5014 2000-01-17 Paul Eggert <eggert@twinsun.com>
5016 * nanosleep.c (nanosleep):
5017 Don't use SA_INTERRUPT to decide whether to call sigaction, as
5018 POSIX.1 doesn't require SA_INTERRUPT and some systems
5019 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
5020 it's been part of POSIX.1 since day 1 (in 1988).
5022 2000-01-17 Jim Meyering <meyering@lucent.com>
5024 * interlock: Remove unused file. Reported by François Pinard.
5026 2000-01-16 Paul Eggert <eggert@twinsun.com>
5028 * quotearg.c (quotearg_buffer_restyled): Do not quote
5029 alert, backslash, formfeed, and vertical tab unnecessarily in
5030 shell quoting style.
5033 version-control: never