1 2003-09-25 Karl Berry <karl@gnu.org>
3 * argp-fmtstream.c, argp-help.c: update from libc.
5 2003-09-25 Bruno Haible <bruno@clisp.org>
7 * version-etc-2.h: New file, from version-etc.h with modifications.
8 * version-etc-2.c: New file, from version-etc.c with modifications.
10 2003-09-25 Simon Josefsson <jas@extundo.com>
12 * xgetdomainname.h: New file.
13 * xgetdomainname.c: New file.
15 2003-09-25 Simon Josefsson <jas@extundo.com>
16 Bruno Haible <bruno@clisp.org>
18 * getdomainname.h: New file.
19 * getdomainname.c: New file.
21 2003-09-19 Karl Berry <karl@gnu.org>
23 * argp.h: update from libc.
25 2003-09-16 Paul Eggert <eggert@twinsun.com>
27 * linebuffer.c (readlinebuffer): Return NULL immediately upon
28 input error, instead of returning NULL the next time we are called
29 (and therefore losing track of errno).
31 2003-09-15 Paul Eggert <eggert@twinsun.com>
33 * getndelim2.c (getndelim2): Don't trash errno when a read
34 fails, so that the caller gets the proper errno.
36 * readutmp.c (read_utmp): Likewise.
37 Check for fstat error. Close stream and free storage
40 2003-09-14 Bruno Haible <bruno@clisp.org>
42 * fwriteerror.h: New file.
43 * fwriteerror.c: New file.
45 2003-09-14 Jim Meyering <jim@meyering.net>
47 * getloadavg.c: Correct cpp indentation.
49 * vasnprintf.c: Likewise.
51 2003-09-12 Paul Eggert <eggert@twinsun.com>
53 * argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
54 * obstack.c [!defined _LIBC]: Likewise.
55 * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
56 * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
57 * exitfail.c: Don't include stdlib.h; no longer needed.
59 More changes to assume C89 or better.
61 * error.c (error_tail): Assume vprintf.
63 * argmatch.c (getenv): Remove decl.
64 * progreloc.c (get_full_program_name): Define via prototype.
65 * setenv.c (clearenv): Likewise.
66 * stpncpy.c: Do not include <string.h> or <sys/types.h>; not
68 * strdup.c: Include <stdlib.h>, <string.h> unconditionally.
69 (malloc, memcpy): Remove decls.
70 * strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
71 (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
72 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
73 (memcpy): Remove macro.
74 (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
75 (__P): Remove. All uses removed.
76 (PTR): Remove. All uses changed to void *.
77 (CHAR_BIT, NULL): Remove.
78 (spaces, zeros, memset_space, memset_zero)
79 [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
81 (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
82 (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
83 Define with prototype.
84 Remove now-unnecessary prototype decl.
85 (extra_args_spec): Assume ANSI C. All uses changed.
86 (extra_args_spec_iso): Remove.
87 (my_strftime, emacs_strftimeu): Define via prototype.
88 * strtod.c: Include <float.h>, <stdlib.h>, <string.h>
90 (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
91 * strtoimax.c: Include <stdlib.h> unconditionally.
92 (strtoul, strtol): Remove decls.
93 * strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
95 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
96 (LOCALE_PARAM_DECL): Remove. All uses changed to LOCALE_PARAM_PROTO.
97 (LOCALE_PARAM_PROTO): New macro.
98 (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
99 (INTERNAL (strtol), strtol): Define with a prototype.
100 (PARAMS): Remove. All uses removed.
101 * tempname.c: Include <string.h> unconditionally.
102 * userspec.c: Include <stdlib.h>, <string.h> unconditionally.
103 * xgethostname.c (main): Define with a prototype.
104 * xmalloc.c: Include "xalloc.h" first, to check interface.
105 Include <stdlib.h> unconditionally.
106 (calloc, malloc, realloc, free): Remove decls.
107 * xstrtod.c: Include "xstrtod.h" first, to check interface.
108 Include <stdlib.h> unconditionally. Sort include file names.
110 (xstrtod): Define with a prototype.
111 * xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
112 (strtol, strtoul): Remove decls.
114 2003-09-11 Paul Eggert <eggert@twinsun.com>
116 * strndup.c: Don't include <stdio.h>, <sys/types.h>.
117 Include <stdlib.h>, <string.h> unconditionally.
118 Remove now-unnecessary cast to char *.
119 * strnlen.c: Include <string.h> unconditionally.
120 * yesno.c (yesno): Define with a prototype.
122 2003-09-10 Bruno Haible <bruno@clisp.org>
124 * strcspn.c: Include <string.h> unconditionally.
125 * strpbrk.c: Include <string.h> unconditionally.
126 * strstr.c: Include <string.h> unconditionally.
127 * unicodeio.c: Include <string.h> unconditionally.
128 * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
129 * unsetenv.c: Likewise.
130 * xreadlink.c: Include <stdlib.h> unconditionally.
131 * yesno.c: Include <stdlib.h> unconditionally.
132 (rpmatch): Add prototype.
134 2003-09-10 Jim Meyering <jim@meyering.net>
136 * error.c: Correct indentation of cpp directives.
138 2003-09-09 Paul Eggert <eggert@twinsun.com>
142 * acosl.c (main): Use a prototype.
143 * asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
146 * getloadavg.c (getloadavg, main): Define via prototypes.
148 * getopt.h (struct option.name): Assume C89, and use 'const'.
149 (getopt, etopt_long, getopt_long_only, _getopt_internal)
150 [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
152 * getopt.c (const): Remove macro.
153 Include <string.h> unconditionally.
154 (my_index): Remove; all uses changed to strchr.
155 (strlen): Remove decl.
156 (exchange): Remove forward decl; no longer needed.
157 (exchange, _getopt_initialize, _getopt_internal, getopt, main):
158 Define with prototype.
159 * getopt1.c (const): Remove macro.
160 (getopt_long, getopt_long_only, main): Define with prototype.
162 * getugroups.c: Include <string.h> unconditionally.
164 * getusershell.c: Include <stdlib.h> unconditionally.
165 (getusershell, setusershell, endusershell, readname, main):
166 Define with prototypes.
168 * group-member.c: Include group-member.h first.
169 Include <stdlib.h> unconditionally.
171 * hard-locale.c: Include hard-locale.h first.
172 Include <stdlib.h>, <string.h> unconditionally.
174 * hash.c (free, malloc): Remove decls.
175 Include <stdlib.h> unconditionally.
177 * human.c: Include <stdlib.h>, <string.h> unconditionally.
178 (getenv): Do not declare.
180 * idcache.c: Include <string.h> unconditionally.
182 * long-options.c: Include long-options.h first, to test interface.
183 Include <stdlib.h> unconditionally.
185 * makepath.c: Include makepath.h first, to test interface.
186 Include <stdlib.h> and <string.h> unconditionally.
188 * linebuffer.c: Include <stdlib.h>.
191 * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h.
192 rpl_malloc returns void *, not char *.
193 * realloc.c (rpl_realloc): Likewise. Also, define with a prototype.
195 * md5.h: Include <limits.h> unconditionally.
196 (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
197 (__P): Remove; all uses removed.
198 * md5.c: Include "md5.h" first.
199 (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
200 md5_buffer, md5_process_bytes, md5_process_block):
201 Define with prototypes.
202 * sha.h (__P): Remove all uses. (It wasn't defined??)
203 * sha.c: Include "sha.h" first.
204 Include <stdlib.h>, <string.h> unconditionally.
206 * memchr.c (__ptr_t): Remove; all uses changed to void *.
207 * memcmp.c (__ptr_t): Likewise.
208 * memrchr.c (__ptr_t): Likewise.
209 * memchr.c, memcmp.c, memcoll.c, memrchr.c:
210 Include <string.h> unconditionally.
211 * memchr.c, memrchr.c: Include <limits.h> unconditionally.
212 * memchr.c: Include <stdlib.h> unconditionally.
213 * memchr.c (LONG_MAX): Remove.
214 * memrchr.c (LONG_MAX): Likewise.
215 * memchr.c (__memchr): Define via a prototype.
216 * memrchr.c (__memrchr): Likewise.
217 * memcmp.c (__P): Remove, and remove all uses.
218 (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
219 Remove forward decls; no longer needed.
220 * memcpy.c, memmove.c, memset.c: Include <stddef.h>.
221 Use types required by C89 in prototype.
223 * mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
224 * savedir.c: Likewise.
225 * mkdir.c (free): Remove decl.
226 * rmdir.c (rmdir): Define with a prototype.
227 * savedir.c: Include savedir.h first, to test interface.
229 * mktime.c (STDC_HEADERS): Remove.
230 Include <stdlib.h>, <string.h> unconditionally.
232 * modechange.c: Include <stdlib.h> unconditionally.
233 (malloc): Remove decl.
235 * mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
238 * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
239 Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
240 (This type really should be intptr_t, but that's a C99ism.)
241 (_obstack_memcpy): Remove: all uses changed to memcpy.
242 Include <string.h> unconditionally.
243 (struct obstack): Assume __STDC__ for types of members
244 chunkfun, freefun, extra_arg.
245 (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
246 _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
247 obstack_begin, obstack_specify_allocation,
248 obstack_specify_allocation_with_arg, obstack_chunkfun,
249 obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
250 Remove unprototyped decls and the macros that use them.
251 * obstack.c (POINTER): Remove. All uses changed to void *.
252 (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
253 _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
254 (defined __STDC__ && __STDC__)]:
255 Remove nonprototyped code.
256 Include <stdlib.h> unconditionally.
257 (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
258 _obstack_allocated_p, _obstack_free, obstack_free,
259 _obstack_memory_used, print_and_abort):
260 Define using prototypes.
261 (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
262 obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
263 obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
264 obstack_next_free, obstack_object_size, obstack_room) [0]:
265 Remove unused, unprototyped code.
267 * path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
269 * physmem.c (physmem_total, physmem_available, main): Define
272 * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
273 (main): Define with a prototype.
275 * posixver.c (getenv): Remove decl.
277 * putenv.c (malloc): Returns void *, not char *.
278 Include <string.h> unconditionally.
279 (strchr, memcpy, NULL): Do not define.
281 * readtokens.c: Include readtokens.h first, to test interface.
282 Include <stdlib.h>, <string.h> unconditionally.
283 (init_tokenbuffer): Define with a prototype.
285 * regex.c (PARAMS): Remove. All uses removed.
286 All uses of _RE_ARGS removed, too.
287 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
289 (bzero): Assume memset exists.
290 (memcmp, memcpy, NULL): Remove.
291 (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
292 char, or assignments to local vars of type signed char.
293 (init_syntax_once, PREFIX(extract_number_and_incr),
294 PREFIX(print_partial_compiled_pattern),
295 PREFIX(print_compiled_pattern), PREFIX(print_double_string),
296 convert_mbs_to_wcs, print_fastmap, re_set_syntax,
297 PREFIX(regex_grow_registers), PREFIX(regex_compile),
298 PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
299 PREFIX(insert_op2), PREFIX(at_begline_loc_p),
300 PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
301 wcs_compile_range, byte_compile_range, truncate_wchar,
302 PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
303 re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
304 count_mbs_length, wcs_re_match_2_internal,
305 byte_re_match_2_internal, PREFIX(group_match_null_string_p),
306 PREFIX(alt_match_null_string_p),
307 PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
308 re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
309 regfree, PREFIX(extract_number)): Define with prototype. Remove
310 now-unnecessary declaration, if any.
311 (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
313 Remove now-unnecessary casts among pointer types.
314 * regex.h (_RE_ARGS): Remove. All uses removed.
316 * rename.c: Include <stdlib.h>, <string.h> unconditionally.
319 * rpmatch.c: Include <stdlib.h> unconditionally.
321 * same.c: Include <stdlib.h>, <string.h> unconditionally.
324 * save-cwd.c: Include <stdlib.h> unconditionally.
325 * xgetcwd.c: Likewise.
327 * stat.c: Include <stdlib.h>, <string.h> unconditionally.
330 * strchrnul.c (strchrnul): Define with a prototype.
331 Fix bug: c_in was not converted to char before searching.
333 The following changes are not K&R related:
335 * group-member.h: Include <sys/types.h>, so that this file is
337 * makepath.h: Likewise.
339 * getusershell.c (readname, default_index, line_size, readname):
340 Use size_t, not int, for sizes.
341 (readname): If the size overflows, report an error instead of
344 2003-09-09 Derek Robert Price <derek@ximbiot.com>
346 * getndelim2.c: Assume stdlib.h per the C89 spec.
348 2003-09-08 Paul Eggert <eggert@twinsun.com>
350 Assume C89 or better; remove K&R cruft.
351 A few of these changes were first proposed by Derek Robert Price
352 in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
354 * addext.c: Include <string.h> unconditionally.
355 * backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
356 Don't declare getenv or malloc.
358 * alloca.c: Include <string.h>, <stdlib.h> unconditionally.
359 (POINTER_TYPE, pointer): Remove; all uses changed to void *.
361 (find_stack_direction, alloca): Use prototypes.
363 * atexit.c (atexit): Define using a prototype.
365 * basename.c, dirname.c, stripslash.c:
366 Include <string.h> unconditionally.
368 * bcopy.c: Include <stddef.h>.
369 (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
371 * canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
373 * error.h (error, error_at_line, error_print_progname)
374 [! (defined (__STDC__) && __STDC__)]: Remove decls.
375 * error.c: Include error.h first, to check interface.
376 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
377 (VA_START): Remove; all uses changeed to va_start.
378 (exit, strerror): Remove decls.
379 (error_print_progname): Prototype uncondionally.
380 Don't include <errno.h>; no longer needed.
381 (private_strerror): Remove.
382 (error_tail): Always define.
383 (error, error_at_line): Assume C89 or better; always use prototypes.
384 * fatal.c: Include "fatal.h" first, to test interface.
385 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
386 (VA_START): Remove; all uses changed to va_start.
387 [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
390 (fatal): Prototype unconditionally. Assume va_start works.
391 Abort at end, to pacify gcc.
393 * euidaccess.c (main): Define with a prototype.
395 * exclude.c: Include <stdlib.h>, <string.h> unconditionally.
397 * exitfail.c: Include <stdlib.h> unconditionally.
399 * fnmatch_.h (__P): Remove. All uses changed to assume
401 * fnmatch.c: Include fnmatch.h first, to test interface.
402 Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
403 (getenv): Remove decl.
404 (fnmatch): Define using a prototype.
405 * fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
406 (FCT): Define using a prototype.
408 * getdate.y: Include <stdlib.h>, <string.h> unconditionally.
410 * gethostname.c: Include <stddef.h>.
411 (gethostname): Define with prototype. Length is size_t, not int.
413 2003-09-08 Paul Eggert <eggert@twinsun.com>
415 * getversion.c: Remove; was migrated to backupfile.c in 1997.
416 getversion.c should have been removed then, but was accidentally
419 * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
420 (utime_null): Fix typo: 'st' was sometimes called 'sb'.
422 2003-09-07 Paul Eggert <eggert@twinsun.com>
424 * time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
425 copy_tm_result. Bug reported by Simon Josefsson in
426 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
428 2003-09-06 Paul Eggert <eggert@twinsun.com>
430 * time_r.c, time_r.h: New files.
432 * mktime.c (my_mktime_localtime_r): Remove; all uses changed to
434 (__localtime_r) [!defined _LIBC]: New macro. Include <time_r.h>.
435 (__mktime_internal) [!defined _LIBC]: Now extern, not static.
437 * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
439 (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
440 (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
443 * timegm.c: Switch to glibc implementation, with the following changes:
444 [defined HAVE_CONFIG_H]: Include <config.h>.
445 [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
446 (__mktime_internal) [!defined _LIBC]: New decl.
447 (__gmtime_r) [!defined _LIBC]: New macro and function.
448 (timegm): Use a prototype, since gnulib assumes C89.
449 Do not bother declaring tmp to be const, as it's not really usefu.
450 * timegm.h: Hoist "#include <time.h>" out of #ifdef.
451 (timegm): Declare only if HAVE_DECL_TIMEGM.
453 2003-09-03 Paul Eggert <eggert@twinsun.com>
455 * human.c (human_readable): Fix bug that rounded 10501 to 10k.
456 Bug reported by Lute Kamstra in
457 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
459 * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
460 "yesterday", "today", and "now" rather than tMINUTE_UNIT. Of
461 course with correspondingly smaller numbers for tomorrow and
462 yesterday. From Tadayoshi Funaba. Originally installed into
463 sh-utils on 1999-08-07, but the patch got lost (I guess during the
466 2003-08-31 Simon Josefsson <jas@extundo.com>
468 * timegm.h: New file.
469 * timegm.c: New file. Based on wget-1.8.2/src/http.c:mktime_from_utc.
471 2003-08-31 Karl Berry <karl@gnu.org>
473 * argp.h: update from libc.
475 2003-08-28 Bruno Haible <bruno@clisp.org>
477 * binary-io.h: Undefine O_BINARY before defining it. This avoids a
478 warning on QNX, which defines O_BINARY to 000000.
480 2003-08-24 Bruno Haible <bruno@clisp.org>
482 * binary-io.h: Include <stdio.h>, to avoid a compilation error when
483 MSVC7 <stdio.h> is included later.
485 2003-08-20 Bruno Haible <bruno@clisp.org>
487 * progname.h: New file, from GNU gettext.
488 * progname.c: New file, from GNU gettext.
489 * progreloc.c: New file, from GNU gettext.
491 2003-08-19 Bruno Haible <bruno@clisp.org>
493 * xstrdup.c: Assume <string.h> exists.
495 2003-08-18 Jim Meyering <jim@meyering.net>
497 * setenv.h: Indent nested cpp directive.
498 * vasnprintf.c: Remove trailing blanks.
500 2003-08-17 Simon Josefsson <jas@extundo.com>
501 Bruno Haible <bruno@clisp.org>
503 * xstrndup.h: New file.
504 * xstrndup.c: New file.
506 2003-08-17 Bruno Haible <bruno@clisp.org>
508 * strndup.h: New file.
510 2003-08-16 Paul Eggert <eggert@twinsun.com>
512 * regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
513 space, undoing this 2003-08-12 change:
514 <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
516 2003-08-16 Jim Meyering <jim@meyering.net>
518 Merge from coreutils.
519 * xstrtoimax.c: #else #if -> #elif.
520 * xstrtoumax.c: Likewise.
522 2003-08-15 Paul Eggert <eggert@twinsun.com>
524 * config.charset, ref-add.sin, ref-del.sin: Use three spaces,
525 rather than tab, after '#' in shell-script copyright notices.
526 Suggested by Bruno Haible.
528 2003-08-15 Jim Meyering <jim@meyering.net>
529 and Paul Eggert <eggert@twinsun.com>
531 Merge from coreutils.
532 * readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
533 member but strut utmpx does not. Needed for AIX 4.3.3.
534 (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
536 2003-08-15 Jim Meyering <jim@meyering.net>
538 Merge from coreutils.
539 * xgethostname.c: Include <stdlib.h>.
540 (xghostname): Don't exit for anything other than memory-related
541 failure; just return NULL.
542 * userspec.c: Include "posixver.h".
543 (parse_user_spec): Accept `.' as a separator only
544 in pre-POSIX-200112 mode.
545 * strtoimax.c: Use #elif rather than #else #if.
546 * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
547 Remove function, now that we can rely on a working tzset function.
548 [!_LIBC]: Ensure that the required autoconf test has been run.
549 [!defined _NL_CURRENT && HAVE_STRFTIME]:
550 Use underlying_strftime for %r.
551 * sha.c: Merge in some clean-up and optimization changes from glibc.
552 * sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
553 Ensure that it is a multiple of 64.
554 Rearrange loop exit tests so as to avoid performing an
555 additional fread after encountering an error or EOF.
556 * realloc.c: Update copyright date.
558 2003-08-14 Jim Meyering <jim@meyering.net>
560 Merge from coreutils.
561 * obstack.h: Whitespace changes.
562 * mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
563 and xcalloc return values.
564 (read_filesystem_list) [MOUNTED_GETFSSTAT]:
565 Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could
566 hang on OSF/1 5.1 for DIR on both local and remote file systems.
567 Reported by (and fix confirmed by) Nelson H. F. Beebe.
568 (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
570 Use mntctl's return value to drive the entry-processing loop, since
571 we can't rely on the value of the vmt_length member in the last
572 entry. On some systems doing so could result in exhausting
573 virtual memory. Based in part on a patch from Mike Jetzer.
575 2003-08-14 Jim Meyering <jim@meyering.net>
576 and Paul Eggert <eggert@twinsun.com>
578 Merges from coreutils, plus other fixes.
579 * physmem.c: Merge in portability changes from gcc/libiberty
580 to support AIX, IRIX, Tru64, and Windows. See the ChangeLog there
581 for credits and details. Thanks to Kaveh Ghazi for helping
582 to keep these files in sync.
583 (ARRAY_SIZE): Define it.
584 (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
585 * memcasecmp.c: Remove unnecessary parentheses after 'defined'.
586 (memcasecmp): Don't assume size_t fits in unsigned int.
587 Remove casts and duplicate code.
588 * md5.c: Include <string.h> and <stdlib.h> unconditionally.
589 (memcpy): Remove definition.
590 Merge in some clean-up and optimization changes from glibc.
591 [BLOCKSIZE]: Move definition to top of file.
592 Ensure that it is a multiple of 64.
593 Rearrange loop exit tests so as to avoid performing an
594 additional fread after encountering an error or EOF.
595 * md5.h (md5_uintptr): Define.
596 * makepath.c (CLEANUP_CWD): Report an error if we failed to
597 return to the initial working directory. Preserve errno
599 * idcache.c: Include "xalloc.h".
600 (xmalloc, xrealloc): Remove decls.
601 (getuser): Remove casts no longer required in C89.
602 * human.c: Include stdio.h, for sprintf.
603 * group-member.c: Include "xalloc.h".
604 (xmalloc, xrealloc): Remove decls.
605 (get_group_info): Remove casts no longer required in C89.
606 * getusershell.c (readname): Remove casts no longer required in C89.
607 * gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
608 * getline.c: Whitespace fix, from coreutils.
610 2003-08-13 Paul Eggert <eggert@twinsun.com>
612 * exclude.c: Include <ctype.h>
613 (IN_CTYPE_DOMAIN): New macro.
615 (add_exclude_file): If LINE_END is a space, ignore trailing spaces
618 * argp-help.c, argp-parse.c, config.charset, getopt.h:
619 Undo previous (whitespace-only) change.
621 2003-08-12 Paul Eggert <eggert@twinsun.com>
623 * argp-help.c, argp-parse.c, config.charset, getopt.h:
624 Normalize leading white space and remove trailing white space.
625 * ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
626 notice, as per ../config/srclist-update.
628 Merge from coreutils.
629 * euidaccess.h: New file.
630 * euidaccess.c: Include it.
631 * .cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
632 vasnprintf.h, vasprintf.h. Remove strdup.c, gettext.h.
633 * regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
635 2003-08-11 Bruno Haible <bruno@clisp.org>
637 * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
638 (vasnprintf): Use it instead of wcslen.
640 2003-08-11 Bruno Haible <bruno@clisp.org>
642 * stdbool_.h (_Bool): Undo last change; instead use a negative enum
643 value to ensure that _Bool promotes to int. Use #define for _Bool when
644 using the Solaris C compiler. Adds comments suggested by Paul Eggert.
646 2003-08-10 Karl Berry <karl@gnu.org>
648 * regex.h: update from libc (whitespace fix).
650 2003-08-09 Paul Eggert <eggert@twinsun.com>
652 Merge some files from coreutils. These changes were
653 originally made by Jim Meyering.
654 * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
655 many older Unixes require this.
656 * lib/alloca.c (alloca): Remove cast to argument of free;
657 no longer needed in C89.
658 * lib/alloca_.h, lib/regex.h: Fix white space to match
659 what GNU indent does.
661 2003-08-05 Paul Eggert <eggert@twinsun.com>
663 * bumpalloc.h: Remove.
665 2003-08-04 Paul Eggert <eggert@twinsun.com>
667 * getloadavg.c: Change copyright notice and spacing to conform to
670 Merge from coreutils.
671 * error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
673 * getdate.y (date): Also accept dates like May-23-2003; suggestion
674 from Karl Berry, implemented by Jim Meyering.
675 * getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
676 from Dmitry V. Levin.
677 Remove anachronistic cast of xrealloc.
678 * fnmatch_.h (__const): Remove. Use 'const'.
679 * fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
680 type. Otherwise, it wouldn't compile with at least /bin/cc on
681 ymp-cray-unicos9.0.2.X.
682 Combine two mostly-identical uses of alloca into one.
683 Thanks to the Cray-Cyber project for access to a Cray Y-MP.
685 2003-08-04 Dave Love <d.love@dl.ac.uk>
689 * getloadavg.c: Check `__unix' as well as `unix'. Use #ifdef, not
690 #if. Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE. Check
691 F_SETFD, not FD_SETFD. Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
692 obsolete NLIST_NAME_UNION.
693 [__GNU__]: Undef BSD and FSCALE.
694 [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
696 2003-08-03 Paul Eggert <eggert@twinsun.com>
698 * stdbool_.h (_Bool): Make it signed char, instead of
699 an enum type, so that it's guaranteed to promote to int. See:
700 <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
702 2003-07-31 Paul Eggert <eggert@twinsun.com>
704 * strerror.c: Include config.h, limits.h. Declare sprintf.
705 (strerror): Don't assume that a printable int fits in 14 bytes.
707 2003-07-24 Derek Robert Price <derek@ximbiot.com>
708 Bruno Haible <bruno@clisp.org>
710 * getline.h (getline, getdelim): Change return type to ssize_t.
711 * getline.c (getline, getdelim): Likewise.
712 Remove _GNU_SOURCE define; now it's defined in config.h through
715 2003-07-22 Paul Eggert <eggert@twinsun.com>
717 * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
718 over-parenthesization in macros.
722 * xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
725 Use `exit_failure' for xalloc and xmemcoll instead of their own
726 private exit-failure variables.
727 * xalloc.h (xalloc_exit_failure): Remove.
728 * xmalloc.c: Likewise. Include exitfail.h.
729 (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
730 * xmemcoll.h (xmemcoll_exit_failure): Remove.
731 * xmemcoll.c: Likewise. Include exitfail.h.
732 (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
734 2003-07-18 Paul Eggert <eggert@twinsun.com>
736 * closeout.h (close_stdout_set_status, close_stdout_status): Remove.
737 * closeout.c: Likewise. Include "closeout.h" right after config.h,
738 to test that it can stand by itself. Include "exitfail.h".
739 Clients should set exit_failure instead.
740 (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
742 2003-07-18 Andreas Schwab <schwab@suse.de>
744 * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
746 2003-07-18 Bruno Haible <bruno@clisp.org>
748 * getndelim2.h: New file.
749 * getndelim2.c: Make into a module of its own. Include config.h,
751 (getndelim2): Make non-static. Change return type to ssize_t.
752 * getline.h: Change argument names.
753 * getline.c: Include getndelim2.h instead of getndelim2.c.
754 * getnline.c: Include getndelim2.h.
756 2003-07-17 Bruno Haible <bruno@clisp.org>
758 * Makefile.am: Remove file.
759 * Makefile.in: Remove file.
761 2003-07-17 Bruno Haible <bruno@clisp.org>
763 * getnline.h: New file.
764 * getnline.c: New file.
765 * getndelim2.c: New file, extracted from getline.c.
766 (getndelim2): Renamed from getdelim2, with added nmax argument.
767 * getline.c: Include getndelim2.c.
768 (getdelim2): Moved out to getndelim2.c.
769 (getline, getdelim): Update.
771 2003-07-15 <karl@gnu.org>
773 * vasnprintf.c: update from gettext.
775 2003-07-15 Jim Meyering <jim@meyering.net>
777 * makepath.c (make_path): Enclose diagnostic in _(...).
779 2003-07-14 Paul Eggert <eggert@twinsun.com>
781 * asnprintf.c, asprintf.c, config.charset, gettext.h,
782 localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
783 printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
784 ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
785 vasprintf.c, vasprintf.h: Regenerate. These files are now being
786 updated automatically by ../config/srclist-update. This changes
787 their license from LPGL to GPL.
789 2003-07-14 Jim Meyering <jim@meyering.net>
791 Don't emit diagnostics. Let callers do that.
792 * save-cwd.c: Don't include "error.h".
793 (save_cwd): Don't call error. Ensure that errno is valid
794 when returning nonzero.
796 * save-cwd.h (restore_cwd): Update prototype.
797 * save-cwd.c (restore_cwd): Remove two parameters.
798 Simplify. Don't call error upon failure. Let callers do that.
799 (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
800 when auditing is enabled. But don't bother updating the #if.
802 2003-07-14 Simon Josefsson <jas@extundo.com>
804 * mempcpy.h: New file.
805 * mempcpy.c: New file.
807 2003-07-14 Paul Eggert <eggert@twinsun.com>
809 * ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
810 sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
811 unicodeio.c, unicodeio.h, unlocked-io.h:
812 Switch from LGPL to GPL.
814 2003-07-11 Alexandre Duret-Lutz <adl@gnu.org>
816 * obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
817 it breaks C++ compilation.
818 [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
820 2003-07-10 Jim Meyering <jim@meyering.net>
822 * vasnprintf.c: Remove trailing blanks.
823 Make cpp indentation consistent.
825 2003-07-09 Paul Eggert <eggert@twinsun.com>
827 * alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
828 posixver.c, strftime.c, strnlen.c, strverscmp.c:
829 Switch from LGPL to GPL.
831 2003-07-07 Paul Eggert <eggert@twinsun.com>
833 * mktime.c: Fix some boundary cases and remove need for floating point.
835 Issue a compile-time diagnostic if time_t is floating point, or if
836 two's complement arithmetic is not in effect, or if arithmetic
837 right shift does not propagate the sign. These assumptions were
838 all in the original code but they weren't checked.
840 (TIME_T_MIDPOINT, verify): New macros.
841 (__isleap): Remove; it has integer overflow problems.
842 (leapyear): New function, without those problems.
843 (ydhms_tm_diff): Remove; splitting into two parts.
844 (ydhms_diff): New function, containing the arithmetic part of
845 the old ydhms_tm_diff function. Issue a compile-time
846 diagnostic if we are not using C99 integer division.
847 Avoid casts when possible.
848 (guess_time_tm): New function, containing the checking part of
849 the old ydhms_tm_diff function. Return the new value, rather than
850 the difference between it and the old. Accept a new argument T
851 so that *T specifies the old value. Check for overflow in the result.
853 (__mktime_internal): Use a time_t offset, not a long int offset.
854 This undoes the 2003-06-04 change, which is no longer needed now
855 that we have better overflow checking.
856 (localtime_offset): Likewise.
858 (__mktime_internal): Avoid harmful overflow on hosts where time_t
859 and long are 64-bit but int is only 32-bit.
860 (ydhms_diff): Use long int to store year1 and yday1.
861 Issue a compile-time diagnostic if long int is not wide enough.
863 (__mktime_internal): Use long int to store adjusted year and yday.
864 Use plain C rather than preprocessor commands, if that doesn't
866 Check for overflow (and try to repair) after each probe
867 rather than checking only at the very end. This avoids some bugs
868 (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
869 does not equal GMT offset at maximum time).
870 Use integer to check for overflow rather than floating point; this
871 is more portable to non-IEEE hosts, and is a tad faster.
872 When we detect that we are oscillating between two values,
873 don't check whether tm_isdst has the requested value, since
874 we already know the answer. When tm_isdst has the wrong value,
875 use a different heuristic to find the right one, based on the
876 extreme values actually observed in practice in tz2003a,
877 rather than the (overly optimistic) "previous 3 calendar quarters".
879 (not_equal_tm, print_tm, check_result): Use "const T" rather than
880 "T const" to accommodate glibc style.
881 (check_result): Use less-confusing report format. "long" -> "long int.
883 Don't loop if the iteration overflows time_t.
884 Allow a negative step in the iteration.
886 2003-07-01 Paul Eggert <eggert@twinsun.com>
888 * xreadlink.c: Include <sys/types.h> unconditionally, instead of
889 having it depend on HAVE_SYS_TYPES_H.
891 2003-06-25 Bruno Haible <bruno@clisp.org>
893 * readlink.c: New file.
895 2003-06-20 Bruno Haible <bruno@clisp.org>
897 Assume C89, so PARAMS isn't needed.
898 * unicodeio.h (PARAMS): Remove.
899 * unicodeio.c: Don't use PARAMS.
901 2003-06-18 Jim Meyering <jim@meyering.net>
903 Merge changes from coreutils.
904 * readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
905 Remove explicit declarations of xmalloc and realloc.
907 (read_utmp): Remove anachronistic cast of xmalloc.
909 2003-06-17 Paul Eggert <eggert@twinsun.com>
911 Assume C89, so PARAMS isn't needed.
912 * backupfile.h (PARAMS): Remove. All uses removed.
913 * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
914 group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
915 makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
916 path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
917 save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
918 unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
920 * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h,
921 same.h, strverscmp.h: Do not include config.h; no longer needed.
922 Anyway, config.h should always be included before any other file.
924 2003-06-11 Simon Josefsson <jas@extundo.com>
926 * sysexit_.h: New file.
928 2003-05-20 Derek Price <derek@ximbiot.com>
930 * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
932 2003-06-10 Simon Josefsson <jas@extundo.com>
934 * strchrnul.h: New file.
935 * strchrnul.c: New file.
937 2003-06-10 Simon Josefsson <jas@extundo.com>
939 * argp.h: New file, from glibc.
940 * argp-ba.c: New file, from glibc.
941 * argp-eexst.c: New file, from glibc.
942 * argp-fmtstream.c: New file, from glibc.
943 * argp-fmtstream.h: New file, from glibc.
944 * argp-fs-xinl.c: New file, from glibc.
945 * argp-help.c: New file, from glibc.
946 * argp-namefrob.h: New file, from glibc.
947 * argp-parse.c: New file, from glibc.
948 * argp-pv.c: New file, from glibc.
949 * argp-pvh.c: New file, from glibc.
950 * argp-xinl.c: New file, from glibc.
952 2003-06-07 Jim Meyering <jim@meyering.net>
954 * readtokens.h: Put `Free Software Foundation, Inc.'
955 in place of my name in the copyright comment.
956 Remove definition and uses of __P.
959 * stat.c: Don't declare xmalloc explicitly.
960 Instead, include "xalloc.h".
961 * readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
962 xrealloc, and xcalloc return values.
963 * xgetcwd.c (xgetcwd): Include "xgetcwd.h".
965 * xgetcwd.h: Remove definition/uses of PARAMS.
967 2003-06-06 Jim Meyering <jim@meyering.net>
969 * stdbool_.h: Renamed from stdbool.h.in.
971 2003-06-06 Jim Meyering <jim@meyering.net>
973 Merge from coreutils.
974 * same.c: (same_name): Declare *_basename locals to be `const'.
975 Consolidate declarations and initializations of *_base* locals.
977 Merge from coreutils.
978 This avoids a core dump on systems without GNU putenv,
979 when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
980 * putenv.c (__set_errno, LOCK, UNLOCK): Define.
981 (unsetenv): New static function, from GNU libc.
982 (rpl_putenv): Use it.
984 * modechange.c: Remove trailing blanks.
986 Merge from coreutils.
987 * fsusage.c: Remove declaration of statfs.
988 It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
990 * posixtm.c: Include <stdbool.h> unconditionally.
992 2003-06-05 Paul Eggert <eggert@twinsun.com>
994 * mktime.c (__mktime_internal): When resolving a tm_isdst
995 mismatch, look in future quarters as well as past. This fixes a
996 bug when processing fall-backwards gaps immediately after a long
997 period of daylight-saving time.
999 * mktime.c: Assume freestanding C89 or better.
1000 (HAVE_LIMITS_H): Remove. Assume it's 1.
1001 (__P): Remove; not used.
1002 (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
1003 (mktime, not_equal_tm, print_tm, check_result,
1004 main): Use prototypes. Use const * where appropriate.
1005 (main): Fix typo in testing code that uncovered by above changes.
1006 (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
1008 2003-06-04 Paul Eggert <eggert@twinsun.com>
1010 * mktime.c: Fix Debian bug 177940
1011 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
1012 (localtime_offset): Now long int, not time_t, because we want it
1013 to be guaranteed to be signed. All uses changed.
1014 (__mktime_internal): If overflow would occur when adding offset,
1017 Merge 'human' changes from coreutils. Rewrite to support
1018 locale-specific notations like thousands separators.
1019 * human.c: Simplify authorship notice.
1020 Include human.h immediately after config.h.
1021 <sys/types.h>, <stdio.h>: Do not include; no longer needed.
1022 <limits.h>: Do not include, since human.h does.
1023 (SIZE_MAX, UINTMAX_MAX): New macros.
1024 <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
1025 <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
1026 (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
1027 (power_letter): Renamed from suffixes.
1028 (generate_suffix_backwards): Remove.
1029 (adjust_value): Now takes int style (because of human.h changes)
1030 and long double value (for greater precision on some platforms).
1031 (group_number): New function.
1032 (human_readable): Use it. Use integer options, not enum.
1033 Put the options before the sizes in the arg list.
1034 Support all the new options.
1035 The old human_readable function has been removed;
1036 use inttostr.h instead.
1037 (human_readable, default_block_size, humblock):
1038 Use uintmax_t, not int, for block sizes.
1039 (human_readable_inexact, block_size_types): Remove.
1040 (block_size_opts): New constant.
1041 (human_options): Renamed from human_block_size, with new signature
1042 that allows block sizes up to UINTMAX_MAX. All callers changed.
1043 * human.h: Add copyright and authorship notice.
1044 Include <limits.h> and <stdbool.h> unconditionally.
1045 (PARAMS): Remove. All uses removed.
1046 (LONGEST_HUMAN_READABLE): Add support for thousands separator.
1047 (enum human_inexact_style): Remove tag; now a nameless enum.
1048 (human_floor, human_ceiling, human_round_to_even): Now have
1049 values 2, 0, 1 rather than -1, 1, 0.
1050 (human_group_digits, human_suppress_point_zero, human_autoscale,
1051 human_base_1024, human_SI, human_B): New constants.
1052 (human_readable_inexact, human_block_size): Remove.
1053 (human_readable): Size args are now uintmax_t, not int.
1054 (human_options): New decl.
1056 * exclude.c: (new_exclude, add_exclude): Remove casts that are
1057 unnecessary now that we assume C89 or better. This change
1058 imported from coreutils.
1060 * mktime.c (__mktime_internal): Do not reject negative timestamps
1061 arbitrarily. This is the same patch as 2003-05-28, but it got lost
1062 in the 2003-05-30 sync from glibc.
1064 .h files should stand alone, but we shouldn't include <sys/types.h>
1065 if we can get away with just <stddef.h>.
1067 * __fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
1068 malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
1069 rather than <sys/types.h>, as we merely need size_t.
1070 * dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
1072 * hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
1073 Include <stdio.h>, to get FILE.
1074 * memcasecmp.c: Don't include <sys/types.h>, as we can assume
1075 memcasecmp.h has included <stddef.h> and all we need is size_t.
1076 * memcoll.c: Include "memcoll.h", which gets us size_t and checks
1077 our interface, instead of including <sys/types.h>
1079 2003-06-02 Paul Eggert <eggert@twinsun.com>
1082 Fix some minor time-related bugs with POSIX time arguments.
1083 Some valid time stamps were being rejected (notably -1, and
1084 time stamps before 1900 on 64-bit hosts). And some invalid
1085 time stamps were being accepted, e.g. September 31.
1087 * posixtm.h (posixtime): Return bool instead of time_t, so
1088 that we can return (time_t) -1 successfully.
1089 * posixtm.c: Likewise.
1090 [HAVE_STDBOOL_H]: Include <stdbool.h>.
1091 (bool, false, true) [!HAVE_STDBOOL_H]: New type.
1092 (t): Remove static var.
1093 (year, posix_time_parse): Now takes struct tm * arg to modify, instead
1094 of static var. All uses changed.
1095 (year): Do not reject years before 1900; they can occur with
1097 (posix_time_parse): Do not check for out-of-range components;
1098 that is now the caller's responsibility, since our checks were
1099 only approximations.
1100 (posixtime): Use mktime to check for out-of-range components,
1101 since it knows them exactly.
1102 If mktime returns (time_t) -1, check whether an error actually occurred
1103 by invoking localtime on -1.
1104 (main) [TEST_POSIXTIME]: Check for input data errors, and report
1105 posixtime failures better.
1106 Improve the test data (in comments only).
1108 2003-05-30 <karl@gnu.org>
1110 * mktime.c: update from libc.
1112 2003-05-30 Bruno Haible <bruno@clisp.org>
1114 * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
1115 * localcharset.h: Likewise.
1116 * localcharset.c: Likewise.
1118 2003-05-28 Paul Eggert <eggert@twinsun.com>
1120 Assume the headers required for C89 freestanding compilers.
1121 * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
1122 rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
1123 without checking for HAVE_LIMITS_H.
1124 * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
1125 xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
1127 * fatal.c: Include <stdarg.h> without checking for __STDC__.
1128 * exclude.c: Include <stdbool.h> unconditionally.
1129 * tempname.c: Include <stddef.h> unconditionally.
1130 * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
1131 * modechange.c, rpmatch.c (NULL): Don't define, since
1132 <stddef.h> does that.
1133 * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
1134 * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
1135 * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
1136 * xstrtol.c: Likewise.
1137 * safe-read.c: Remove TYPE_SIGNED; no longer needed.
1138 * savedir.c: Include <stddef.h> instead of defining NULL.
1140 * addext.c (addext): Use assignment rather than cast, to avoid
1141 warnings on some platforms.
1143 * mktime.c (__mktime_internal): Do not reject negative timestamps
1146 2003-05-10 Bruno Haible <bruno@clisp.org>
1148 * linebreak.c (iconv_string_length): Don't return -1 just because the
1149 string is longer than 4 KB.
1151 2003-05-12 Jim Meyering <jim@meyering.net>
1153 * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
1154 the space-padded-by-default conversion specifiers, %e, %k, %l.
1156 2003-05-03 Bruno Haible <bruno@clisp.org>
1158 Upgrade to Unicode-4.0.
1159 * linebreak.c (nonspacing_table_data): Change width of U+00AD,
1160 U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
1161 U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
1162 U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
1163 from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
1164 (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
1165 of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
1166 Change width of U+E0100..U+E01EF from 1 to 0.
1168 2003-04-25 Bruno Haible <bruno@clisp.org>
1170 * copy-file.c: Include <stddef.h>, for size_t.
1172 2003-04-25 Jim Meyering <jim@meyering.net>
1174 * copy-file.c (copy_file_preserving): Declare buf_size to be
1175 of type size_t, not int.
1177 2003-04-11 Jim Meyering <jim@meyering.net>
1179 Merge changes from Coreutils.
1181 2003-03-22 Jim Meyering <jim@meyering.net>
1183 * strftime.c (widen): Cast alloca return value to proper type.
1185 2003-01-19 Ulrich Drepper <drepper@redhat.com>
1188 * strftime.c (my_strftime): Handle very large width
1189 specifications for numeric values correctly. Improve checks for
1192 2003-01-19 Jim Meyering <jim@meyering.net>
1194 * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
1195 (nl_get_alt_digit) [! defined my_strftime]: Define.
1196 (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
1197 _nl_get_alt_digit and _nl_get_walt_digit.
1199 * strftime.c (my_strftime): Merge in locale-related changes from libc.
1200 These changes have no effect outside of _LIBC.
1202 2003-04-10 Bruno Haible <bruno@clisp.org>
1204 * findprog.h: New file, from GNU gettext.
1205 * findprog.c: New file, from GNU gettext.
1207 2003-04-05 Jim Meyering <jim@meyering.net>
1209 Merge changes from Coreutils.
1211 * exclude.h (PARAMS): Remove definition and uses.
1212 * exclude.c: Remove uses of `PARAMS'.
1214 * dirname.c [TEST_DIRNAME]: Update build instructions for test.
1215 Add test-cases for DOS filenames. Declare program_name.
1216 (main): Set up program_name. Patch by Rich Dawe.
1218 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
1220 Use mntctl's return value to drive the entry-processing loop, since
1221 we can't rely on the value of the vmt_length member in the last
1222 entry. On some systems doing so could result in exhausting
1223 virtual memory. Based in part on a patch from Mike Jetzer.
1225 2003-04-04 Bruno Haible <bruno@clisp.org>
1227 * linebreak.h: New file, from GNU gettext.
1228 * linebreak.c: New file, from GNU gettext with slight modifications.
1229 * lbrkprop.h: New file, from GNU gettext.
1231 2003-04-03 Bruno Haible <bruno@clisp.org>
1233 * utf8-ucs4.h: New file, from GNU gettext.
1234 * utf16-ucs4.h: New file, from GNU gettext.
1235 * ucs4-utf8.h: New file, from GNU gettext.
1236 * ucs4-utf16.h: New file, from GNU gettext.
1238 2003-04-02 Bruno Haible <bruno@clisp.org>
1240 * binary-io.h: New file, from GNU gettext.
1242 2003-04-01 Bruno Haible <bruno@clisp.org>
1244 * pathname.h: New file, from GNU gettext.
1245 * concatpath.c: New file, from GNU gettext.
1247 2003-03-30 Bruno Haible <bruno@clisp.org>
1249 * copy-file.c (copy_file_preserving): Don't set owner if the function
1250 chown() doesn't exist.
1252 2003-03-28 Bruno Haible <bruno@clisp.org>
1254 * copy-file.h: New file, from GNU gettext.
1255 * copy-file.c: New file, from GNU gettext.
1257 2003-03-18 Jim Meyering <jim@meyering.net>
1259 * quote.c (quote_n): Fix typo in comment.
1261 2003-03-14 Jim Meyering <jim@meyering.net>
1263 Merge changes from Coreutils.
1264 * obstack.h (obstack_object_size): Declare temporary, __o,
1265 to be const, in order to avoid warnings.
1266 (obstack_room): Likewise.
1267 (obstack_empty_p): Likewise.
1269 2003-03-13 Paul Eggert <eggert@twinsun.com>
1271 Merge changes from Bison.
1272 * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
1273 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1274 when compiling Bison 1.875's `bitset bset = obstack_alloc
1275 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1276 * hash.c: Include <stdbool.h> unconditionally.
1278 2003-03-09 Paul Eggert <eggert@twinsun.com>
1280 * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
1281 Reported by Bruce Becker; see:
1282 http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
1284 2003-03-03 Paul Eggert <eggert@twinsun.com>
1285 Bruno Haible <bruno@clisp.org>
1287 * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
1288 Reported by John Hughes, see
1289 http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
1291 2003-02-19 Paolo Bonzino <bonzini@gnu.org>
1293 * poll_.h: New file.
1296 2003-02-18 Paolo Bonzino <bonzini@gnu.org>
1298 * mathl.h: New file.
1299 * acosl.c: New file.
1300 * asinl.c: New file.
1301 * atanl.c: New file.
1302 * ceill.c: New file.
1305 * floorl.c: New file.
1306 * frexpl.c: New file.
1307 * ldexpl.c: New file.
1309 * sincosl.c: New file.
1311 * sqrtl.c: New file.
1313 * trigl.c: New file.
1314 * trigl.h: New file.
1316 2003-02-17 Bruno Haible <bruno@clisp.org>
1318 * mkdtemp.h: New file, from GNU gettext.
1319 * mkdtemp.c: New file, from GNU gettext.
1321 2003-01-31 Bruno Haible <bruno@clisp.org>
1323 * rename.c: #undef rename before defining rpl_rename.
1324 * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
1326 2003-01-30 Bruno Haible <bruno@clisp.org>
1328 * printf-args.h: New file, from GNU gettext.
1329 * printf-args.c: New file, from GNU gettext.
1330 * printf-parse.h: New file, from GNU gettext.
1331 * printf-parse.c: New file, from GNU gettext.
1332 * vasnprintf.h: New file, from GNU gettext.
1333 * vasnprintf.c: New file, from GNU gettext.
1334 * asnprintf.c: New file, from GNU gettext.
1335 * vasprintf.h: New file, from GNU gettext with modifications.
1336 * vasprintf.c: New file, from GNU gettext.
1337 * asprintf.c: New file, from GNU gettext.
1339 2003-01-29 Bruno Haible <bruno@clisp.org>
1341 * stpncpy.h: New file, from GNU gettext with modifications.
1342 * stpncpy.c: New file, from GNU gettext with modifications.
1344 2003-01-28 Bruno Haible <bruno@clisp.org>
1346 * c-ctype.h: New file, from GNU gettext, with changes suggested by
1348 * c-ctype.c: New file, from GNU gettext, with changes suggested by
1351 2003-01-27 Bruno Haible <bruno@clisp.org>
1353 * xsetenv.h: New file, from GNU gettext.
1354 * xsetenv.c: New file, from GNU gettext.
1356 2003-01-23 Bruno Haible <bruno@clisp.org>
1358 * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
1360 2003-01-22 Bruno Haible <bruno@clisp.org>
1362 * exit.h: New file, from GNU gettext.
1364 2003-01-11 Bruno Haible <bruno@clisp.org>
1366 * stpcpy.h (stpcpy): Use ANSI C function declarations.
1367 * strcase.h (strcasecmp, strncasecmp): Likewise.
1369 2003-01-14 Jim Meyering <jim@meyering.net>
1371 * same.c (same_name): Tweak a comment.
1373 2003-01-11 Bruno Haible <bruno@clisp.org>
1375 * same.c (same_name): Reorder tests so as to avoid calling stat()
1376 when a string comparison is sufficient.
1378 2003-01-11 Bruno Haible <bruno@clisp.org>
1380 * readtokens.c (readtoken): Cast character to 'unsigned char', not
1383 2003-01-11 Bruno Haible <bruno@clisp.org>
1385 * hash-pjw.c: Add comment about low quality of this function.
1387 2003-01-12 Paul Eggert <eggert@twinsun.com>
1389 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
1390 to avoid collisions with libcurses and libreadline.
1392 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
1393 * getstr.h, getstr.c: Remove.
1394 * getline.c: Include "getline.h", to check interface.
1395 Move body of old getstr.c here: this defines MIN_CHUNK and
1396 declares getdelim2, which is renamed from getstr.
1397 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
1399 * linebuffer.c (readlinebuffer): Renamed from readline.
1401 * linebuffer.h: Likewise.
1402 (readline): Remove backward-compatibility macro.
1404 2003-01-12 Jim Meyering <jim@meyering.net>
1406 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
1408 2003-01-10 Bruno Haible <bruno@clisp.org>
1410 * alloca_.h: New file.
1411 * getdate.y: Unconditionally include alloca.h.
1412 * makepath.c: Likewise.
1413 * setenv.c: Likewise.
1414 * userspec.c: Likewise.
1416 2003-01-09 Bruno Haible <bruno@clisp.org>
1418 * stdbool.h.in: New file.
1420 2003-01-08 Bruno Haible <bruno@clisp.org>
1422 * safe-read.c: Include specification header first, to ensure its
1424 * full-write.c: Likewise.
1426 2003-01-08 Jim Meyering <jim@meyering.net>
1428 * full-write.c: Undefine and define-away `const' after inclusion
1429 of errno.h, not before. Suggestion from Bruno Haible.
1431 2003-01-07 Jim Meyering <jim@meyering.net>
1433 * full-write.c: Rework so that it may serve to define full_read, too.
1434 * full-read.c: Simply #define FULL_READ and include full-write.c.
1436 2003-01-06 Jim Meyering <jim@meyering.net>
1438 * version-etc.c: Update year in translatable copyright string.
1440 2002-12-25 Bruno Haible <bruno@clisp.org>
1442 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
1443 * xstrtol.h: Likewise.
1444 * xstrtoimax.c: Likewise.
1445 * xstrtoumax.c: Likewise.
1446 * human.h: Likewise.
1448 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
1449 on systems that have <inttypes.h> but not <stdint.h>.
1451 2002-12-31 Paul Eggert <eggert@twinsun.com>
1453 * memcoll.c (memcoll): Fall back on a simple algorithm using
1454 memcmp if strcoll doesn't work.
1456 2002-12-23 Bruno Haible <bruno@clisp.org>
1458 * localcharset.h: New file.
1459 * localcharset.c: Include it.
1460 * unicodeio.c: Likewise.
1462 2002-12-22 Bruno Haible <bruno@clisp.org>
1464 * utime.c (utime_null): No need to call ftruncate if the file was
1467 2002-12-23 Bruno Haible <bruno@clisp.org>
1469 * memcoll.c (STRCOLL): New macro.
1472 2002-12-22 Bruno Haible <bruno@clisp.org>
1474 * getstr.h (getstr): Define, to avoid clash with libcurses.
1475 * linebuffer.h (readline): Define, to avoid clash with libreadline.
1477 2002-12-22 Bruno Haible <bruno@clisp.org>
1479 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
1481 2002-12-23 Bruno Haible <bruno@clisp.org>
1483 * getline.h: Include <stddef.h>, for size_t.
1485 * unicodeio.h: Include <stddef.h>, for size_t.
1486 * unicodeio.c: Don't include <stddef.h>.
1488 2002-12-17 Bruno Haible <bruno@clisp.org>
1490 * canon-host.c (strdup): Remove unused declaration.
1492 * fsusage.c: Include full_read.h.
1493 (get_fs_usage): Use full_read instead of safe_read.
1495 * utime.c (utime_null): Use SAFE_READ_ERROR.
1497 2002-12-11 Bruno Haible <bruno@clisp.org>
1499 * setenv.h: Rewritten to cope with systems that have setenv() but not
1501 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
1504 2002-12-11 Bruno Haible <bruno@clisp.org>
1506 * setenv.c (alloca): Fall back to malloc.
1508 (setenv): Use freea() to free memory allocated with alloca().
1510 2002-11-13 Bruno Haible <bruno@clisp.org>
1512 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
1513 function declarations.
1514 * unsetenv.c (unsetenv): Likewise.
1516 2002-03-04 Bruno Haible <bruno@clisp.org>
1518 Portability to AIX 4.3.3.
1519 * unsetenv.c: New file, extracted from setenv.c.
1520 * setenv.c: Move the unsetenv() function to unsetenv.c.
1522 2001-12-20 Bruno Haible <bruno@clisp.org>
1524 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
1525 use malloc instead. For SunOS 4.
1527 2001-12-11 Bruno Haible <bruno@clisp.org>
1529 * setenv.c: Declare alloca.
1530 (compar_fn_t): New typedef.
1531 (KNOWN_VALUE, STORE_VALUE): Use it.
1533 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
1536 2002-12-10 Paul Eggert <eggert@twinsun.com>
1538 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
1539 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
1540 Choose values that are less likely to collide with system fnmatch
1542 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
1543 defined (e.g., a pure POSIX system).
1544 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
1545 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
1547 2002-12-06 Jim Meyering <jim@meyering.net>
1549 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
1551 Merge in changes from libc's misc/error.c, in preparation
1552 for the merge of gnulib's changes back into libc.
1554 * error.c (_): Define only if not already defined.
1555 Move definition to follow all #include directives.
1556 Include unlocked-io.h only if !_LIBC.
1557 [_LIBC]: Include <libio/libioP.h>.
1558 [USE_IN_LIBIO]: Include <libio/iolibio.h>
1559 (fflush): Tweak definition to use INTUSE.
1562 2002-12-05 Paul Eggert <eggert@twinsun.com>
1564 * alloca.c [defined emacs]: Include "lisp.h".
1565 (xalloc_die) [defined emacs]: New macro.
1566 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
1567 [! defined emacs]: Include <xalloc.h>.
1568 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
1569 (pointer): Typedef to POINTER_TYPE *.
1570 (malloc): Remove decl; we now always use xmalloc.
1571 (alloca): Use old-style definition, since Emacs needs this.
1572 Check for arithmetic overflow when computing combined size.
1574 2002-12-04 Paul Eggert <eggert@twinsun.com>
1576 Do not generate unlocked-io.h automatically, since it's easier to
1577 maintain it by hand.
1579 * unlocked-io.h: New file, from GNU diffutils,
1580 but with proper copyright notice and attribution.
1582 * Makefile.am: Add copyright notice.
1583 (libfetish_a_SOURCES): Add unlocked-io.h.
1584 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
1585 (DISTCLEANFILES, io_functions): Remove macros.
1586 (EXTRA_DIST): Remove gen_uio.
1587 (unlocked-io.h): Remove rule.
1589 2002-12-04 Jim Meyering <jim@meyering.net>
1591 Reflect the fact that stat.c and lstat.c are no longer generated.
1592 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
1593 (DISTCLEANFILES): Likewise.
1594 (EXTRA_DIST): Likewise.
1595 (all_local): Don't depend on stat.c or lstat.c.
1596 (stat.c, lstat.c): Remove rules.
1597 (EXTRA_DIST): Remove xstat.in.
1599 * xstat.in: Remove file. Contents moved into stat.c.
1600 * stat.c: New file. Contents mostly from xstat.in.
1601 * stat.c: Rework so that it may serve to define rpl_lstat, too.
1602 * lstat.c: New file. Simply #define LSTAT and include stat.c.
1604 * safe-read.c: Rework so that it may serve to define safe_write, too.
1605 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
1607 2002-12-03 Jim Meyering <jim@meyering.net>
1609 * safe-read.c, safe-write.c: Change variable names and comments, but
1610 not semantics, to minimize the differences between these two files.
1611 (safe_read): Change comment to mention SAFE_READ_ERROR.
1613 * safe-read.c (IS_EINTR): Define.
1614 (safe_read): Use IS_EINTR in place of in-function cpp directives.
1616 2002-12-02 Bruno Haible <bruno@clisp.org>
1618 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
1619 Define, taken from safe-read.c.
1620 (INT_MAX): Provide fallback.
1621 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
1622 * safe-write.h (SAFE_WRITE_ERROR): Define.
1624 * safe-read.c (EINTR): Remove definition.
1625 (safe_read): Don't use EINTR if it is absent.
1627 2002-12-02 Jim Meyering <jim@meyering.net>
1629 * safe-read.c (EINTR): Define.
1630 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1631 (INT_MAX): Provide fallback.
1632 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
1634 * safe-read.h (SAFE_READ_ERROR): Define.
1636 2002-12-01 Jim Meyering <jim@meyering.net>
1638 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
1639 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
1641 2002-11-27 Paul Eggert <eggert@twinsun.com>
1643 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
1644 hash_rehash): Replace `if (limit <= value) abort ();' with
1645 `if (! (value < limit)) abort ();', for readability.
1647 2002-11-26 <karl@gnu.org>
1649 * strdup.c: copy from libc again, with jim's ok.
1650 * .cppi-disable: re-add strdup.c
1652 2002-11-25 <karl@gnu.org>
1654 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
1655 instead of "strtol.c".
1657 2002-11-25 Jim Meyering <jim@meyering.net>
1659 * mktime.c: Sync from libc, now that it has the latest fix.
1661 2002-11-24 <karl@gnu.org>
1663 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
1664 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
1666 2002-11-24 Jim Meyering <jim@meyering.net>
1668 Update from coreutils:
1670 * mktime.c: Merge in changes from libc.
1672 Avoid a link-time failure on some Linux systems.
1673 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
1674 (__mon_yday): Declare with the STATIC attribute.
1675 (__mktime_internal): Likewise.
1676 Based on a report from Greg Schafer.
1678 2002-11-23 Jim Meyering <jim@meyering.net>
1680 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
1681 Use `unsigned', not `int', as type of index.
1683 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
1685 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
1687 2002-11-22 Paul Eggert <eggert@twinsun.com>
1689 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
1690 hint that one should use `if (! x) abort ();' rather than `assert
1691 (x);', and anyway it's one less thing to worry about configuring.
1692 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
1693 hash_rehash, hash_insert): Use abort rather than assert.
1695 2002-11-22 Paul Eggert <eggert@twinsun.com>
1697 * quotearg.h: Allow multiple inclusion by surrounding with
1698 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
1699 so that we can be included first.
1700 (PARAMS): Remove; we now assume C89 or later. All uses removed.
1701 * quotearg.c: Include quotearg.h immediately after config.h.
1702 No need to include stddef.h or sys/types.h any more.
1703 Surround local include files with "", not "<>".
1704 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
1705 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
1706 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
1707 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
1708 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
1709 (ISPRINT): Remove; no longer needed now that we assume C89.
1711 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
1714 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
1715 quotearg_char): Use SIZE_MAX rather than
1716 (size_t) -1 when we are talking about "infinity".
1718 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
1720 2002-11-22 Bruno Haible <bruno@clisp.org>
1722 * safe-read.h: Assume C89. Add comments.
1723 (safe_read): Change return type to size_t.
1724 * safe-read.c (safe_read): Change return type to size_t. Handle byte
1725 counts > SSIZE_MAX correctly.
1726 * safe-write.h: New file.
1727 * safe-write.c: New file.
1728 * full-read.h: New file.
1729 * full-read.c: New file.
1730 * full-write.h: Assume C89. Add comments.
1731 * full-write.c: Include safe-write.h.
1732 (full_write): Rewritten to use safe_write.
1733 Suggested by Jim Meyering and Paul Eggert.
1735 2002-11-21 Bruno Haible <bruno@clisp.org>
1737 Remove case insensitive option matching.
1738 * argmatch.h (argcasematch): Remove declaration.
1739 (ARGCASEMATCH): Remove macro.
1740 (__xargmatch_internal): Remove case_sensitive argument.
1741 (XARGMATCH): Update.
1742 (XARGCASEMATCH): Remove macro.
1743 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
1744 case_sensitive argument.
1745 (argcasematch): Remove function.
1746 (__xargmatch_internal): Remove case_sensitive argument.
1747 (main): Use XARGMATCH instead of XARGCASEMATCH.
1749 * xmalloc.c: Change compile-time error message. Add comment about
1750 required autoconf version.
1752 2002-11-21 Jim Meyering <jim@meyering.net>
1754 * strdup.c (strdup): Tweak comment and initial #if/#include.
1756 Merge in changes from the coreutils.
1758 2002-09-25 Paul Eggert <eggert@twinsun.com>
1759 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
1760 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
1761 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
1762 int. Work more efficiently if X is the same width as uintmax_t.
1763 Do not compare X to -1, to avoid bogus compiler warning.
1764 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
1765 Don't assume that f_frsize and f_bsize are the same type.
1767 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
1770 * makepath.c (make_path): Restore umask *before* creating the final
1772 (make_path): Minor reformatting.
1774 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
1775 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
1777 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
1778 ones. At least on GNU/Linux systems, `auto' means something else.
1781 2002-11-20 Paul Eggert <eggert@twinsun.com>
1783 Merge argmatch cleanups from Bison. Assume C89.
1785 * argmatch.c: Include config.h here, not in argmatch.h.
1786 Include stdlib.h, for EXIT_FAILURE.
1787 Always include <string.h>, since we assume C89.
1788 (EXIT_FAILURE): Remove pre-C89 bug workaround.
1789 * argmatch.h: Do not include <config.h> or <sys/types.h>.
1790 Include <stddef.h> instead, since it's all we need for size_t.
1791 (PARAMS): Remove. All uses removed.
1792 (ARRAY_CARDINALITY): Do not bother to #undef.
1793 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
1794 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
1795 Remove unnecessary parentheses.
1796 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
1797 Insert necessary parentheses.
1798 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
1799 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
1801 2002-11-19 Bruno Haible <bruno@clisp.org>
1803 * mbswidth.c: Include mbswidth.h right at the beginning.
1804 * mbswidth.h: Include <stddef.h>, for size_t.
1806 * mbswidth.h (PARAMS): Remove macro.
1807 (mbswidth, mbsnwidth): Use ANSI C function declarations.
1808 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
1810 * gcd.h (PARAMS): Remove macro.
1811 (gcd): Use ANSI C function declarations.
1812 * gcd.c (gcd): Likewise.
1814 2002-11-15 Bruno Haible <bruno@clisp.org>
1816 * strcspn.c: Include <stddef.h>.
1817 (strcspn): Use ANSI C function declaration. Change return type to
1819 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
1820 (strpbrk): Use NULL.
1821 * strpbrk.h (PARAMS): Remove macro.
1822 (strpbrk): Use ANSI C function declaration.
1823 * strstr.c: Don't include <sys/types.h>.
1824 * strstr.h (PARAMS): Remove macro.
1825 (strstr): Use ANSI C function declarations.
1827 2002-11-06 Bruno Haible <bruno@clisp.org>
1829 * gcd.h (gcd): Change argument type to 'unsigned long'.
1830 * gcd.c (gcd): Likewise.
1832 2002-11-05 Bruno Haible <bruno@clisp.org>
1834 * gcd.h: New file, from gettext-0.11.5.
1835 * gcd.c: New file, from gettext-0.11.5.
1837 2002-11-05 Bruno Haible <bruno@clisp.org>
1839 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1840 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1841 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1842 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1844 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
1845 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
1847 * closeout.c: Include gettext.h instead of <libintl.h>.
1848 * human.c: Include gettext.h instead of <libintl.h>.
1849 * quotearg.c: Include gettext.h instead of <libintl.h>.
1850 * rpmatch.c: Include gettext.h instead of <libintl.h>.
1851 * unicodeio.c: Include gettext.h instead of <libintl.h>.
1852 * userspec.c: Include gettext.h instead of <libintl.h>.
1853 * version-etc.c: Include gettext.h instead of <libintl.h>.
1854 * xmalloc.c: Include gettext.h instead of <libintl.h>.
1855 (textdomain): Remove definition.
1856 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
1858 * long-options.c: Remove include of <libintl.h> and definition of _.
1859 * same.c: Remove include of <libintl.h> and definition of _.
1861 2002-11-04 Bruno Haible <bruno@clisp.org>
1863 * stpcpy.h: New file, from GNU gettext-0.11.5.
1864 * strcase.h: New file, from GNU gettext-0.11.5.
1865 * strpbrk.h: New file, from GNU gettext-0.11.5.
1866 * strstr.h: New file, from GNU gettext-0.11.5.
1867 * xgetcwd.h: New file, from GNU gettext-0.11.5.
1869 2002-05-09 Bruno Haible <bruno@clisp.org>
1871 * config.charset: Update for newest glibc. Add canonical names
1872 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
1874 2002-05-09 Bruno Haible <bruno@clisp.org>
1876 * localcharset.c (get_charset_aliases): Add more Windows specific
1879 2002-05-08 Owen Taylor <otaylor@redhat.com>
1881 * config.charset: A few additions for Solaris.
1883 2001-12-05 Bruno Haible <bruno@clisp.org>
1885 * localcharset.c (locale_charset): Don't return an empty string.
1887 2001-10-23 Bruno Haible <haible@clisp.cons.org>
1889 * config.charset: msdos in uk_UA uses CP1125.
1891 2001-08-05 Bruno Haible <haible@clisp.cons.org>
1893 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
1894 * localcharset.c (locale_charset): Declare as extern "C".
1896 2002-02-15 Bruno Haible <bruno@clisp.org>
1898 * config.charset [msdosdjgpp]: For Russian, use CP866.
1900 2002-02-11 Bruno Haible <bruno@clisp.org>
1902 * config.charset: Add support for NetBSD.
1904 2002-09-25 <karl@gnu.org>
1906 * strdup.c: copy from libc/string (via ../config/srclist*).
1907 * getopt*: copy from libc/posix.
1908 * gettext.h: copy from gettext.
1909 * .cppi-disable: add strdup.c, gettext.h.
1911 2002-07-01 Jim Meyering <meyering@lucent.com>
1913 * c-stack.c: Include sys/time.h.
1914 From Volker Borchert.
1916 2002-06-11 Paul Eggert <eggert@twinsun.com>
1918 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
1919 New macro. Use it uniformly instead of
1920 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
1921 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
1922 reported by Vin Shelton.
1924 2002-06-22 Jim Meyering <meyering@lucent.com>
1926 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
1927 redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
1929 2002-06-22 Paul Eggert <eggert@twinsun.com>
1931 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
1932 Do not assume SA_SIGINFO behavior.
1933 Bug reported by Jim Meyering on NetBSD 1.5.2.
1935 2002-06-22 Jim Meyering <meyering@lucent.com>
1937 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
1939 * exitfail.c, exitfail.h: Likewise.
1940 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
1942 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
1944 (EXTRA_DIST): Add fnmatch_loop.c.
1945 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
1947 * fnmatch_loop.c: New file, from diffutils-2.8.2.
1948 * fnmatch.c: Update from diffutils-2.8.2.
1949 * fnmatch_.h: New file. From diffutils-2.8.2.
1950 * fnmatch.h: Remove file.
1952 2002-06-18 Paul Eggert <eggert@twinsun.com>
1954 * file-type.h: Report an error if neither S_ISREG nor
1955 S_IFREG is defined, instead of using a test specific to glibc
1956 2.2. This should be safe, since POSIX requires S_ISREG and
1957 Unix Version 7 had S_IFREG. We don't need to check for
1958 <sys/types.h> since we don't use any symbols that it defines.
1960 2002-06-15 Jim Meyering <meyering@lucent.com>
1962 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
1963 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
1964 have been included before this file.
1966 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
1968 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
1969 so that each temporary file name is unique and valid in the first
1970 8 characters, for operation under DOS.
1972 2002-06-15 Jim Meyering <meyering@lucent.com>
1974 Work even with DJGPP 2.03, which lacks support for symlinks.
1976 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
1978 * lchown.c (S_ISLNK): Likewise.
1980 2002-06-14 Jim Meyering <meyering@lucent.com>
1982 * file-type.h: Use the version from diffutils-2.8.2.
1983 * file-type.c: Likewise.
1985 2002-05-27 Jim Meyering <meyering@lucent.com>
1987 Fix a problem seen only on nonconforming systems whereby ls.c's
1988 use of localtime, and then of gettimeofday would cause trouble:
1989 the localtime call used to initialize rpl_gettimeofday's save
1990 mechanism would clobber ls's current local time information so
1991 that in any long listing the first file would always be listed
1992 with date 1970-01-01. Analysis by Volker Borchert.
1994 * gettimeofday.c (localtime): Undefine.
1995 (rpl_localtime): New function.
1997 2002-05-22 Jim Meyering <meyering@lucent.com>
1999 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
2000 * file-type.h: New file.
2001 * file-type.c (file_type): New file/function. Extracted from diffutils.
2003 2002-04-29 Paul Eggert <eggert@twinsun.com>
2005 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
2007 2002-04-28 Paul Eggert <eggert@twinsun.com>
2009 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
2010 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
2011 of 127, since 64 is the largest conceivable number for ancient
2013 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
2015 2002-04-28 Jim Meyering <meyering@lucent.com>
2017 * sig2str.c (WTERMSIG): Remove definition (unused).
2019 2002-04-28 Paul Eggert <eggert@twinsun.com>
2021 * sig2str.h, sig2str.c: New files.
2022 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
2024 2002-04-24 Jim Meyering <meyering@lucent.com>
2026 * gettext.h: New file, from Gettext.
2027 * Makefile.am (INCLUDES): Remove -I../intl.
2028 (libfetish_a_SOURCES): Add gettext.h.
2030 2002-04-16 Jim Meyering <meyering@lucent.com>
2032 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
2033 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
2034 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
2036 2002-04-12 Jim Meyering <meyering@lucent.com>
2038 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
2040 2002-03-10 Jim Meyering <meyering@lucent.com>
2042 * makepath.c (make_path): Remove a comma from a diagnostic.
2043 Suggestion from Santiago Vila.
2045 2002-03-08 Jim Meyering <meyering@lucent.com>
2047 * rename.c: Mention that this wrapper is needed also on
2048 mips-dec-ultrix4.4 systems.
2050 2002-03-02 Jim Meyering <meyering@lucent.com>
2052 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
2053 not HAVE_CLOCK_SETTIME.
2055 2002-02-27 Paul Eggert <eggert@twinsun.com>
2057 * nanosleep.h: Rename to....
2058 * timespec.h: New name for nanosleep.h. All uses changed.
2060 * gettime.c: New file.
2061 * settime.c: New file.
2064 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
2065 timespec.h. Remove nanosleep.h.
2067 2002-02-25 Paul Eggert <eggert@twinsun.com>
2069 * acl.c, acl.h: New files.
2070 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
2072 2002-02-24 Jim Meyering <meyering@lucent.com>
2074 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
2075 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
2076 cause trouble. Reported by Nelson Beebe.
2078 2002-02-23 Paul Eggert <eggert@twinsun.com>
2080 * path-concat.c (xpath_concat): Reorder code to pacify
2081 compilers that don't know that xalloc_die never returns.
2083 2002-02-20 Jim Meyering <meyering@lucent.com>
2085 * getdate.c: Regenerate using bison-1.33.
2087 2002-02-15 Paul Eggert <eggert@twinsun.com>
2089 * posixver.c, posixver.h: New files.
2090 * Makefile.am (libfetish_a_SOURCES): Add them.
2092 2002-02-02 Paul Eggert <eggert@twinsun.com>
2093 Bruno Haible <bruno@clisp.org>
2095 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
2096 (fwrite_success_callback): New declaration.
2097 * unicodeio.c (unicode_to_mb): New function, extracted from
2098 print_unicode_char. Call failure callback instead of error.
2099 (fwrite_success_callback): New function.
2100 (exit_failure_callback): New function.
2101 (fallback_failure_callback): New function.
2102 (print_unicode_char): Call unicode_to_mb.
2104 2002-01-26 Jim Meyering <meyering@lucent.com>
2106 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
2108 2002-01-22 Jim Meyering <meyering@lucent.com>
2110 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
2111 Otherwise, some versions of automake would omit the rule that makes
2112 Makefile from Makefile.in.
2114 2001-01-21 Paul Eggert <eggert@twinsun.com>
2116 * xmemcoll.h, xmemcoll.c: New files.
2117 * Makefile.am (libfetish_a_SOURCES): Add them.
2118 * memcoll.c: Include errno.h, and declare errno if not defined.
2119 (memcoll): Set errno to zero if there is no error.
2121 * quotearg.c (quotearg_buffer_restyled):
2122 Fix bug with quoting buffers containing NUL when backslashing escapes.
2123 This bug was exposed by the other changes in this patch.
2124 (quotearg_n_options): New arg ARGSIZE.
2125 All callers changed.
2126 (quoting_options_from_style): New function.
2127 (quotearg_n_style): Use it.
2128 (quotearg_n_style_mem): New function.
2130 * quotearg.h (quotearg_n_style_mem): New function.
2132 2002-01-16 Jim Meyering <meyering@lucent.com>
2134 * getdate.y: Add three semicolons, each just before a closing brace.
2135 Bison (as of version 1.31) no longer papers over that mistake.
2137 2002-02-14 Paul Eggert <eggert@twinsun.com>
2139 * backupfile.c (ISDIGIT): Comment fix.
2140 * getdate.y (ISDIGIT): Likewise.
2141 * posixtm.c (ISDIGIT, year): Likewise.
2142 * strverscmp.c (ISDIGIT): Likewise.
2143 * userspec.c (ISDIGIT): Likewise.
2145 2002-01-05 Jim Meyering <meyering@lucent.com>
2147 * version-etc.c (version_etc_copyright): Update copyright year.
2149 2001-01-19 Paul Eggert <eggert@twinsun.com>
2151 * closeout.c (close_stdout_status): If ferror (stdout), do
2152 not silently exit merely because the output buffer happens to
2153 have nothing pending.
2155 2001-12-18 Paul Eggert <eggert@twinsun.com>
2157 See the big note in ../ChangeLog.
2158 * human.c (suffixes): Prefer K to k for 1024.
2159 (generate_suffix_backwards): New function.
2160 (human_readable_inexact): Use it.
2161 * xstrtol.c (__xstrtol): If there is no number but there
2162 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
2163 Accept 'K' as well as 'k'.
2165 2001-12-15 Jim Meyering <meyering@lucent.com>
2167 * regex.h (__restrict_arr): Update from libc.
2169 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
2170 as `remote' if the name starts with `//'. Suggested by Michael Stone.
2173 2001-12-10 Jim Meyering <meyering@lucent.com>
2175 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
2176 Instead, include "xalloc.h".
2177 (initbuffer): Don't cast xmalloc return value to char*.
2178 (readline): Reword comment.
2179 Don't cast xrealloc return value to char*
2182 2001-12-09 Jim Meyering <meyering@lucent.com>
2184 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
2185 `signed and unsigned type in conditional expression'.
2186 * posixtm.c (posix_time_parse): Likewise.
2188 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
2190 * readtokens.c (readtoken): Declare an index to be of type unsigned
2191 to avoid a pedantic warning.
2193 * getstr.c: Don't include assert.h.
2194 (getstr): Remove warning-evoking assertions.
2195 Return -1 if offset parameter is out of bounds.
2196 Change the type of a local from int to size_t.
2198 * strftime.c (my_strftime_localtime_r): Include this function
2199 definition in the `#if ! HAVE_TM_GMTOFF' block.
2201 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
2202 Include xalloc.h instead.
2204 2001-12-02 Jim Meyering <meyering@lucent.com>
2206 * tempname.c: Don't declare getenv, thus reverting the change of
2207 2001-11-18. It's no longer necessary, now that stdlib.h is always
2210 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
2211 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
2213 2001-11-30 Akim Demaille <akim@epita.fr>
2215 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
2216 before being defined.
2218 2001-11-27 Paul Eggert <eggert@twinsun.com>
2220 * quotearg.h (quotearg_n, quotearg_n_style):
2221 First arg is int, not unsigned.
2222 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2223 (SIZE_MAX, UINT_MAX): New macros.
2224 (quotearg_n_options): Abort if N is negative.
2225 Avoid overflow check on hosts where size_t is 64 bits and int
2226 is 32 bits, as overflow is impossible there.
2227 Fix off-by-one typo that caused unnecessary reallocation.
2229 2001-11-27 Jim Meyering <meyering@lucent.com>
2231 * tempname.c: Merge with version from libc.
2232 * regex.c: Likewise.
2234 * tempname.c: Include stdlib.h unconditionally. On some old systems
2235 for which STDC_HEADERS is 0, it was not included, resulting in a
2236 warning about an integer-to-pointer conversion problem with getenv.
2237 Reported by Volker Borchert.
2239 2001-11-26 Jim Meyering <meyering@lucent.com>
2241 * gtod.h: Remove file.
2242 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
2243 * gettimeofday.c: Don't include gtod.h.
2244 (GTOD_init): Remove function.
2245 (rpl_gettimeofday): Do its job here instead, rather than aborting.
2246 Suggestion from Volker Borchert.
2248 2001-11-23 Jim Meyering <meyering@lucent.com>
2250 * hash.h (struct hash_table): Don't define here. Merely declare it.
2251 * hash.c (struct hash_table): Define it here instead.
2253 2001-11-22 Jim Meyering <meyering@lucent.com>
2255 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
2257 2001-11-18 Paul Eggert <eggert@twinsun.com>
2259 * tempname.c (TMP_MAX): Remove; no longer needed.
2260 (TEMPORARIES): New macro.
2261 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
2262 removes an artificial limitation (e.g. HP-UX 10.20, where
2265 2001-11-18 Jim Meyering <meyering@lucent.com>
2267 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
2270 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
2271 files will be created before anything else.
2273 2001-11-17 Jim Meyering <meyering@lucent.com>
2275 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
2276 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
2277 rather than group writable. Patch by Juan F. Codagnone.
2279 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
2280 Instead, include "xalloc.h".
2282 * mountlist.c: Include unlocked-io.h after all system headers.
2283 Remove explicit declarations of xmalloc, xrealloc,
2284 and xstrdup. Instead, include "xalloc.h".
2286 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
2287 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
2288 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
2290 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
2291 Reported by Padraig Brady.
2293 * mkstemp.c: #undef mkstemp.
2295 (rpl_mkstemp): Rename from mkstemp.
2298 2001-11-16 Jim Meyering <meyering@lucent.com>
2300 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
2301 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
2302 determine the amount of total physical memory, use pstat_getstatic.
2303 HPUX-11 doesn't define _SC_PHYS_PAGES.
2304 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
2305 If sysconf couldn't be used to determine the amount of available
2306 physical memory, use both pstat_getstatic and pstat_getdynamic.
2307 Based on a patch from Bob Proulx.
2309 2001-11-05 Jim Meyering <meyering@lucent.com>
2311 * xstat.in (slash_aware_lstat): Correct a misleading comment.
2313 2001-11-03 Jim Meyering <meyering@lucent.com>
2315 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
2316 in argmatch_to_argument call.
2318 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
2321 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
2322 e.g., a fault due to an attempt to free a NULL pointer.
2324 2001-11-01 Jim Meyering <meyering@lucent.com>
2326 * dirfd.c, dirfd.h: New files.
2327 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
2329 * hash.c (hash_print) [TESTING]: Clean up.
2331 2001-10-22 Paul Eggert <eggert@twinsun.com>
2333 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
2334 to avoid a warning if -Wall.
2336 2001-10-21 Paul Eggert <eggert@twinsun.com>
2338 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
2340 2001-10-21 Jim Meyering <meyering@lucent.com>
2342 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
2343 this code would end up calling gettext even in packages built
2345 * getopt.c (_): Likewise.
2346 * regex.c (_): Likewise.
2348 2001-10-20 Paul Eggert <eggert@twinsun.com>
2350 * error.c (strerror_r): Do not declare unless !_LIBC.
2351 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
2352 Use strerror_r that is only a macro, even if it is not a function.
2353 (strerror): Check for HAVE_DECL_STRERROR before declaring.
2354 (private_strerror): Use prototypes, not old-style function definition.
2355 (print_errno_message): New function.
2356 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
2358 (error_tail, error, error_at_line): Use it.
2360 2001-10-11 Jim Meyering <meyering@lucent.com>
2362 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
2363 and quote_n (1, ... to avoid clobbering a buffer.
2365 2001-10-05 Jim Meyering <meyering@lucent.com>
2367 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
2368 * hash-pjw.c: New file (factored out of fileutils' remove.c).
2369 * hash-pjw.h: New file.
2371 2001-09-30 Jim Meyering <meyering@lucent.com>
2373 * mountlist.c [MOUNTED_GETFSSTAT]:
2374 Include <sys/ucred.h>, for Apple Darwin.
2375 Include sys/mount.h and sys/fs_types.h only if available.
2377 (read_filesystem_list): Use FS_TYPE.
2379 2001-09-29 Paul Eggert <eggert@twinsun.com>
2381 * exclude.c (excluded_filename): 0 -> false, since it's
2384 2001-09-28 Paul Eggert <eggert@twinsun.com>
2386 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
2387 #defines strtoimax. Also treat the other strto* functions
2390 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
2391 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
2392 (strtoimax, strtoumax): Do not declare if already defined as a macro.
2394 2001-09-26 Jim Meyering <meyering@lucent.com>
2396 Most macros in unlocked-io.h had the wrong number of arguments.
2397 * gen-uio: New script.
2398 (USE_UNLOCKED_IO): Define to 1 if not already defined.
2399 * unlocked-io.hin: Remove file.
2400 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
2401 rather than trying to embed it here.
2402 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
2403 Reported by Padraig Brady.
2405 2001-09-25 Volker Borchert <bt@teknon.de>
2407 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
2409 2001-09-23 Jim Meyering <meyering@lucent.com>
2411 * mountlist.c: Remove useless parentheses in #if directives.
2412 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
2413 the deprecated MOUNTED symbol is no longer defined in mntent.h.
2415 2001-09-22 Jim Meyering <meyering@lucent.com>
2417 * localcharset.c: Update from latest gettext.
2418 * config.charset: Likewise.
2420 2001-09-20 Jim Meyering <meyering@lucent.com>
2422 * xstrtol.c (strtoimax): Guard declaration with
2423 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
2424 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
2425 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
2426 (strtoumax): Likewise, for completeness (it wasn't necessary).
2428 2001-09-06 Paul Eggert <eggert@twinsun.com>
2430 * strtoimax.c (HAVE_LONG_LONG):
2431 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
2432 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
2433 to work around bug in IBM C compiler.
2435 2001-09-16 Jim Meyering <meyering@lucent.com>
2437 * mkdir.c: New file.
2439 2001-09-04 Paul Eggert <eggert@twinsun.com>
2441 * xgetcwd.c: Revert some of the previous change; intead,
2442 fix the HAVE_GETCWD_NULL code to behave more like the
2443 !HAVE_GETCWD_NULL code used to.
2446 (xgetcwd): Do not return NULL when memory is exhausted; instead,
2449 2001-09-04 Paul Eggert <eggert@twinsun.com>
2451 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
2452 Use ssize_t, not int, to store result of readlink.
2453 Check for ssize_t overflow as well as size_t overflow,
2454 as POSIX says the result of readlink is implementation-defined
2455 when ssize_t overflows.
2456 Remove unnecessary cast to char*.
2457 Use free+malloc instead of realloc, as the storage doesn't need
2458 to be preserved and it's clearer and can be more efficient that way.
2459 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
2460 * xreadlink.h (xreadlink): Update prototype.
2462 2001-09-03 Paul Eggert <eggert@twinsun.com>
2464 * exclude.c (fnmatch_no_wildcards): Fix confusion between
2465 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
2466 spotted by Jim Meyering.
2468 2001-09-03 Jim Meyering <meyering@lucent.com>
2470 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
2472 2001-09-03 Paul Eggert <eggert@twinsun.com>
2474 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
2475 like the HAVE_GETCWD_NULL code.
2476 Include pathmax.h if not HAVE_GETCWD.
2477 Do not include xalloc.h.
2478 (INITIAL_BUFFER_SIZE): New symbol.
2479 Do not use xmalloc / xrealloc, since the caller is responsible for
2480 handling errors. Preserve errno around `free' during failure.
2481 Do not overrun buffer when using getwd.
2483 2001-09-03 Paul Eggert <eggert@twinsun.com>
2485 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
2486 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
2488 2001-09-02 Jim Meyering <meyering@lucent.com>
2490 * error.c: Update from GNU libc.
2492 2001-09-01 Jim Meyering <meyering@lucent.com>
2494 * xreadlink.c: New file.
2495 * xreadlink.h: New file.
2496 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
2498 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
2499 doesn't conflict with sparc Solaris 7's definition in
2500 /usr/include/sys/int_types.h.
2502 * exclude.c: Use `""', not `<>' to #include non-system header files.
2503 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
2504 and strncasecmp as r-values. Unixware didn't have declarations.
2506 2001-08-31 Jim Meyering <meyering@lucent.com>
2508 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
2509 Use an initial, malloc'd, buffer of length 128 rather than
2510 a statically allocated one of length 1024.
2512 2001-08-30 Paul Eggert <eggert@twinsun.com>
2514 * xgetcwd.c: Don't include pathmax.h.
2515 Include stdlib.h and unistd.h if available.
2517 (xmalloc, xstrdup, free): Remove decls.
2518 (xgetcwd): Don't assume sizes fit in unsigned.
2519 Check for overflow when computing sizes.
2520 Simplify reallocation code.
2522 2001-08-28 Paul Eggert <eggert@twinsun.com>
2524 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
2526 * strtoimax.c: Renamed from strtoxmax.c, removing the
2529 Also, make the following further changes to make this file's
2530 configuration more similar to that of strtol.c:
2531 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
2532 (strtoumax, uintmax_t, strtoull, strtol): Remove.
2533 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
2534 (strtoimax): Renamed from strtoumax. All uses of unsigned values
2535 changed to signed values.
2537 And make the following changes as well:
2538 Fix copyright notice, as 1999 was missing.
2539 (verify): New macro.
2540 (strtoimax): Check sizes at compile-time, not run-time.
2541 Prefer strtol to strtoll if both work.
2542 (main): Remove; it was not that useful and was a pain to maintain.
2544 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
2546 2001-08-30 Paul Eggert <eggert@twinsun.com>
2548 * savedir.c (savedir): Remove size parameter, as POSIX says that
2549 a directory's st_size can have an arbitrary value, so the old
2550 usage could waste an arbitrary amount of memory. All uses
2552 * savedir.h: Update prototype.
2554 2001-08-30 Paul Eggert <eggert@twinsun.com>
2556 * xstrtol.c (strtoimax): New decl.
2558 2001-08-28 Paul Eggert <eggert@twinsun.com>
2560 * xstrtol.h: Add copyright notice.
2561 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
2562 LONGINT_INVALID_SUFFIX_CHAR.
2564 2001-08-30 Paul Eggert <eggert@twinsun.com>
2566 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2569 2001-08-30 Paul Eggert <eggert@twinsun.com>
2571 * hash.c: Remove '2001' from copyright notice.
2573 2001-08-30 Paul Eggert <eggert@twinsun.com>
2575 * full-write.h: New file.
2576 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
2577 * full-write.c: Correct credits, as cccp.c no longer
2578 exists and anyway it was so heavily changed from the old cccp
2579 code as to be unrecognizable. Include full-write.h.
2580 (full_write) Return size_t, with short writes meaning failure.
2581 All callers changed. This fixes a bug with large buffers
2583 * utime.c: Include full-write.h.
2585 2001-08-30 Paul Eggert <eggert@twinsun.com>
2587 Merge 'exclude' changes from tar 1.13.22.
2588 This fixes one or two unlikely storage allocation overflow bugs,
2589 but doesn't change user-visible behavior otherwise.
2591 2001-08-30 Paul Eggert <eggert@twinsun.com>
2593 * exclude.c (bool): Declare, perhaps by including stdbool.h.
2594 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
2595 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
2596 Include if available.
2597 (<xalloc.h>): Include
2598 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
2599 (verify): New macro. Use it to verify that EXCLUDE macros do not
2600 collide with FNM macros.
2601 (struct patopts): New struct.
2602 (struct exclude): Use it, as exclude patterns now come with options.
2603 (new_exclude): Support above changes.
2604 (new_exclude, add_exclude_file):
2605 Initial size must now be a power of two to simplify overflow checking.
2606 (free_exclude, fnmatch_no_wildcards): New function.
2607 (excluded_filename): No longer requires options arg, as the options
2608 are determined by add_exclude. Now returns bool, not int.
2609 (excluded_filename, add_exclude):
2610 Add support for the fancy new exclusion options.
2611 (add_exclude, add_exclude_file): Now takes int options arg.
2612 Check for arithmetic overflow when computing sizes.
2613 (add_exclude_file): xrealloc might modify errno, so don't
2614 realloc until after errno might be used.
2616 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
2618 (free_exclude): New decl.
2619 (add_exclude, add_exclude_file): Now takes int options arg.
2620 (excluded_filename): No longer requires options arg, as the options
2621 are determined by add_exclude. Now returns bool, not int.
2623 2001-08-30 Paul Eggert <eggert@twinsun.com>
2625 * alloca.c (alloca): Arg is of type size_t, not unsigned.
2627 2001-08-27 Jim Meyering <meyering@lucent.com>
2629 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
2631 * version-etc.c (N_): Remove definition.
2632 Revert most of last change.
2633 Instead, simply don't mark the `Copyright...' string for translation.
2634 Based on advice from Paul Eggert.
2636 * strtoxmax.c: Tweak comment.
2638 2001-08-26 Jim Meyering <meyering@lucent.com>
2640 * version-etc.c (version_etc_copyright_fmt): Replace literal year
2641 of copyright with `%s' so translators don't get an untranslated
2643 (COPYRIGHT_YEAR): Define.
2644 (version_etc): Use fprintf rather than fputs.
2645 Suggestion from Ulrich Drepper.
2647 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
2649 * strtoll.c: New file, from GNU libc.
2650 * xstrtoimax.c: New file.
2652 * xstrtol.h: Add xstrtoimax.
2653 * strtoumax.c: New file. Simply include "strtoumax.c".
2654 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
2656 * strtoumax.c: Factor to work both for unsigned and signed types, ...
2657 * strtoxmax.c: ... then renamed to this.
2659 2001-08-13 Paul Eggert <eggert@twinsun.com>
2661 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
2662 Port to Solaris 8, where 'sed' requires a space after the 'r'
2663 command, and where sh dislikes "$/". Clean up the spacing a bit.
2664 Redirect output to $tmp just once.
2666 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
2668 * addext.c (<errno.h>): Include.
2669 (errno): Declare if not defined.
2670 (addext): Work correctly when pathconf returns -1 and leaves
2671 errno alone because there is no limit. Also, work even if
2672 pathconf returns a value greater than SIZE_MAX.
2674 2001-08-12 Jim Meyering <meyering@lucent.com>
2676 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
2677 Simply `return getcwd (NULL, 0);'.
2678 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
2679 Use 1300 as initial value for length, not PATH_MAX.
2681 * pathmax.h: Clean up cpp syntax.
2683 2001-08-12 Jim Meyering <meyering@lucent.com>
2685 * gettimeofday.c: New file.
2687 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
2689 2001-08-04 Jim Meyering <meyering@lucent.com>
2691 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
2692 to get in sync with glibc.
2694 2001-08-03 Paul Eggert <eggert@twinsun.com>
2696 The following changes are from gettext 0.10.39 as maintained by
2699 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
2700 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
2701 with inverted sense. All uses changed.
2703 * mbswidth.c: Don't include <limits.h>.
2704 Include <stdlib.h> and <string.h> unconditionally.
2705 (iswcntrl, mbsinit, ISCNTRL): New macros.
2706 (mbsnwidth): Use K&R style function declarations.
2707 Don't bother checking for MB_LEN_MAX == 1, since the compiler
2708 can optimize it when MB_CUR_MAX == 1.
2709 The width of control characters is zero, not 1.
2711 2001-07-15 Jim Meyering <meyering@lucent.com>
2713 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
2714 (BUILT_SOURCES): Add unlocked-io.h.
2715 (io_functions): Define.
2716 (unlocked-io.h): New rule.
2717 (DISTCLEANFILES): Add unlocked-io.h.
2718 (all-local): Depend on unlocked-io.h, to ensure it is created.
2720 * unlocked-io.hin: New file
2722 * regex.c: Update from glibc.
2724 2001-07-05 Jim Meyering <meyering@lucent.com>
2726 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
2728 (libfetish_a_SOURCES): Put all .h files here instead.
2729 Remove a thus-exposed (better checks in automake) duplicate and
2730 two unnecessary .h files.
2732 2001-06-11 Jim Meyering <meyering@lucent.com>
2734 * regex.c: Update from GNU libc.
2736 2001-05-27 Jim Meyering <meyering@lucent.com>
2738 * readutmp.h (UT_TYPE): Define.
2740 2001-05-24 Jim Meyering <meyering@lucent.com>
2742 * argmatch.c: Include "quote.h".
2743 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
2744 quote function. Reported by Göran Uddeborg.
2746 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
2748 * dirname.c (dir_name): Compute append_dot using path, not newpath
2749 which is not yet declared.
2751 2001-05-11 Paul Eggert <eggert@twinsun.com>
2753 * Makefile.am (libfetish_a_SOURCES):
2754 Add strftime.c, since we now compile it on all hosts.
2756 * strftime.c (my_strftime):
2757 Define to nstrftime if emacs, but only if my_strftime is not defined.
2758 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
2759 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
2760 Add one more extra argument: a nanoseconds value.
2763 (my_strftime function): Add %N format.
2764 (emacs_strftimeu): Renamed from emacs_strftime,
2765 with extra ut argument.
2767 2001-05-11 Paul Eggert <eggert@twinsun.com>
2769 dirname code cleanup. base_name now behaves more compatibly
2770 with POSIX basename when given file names that have trailing
2771 slashes, and similarly for dir_name. Add new primitives
2772 base_len and dir_len. Put the directory-name-related decls
2775 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
2776 * backupfile.c (base_name): Likewise.
2777 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
2778 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
2779 * makepath.c (strip_trailing_slashes): Likewise.
2780 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
2782 * rename.c (strip_trailing_slashes): Likewise.
2783 * same.c (base_name): Likewise.
2784 * stripslash.c (ISSLASH): Likewise.
2786 * addext.c: Include <dirname.h> after size_t is defined.
2787 * backupfile.c: Likewise.
2789 * addext.c (addext): Use base_len to trim redundant
2790 trailing slashes instead of doing it ourselves.
2791 But do not trim the last slash if it is not redundant.
2793 * backupfile.c (find_backup_file_name,
2794 max_backup_version): Use base_len instead of rolling it ourselves.
2795 Handle the case of "" and (on DOS) "C:" correctly.
2797 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
2798 Include <string.h>, <dirname.h>.
2799 (base_name): Allow file names ending in slashes, other than names
2800 that are all slashes. In this case, return the basename followed
2801 by the slashes. This is more general, and can be used in places
2802 where the original base_name purposely had an assertion failure.
2803 (base_len): New function.
2805 * dirname.c: Include <string.h> instead of <stdlib.h>.
2806 Do not include <assert.h>; no longer needed.
2808 (memrchr): Remove decl.
2809 (dir_name_r): Remove.
2810 (dir_len): Renamed from dirlen. All callers changed.
2811 Rewrite in terms of base_name, for simplicity and consistency.
2812 (dir_name): Never return NULL. All callers changed.
2813 Do not include <stdlib.h> in test program; no longer needed.
2814 return 0; is fine for test program.
2816 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
2818 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
2820 * path-concat.c (path_concat): Use base_len to compute
2821 base length, not strlen; this means we cannot rely on memcpy
2824 * same.c (STREQ): Remove.
2825 (same_name): Handle the case where the basename ends in trailing '/'.
2827 * stripslash.c (strip_trailing_slashes): Return nonzero if
2828 a slash was stripped. Do not strip the last slash after a
2831 2001-04-08 Jim Meyering <meyering@lucent.com>
2833 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
2834 recomputed; that's necessary when the offset spans a DST transition.
2835 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
2837 2001-04-02 Jim Meyering <meyering@lucent.com>
2839 * regex.h, regex.c: Update from GNU libc.
2841 2001-03-19 Paul Eggert <eggert@twinsun.com>
2843 * version-etc.c (version_etc_copyright): Update to 2001.
2845 2001-03-16 Paul Eggert <eggert@twinsun.com>
2847 * tempname.c (uint64_t): Define to uintmax_t if
2848 not defined, and if UINT64_MAX is not defined.
2849 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
2850 Reported by John David Anglin.
2852 2001-03-10 Bruno Haible <haible@clisp.cons.org>
2854 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
2855 alias if codeset is empty.
2856 * config.charset (BeOS): Use wildcard syntax.
2858 2001-03-13 Jim Meyering <meyering@lucent.com>
2860 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
2861 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
2864 2001-03-06 Bruno Haible <haible@clisp.cons.org>
2866 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
2868 * unicodeio.c (print_unicode_char): Simplify accordingly.
2870 2001-03-06 Bruno Haible <haible@clisp.cons.org>
2872 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
2873 support for DOS/DJGPP.
2875 2001-02-28 Paul Eggert <eggert@twinsun.com>
2877 * Makefile.am (libfetish_a_SOURCES):
2878 Add dup-safer.c, fopen-safer.c.
2879 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
2881 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
2883 2001-02-25 Paul Eggert <eggert@twinsun.com>
2885 The mkstemp replacement is taken from glibc 2.2.2, with some
2886 portability fixes for use outside glibc, as follows:
2888 * tempname.c (struct_stat64): New macro.
2889 (direxists, __gen_tempname): Use it.
2890 This avoids a portability problem with Solaris 8.
2892 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
2893 (<stddef.h>, <stdint.h>, <string.h>):
2894 Include only if STDC_HEADERS || _LIBC.
2895 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
2896 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
2897 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
2898 (__set_errno): Define this macro if <errno.h> doesn't.
2899 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
2900 Define these macros if <stdio.h> doesn't.
2901 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
2902 Define these macros if <sys/stat.h>
2903 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
2904 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
2905 __xstat64): Define if not _LIBC.
2906 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
2907 (__gen_tempname): Invoke gettimeofday only if
2908 HAVE_GETTIMEOFDAY || _LIBC;
2909 otherwise, fall back on plain "time".
2910 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
2912 * mkstemp.c (__GT_FILE): Define to zero if not defined.
2914 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
2916 2001-02-17 Jim Meyering <meyering@lucent.com>
2918 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
2919 around included file name.
2921 * strnlen.c (__strnlen): Merge in a change from GNU libc.
2923 * strftime.c: Update from GNU libc (the only changes were to comments).
2925 2001-02-13 Bruno Haible <haible@clisp.cons.org>
2927 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
2929 2001-02-17 Paul Eggert <eggert@twinsun.com>
2931 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
2932 Remove workaround macros for hosts that have mbrtowc but not
2933 mbstate_t, as we now insist on proper declarations for both
2934 before using mbrtowc.
2936 2001-02-17 Jim Meyering <meyering@lucent.com>
2938 * regex.c: Update from libc.
2940 2001-02-16 Paul Eggert <eggert@twinsun.com>
2942 * alloca.c (malloc): Undef before defining, since stdlib.h
2943 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
2944 Reported by Mark Hounschell via Paul Eggert.
2946 2001-01-30 Bruno Haible <haible@clisp.cons.org>
2948 * config.charset: Update for FreeBSD 4.2.
2950 2001-01-26 Jim Meyering <meyering@lucent.com>
2952 * quotearg.c: Include stddef.h.
2953 * quote.c: Include stddef.h.
2954 Reported by Axel Kittenberger.
2956 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
2957 line in double quotes so that it evokes a better diagnostic.
2958 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
2959 Reported by Axel Kittenberger.
2961 2001-01-15 Bruno Haible <haible@clisp.cons.org>
2963 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
2964 to avoid a warning. Add back 'const' to inptr.
2966 2001-01-16 Jim Meyering <meyering@lucent.com>
2968 * basename.c: Include <stdio.h>, needed by assert on SunOS 4.
2971 2001-01-14 Jim Meyering <meyering@lucent.com>
2973 * rename.c: New file. From Volker Borchert.
2974 Include stdlib.h, string.h or strings.h, and xalloc.h.
2975 Use strip_trailing_slashes rather than open-coding it.
2977 2001-01-03 Paul Eggert <eggert@twinsun.com>
2979 * strftime.c: Sync with glibc time/strftime.c 1.81.
2981 2001-01-03 Jim Meyering <meyering@lucent.com>
2983 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
2984 local `inptr' to avoid warning with some system declarations of iconv.
2986 2000-12-29 Paul Eggert <eggert@twinsun.com>
2988 * modechange.c: Do not assume that mode_t uses the
2989 traditional octal encoding. E.g. "chmod 1 FOO" should set
2990 the other-execute bit of FOO even if S_IXOTH != 1.
2992 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
2993 WOTH, XOTH, ALLM): New macros.
2994 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
2995 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
2997 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
2998 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
3000 No need to use uintmax_t; unsigned long is long enough.
3001 Don't bother to get suffix since we don't use it.
3003 2000-12-24 Jim Meyering <meyering@lucent.com>
3005 * hash.c (is_prime): Return explicit boolean values.
3006 (hash_get_first): Return NULL to appease Irix5.6's 89.
3007 Reported by Nelson Beebe.
3009 2000-10-31 Bruno Haible <haible@clisp.cons.org>
3011 * localcharset.c (locale_charset): Add support for Win32.
3013 2000-12-18 Paul Eggert <eggert@twinsun.com>
3015 * physmem.h, physmem.c: New files.
3017 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
3018 (noinst_HEADERS): Add physmem.h.
3020 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
3021 't' for compatibility with Solaris 8 sort.
3023 2000-12-18 Bruno Haible <haible@clisp.cons.org>
3025 * config.charset: Add support for BeOS.
3027 2000-12-16 Jim Meyering <meyering@lucent.com>
3029 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
3030 SHELLS_FILE to a file name that's useful on djgpp systems.
3032 (ADDITIONAL_DEFAULT_SHELLS): Define.
3033 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
3034 Based mostly on a patch from Prashant TR.
3036 2000-12-16 Jim Meyering <meyering@lucent.com>
3038 This bug had a serious impact on chown: `chown N:M FILE' (for integer
3039 N and M) would have treated it like `chown N:N FILE'.
3041 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
3043 2000-10-31 Bruno Haible <haible@clisp.cons.org>
3045 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
3046 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
3047 to the list of canonical encodings. Rename EUC-CN to GB2312.
3049 2000-12-08 Andreas Schwab <schwab@suse.de>
3051 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
3052 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
3054 2000-12-07 Jim Meyering <meyering@lucent.com>
3056 * stripslash.c (ISSLASH): Define.
3057 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
3060 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
3061 (dir_name_r): Declare this function as static.
3062 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
3063 manifest itself on a name containing a mix of slashes and
3065 Make this function work with names starting with a DOS-style
3066 drive letter and colon prefix.
3067 (dir_name): Append `.' if necessary.
3068 Based mostly on patches from Prashant TR and Eli Zaretskii.
3070 * dirname.h (dir_name_r): Remove prototype.
3072 2000-12-05 Jim Meyering <meyering@lucent.com>
3074 * dirname.c (dir_name_r): Add `const' in a few local declarations.
3076 2000-12-04 Jim Meyering <meyering@lucent.com>
3078 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
3079 Also include memory.h, stdlib.h, unistd.h if appropriate.
3080 Reported by Andreas Jaeger (conflicting declaration of malloc).
3082 2000-12-02 Jim Meyering <meyering@lucent.com>
3084 * closeout.h: Make idempotent, to avoid some obscure warnings.
3086 2000-12-01 Paul Eggert <eggert@twinsun.com>
3088 * memrchr.c: Include <config.h> before any system include file.
3090 2000-11-29 Paul Eggert <eggert@twinsun.com>
3092 * dirname.c (dir_name_r): Fix typo: int -> size_t.
3094 2000-11-26 Jim Meyering <meyering@lucent.com>
3096 * memcoll.c: Include sys/types.h. From Werner Almesberger.
3098 2000-11-22 Paul Eggert <eggert@twinsun.com>
3100 * strftime.c (my_strftime): Do not invoke mbrlen with a
3101 size of (size_t) -1; it's not portable.
3103 2000-11-17 Akim Demaille <akim@epita.fr>
3105 * obstack.h: Formatting changes.
3106 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
3107 prevent type checking.
3108 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3109 cast the value to (void *): assigning a `foo *' to a `void *'
3111 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3113 2000-11-17 Jim Meyering <meyering@lucent.com>
3115 * strstr.c: Update from GNU libc.
3117 2000-11-16 Jim Meyering <meyering@lucent.com>
3119 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
3121 2000-11-11 Jim Meyering <meyering@lucent.com>
3123 * error.c: Add a couple #includes, merging from GNU libc version.
3125 2000-11-10 Jim Meyering <meyering@lucent.com>
3127 * obstack.h: Update from GNU libc.
3128 * obstack.c: Likewise.
3130 2000-11-06 Paul Eggert <eggert@twinsun.com>
3132 * getusershell.c (setusershell): Use rewind rather than
3133 fseek/fseeko, to avoid configuration hassles with fseeko.
3134 Don't bother opening SHELLS_FILE if shellstream is NULL;
3137 2000-11-05 Jim Meyering <meyering@lucent.com>
3139 * makepath.h (make_dir): Declare.
3140 * makepath.c (make_dir): Remove `static' attribute.
3143 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
3145 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
3146 last one in a bucket, advance to the next bucket.
3148 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
3150 * fnmatch.c: Do not comment out all the code if we are using
3151 the GNU C library, because in some cases we are replacing buggy
3152 code in the GNU C library itself.
3154 2000-10-30 Paul Eggert <eggert@twinsun.com>
3156 * error.h, getline.h, modechange.h:
3157 Remove "2000" from Copyright line, as the file hasn't been
3158 changed this year other than in the copyright notice.
3160 * xalloc.h: Add "2000" to Copyright line, as this file
3161 was changed this year.
3163 2000-10-30 Paul Eggert <eggert@twinsun.com>
3165 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
3166 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
3167 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
3169 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
3171 * regex.h (__restrict_arr): Move definition out of #ifndef block.
3172 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
3173 doesn't define __restrict_arr.
3175 2000-10-29 Jim Meyering <meyering@lucent.com>
3177 * xstat.in: Fix grammar in comment.
3179 2000-10-28 Jim Meyering <meyering@lucent.com>
3181 * memchr.c: Update from libc.
3182 Adjust for portability:
3183 [HAVE_STDLIB_H]: Include stdlib.h.
3184 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
3185 Undef __memchr, too.
3186 [!weak_alias]: Define __memchr to memchr.
3188 * regex.c: Update from libc.
3189 * regex.h: Likewise.
3190 * getopt1.c: Likewise.
3191 * memcmp.c: Likewise.
3193 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
3194 Avoid using fseek, when possible -- it's broken by design.
3195 Patch by Ulrich Drepper.
3197 2000-10-26 Jim Meyering <meyering@lucent.com>
3199 * strftime.c: Update from libc.
3201 2000-10-25 Jim Meyering <meyering@lucent.com>
3203 * obstack.c: Update from libc.
3205 2000-10-23 Jim Meyering <meyering@lucent.com>
3207 * hard-locale.c (hard_locale): Revert last change -- it was simply
3208 wrong. That set_locale call must not have any side effects.
3211 2000-10-22 Jim Meyering <meyering@lucent.com>
3213 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
3214 [CYCLIC]: Remove now-unused definition.
3216 * save-cwd.c (O_DIRECTORY): Define, if needed.
3217 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
3218 Suggestion from Ulrich Drepper.
3220 2000-10-21 Jim Meyering <meyering@lucent.com>
3222 * dirname.c (dir_name_r): New function, factored out of dir_name.
3223 (dir_name): Use dir_name_r.
3224 * dirname.h (dir_name_r): Declare it.
3226 2000-10-21 Jim Meyering <meyering@lucent.com>
3228 * dirname.c (memrchr): Declare if necessary.
3229 (dir_name): Remove the restriction that there be no
3230 trailing slashes. Now, this code skips past them, effectively
3232 [TEST_DIRNAME] (main): New unit tests.
3234 * memrchr.c: New file from GNU libc.
3235 Undef __memrchr, too.
3236 [!weak_alias]: Define __memrchr to memrchr.
3237 Guard weak_alias use with `#ifdef weak_alias'.
3239 2000-10-17 Jim Meyering <meyering@lucent.com>
3241 * quote.h (PARAMS): Define and use.
3242 Reported by Akim Demaille.
3244 * getopt.c: Update from libc.
3246 2000-10-16 Jim Meyering <meyering@lucent.com>
3248 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
3251 2000-09-25 Jim Meyering <meyering@lucent.com>
3253 * md5.h (rol): Define (from GnuPG).
3255 * sha.c: Give credit (GnuPG) where due.
3256 (M): Use rol rather than open-coding it.
3257 Add a FIXME comment.
3259 2000-09-21 Jim Meyering <meyering@lucent.com>
3261 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
3262 Reported by Michael Stone.
3264 2000-09-20 Jim Meyering <meyering@lucent.com>
3266 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
3267 (noinst_HEADERS): Add sha.h.
3268 Based on code from Scott G. Miller and from GnuPG.
3270 2000-09-15 Jim Meyering <meyering@lucent.com>
3272 * regex.c: Update from libc.
3274 2000-09-10 Jim Meyering <meyering@lucent.com>
3276 * getopt.c (_getopt_internal): Update from glibc.
3278 2000-09-09 Jim Meyering <meyering@lucent.com>
3280 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
3281 think it should be used as a general replacement for isascii.
3282 * fnmatch.c: Likewise.
3283 * mbswidth.c: Likewise
3284 * regex.c: Likewise.
3287 * userspec.c: Include sys/param.h and limits.h.
3289 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
3290 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
3291 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
3292 UID, GID. Check range.
3294 2000-09-06 Jim Meyering <meyering@lucent.com>
3296 * getopt.c (_getopt_internal): Update from glibc.
3298 2000-08-30 Jim Meyering <meyering@lucent.com>
3300 * strftime.c: Merge in changes from GNU libc.
3302 2000-08-26 Jim Meyering <meyering@lucent.com>
3304 * closeout.c: Include "__fpending.h".
3305 (close_stdout_status): Return right away if there's nothing to flush.
3307 * Makefile.am (noinst_HEADERS): Add __fpending.h.
3308 * __fpending.c: New file.
3309 * __fpending.h: New file.
3311 2000-08-07 Paul Eggert <eggert@twinsun.com>
3313 Standardize on "memory exhausted" instead of "Memory exhausted"
3314 or "virtual memory exhausted".
3315 * obstack.c (print_and_abort): Use "memory exhausted", not
3316 "virtual memory exhausted".
3317 * same.c (same_name): Invoke xalloc_die instead of printing
3319 * userspec.c (parse_user_spec): Likewise.
3320 * bumpalloc.h: comment fix
3321 * same.c, userspec.c: Include xalloc.h.
3323 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
3324 not char *const and pointing to a constant array.
3325 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
3326 (xrealloc): Comment fix.
3328 * userspec.c (parse_user_spec):
3329 Don't translate a message until just before returning,
3330 to avoid unnecessary translation.
3332 2000-08-07 Jim Meyering <meyering@lucent.com>
3334 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
3335 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
3336 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
3337 getgroups.c, gethostname.c, getopt.h, group-member.c,
3338 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
3339 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
3340 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
3341 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
3342 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
3343 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
3344 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
3345 yesno.c: Back out Copyright date changes for each file with no change
3346 this year. This eases coordination with other programs using the same
3347 source code modules. From Paul Eggert.
3349 2000-08-03 Greg McGary <greg@mcgary.org>
3351 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
3352 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
3353 (EXTEND_BUFFER): Use them.
3355 2000-08-01 Jim Meyering <meyering@lucent.com>
3357 * dirname.c (ISSLASH): Define.
3358 (BACKSLASH_IS_PATH_SEPARATOR): Define.
3359 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
3360 both `\' and `/' may be use as path separators.
3361 Based on a patch from Prashant TR.
3363 2000-07-31 Paul Eggert <eggert@twinsun.com>
3365 * quotearg.c (quotearg_n_options): Don't make the initial
3366 slot vector a constant, since it might get modified.
3368 2000-07-31 Jim Meyering <meyering@lucent.com>
3370 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
3371 * obstack.c (print_and_abort): Likewise.
3373 2000-07-30 Paul Eggert <eggert@twinsun.com>
3375 * quotearg.c (quotearg_n_options): Preallocate a slot 0
3376 buffer, so that the caller can always quote one small
3377 component of a "memory exhausted" message in slot 0.
3378 From a suggestion by Jim Meyering.
3380 2000-07-30 Jim Meyering <meyering@lucent.com>
3382 * makepath.c (make_path): Quote the other instance, too.
3384 * quotearg.c (N_STATIC_SLOTVECS): Define.
3385 (STATIC_BUF_SIZE): Define.
3386 (quotearg_n_options): Use only statically allocated storage when
3387 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
3388 than STATIC_BUF_SIZE.
3390 2000-07-29 Jim Meyering <meyering@lucent.com>
3392 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
3393 * dirname.c (dir_name): Likewise.
3395 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
3397 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
3398 (dir_name): Assert that there are no trailing slashes.
3400 2000-07-18 Bruno Haible <haible@clisp.cons.org>
3402 * mbswidth.h (mbswidth): Add a flags argument.
3403 (mbswidth): New declaration.
3404 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
3405 * mbswidth.c (mbswidth): Add a flags argument.
3406 (mbsnwidth): New function.
3408 2000-07-24 Jim Meyering <meyering@lucent.com>
3410 * mbswidth.c: Remove useless #else. From Bruno Haible.
3412 2000-07-23 Paul Eggert <eggert@twinsun.com>
3414 * mbswidth.c (_XOPEN_SOURCE):
3415 Don't define; this causes problems on Solaris 7.
3416 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
3418 2000-07-23 Paul Eggert <eggert@twinsun.com>
3421 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
3422 so that mbstate_t is always defined.
3424 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
3425 be 1 in at least one GCC installation, and this configuration
3426 error is likely to be common. Ignoring MB_LEN_MAX hurts
3427 performance on hosts that have mbrtowc but have only unibyte
3428 locales, but I assume these hosts are rare.
3430 2000-07-23 Paul Eggert <eggert@twinsun.com>
3432 * quotearg.c: Streamline by invoking multibyte code only if needed.
3433 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
3434 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
3435 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
3436 invoke multibyte primitives.
3438 2000-07-23 Jim Meyering <meyering@lucent.com>
3440 * basename.c (base_name): Add an assertion.
3442 2000-07-15 Bruno Haible <clisp.cons.org>
3444 * quotearg.c: When the system forces us to redefine mbstate_t,
3445 shadow its mbsinit function.
3447 2000-07-16 Bruno Haible <haible@clisp.cons.org>
3449 * mbswidth.h: New file.
3450 * mbswidth.c: New file.
3451 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
3452 (noinst_HEADERS): Add mbswidth.h.
3454 2000-07-17 Bruno Haible <haible@clisp.cons.org>
3456 * config.charset: Add support for FreeBSD. Improve support for HP-UX
3459 2000-07-15 Jim Meyering <meyering@lucent.com>
3461 * makepath.c: Include quote.h.
3462 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
3463 corresponding argument in a `quote (...)' call.
3464 Give better diagnostics.
3466 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
3467 (noinst_HEADERS): Add quote.h.
3469 * quote.c (quote, quote_n): New file. Two functions taken verbatim
3470 from tar's src/misc.c.
3471 * quote.h: New file. Prototypes for same.
3473 2000-07-10 Paul Eggert <eggert@twinsun.com>
3475 From a suggestion by Bruno Haible.
3476 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
3477 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
3478 to decide whether to define the BeOS workaround macro;
3479 this adjusts to the change to AC_MBSTATE_T.
3481 2000-07-13 Paul Eggert <eggert@twinsun.com>
3483 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
3485 * quotearg.c (quoting_style_args, quoting_style_vals,
3486 quotearg_buffer_restyled): Add support for
3487 clocale_quoting_style. Undo previous change to
3488 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
3489 and "{RIGHT QUOTATION MARK}" msgids.
3491 2000-07-05 Paul Eggert <eggert@twinsun.com>
3493 The old behavior of quoting `like this' doesn't look good with
3494 newer, ISO-style fonts. See:
3495 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
3497 Instead, quote "like this" by default. Let the translator
3498 tailor the locale-specific quoting behavior by providing
3499 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
3501 * quotearg.c (N_): New macro.
3502 (gettext_default): New function.
3503 (quotearg_buffer_restyled): Use
3504 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
3505 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
3507 2000-07-09 Jim Meyering <meyering@lucent.com>
3509 * Most files: Update copyright dates to include 2000.
3511 2000-07-08 Jim Meyering <meyering@lucent.com>
3513 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
3515 (xgethostname): Remove now-unnecessary #ifdef.
3516 Move declaration of `err' into loop where it's used.
3518 2000-07-05 Bruno Haible <haible@clisp.cons.org>
3520 * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
3521 by allocating a larger buffer. Test the gethostname return value for
3522 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
3523 returns an error and ENAMETOOLONG isn't defined.
3525 2000-07-05 Paul Eggert <eggert@twinsun.com>
3526 and Bruno Haible <haible@clisp.cons.org>
3528 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
3530 2000-07-05 Bruno Haible <haible@clisp.cons.org>
3532 * quotearg.c (struct quoting_options): Simplify quote_these_too
3535 2000-07-03 Jim Meyering <meyering@lucent.com>
3537 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
3538 Reported by Bruno Haible.
3540 2000-07-04 Jim Meyering <meyering@lucent.com>
3542 * quotearg.c: Make inclusion of <wchar.h> independent of whether
3543 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
3546 2000-07-03 Paul Eggert <eggert@twinsun.com>
3547 and Bruno Haible <haible@clisp.cons.org>
3549 * quotearg.c (mbrtowc):
3550 Assign to *pwc, and return 1 only if result is nonzero.
3551 (iswprint): Use ISPRINT when substituting our own mbrtowc.
3553 2000-07-03 Jim Meyering <meyering@lucent.com>
3555 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
3556 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
3559 2000-07-02 Jim Meyering <meyering@lucent.com>
3561 * quotearg.c (mbstate_t): Don't define here.
3563 2000-07-02 Jim Meyering <meyering@lucent.com>
3565 * nanosleep.c (SIGCONT): Define if not already defined.
3567 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3569 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
3570 per change in ../m4/ls-mntd-fs.m4.
3571 (read_filesystem_list): Ignore symbolic links.
3573 2000-06-29 Jim Meyering <meyering@lucent.com>
3575 * same.c: Include <string.h> or <strings.h>, as appropriate,
3576 for declaration of strcmp.
3578 * long-options.c: Include <stdlib.h>, for declaration of exit.
3580 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
3581 Avoid warning by casting result to `char *' to remove `const'.
3583 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3585 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
3587 2000-06-26 Paul Eggert <eggert@twinsun.com>
3589 savedir now sets errno on failure and invokes xmalloc to get memory.
3590 Fix a couple of other minor bugs while we're at it.
3592 * savedir.c (<unistd.h>): Do not include; there's no need.
3593 (NAMLEN): Remove macro.
3594 (malloc, realloc): Remove decls.
3596 ("xalloc.h"): Include.
3597 (NAME_SIZE_DEFAULT): New macro.
3598 (savedir): Use xmalloc / xrealloc to allocate memory.
3599 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
3600 Skip "" directory entries.
3601 Use strlen to calculate directory entry length, since the old method
3602 is rarely used these days and isn't worth supporting.
3603 Don't use a pointer after freeing it.
3604 Check for integer overflow when calculating allocation size.
3605 Use memcpy to copy entries, instead of stpcpy.
3606 Set errno properly when returning NULL.
3607 Check for readdir error.
3609 2000-06-26 Jim Meyering <meyering@lucent.com>
3611 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
3613 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3615 * getusershell.c (xmalloc, xrealloc): Remove functions.
3617 Don't include <stdlib.h>. Don't declare malloc, realloc.
3619 2000-06-23 Bruno Haible <haible@clisp.cons.org>
3621 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
3623 2000-06-24 Jim Meyering <meyering@lucent.com>
3625 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
3627 2000-06-21 Jim Meyering <meyering@lucent.com>
3629 * getpass.c: New file, from Bruno Haible. Required for BeOS.
3631 2000-06-19 Paul Eggert <eggert@twinsun.com>
3633 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
3634 (mbrtowc, mbstate_t): Define substitutes if
3635 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
3636 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
3637 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
3639 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3641 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
3642 than 1024, return a memory chunk of least possible size, instead
3643 of size PATH_MAX + 2. In the loop, increment the size proportionally.
3644 Use free/xmalloc instead of xrealloc to avoid copying for very long
3647 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3649 * canon-host.c (canon_host): Use malloc and memcpy to copy an
3650 address, not strdup. Include <stdlib.h> and don't declare free().
3652 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3654 * path-concat.c (path_concat): Don't access dir[-1] if dir is
3657 2000-06-21 Jim Meyering <meyering@lucent.com>
3659 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
3660 (noinst_HEADERS): Add getstr.h.
3662 * getline.c (getstr): Move into a separate file.
3663 * getstr.c (getstr): New file, extracted from getline.c, with
3664 the following changes: new parameter, delim2; both delim[12]
3665 parameters have type `int', not `char'. The latter would lose
3666 with 8-bit delimiters.
3667 * getstr.h: New file.
3669 2000-06-19 Jim Meyering <meyering@lucent.com>
3671 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
3673 2000-06-18 Jim Meyering <meyering@lucent.com>
3675 * mkdir.c: Remove file, due mainly to copyright incompatibility.
3676 Besides, these days every porting target provides a mkdir function.
3678 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
3679 (this snippet comes from src/system.h).
3681 2000-06-15 Paul Eggert <eggert@twinsun.com>
3683 * human.c (adjust_value): New function.
3684 (human_readable_inexact): Apply rounding style even when
3685 printing approximate values.
3687 2000-06-14 Paul Eggert <eggert@twinsun.com>
3689 * human.c (human_readable_inexact): Allow an input block
3690 size that is not a multiple of the output block size, and vice versa.
3691 Reported by Piergiorgio Sartor.
3693 2000-06-14 Paul Eggert <eggert@twinsun.com>
3695 * getdate.y (get_date): Apply relative times after time
3696 zone indicator, not before. Reported by Todd A. Jacobs.
3698 2000-06-13 Jim Meyering <meyering@lucent.com>
3700 * Makefile.am (all-local): Depend on lstat.c and stat.c.
3702 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
3704 2000-06-12 Paul Eggert <eggert@twinsun.com>
3706 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
3708 2000-06-04 Paul Eggert <eggert@twinsun.com>
3710 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
3712 2000-06-04 Jim Meyering <meyering@lucent.com>
3714 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
3715 SunOS 4.1.4 for which gid_t is an unsigned type.
3717 2000-06-03 Jim Meyering <meyering@lucent.com>
3719 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
3721 2000-05-26 Bruno Haible <haible@clisp.cons.org>
3723 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
3724 newer, don't install charset.alias.
3725 * config.charset: Change the Linux/glibc rules so they become empty
3726 on glibc-2.1 or newer.
3728 2000-06-02 Jim Meyering <meyering@lucent.com>
3730 * mountlist.c: Back out last change. Instead, do this...
3731 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
3732 member using the same `ignore'-testing code.
3733 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
3737 2000-05-29 Jim Meyering <meyering@lucent.com>
3739 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
3740 with the `ignore' attribute. Based on a patch from Mark D. Roth.
3742 2000-05-22 Jim Meyering <meyering@lucent.com>
3744 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
3746 2000-05-18 Jim Meyering <meyering@lucent.com>
3748 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
3749 back, too, since it may have been modified by allocate_entry.
3750 (hash_delete): Rewrite to use neither the assignment operator
3751 nor the comma operator in an if-expression.
3753 2000-05-15 Paul Eggert <eggert@twinsun.com>
3756 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
3757 Remove; no longer needed.
3758 "quotearg.h": Add include.
3759 (file_name): Do not bother to explicitly initialize to NULL; it's less
3760 efficient on some hosts.
3761 (close_stdout_status): Remove test as to whether stdout was already
3762 closed; it breaks for the case "echo x | sort >&-".
3763 Quote file name colons.
3764 Do not assume that _("write error") lacks format strings.
3766 2000-05-15 Jim Meyering <meyering@lucent.com>
3768 * version-etc.c (version_etc_copyright): Update the copyright string
3769 used in all --version output.
3771 2000-05-14 Jim Meyering <meyering@lucent.com>
3773 * closeout.c (close_stdout_set_file_name): New function.
3774 (close_stdout_status): Use new file-scoped global.
3775 Return right away if fstat says the stdout file descriptor is invalid.
3776 * closeout.h (close_stdout_set_file_name): Declare.
3778 2000-05-10 Jim Meyering <meyering@lucent.com>
3780 * closeout.c [default_exit_status]: New file-scoped variable.
3781 (close_stdout_set_status): New function.
3782 * closeout.h (close_stdout_set_status): Declare.
3784 2000-05-08 Jim Meyering <meyering@lucent.com>
3786 * long-options.c: Don't include closeout.h.
3787 (parse_long_options): Don't call close_stdout for --version.
3789 2000-05-06 Jim Meyering <meyering@lucent.com>
3791 * strnlen.c: Undefine __strnlen and strnlen.
3792 [!weak_alias]: Define __strnlen to strnlen.
3794 * atexit.c: New file, from libiberty.
3796 2000-05-06 Jim Meyering <meyering@lucent.com>
3798 * closeout.c (close_stdout_status): Also check for errors on the
3801 2000-05-05 Bruno Haible <haible@clisp.cons.org>
3803 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
3804 instead of xmalloc, xrealloc, path_concat.
3805 (locale_charset): Treat empty environment variables as absent.
3806 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
3808 2000-05-04 Jim Meyering <meyering@lucent.com>
3810 * getopt.c: Update from glibc.
3811 * obstack.c: Likewise.
3812 * obstack.h: Likewise.
3813 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
3815 * regex.h: Likewise.
3816 * strndup.c: Likewise.
3817 * strnlen.c: New file, from glibc.
3819 2000-05-01 Jim Meyering <meyering@lucent.com>
3821 * full-write.c (full_write): Remove `FIXME' part of comment.
3823 2000-04-29 Jim Meyering <meyering@lucent.com>
3825 * path-concat.c: Declare strdup only if it's not defined.
3826 * canon-host.c: Likewise.
3828 2000-04-28 Jim Meyering <meyering@lucent.com>
3830 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
3831 redefinition warning on some systems (HPUX). Otherwise, regex.h is
3832 included first, then limits.h is included by locale.h by libintl.h.
3833 From John David Anglin.
3835 2000-04-25 Jim Meyering <meyering@lucent.com>
3837 * makepath.c (S_IRWXUGO): Define.
3838 (make_path): Always perform explicit chmod if MODE specifies any
3839 of the `special' permission bits. Prompted by a bug report against
3840 install from Mate Wierdl and Joost van Baal.
3842 2000-04-18 Jim Meyering <meyering@lucent.com>
3846 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
3847 getpagesize. For BeOS. Based on a patch from Bruno Haible.
3849 2000-04-17 Jim Meyering <meyering@lucent.com>
3851 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
3852 the definition of it to rpl_strftime also defined-away the system's
3855 2000-04-15 Jim Meyering <meyering@lucent.com>
3857 Use `C' to denote so-called `contiguous' files, the same way
3859 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
3860 (ftypelet): Use S_ISCTG.
3861 From Michael Deutschmann.
3863 2000-04-14 Jim Meyering <meyering@lucent.com>
3865 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
3867 2000-04-08 Jim Meyering <meyering@lucent.com>
3869 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
3870 names don't conflict. Reported by Eli Zaretskii.
3872 2000-03-28 Bruno Haible <haible@clisp.cons.org>
3874 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
3875 bug. Deal with the different error behavior of Irix iconv.
3877 2000-04-07 Jim Meyering <meyering@lucent.com>
3879 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
3880 to work around system header problems on AIX 3.2.5. From Bruno Haible.
3882 2000-04-05 Jim Meyering <meyering@lucent.com>
3884 Portability tweaks required for ultrix4.3.
3885 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
3886 * readutmp.c: Include sys/types.h before sys/stat.h.
3887 * canon-host.c: Declare strdup.
3888 * path-concat.c: Likewise.
3889 From John David Anglin.
3891 2000-04-04 Jim Meyering <meyering@lucent.com>
3893 Be more DOS 8.3-friendly.
3894 * ref-add.sin: Renamed from ref-add.sed.in.
3895 * ref-del.sin: Renamed from ref-del.sed.in.
3896 * Makefile.am: Reflect renaming.
3897 Reported by Eli Zaretskii.
3899 Use a temporary file name that won't clash with `charset.alias'
3900 in the DOS 8.3 name space.
3901 * Makefile.am (charset_tmp): Define.
3902 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
3903 (uninstall-local): Likewise.
3904 Reported by Eli Zaretskii.
3906 2000-03-29 Paul Eggert <eggert@twinsun.com>
3908 * time/strftime.c (my_strftime): Make sure we call the system
3909 strftime, not ourselves, when invoking the underlying strftime.
3911 2000-03-24 Jim Meyering <meyering@lucent.com>
3913 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
3914 (charset_alias): Define.
3915 (install-exec-local): Factor out common code.
3916 (uninstall-local): Split lines longer than 80.
3917 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
3919 (.sed.in.sed): New rule. Don't redirect directly to $@.
3920 (CLEANFILES): Add ref-add.sed and ref-del.sed.
3922 2000-03-19 Bruno Haible <haible@clisp.cons.org>
3924 * config.charset: Output a line containing "Packages using this file".
3925 * ref-add.sed.in, ref-del.sed.in: New files.
3926 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
3927 ref-del.sed): New rules.
3929 2000-03-17 Jim Meyering <meyering@lucent.com>
3931 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
3932 Otherwise, include <strings.h>
3934 2000-03-17 Bruno Haible <haible@clisp.cons.org>
3936 * unicodeio.c (utf8_wctomb): New function.
3937 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
3938 format instead of in UCS-4 with platform dependent endianness.
3940 2000-03-07 Paul Eggert <eggert@twinsun.com>
3942 * savedir.c (savedir): Work even if directory size is
3943 negative; this can happen with some screwy NFS configurations.
3945 2000-03-06 Jim Meyering <meyering@lucent.com>
3947 * localcharset.c (get_charset_aliases): Don't try to free file_name
3948 if it's NULL (because we ran out of memory). From Bruno Haible.
3950 2000-03-05 Jim Meyering <meyering@lucent.com>
3952 * localcharset.c ("path-concat.h"): Include.
3953 (get_charset_aliases): Use path_concat instead of ANSI string
3956 * unicodeio.h (PARAMS): Define.
3957 Use it to guard prototype.
3959 2000-03-04 Jim Meyering <meyering@lucent.com>
3961 * Makefile.am (install-exec-local): Create $(libdir) before installing
3963 (uninstall-local): Uncomment this rule so `make distcheck' works
3966 * unicodeio.c (<errno.h>): Include it.
3967 (errno): Declare if not defined.
3969 * localcharset.c: Add Bruno's comment justifying use of volatile.
3971 * config.charset: New version, incorporating remarks from a linux
3972 i18n mailing list. From Bruno Haible.
3974 2000-03-02 Jim Meyering <meyering@lucent.com>
3976 * Makefile.am (EXTRA_DIST): Add config.charset.
3978 2000-03-01 Jim Meyering <meyering@lucent.com>
3980 * localcharset.c: Guard some #includes with `#if HAVE_...'.
3981 * unicodeio.c: Likewise.
3983 2000-02-02 Bruno Haible <haible@clisp.cons.org>
3985 * config.charset: New file.
3986 * localcharset.c: New file.
3987 * unicodeio.h, unicodeio.c: New files.
3988 * Makefile.am (DEFS): Add -DLIBDIR=...
3989 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
3990 (noinst_HEADERS): Add unicodeio.h.
3991 (all-local, install-exec-local, charset.alias): New targets.
3993 2000-02-28 Paul Eggert <eggert@twinsun.com>
3995 * quotearg.c (ALERT_CHAR): New macro.
3996 (quotearg_buffer_restyled): Use it.
3998 2000-02-27 Jim Meyering <meyering@lucent.com>
4000 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
4001 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
4003 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
4004 not `#if STDC_HEADERS'.
4005 Declare malloc if needed.
4007 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
4008 now that autoconf always defines the HAVE_DECL_ symbols.
4009 * human.c: Likewise.
4011 * strtoumax.c: Likewise.
4013 * backupfile.c: Arrange for cpp to fail if the configure-time
4014 declaration check was not run.
4016 * human.c: Likewise.
4018 * strtoumax.c: Likewise.
4020 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
4021 then first look up the entire `.'-containing string as a login name.
4023 2000-02-18 Paul Eggert <eggert@twinsun.com>
4025 * getdate.y: Handle two-digit years with leading zeros correctly.
4026 (textint): New typedef.
4027 (parser_control): Member year changed from int to textint.
4029 (YYSTYPE): Removed; replaced by %union with int and textint members.
4030 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
4031 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
4032 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
4033 (tSNUMBER, tUNUMBER): Now of type <textintval>.
4034 (date, number, to_year): Use width of number in digits, not its value,
4035 to determine whether it's a 2-digit year, or a 2-digit time.
4036 (yylex): Store number of digits of numeric tokens.
4037 Reported by John Kendall.
4039 (parser_control): Changed from struct parser_control to typedef (for
4040 consistency). All uses changed.
4042 (tID): Removed; not used.
4043 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
4045 2000-02-14 Paul Eggert <eggert@twinsun.com>
4047 * getpagesize.h (getpagesize): Port to VMS for Alpha;
4048 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
4050 2000-02-12 Jim Meyering <meyering@lucent.com>
4052 * userspec.c (ISDIGIT): Define it.
4053 (isdigit): Remove definition.
4054 (is_number): Use ISDIGIT, not isdigit.
4055 <libintl.h>: Include.
4057 (parse_user_spec): Mark translatable strings.
4059 2000-02-10 Jim Meyering <meyering@lucent.com>
4061 With these changes, nanosleep.[ch] are finally enough like the other
4062 lib/* replacement files to compile on a few more losing systems.
4064 * nanosleep.h: Don't include config.h.
4065 Remove prototype from declaration of nanosleep.
4066 (PARAMS): Remove now-unneeded definition.
4067 * nanosleep.c: #undef nanosleep.
4068 (rpl_nanosleep): Rename from nanosleep.
4070 2000-02-03 Jim Meyering <meyering@lucent.com>
4072 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
4073 rather than with `#if HAVE_UTMPNAME'.
4075 2000-02-01 Jim Meyering <meyering@lucent.com>
4077 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
4079 2000-01-31 Jim Meyering <meyering@lucent.com>
4081 * nanosleep.h (nanosleep): Guard declaration with
4082 `#if ! HAVE_DECL_NANOSLEEP'.
4083 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
4084 the declaration in that vendor's sys/timers.h.
4085 Reported by Christian Krackowizer.
4087 * quotearg.c (ISASCII): Add #undef and move definition to follow
4088 inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
4089 (ISPRINT): Likewise.
4090 Reported by Tom Tromey.
4092 2000-01-30 Jim Meyering <meyering@lucent.com>
4094 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
4095 uses of ->ut_name. The latter doesn't work with new Linux header files
4096 where only utmpx.ut_user is declared.
4098 * readutmp.h (UT_USER): Define.
4100 2000-01-23 Jim Meyering <meyering@lucent.com>
4102 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
4105 2000-01-22 Jim Meyering <meyering@lucent.com>
4107 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
4108 [! HAVE_DECL_STRTOULL]: Declare strtoull.
4109 Required for some AIX systems. Reported by Christian Krackowizer.
4110 [TESTING] (main): New function.
4112 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
4113 * dirname.c (dir_name): Support for DOS-style file names with drive
4116 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
4118 * strverscmp.c (ISDIGIT): Define.
4119 (strverscmp): Use ISDIGIT, not isdigit.
4121 2000-01-17 Paul Eggert <eggert@twinsun.com>
4123 * nanosleep.c (nanosleep):
4124 Don't use SA_INTERRUPT to decide whether to call sigaction, as
4125 POSIX.1 doesn't require SA_INTERRUPT and some systems
4126 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
4127 it's been part of POSIX.1 since day 1 (in 1988).
4129 2000-01-17 Jim Meyering <meyering@lucent.com>
4131 * interlock: Remove unused file. Reported by François Pinard.
4133 2000-01-16 Paul Eggert <eggert@twinsun.com>
4135 * quotearg.c (quotearg_buffer_restyled): Do not quote
4136 alert, backslash, formfeed, and vertical tab unnecessarily in
4137 shell quoting style.
4140 version-control: never