1 2003-09-16 Paul Eggert <eggert@twinsun.com>
3 * linebuffer.c (readlinebuffer): Return NULL immediately upon
4 input error, instead of returning NULL the next time we are called
5 (and therefore losing track of errno).
7 2003-09-15 Paul Eggert <eggert@twinsun.com>
9 * getndelim2.c (getndelim2): Don't trash errno when a read
10 fails, so that the caller gets the proper errno.
12 * readutmp.c (read_utmp): Likewise.
13 Check for fstat error. Close stream and free storage
16 2003-09-14 Bruno Haible <bruno@clisp.org>
18 * fwriteerror.h: New file.
19 * fwriteerror.c: New file.
21 2003-09-14 Jim Meyering <jim@meyering.net>
23 * getloadavg.c: Correct cpp indentation.
25 * vasnprintf.c: Likewise.
27 2003-09-12 Paul Eggert <eggert@twinsun.com>
29 * argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
30 * obstack.c [!defined _LIBC]: Likewise.
31 * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
32 * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
33 * exitfail.c: Don't include stdlib.h; no longer needed.
35 More changes to assume C89 or better.
37 * error.c (error_tail): Assume vprintf.
39 * argmatch.c (getenv): Remove decl.
40 * progreloc.c (get_full_program_name): Define via prototype.
41 * setenv.c (clearenv): Likewise.
42 * stpncpy.c: Do not include <string.h> or <sys/types.h>; not
44 * strdup.c: Include <stdlib.h>, <string.h> unconditionally.
45 (malloc, memcpy): Remove decls.
46 * strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
47 (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
48 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
49 (memcpy): Remove macro.
50 (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
51 (__P): Remove. All uses removed.
52 (PTR): Remove. All uses changed to void *.
53 (CHAR_BIT, NULL): Remove.
54 (spaces, zeros, memset_space, memset_zero)
55 [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
57 (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
58 (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
59 Define with prototype.
60 Remove now-unnecessary prototype decl.
61 (extra_args_spec): Assume ANSI C. All uses changed.
62 (extra_args_spec_iso): Remove.
63 (my_strftime, emacs_strftimeu): Define via prototype.
64 * strtod.c: Include <float.h>, <stdlib.h>, <string.h>
66 (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
67 * strtoimax.c: Include <stdlib.h> unconditionally.
68 (strtoul, strtol): Remove decls.
69 * strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
71 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
72 (LOCALE_PARAM_DECL): Remove. All uses changed to LOCALE_PARAM_PROTO.
73 (LOCALE_PARAM_PROTO): New macro.
74 (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
75 (INTERNAL (strtol), strtol): Define with a prototype.
76 (PARAMS): Remove. All uses removed.
77 * tempname.c: Include <string.h> unconditionally.
78 * userspec.c: Include <stdlib.h>, <string.h> unconditionally.
79 * xgethostname.c (main): Define with a prototype.
80 * xmalloc.c: Include "xalloc.h" first, to check interface.
81 Include <stdlib.h> unconditionally.
82 (calloc, malloc, realloc, free): Remove decls.
83 * xstrtod.c: Include "xstrtod.h" first, to check interface.
84 Include <stdlib.h> unconditionally. Sort include file names.
86 (xstrtod): Define with a prototype.
87 * xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
88 (strtol, strtoul): Remove decls.
90 2003-09-11 Paul Eggert <eggert@twinsun.com>
92 * strndup.c: Don't include <stdio.h>, <sys/types.h>.
93 Include <stdlib.h>, <string.h> unconditionally.
94 Remove now-unnecessary cast to char *.
95 * strnlen.c: Include <string.h> unconditionally.
96 * yesno.c (yesno): Define with a prototype.
98 2003-09-10 Bruno Haible <bruno@clisp.org>
100 * strcspn.c: Include <string.h> unconditionally.
101 * strpbrk.c: Include <string.h> unconditionally.
102 * strstr.c: Include <string.h> unconditionally.
103 * unicodeio.c: Include <string.h> unconditionally.
104 * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
105 * unsetenv.c: Likewise.
106 * xreadlink.c: Include <stdlib.h> unconditionally.
107 * yesno.c: Include <stdlib.h> unconditionally.
108 (rpmatch): Add prototype.
110 2003-09-10 Jim Meyering <jim@meyering.net>
112 * error.c: Correct indentation of cpp directives.
114 2003-09-09 Paul Eggert <eggert@twinsun.com>
118 * acosl.c (main): Use a prototype.
119 * asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
122 * getloadavg.c (getloadavg, main): Define via prototypes.
124 * getopt.h (struct option.name): Assume C89, and use 'const'.
125 (getopt, etopt_long, getopt_long_only, _getopt_internal)
126 [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
128 * getopt.c (const): Remove macro.
129 Include <string.h> unconditionally.
130 (my_index): Remove; all uses changed to strchr.
131 (strlen): Remove decl.
132 (exchange): Remove forward decl; no longer needed.
133 (exchange, _getopt_initialize, _getopt_internal, getopt, main):
134 Define with prototype.
135 * getopt1.c (const): Remove macro.
136 (getopt_long, getopt_long_only, main): Define with prototype.
138 * getugroups.c: Include <string.h> unconditionally.
140 * getusershell.c: Include <stdlib.h> unconditionally.
141 (getusershell, setusershell, endusershell, readname, main):
142 Define with prototypes.
144 * group-member.c: Include group-member.h first.
145 Include <stdlib.h> unconditionally.
147 * hard-locale.c: Include hard-locale.h first.
148 Include <stdlib.h>, <string.h> unconditionally.
150 * hash.c (free, malloc): Remove decls.
151 Include <stdlib.h> unconditionally.
153 * human.c: Include <stdlib.h>, <string.h> unconditionally.
154 (getenv): Do not declare.
156 * idcache.c: Include <string.h> unconditionally.
158 * long-options.c: Include long-options.h first, to test interface.
159 Include <stdlib.h> unconditionally.
161 * makepath.c: Include makepath.h first, to test interface.
162 Include <stdlib.h> and <string.h> unconditionally.
164 * linebuffer.c: Include <stdlib.h>.
167 * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h.
168 rpl_malloc returns void *, not char *.
169 * realloc.c (rpl_realloc): Likewise. Also, define with a prototype.
171 * md5.h: Include <limits.h> unconditionally.
172 (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
173 (__P): Remove; all uses removed.
174 * md5.c: Include "md5.h" first.
175 (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
176 md5_buffer, md5_process_bytes, md5_process_block):
177 Define with prototypes.
178 * sha.h (__P): Remove all uses. (It wasn't defined??)
179 * sha.c: Include "sha.h" first.
180 Include <stdlib.h>, <string.h> unconditionally.
182 * memchr.c (__ptr_t): Remove; all uses changed to void *.
183 * memcmp.c (__ptr_t): Likewise.
184 * memrchr.c (__ptr_t): Likewise.
185 * memchr.c, memcmp.c, memcoll.c, memrchr.c:
186 Include <string.h> unconditionally.
187 * memchr.c, memrchr.c: Include <limits.h> unconditionally.
188 * memchr.c: Include <stdlib.h> unconditionally.
189 * memchr.c (LONG_MAX): Remove.
190 * memrchr.c (LONG_MAX): Likewise.
191 * memchr.c (__memchr): Define via a prototype.
192 * memrchr.c (__memrchr): Likewise.
193 * memcmp.c (__P): Remove, and remove all uses.
194 (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
195 Remove forward decls; no longer needed.
196 * memcpy.c, memmove.c, memset.c: Include <stddef.h>.
197 Use types required by C89 in prototype.
199 * mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
200 * savedir.c: Likewise.
201 * mkdir.c (free): Remove decl.
202 * rmdir.c (rmdir): Define with a prototype.
203 * savedir.c: Include savedir.h first, to test interface.
205 * mktime.c (STDC_HEADERS): Remove.
206 Include <stdlib.h>, <string.h> unconditionally.
208 * modechange.c: Include <stdlib.h> unconditionally.
209 (malloc): Remove decl.
211 * mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
214 * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
215 Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
216 (This type really should be intptr_t, but that's a C99ism.)
217 (_obstack_memcpy): Remove: all uses changed to memcpy.
218 Include <string.h> unconditionally.
219 (struct obstack): Assume __STDC__ for types of members
220 chunkfun, freefun, extra_arg.
221 (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
222 _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
223 obstack_begin, obstack_specify_allocation,
224 obstack_specify_allocation_with_arg, obstack_chunkfun,
225 obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
226 Remove unprototyped decls and the macros that use them.
227 * obstack.c (POINTER): Remove. All uses changed to void *.
228 (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
229 _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
230 (defined __STDC__ && __STDC__)]:
231 Remove nonprototyped code.
232 Include <stdlib.h> unconditionally.
233 (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
234 _obstack_allocated_p, _obstack_free, obstack_free,
235 _obstack_memory_used, print_and_abort):
236 Define using prototypes.
237 (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
238 obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
239 obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
240 obstack_next_free, obstack_object_size, obstack_room) [0]:
241 Remove unused, unprototyped code.
243 * path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
245 * physmem.c (physmem_total, physmem_available, main): Define
248 * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
249 (main): Define with a prototype.
251 * posixver.c (getenv): Remove decl.
253 * putenv.c (malloc): Returns void *, not char *.
254 Include <string.h> unconditionally.
255 (strchr, memcpy, NULL): Do not define.
257 * readtokens.c: Include readtokens.h first, to test interface.
258 Include <stdlib.h>, <string.h> unconditionally.
259 (init_tokenbuffer): Define with a prototype.
261 * regex.c (PARAMS): Remove. All uses removed.
262 All uses of _RE_ARGS removed, too.
263 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
265 (bzero): Assume memset exists.
266 (memcmp, memcpy, NULL): Remove.
267 (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
268 char, or assignments to local vars of type signed char.
269 (init_syntax_once, PREFIX(extract_number_and_incr),
270 PREFIX(print_partial_compiled_pattern),
271 PREFIX(print_compiled_pattern), PREFIX(print_double_string),
272 convert_mbs_to_wcs, print_fastmap, re_set_syntax,
273 PREFIX(regex_grow_registers), PREFIX(regex_compile),
274 PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
275 PREFIX(insert_op2), PREFIX(at_begline_loc_p),
276 PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
277 wcs_compile_range, byte_compile_range, truncate_wchar,
278 PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
279 re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
280 count_mbs_length, wcs_re_match_2_internal,
281 byte_re_match_2_internal, PREFIX(group_match_null_string_p),
282 PREFIX(alt_match_null_string_p),
283 PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
284 re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
285 regfree, PREFIX(extract_number)): Define with prototype. Remove
286 now-unnecessary declaration, if any.
287 (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
289 Remove now-unnecessary casts among pointer types.
290 * regex.h (_RE_ARGS): Remove. All uses removed.
292 * rename.c: Include <stdlib.h>, <string.h> unconditionally.
295 * rpmatch.c: Include <stdlib.h> unconditionally.
297 * same.c: Include <stdlib.h>, <string.h> unconditionally.
300 * save-cwd.c: Include <stdlib.h> unconditionally.
301 * xgetcwd.c: Likewise.
303 * stat.c: Include <stdlib.h>, <string.h> unconditionally.
306 * strchrnul.c (strchrnul): Define with a prototype.
307 Fix bug: c_in was not converted to char before searching.
309 The following changes are not K&R related:
311 * group-member.h: Include <sys/types.h>, so that this file is
313 * makepath.h: Likewise.
315 * getusershell.c (readname, default_index, line_size, readname):
316 Use size_t, not int, for sizes.
317 (readname): If the size overflows, report an error instead of
320 2003-09-09 Derek Robert Price <derek@ximbiot.com>
322 * getndelim2.c: Assume stdlib.h per the C89 spec.
324 2003-09-08 Paul Eggert <eggert@twinsun.com>
326 Assume C89 or better; remove K&R cruft.
327 A few of these changes were first proposed by Derek Robert Price
328 in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
330 * addext.c: Include <string.h> unconditionally.
331 * backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
332 Don't declare getenv or malloc.
334 * alloca.c: Include <string.h>, <stdlib.h> unconditionally.
335 (POINTER_TYPE, pointer): Remove; all uses changed to void *.
337 (find_stack_direction, alloca): Use prototypes.
339 * atexit.c (atexit): Define using a prototype.
341 * basename.c, dirname.c, stripslash.c:
342 Include <string.h> unconditionally.
344 * bcopy.c: Include <stddef.h>.
345 (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
347 * canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
349 * error.h (error, error_at_line, error_print_progname)
350 [! (defined (__STDC__) && __STDC__)]: Remove decls.
351 * error.c: Include error.h first, to check interface.
352 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
353 (VA_START): Remove; all uses changeed to va_start.
354 (exit, strerror): Remove decls.
355 (error_print_progname): Prototype uncondionally.
356 Don't include <errno.h>; no longer needed.
357 (private_strerror): Remove.
358 (error_tail): Always define.
359 (error, error_at_line): Assume C89 or better; always use prototypes.
360 * fatal.c: Include "fatal.h" first, to test interface.
361 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
362 (VA_START): Remove; all uses changed to va_start.
363 [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
366 (fatal): Prototype unconditionally. Assume va_start works.
367 Abort at end, to pacify gcc.
369 * euidaccess.c (main): Define with a prototype.
371 * exclude.c: Include <stdlib.h>, <string.h> unconditionally.
373 * exitfail.c: Include <stdlib.h> unconditionally.
375 * fnmatch_.h (__P): Remove. All uses changed to assume
377 * fnmatch.c: Include fnmatch.h first, to test interface.
378 Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
379 (getenv): Remove decl.
380 (fnmatch): Define using a prototype.
381 * fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
382 (FCT): Define using a prototype.
384 * getdate.y: Include <stdlib.h>, <string.h> unconditionally.
386 * gethostname.c: Include <stddef.h>.
387 (gethostname): Define with prototype. Length is size_t, not int.
389 2003-09-08 Paul Eggert <eggert@twinsun.com>
391 * getversion.c: Remove; was migrated to backupfile.c in 1997.
392 getversion.c should have been removed then, but was accidentally
395 * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
396 (utime_null): Fix typo: 'st' was sometimes called 'sb'.
398 2003-09-07 Paul Eggert <eggert@twinsun.com>
400 * time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
401 copy_tm_result. Bug reported by Simon Josefsson in
402 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
404 2003-09-06 Paul Eggert <eggert@twinsun.com>
406 * time_r.c, time_r.h: New files.
408 * mktime.c (my_mktime_localtime_r): Remove; all uses changed to
410 (__localtime_r) [!defined _LIBC]: New macro. Include <time_r.h>.
411 (__mktime_internal) [!defined _LIBC]: Now extern, not static.
413 * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
415 (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
416 (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
419 * timegm.c: Switch to glibc implementation, with the following changes:
420 [defined HAVE_CONFIG_H]: Include <config.h>.
421 [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
422 (__mktime_internal) [!defined _LIBC]: New decl.
423 (__gmtime_r) [!defined _LIBC]: New macro and function.
424 (timegm): Use a prototype, since gnulib assumes C89.
425 Do not bother declaring tmp to be const, as it's not really usefu.
426 * timegm.h: Hoist "#include <time.h>" out of #ifdef.
427 (timegm): Declare only if HAVE_DECL_TIMEGM.
429 2003-09-03 Paul Eggert <eggert@twinsun.com>
431 * human.c (human_readable): Fix bug that rounded 10501 to 10k.
432 Bug reported by Lute Kamstra in
433 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
435 * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
436 "yesterday", "today", and "now" rather than tMINUTE_UNIT. Of
437 course with correspondingly smaller numbers for tomorrow and
438 yesterday. From Tadayoshi Funaba. Originally installed into
439 sh-utils on 1999-08-07, but the patch got lost (I guess during the
442 2003-08-31 Simon Josefsson <jas@extundo.com>
444 * timegm.h: New file.
445 * timegm.c: New file. Based on wget-1.8.2/src/http.c:mktime_from_utc.
447 2003-08-31 Karl Berry <karl@gnu.org>
449 * argp.h: update from libc.
451 2003-08-28 Bruno Haible <bruno@clisp.org>
453 * binary-io.h: Undefine O_BINARY before defining it. This avoids a
454 warning on QNX, which defines O_BINARY to 000000.
456 2003-08-24 Bruno Haible <bruno@clisp.org>
458 * binary-io.h: Include <stdio.h>, to avoid a compilation error when
459 MSVC7 <stdio.h> is included later.
461 2003-08-20 Bruno Haible <bruno@clisp.org>
463 * progname.h: New file, from GNU gettext.
464 * progname.c: New file, from GNU gettext.
465 * progreloc.c: New file, from GNU gettext.
467 2003-08-19 Bruno Haible <bruno@clisp.org>
469 * xstrdup.c: Assume <string.h> exists.
471 2003-08-18 Jim Meyering <jim@meyering.net>
473 * setenv.h: Indent nested cpp directive.
474 * vasnprintf.c: Remove trailing blanks.
476 2003-08-17 Simon Josefsson <jas@extundo.com>
477 Bruno Haible <bruno@clisp.org>
479 * xstrndup.h: New file.
480 * xstrndup.c: New file.
482 2003-08-17 Bruno Haible <bruno@clisp.org>
484 * strndup.h: New file.
486 2003-08-16 Paul Eggert <eggert@twinsun.com>
488 * regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
489 space, undoing this 2003-08-12 change:
490 <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
492 2003-08-16 Jim Meyering <jim@meyering.net>
494 Merge from coreutils.
495 * xstrtoimax.c: #else #if -> #elif.
496 * xstrtoumax.c: Likewise.
498 2003-08-15 Paul Eggert <eggert@twinsun.com>
500 * config.charset, ref-add.sin, ref-del.sin: Use three spaces,
501 rather than tab, after '#' in shell-script copyright notices.
502 Suggested by Bruno Haible.
504 2003-08-15 Jim Meyering <jim@meyering.net>
505 and Paul Eggert <eggert@twinsun.com>
507 Merge from coreutils.
508 * readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
509 member but strut utmpx does not. Needed for AIX 4.3.3.
510 (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
512 2003-08-15 Jim Meyering <jim@meyering.net>
514 Merge from coreutils.
515 * xgethostname.c: Include <stdlib.h>.
516 (xghostname): Don't exit for anything other than memory-related
517 failure; just return NULL.
518 * userspec.c: Include "posixver.h".
519 (parse_user_spec): Accept `.' as a separator only
520 in pre-POSIX-200112 mode.
521 * strtoimax.c: Use #elif rather than #else #if.
522 * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
523 Remove function, now that we can rely on a working tzset function.
524 [!_LIBC]: Ensure that the required autoconf test has been run.
525 [!defined _NL_CURRENT && HAVE_STRFTIME]:
526 Use underlying_strftime for %r.
527 * sha.c: Merge in some clean-up and optimization changes from glibc.
528 * sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
529 Ensure that it is a multiple of 64.
530 Rearrange loop exit tests so as to avoid performing an
531 additional fread after encountering an error or EOF.
532 * realloc.c: Update copyright date.
534 2003-08-14 Jim Meyering <jim@meyering.net>
536 Merge from coreutils.
537 * obstack.h: Whitespace changes.
538 * mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
539 and xcalloc return values.
540 (read_filesystem_list) [MOUNTED_GETFSSTAT]:
541 Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could
542 hang on OSF/1 5.1 for DIR on both local and remote file systems.
543 Reported by (and fix confirmed by) Nelson H. F. Beebe.
544 (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
546 Use mntctl's return value to drive the entry-processing loop, since
547 we can't rely on the value of the vmt_length member in the last
548 entry. On some systems doing so could result in exhausting
549 virtual memory. Based in part on a patch from Mike Jetzer.
551 2003-08-14 Jim Meyering <jim@meyering.net>
552 and Paul Eggert <eggert@twinsun.com>
554 Merges from coreutils, plus other fixes.
555 * physmem.c: Merge in portability changes from gcc/libiberty
556 to support AIX, IRIX, Tru64, and Windows. See the ChangeLog there
557 for credits and details. Thanks to Kaveh Ghazi for helping
558 to keep these files in sync.
559 (ARRAY_SIZE): Define it.
560 (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
561 * memcasecmp.c: Remove unnecessary parentheses after 'defined'.
562 (memcasecmp): Don't assume size_t fits in unsigned int.
563 Remove casts and duplicate code.
564 * md5.c: Include <string.h> and <stdlib.h> unconditionally.
565 (memcpy): Remove definition.
566 Merge in some clean-up and optimization changes from glibc.
567 [BLOCKSIZE]: Move definition to top of file.
568 Ensure that it is a multiple of 64.
569 Rearrange loop exit tests so as to avoid performing an
570 additional fread after encountering an error or EOF.
571 * md5.h (md5_uintptr): Define.
572 * makepath.c (CLEANUP_CWD): Report an error if we failed to
573 return to the initial working directory. Preserve errno
575 * idcache.c: Include "xalloc.h".
576 (xmalloc, xrealloc): Remove decls.
577 (getuser): Remove casts no longer required in C89.
578 * human.c: Include stdio.h, for sprintf.
579 * group-member.c: Include "xalloc.h".
580 (xmalloc, xrealloc): Remove decls.
581 (get_group_info): Remove casts no longer required in C89.
582 * getusershell.c (readname): Remove casts no longer required in C89.
583 * gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
584 * getline.c: Whitespace fix, from coreutils.
586 2003-08-13 Paul Eggert <eggert@twinsun.com>
588 * exclude.c: Include <ctype.h>
589 (IN_CTYPE_DOMAIN): New macro.
591 (add_exclude_file): If LINE_END is a space, ignore trailing spaces
594 * argp-help.c, argp-parse.c, config.charset, getopt.h:
595 Undo previous (whitespace-only) change.
597 2003-08-12 Paul Eggert <eggert@twinsun.com>
599 * argp-help.c, argp-parse.c, config.charset, getopt.h:
600 Normalize leading white space and remove trailing white space.
601 * ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
602 notice, as per ../config/srclist-update.
604 Merge from coreutils.
605 * euidaccess.h: New file.
606 * euidaccess.c: Include it.
607 * .cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
608 vasnprintf.h, vasprintf.h. Remove strdup.c, gettext.h.
609 * regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
611 2003-08-11 Bruno Haible <bruno@clisp.org>
613 * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
614 (vasnprintf): Use it instead of wcslen.
616 2003-08-11 Bruno Haible <bruno@clisp.org>
618 * stdbool_.h (_Bool): Undo last change; instead use a negative enum
619 value to ensure that _Bool promotes to int. Use #define for _Bool when
620 using the Solaris C compiler. Adds comments suggested by Paul Eggert.
622 2003-08-10 Karl Berry <karl@gnu.org>
624 * regex.h: update from libc (whitespace fix).
626 2003-08-09 Paul Eggert <eggert@twinsun.com>
628 Merge some files from coreutils. These changes were
629 originally made by Jim Meyering.
630 * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
631 many older Unixes require this.
632 * lib/alloca.c (alloca): Remove cast to argument of free;
633 no longer needed in C89.
634 * lib/alloca_.h, lib/regex.h: Fix white space to match
635 what GNU indent does.
637 2003-08-05 Paul Eggert <eggert@twinsun.com>
639 * bumpalloc.h: Remove.
641 2003-08-04 Paul Eggert <eggert@twinsun.com>
643 * getloadavg.c: Change copyright notice and spacing to conform to
646 Merge from coreutils.
647 * error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
649 * getdate.y (date): Also accept dates like May-23-2003; suggestion
650 from Karl Berry, implemented by Jim Meyering.
651 * getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
652 from Dmitry V. Levin.
653 Remove anachronistic cast of xrealloc.
654 * fnmatch_.h (__const): Remove. Use 'const'.
655 * fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
656 type. Otherwise, it wouldn't compile with at least /bin/cc on
657 ymp-cray-unicos9.0.2.X.
658 Combine two mostly-identical uses of alloca into one.
659 Thanks to the Cray-Cyber project for access to a Cray Y-MP.
661 2003-08-04 Dave Love <d.love@dl.ac.uk>
665 * getloadavg.c: Check `__unix' as well as `unix'. Use #ifdef, not
666 #if. Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE. Check
667 F_SETFD, not FD_SETFD. Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
668 obsolete NLIST_NAME_UNION.
669 [__GNU__]: Undef BSD and FSCALE.
670 [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
672 2003-08-03 Paul Eggert <eggert@twinsun.com>
674 * stdbool_.h (_Bool): Make it signed char, instead of
675 an enum type, so that it's guaranteed to promote to int. See:
676 <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
678 2003-07-31 Paul Eggert <eggert@twinsun.com>
680 * strerror.c: Include config.h, limits.h. Declare sprintf.
681 (strerror): Don't assume that a printable int fits in 14 bytes.
683 2003-07-24 Derek Robert Price <derek@ximbiot.com>
684 Bruno Haible <bruno@clisp.org>
686 * getline.h (getline, getdelim): Change return type to ssize_t.
687 * getline.c (getline, getdelim): Likewise.
688 Remove _GNU_SOURCE define; now it's defined in config.h through
691 2003-07-22 Paul Eggert <eggert@twinsun.com>
693 * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
694 over-parenthesization in macros.
698 * xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
701 Use `exit_failure' for xalloc and xmemcoll instead of their own
702 private exit-failure variables.
703 * xalloc.h (xalloc_exit_failure): Remove.
704 * xmalloc.c: Likewise. Include exitfail.h.
705 (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
706 * xmemcoll.h (xmemcoll_exit_failure): Remove.
707 * xmemcoll.c: Likewise. Include exitfail.h.
708 (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
710 2003-07-18 Paul Eggert <eggert@twinsun.com>
712 * closeout.h (close_stdout_set_status, close_stdout_status): Remove.
713 * closeout.c: Likewise. Include "closeout.h" right after config.h,
714 to test that it can stand by itself. Include "exitfail.h".
715 Clients should set exit_failure instead.
716 (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
718 2003-07-18 Andreas Schwab <schwab@suse.de>
720 * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
722 2003-07-18 Bruno Haible <bruno@clisp.org>
724 * getndelim2.h: New file.
725 * getndelim2.c: Make into a module of its own. Include config.h,
727 (getndelim2): Make non-static. Change return type to ssize_t.
728 * getline.h: Change argument names.
729 * getline.c: Include getndelim2.h instead of getndelim2.c.
730 * getnline.c: Include getndelim2.h.
732 2003-07-17 Bruno Haible <bruno@clisp.org>
734 * Makefile.am: Remove file.
735 * Makefile.in: Remove file.
737 2003-07-17 Bruno Haible <bruno@clisp.org>
739 * getnline.h: New file.
740 * getnline.c: New file.
741 * getndelim2.c: New file, extracted from getline.c.
742 (getndelim2): Renamed from getdelim2, with added nmax argument.
743 * getline.c: Include getndelim2.c.
744 (getdelim2): Moved out to getndelim2.c.
745 (getline, getdelim): Update.
747 2003-07-15 <karl@gnu.org>
749 * vasnprintf.c: update from gettext.
751 2003-07-15 Jim Meyering <jim@meyering.net>
753 * makepath.c (make_path): Enclose diagnostic in _(...).
755 2003-07-14 Paul Eggert <eggert@twinsun.com>
757 * asnprintf.c, asprintf.c, config.charset, gettext.h,
758 localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
759 printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
760 ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
761 vasprintf.c, vasprintf.h: Regenerate. These files are now being
762 updated automatically by ../config/srclist-update. This changes
763 their license from LPGL to GPL.
765 2003-07-14 Jim Meyering <jim@meyering.net>
767 Don't emit diagnostics. Let callers do that.
768 * save-cwd.c: Don't include "error.h".
769 (save_cwd): Don't call error. Ensure that errno is valid
770 when returning nonzero.
772 * save-cwd.h (restore_cwd): Update prototype.
773 * save-cwd.c (restore_cwd): Remove two parameters.
774 Simplify. Don't call error upon failure. Let callers do that.
775 (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
776 when auditing is enabled. But don't bother updating the #if.
778 2003-07-14 Simon Josefsson <jas@extundo.com>
780 * mempcpy.h: New file.
781 * mempcpy.c: New file.
783 2003-07-14 Paul Eggert <eggert@twinsun.com>
785 * ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
786 sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
787 unicodeio.c, unicodeio.h, unlocked-io.h:
788 Switch from LGPL to GPL.
790 2003-07-11 Alexandre Duret-Lutz <adl@gnu.org>
792 * obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
793 it breaks C++ compilation.
794 [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
796 2003-07-10 Jim Meyering <jim@meyering.net>
798 * vasnprintf.c: Remove trailing blanks.
799 Make cpp indentation consistent.
801 2003-07-09 Paul Eggert <eggert@twinsun.com>
803 * alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
804 posixver.c, strftime.c, strnlen.c, strverscmp.c:
805 Switch from LGPL to GPL.
807 2003-07-07 Paul Eggert <eggert@twinsun.com>
809 * mktime.c: Fix some boundary cases and remove need for floating point.
811 Issue a compile-time diagnostic if time_t is floating point, or if
812 two's complement arithmetic is not in effect, or if arithmetic
813 right shift does not propagate the sign. These assumptions were
814 all in the original code but they weren't checked.
816 (TIME_T_MIDPOINT, verify): New macros.
817 (__isleap): Remove; it has integer overflow problems.
818 (leapyear): New function, without those problems.
819 (ydhms_tm_diff): Remove; splitting into two parts.
820 (ydhms_diff): New function, containing the arithmetic part of
821 the old ydhms_tm_diff function. Issue a compile-time
822 diagnostic if we are not using C99 integer division.
823 Avoid casts when possible.
824 (guess_time_tm): New function, containing the checking part of
825 the old ydhms_tm_diff function. Return the new value, rather than
826 the difference between it and the old. Accept a new argument T
827 so that *T specifies the old value. Check for overflow in the result.
829 (__mktime_internal): Use a time_t offset, not a long int offset.
830 This undoes the 2003-06-04 change, which is no longer needed now
831 that we have better overflow checking.
832 (localtime_offset): Likewise.
834 (__mktime_internal): Avoid harmful overflow on hosts where time_t
835 and long are 64-bit but int is only 32-bit.
836 (ydhms_diff): Use long int to store year1 and yday1.
837 Issue a compile-time diagnostic if long int is not wide enough.
839 (__mktime_internal): Use long int to store adjusted year and yday.
840 Use plain C rather than preprocessor commands, if that doesn't
842 Check for overflow (and try to repair) after each probe
843 rather than checking only at the very end. This avoids some bugs
844 (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
845 does not equal GMT offset at maximum time).
846 Use integer to check for overflow rather than floating point; this
847 is more portable to non-IEEE hosts, and is a tad faster.
848 When we detect that we are oscillating between two values,
849 don't check whether tm_isdst has the requested value, since
850 we already know the answer. When tm_isdst has the wrong value,
851 use a different heuristic to find the right one, based on the
852 extreme values actually observed in practice in tz2003a,
853 rather than the (overly optimistic) "previous 3 calendar quarters".
855 (not_equal_tm, print_tm, check_result): Use "const T" rather than
856 "T const" to accommodate glibc style.
857 (check_result): Use less-confusing report format. "long" -> "long int.
859 Don't loop if the iteration overflows time_t.
860 Allow a negative step in the iteration.
862 2003-07-01 Paul Eggert <eggert@twinsun.com>
864 * xreadlink.c: Include <sys/types.h> unconditionally, instead of
865 having it depend on HAVE_SYS_TYPES_H.
867 2003-06-25 Bruno Haible <bruno@clisp.org>
869 * readlink.c: New file.
871 2003-06-20 Bruno Haible <bruno@clisp.org>
873 Assume C89, so PARAMS isn't needed.
874 * unicodeio.h (PARAMS): Remove.
875 * unicodeio.c: Don't use PARAMS.
877 2003-06-18 Jim Meyering <jim@meyering.net>
879 Merge changes from coreutils.
880 * readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
881 Remove explicit declarations of xmalloc and realloc.
883 (read_utmp): Remove anachronistic cast of xmalloc.
885 2003-06-17 Paul Eggert <eggert@twinsun.com>
887 Assume C89, so PARAMS isn't needed.
888 * backupfile.h (PARAMS): Remove. All uses removed.
889 * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
890 group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
891 makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
892 path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
893 save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
894 unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
896 * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h,
897 same.h, strverscmp.h: Do not include config.h; no longer needed.
898 Anyway, config.h should always be included before any other file.
900 2003-06-11 Simon Josefsson <jas@extundo.com>
902 * sysexit_.h: New file.
904 2003-05-20 Derek Price <derek@ximbiot.com>
906 * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
908 2003-06-10 Simon Josefsson <jas@extundo.com>
910 * strchrnul.h: New file.
911 * strchrnul.c: New file.
913 2003-06-10 Simon Josefsson <jas@extundo.com>
915 * argp.h: New file, from glibc.
916 * argp-ba.c: New file, from glibc.
917 * argp-eexst.c: New file, from glibc.
918 * argp-fmtstream.c: New file, from glibc.
919 * argp-fmtstream.h: New file, from glibc.
920 * argp-fs-xinl.c: New file, from glibc.
921 * argp-help.c: New file, from glibc.
922 * argp-namefrob.h: New file, from glibc.
923 * argp-parse.c: New file, from glibc.
924 * argp-pv.c: New file, from glibc.
925 * argp-pvh.c: New file, from glibc.
926 * argp-xinl.c: New file, from glibc.
928 2003-06-07 Jim Meyering <jim@meyering.net>
930 * readtokens.h: Put `Free Software Foundation, Inc.'
931 in place of my name in the copyright comment.
932 Remove definition and uses of __P.
935 * stat.c: Don't declare xmalloc explicitly.
936 Instead, include "xalloc.h".
937 * readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
938 xrealloc, and xcalloc return values.
939 * xgetcwd.c (xgetcwd): Include "xgetcwd.h".
941 * xgetcwd.h: Remove definition/uses of PARAMS.
943 2003-06-06 Jim Meyering <jim@meyering.net>
945 * stdbool_.h: Renamed from stdbool.h.in.
947 2003-06-06 Jim Meyering <jim@meyering.net>
949 Merge from coreutils.
950 * same.c: (same_name): Declare *_basename locals to be `const'.
951 Consolidate declarations and initializations of *_base* locals.
953 Merge from coreutils.
954 This avoids a core dump on systems without GNU putenv,
955 when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
956 * putenv.c (__set_errno, LOCK, UNLOCK): Define.
957 (unsetenv): New static function, from GNU libc.
958 (rpl_putenv): Use it.
960 * modechange.c: Remove trailing blanks.
962 Merge from coreutils.
963 * fsusage.c: Remove declaration of statfs.
964 It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
966 * posixtm.c: Include <stdbool.h> unconditionally.
968 2003-06-05 Paul Eggert <eggert@twinsun.com>
970 * mktime.c (__mktime_internal): When resolving a tm_isdst
971 mismatch, look in future quarters as well as past. This fixes a
972 bug when processing fall-backwards gaps immediately after a long
973 period of daylight-saving time.
975 * mktime.c: Assume freestanding C89 or better.
976 (HAVE_LIMITS_H): Remove. Assume it's 1.
977 (__P): Remove; not used.
978 (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
979 (mktime, not_equal_tm, print_tm, check_result,
980 main): Use prototypes. Use const * where appropriate.
981 (main): Fix typo in testing code that uncovered by above changes.
982 (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
984 2003-06-04 Paul Eggert <eggert@twinsun.com>
986 * mktime.c: Fix Debian bug 177940
987 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
988 (localtime_offset): Now long int, not time_t, because we want it
989 to be guaranteed to be signed. All uses changed.
990 (__mktime_internal): If overflow would occur when adding offset,
993 Merge 'human' changes from coreutils. Rewrite to support
994 locale-specific notations like thousands separators.
995 * human.c: Simplify authorship notice.
996 Include human.h immediately after config.h.
997 <sys/types.h>, <stdio.h>: Do not include; no longer needed.
998 <limits.h>: Do not include, since human.h does.
999 (SIZE_MAX, UINTMAX_MAX): New macros.
1000 <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
1001 <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
1002 (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
1003 (power_letter): Renamed from suffixes.
1004 (generate_suffix_backwards): Remove.
1005 (adjust_value): Now takes int style (because of human.h changes)
1006 and long double value (for greater precision on some platforms).
1007 (group_number): New function.
1008 (human_readable): Use it. Use integer options, not enum.
1009 Put the options before the sizes in the arg list.
1010 Support all the new options.
1011 The old human_readable function has been removed;
1012 use inttostr.h instead.
1013 (human_readable, default_block_size, humblock):
1014 Use uintmax_t, not int, for block sizes.
1015 (human_readable_inexact, block_size_types): Remove.
1016 (block_size_opts): New constant.
1017 (human_options): Renamed from human_block_size, with new signature
1018 that allows block sizes up to UINTMAX_MAX. All callers changed.
1019 * human.h: Add copyright and authorship notice.
1020 Include <limits.h> and <stdbool.h> unconditionally.
1021 (PARAMS): Remove. All uses removed.
1022 (LONGEST_HUMAN_READABLE): Add support for thousands separator.
1023 (enum human_inexact_style): Remove tag; now a nameless enum.
1024 (human_floor, human_ceiling, human_round_to_even): Now have
1025 values 2, 0, 1 rather than -1, 1, 0.
1026 (human_group_digits, human_suppress_point_zero, human_autoscale,
1027 human_base_1024, human_SI, human_B): New constants.
1028 (human_readable_inexact, human_block_size): Remove.
1029 (human_readable): Size args are now uintmax_t, not int.
1030 (human_options): New decl.
1032 * exclude.c: (new_exclude, add_exclude): Remove casts that are
1033 unnecessary now that we assume C89 or better. This change
1034 imported from coreutils.
1036 * mktime.c (__mktime_internal): Do not reject negative timestamps
1037 arbitrarily. This is the same patch as 2003-05-28, but it got lost
1038 in the 2003-05-30 sync from glibc.
1040 .h files should stand alone, but we shouldn't include <sys/types.h>
1041 if we can get away with just <stddef.h>.
1043 * __fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
1044 malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
1045 rather than <sys/types.h>, as we merely need size_t.
1046 * dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
1048 * hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
1049 Include <stdio.h>, to get FILE.
1050 * memcasecmp.c: Don't include <sys/types.h>, as we can assume
1051 memcasecmp.h has included <stddef.h> and all we need is size_t.
1052 * memcoll.c: Include "memcoll.h", which gets us size_t and checks
1053 our interface, instead of including <sys/types.h>
1055 2003-06-02 Paul Eggert <eggert@twinsun.com>
1058 Fix some minor time-related bugs with POSIX time arguments.
1059 Some valid time stamps were being rejected (notably -1, and
1060 time stamps before 1900 on 64-bit hosts). And some invalid
1061 time stamps were being accepted, e.g. September 31.
1063 * posixtm.h (posixtime): Return bool instead of time_t, so
1064 that we can return (time_t) -1 successfully.
1065 * posixtm.c: Likewise.
1066 [HAVE_STDBOOL_H]: Include <stdbool.h>.
1067 (bool, false, true) [!HAVE_STDBOOL_H]: New type.
1068 (t): Remove static var.
1069 (year, posix_time_parse): Now takes struct tm * arg to modify, instead
1070 of static var. All uses changed.
1071 (year): Do not reject years before 1900; they can occur with
1073 (posix_time_parse): Do not check for out-of-range components;
1074 that is now the caller's responsibility, since our checks were
1075 only approximations.
1076 (posixtime): Use mktime to check for out-of-range components,
1077 since it knows them exactly.
1078 If mktime returns (time_t) -1, check whether an error actually occurred
1079 by invoking localtime on -1.
1080 (main) [TEST_POSIXTIME]: Check for input data errors, and report
1081 posixtime failures better.
1082 Improve the test data (in comments only).
1084 2003-05-30 <karl@gnu.org>
1086 * mktime.c: update from libc.
1088 2003-05-30 Bruno Haible <bruno@clisp.org>
1090 * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
1091 * localcharset.h: Likewise.
1092 * localcharset.c: Likewise.
1094 2003-05-28 Paul Eggert <eggert@twinsun.com>
1096 Assume the headers required for C89 freestanding compilers.
1097 * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
1098 rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
1099 without checking for HAVE_LIMITS_H.
1100 * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
1101 xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
1103 * fatal.c: Include <stdarg.h> without checking for __STDC__.
1104 * exclude.c: Include <stdbool.h> unconditionally.
1105 * tempname.c: Include <stddef.h> unconditionally.
1106 * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
1107 * modechange.c, rpmatch.c (NULL): Don't define, since
1108 <stddef.h> does that.
1109 * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
1110 * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
1111 * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
1112 * xstrtol.c: Likewise.
1113 * safe-read.c: Remove TYPE_SIGNED; no longer needed.
1114 * savedir.c: Include <stddef.h> instead of defining NULL.
1116 * addext.c (addext): Use assignment rather than cast, to avoid
1117 warnings on some platforms.
1119 * mktime.c (__mktime_internal): Do not reject negative timestamps
1122 2003-05-10 Bruno Haible <bruno@clisp.org>
1124 * linebreak.c (iconv_string_length): Don't return -1 just because the
1125 string is longer than 4 KB.
1127 2003-05-12 Jim Meyering <jim@meyering.net>
1129 * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
1130 the space-padded-by-default conversion specifiers, %e, %k, %l.
1132 2003-05-03 Bruno Haible <bruno@clisp.org>
1134 Upgrade to Unicode-4.0.
1135 * linebreak.c (nonspacing_table_data): Change width of U+00AD,
1136 U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
1137 U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
1138 U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
1139 from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
1140 (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
1141 of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
1142 Change width of U+E0100..U+E01EF from 1 to 0.
1144 2003-04-25 Bruno Haible <bruno@clisp.org>
1146 * copy-file.c: Include <stddef.h>, for size_t.
1148 2003-04-25 Jim Meyering <jim@meyering.net>
1150 * copy-file.c (copy_file_preserving): Declare buf_size to be
1151 of type size_t, not int.
1153 2003-04-11 Jim Meyering <jim@meyering.net>
1155 Merge changes from Coreutils.
1157 2003-03-22 Jim Meyering <jim@meyering.net>
1159 * strftime.c (widen): Cast alloca return value to proper type.
1161 2003-01-19 Ulrich Drepper <drepper@redhat.com>
1164 * strftime.c (my_strftime): Handle very large width
1165 specifications for numeric values correctly. Improve checks for
1168 2003-01-19 Jim Meyering <jim@meyering.net>
1170 * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
1171 (nl_get_alt_digit) [! defined my_strftime]: Define.
1172 (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
1173 _nl_get_alt_digit and _nl_get_walt_digit.
1175 * strftime.c (my_strftime): Merge in locale-related changes from libc.
1176 These changes have no effect outside of _LIBC.
1178 2003-04-10 Bruno Haible <bruno@clisp.org>
1180 * findprog.h: New file, from GNU gettext.
1181 * findprog.c: New file, from GNU gettext.
1183 2003-04-05 Jim Meyering <jim@meyering.net>
1185 Merge changes from Coreutils.
1187 * exclude.h (PARAMS): Remove definition and uses.
1188 * exclude.c: Remove uses of `PARAMS'.
1190 * dirname.c [TEST_DIRNAME]: Update build instructions for test.
1191 Add test-cases for DOS filenames. Declare program_name.
1192 (main): Set up program_name. Patch by Rich Dawe.
1194 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
1196 Use mntctl's return value to drive the entry-processing loop, since
1197 we can't rely on the value of the vmt_length member in the last
1198 entry. On some systems doing so could result in exhausting
1199 virtual memory. Based in part on a patch from Mike Jetzer.
1201 2003-04-04 Bruno Haible <bruno@clisp.org>
1203 * linebreak.h: New file, from GNU gettext.
1204 * linebreak.c: New file, from GNU gettext with slight modifications.
1205 * lbrkprop.h: New file, from GNU gettext.
1207 2003-04-03 Bruno Haible <bruno@clisp.org>
1209 * utf8-ucs4.h: New file, from GNU gettext.
1210 * utf16-ucs4.h: New file, from GNU gettext.
1211 * ucs4-utf8.h: New file, from GNU gettext.
1212 * ucs4-utf16.h: New file, from GNU gettext.
1214 2003-04-02 Bruno Haible <bruno@clisp.org>
1216 * binary-io.h: New file, from GNU gettext.
1218 2003-04-01 Bruno Haible <bruno@clisp.org>
1220 * pathname.h: New file, from GNU gettext.
1221 * concatpath.c: New file, from GNU gettext.
1223 2003-03-30 Bruno Haible <bruno@clisp.org>
1225 * copy-file.c (copy_file_preserving): Don't set owner if the function
1226 chown() doesn't exist.
1228 2003-03-28 Bruno Haible <bruno@clisp.org>
1230 * copy-file.h: New file, from GNU gettext.
1231 * copy-file.c: New file, from GNU gettext.
1233 2003-03-18 Jim Meyering <jim@meyering.net>
1235 * quote.c (quote_n): Fix typo in comment.
1237 2003-03-14 Jim Meyering <jim@meyering.net>
1239 Merge changes from Coreutils.
1240 * obstack.h (obstack_object_size): Declare temporary, __o,
1241 to be const, in order to avoid warnings.
1242 (obstack_room): Likewise.
1243 (obstack_empty_p): Likewise.
1245 2003-03-13 Paul Eggert <eggert@twinsun.com>
1247 Merge changes from Bison.
1248 * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
1249 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1250 when compiling Bison 1.875's `bitset bset = obstack_alloc
1251 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
1252 * hash.c: Include <stdbool.h> unconditionally.
1254 2003-03-09 Paul Eggert <eggert@twinsun.com>
1256 * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
1257 Reported by Bruce Becker; see:
1258 http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
1260 2003-03-03 Paul Eggert <eggert@twinsun.com>
1261 Bruno Haible <bruno@clisp.org>
1263 * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
1264 Reported by John Hughes, see
1265 http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
1267 2003-02-19 Paolo Bonzino <bonzini@gnu.org>
1269 * poll_.h: New file.
1272 2003-02-18 Paolo Bonzino <bonzini@gnu.org>
1274 * mathl.h: New file.
1275 * acosl.c: New file.
1276 * asinl.c: New file.
1277 * atanl.c: New file.
1278 * ceill.c: New file.
1281 * floorl.c: New file.
1282 * frexpl.c: New file.
1283 * ldexpl.c: New file.
1285 * sincosl.c: New file.
1287 * sqrtl.c: New file.
1289 * trigl.c: New file.
1290 * trigl.h: New file.
1292 2003-02-17 Bruno Haible <bruno@clisp.org>
1294 * mkdtemp.h: New file, from GNU gettext.
1295 * mkdtemp.c: New file, from GNU gettext.
1297 2003-01-31 Bruno Haible <bruno@clisp.org>
1299 * rename.c: #undef rename before defining rpl_rename.
1300 * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
1302 2003-01-30 Bruno Haible <bruno@clisp.org>
1304 * printf-args.h: New file, from GNU gettext.
1305 * printf-args.c: New file, from GNU gettext.
1306 * printf-parse.h: New file, from GNU gettext.
1307 * printf-parse.c: New file, from GNU gettext.
1308 * vasnprintf.h: New file, from GNU gettext.
1309 * vasnprintf.c: New file, from GNU gettext.
1310 * asnprintf.c: New file, from GNU gettext.
1311 * vasprintf.h: New file, from GNU gettext with modifications.
1312 * vasprintf.c: New file, from GNU gettext.
1313 * asprintf.c: New file, from GNU gettext.
1315 2003-01-29 Bruno Haible <bruno@clisp.org>
1317 * stpncpy.h: New file, from GNU gettext with modifications.
1318 * stpncpy.c: New file, from GNU gettext with modifications.
1320 2003-01-28 Bruno Haible <bruno@clisp.org>
1322 * c-ctype.h: New file, from GNU gettext, with changes suggested by
1324 * c-ctype.c: New file, from GNU gettext, with changes suggested by
1327 2003-01-27 Bruno Haible <bruno@clisp.org>
1329 * xsetenv.h: New file, from GNU gettext.
1330 * xsetenv.c: New file, from GNU gettext.
1332 2003-01-23 Bruno Haible <bruno@clisp.org>
1334 * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
1336 2003-01-22 Bruno Haible <bruno@clisp.org>
1338 * exit.h: New file, from GNU gettext.
1340 2003-01-11 Bruno Haible <bruno@clisp.org>
1342 * stpcpy.h (stpcpy): Use ANSI C function declarations.
1343 * strcase.h (strcasecmp, strncasecmp): Likewise.
1345 2003-01-14 Jim Meyering <jim@meyering.net>
1347 * same.c (same_name): Tweak a comment.
1349 2003-01-11 Bruno Haible <bruno@clisp.org>
1351 * same.c (same_name): Reorder tests so as to avoid calling stat()
1352 when a string comparison is sufficient.
1354 2003-01-11 Bruno Haible <bruno@clisp.org>
1356 * readtokens.c (readtoken): Cast character to 'unsigned char', not
1359 2003-01-11 Bruno Haible <bruno@clisp.org>
1361 * hash-pjw.c: Add comment about low quality of this function.
1363 2003-01-12 Paul Eggert <eggert@twinsun.com>
1365 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
1366 to avoid collisions with libcurses and libreadline.
1368 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
1369 * getstr.h, getstr.c: Remove.
1370 * getline.c: Include "getline.h", to check interface.
1371 Move body of old getstr.c here: this defines MIN_CHUNK and
1372 declares getdelim2, which is renamed from getstr.
1373 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
1375 * linebuffer.c (readlinebuffer): Renamed from readline.
1377 * linebuffer.h: Likewise.
1378 (readline): Remove backward-compatibility macro.
1380 2003-01-12 Jim Meyering <jim@meyering.net>
1382 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
1384 2003-01-10 Bruno Haible <bruno@clisp.org>
1386 * alloca_.h: New file.
1387 * getdate.y: Unconditionally include alloca.h.
1388 * makepath.c: Likewise.
1389 * setenv.c: Likewise.
1390 * userspec.c: Likewise.
1392 2003-01-09 Bruno Haible <bruno@clisp.org>
1394 * stdbool.h.in: New file.
1396 2003-01-08 Bruno Haible <bruno@clisp.org>
1398 * safe-read.c: Include specification header first, to ensure its
1400 * full-write.c: Likewise.
1402 2003-01-08 Jim Meyering <jim@meyering.net>
1404 * full-write.c: Undefine and define-away `const' after inclusion
1405 of errno.h, not before. Suggestion from Bruno Haible.
1407 2003-01-07 Jim Meyering <jim@meyering.net>
1409 * full-write.c: Rework so that it may serve to define full_read, too.
1410 * full-read.c: Simply #define FULL_READ and include full-write.c.
1412 2003-01-06 Jim Meyering <jim@meyering.net>
1414 * version-etc.c: Update year in translatable copyright string.
1416 2002-12-25 Bruno Haible <bruno@clisp.org>
1418 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
1419 * xstrtol.h: Likewise.
1420 * xstrtoimax.c: Likewise.
1421 * xstrtoumax.c: Likewise.
1422 * human.h: Likewise.
1424 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
1425 on systems that have <inttypes.h> but not <stdint.h>.
1427 2002-12-31 Paul Eggert <eggert@twinsun.com>
1429 * memcoll.c (memcoll): Fall back on a simple algorithm using
1430 memcmp if strcoll doesn't work.
1432 2002-12-23 Bruno Haible <bruno@clisp.org>
1434 * localcharset.h: New file.
1435 * localcharset.c: Include it.
1436 * unicodeio.c: Likewise.
1438 2002-12-22 Bruno Haible <bruno@clisp.org>
1440 * utime.c (utime_null): No need to call ftruncate if the file was
1443 2002-12-23 Bruno Haible <bruno@clisp.org>
1445 * memcoll.c (STRCOLL): New macro.
1448 2002-12-22 Bruno Haible <bruno@clisp.org>
1450 * getstr.h (getstr): Define, to avoid clash with libcurses.
1451 * linebuffer.h (readline): Define, to avoid clash with libreadline.
1453 2002-12-22 Bruno Haible <bruno@clisp.org>
1455 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
1457 2002-12-23 Bruno Haible <bruno@clisp.org>
1459 * getline.h: Include <stddef.h>, for size_t.
1461 * unicodeio.h: Include <stddef.h>, for size_t.
1462 * unicodeio.c: Don't include <stddef.h>.
1464 2002-12-17 Bruno Haible <bruno@clisp.org>
1466 * canon-host.c (strdup): Remove unused declaration.
1468 * fsusage.c: Include full_read.h.
1469 (get_fs_usage): Use full_read instead of safe_read.
1471 * utime.c (utime_null): Use SAFE_READ_ERROR.
1473 2002-12-11 Bruno Haible <bruno@clisp.org>
1475 * setenv.h: Rewritten to cope with systems that have setenv() but not
1477 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
1480 2002-12-11 Bruno Haible <bruno@clisp.org>
1482 * setenv.c (alloca): Fall back to malloc.
1484 (setenv): Use freea() to free memory allocated with alloca().
1486 2002-11-13 Bruno Haible <bruno@clisp.org>
1488 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
1489 function declarations.
1490 * unsetenv.c (unsetenv): Likewise.
1492 2002-03-04 Bruno Haible <bruno@clisp.org>
1494 Portability to AIX 4.3.3.
1495 * unsetenv.c: New file, extracted from setenv.c.
1496 * setenv.c: Move the unsetenv() function to unsetenv.c.
1498 2001-12-20 Bruno Haible <bruno@clisp.org>
1500 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
1501 use malloc instead. For SunOS 4.
1503 2001-12-11 Bruno Haible <bruno@clisp.org>
1505 * setenv.c: Declare alloca.
1506 (compar_fn_t): New typedef.
1507 (KNOWN_VALUE, STORE_VALUE): Use it.
1509 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
1512 2002-12-10 Paul Eggert <eggert@twinsun.com>
1514 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
1515 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
1516 Choose values that are less likely to collide with system fnmatch
1518 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
1519 defined (e.g., a pure POSIX system).
1520 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
1521 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
1523 2002-12-06 Jim Meyering <jim@meyering.net>
1525 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
1527 Merge in changes from libc's misc/error.c, in preparation
1528 for the merge of gnulib's changes back into libc.
1530 * error.c (_): Define only if not already defined.
1531 Move definition to follow all #include directives.
1532 Include unlocked-io.h only if !_LIBC.
1533 [_LIBC]: Include <libio/libioP.h>.
1534 [USE_IN_LIBIO]: Include <libio/iolibio.h>
1535 (fflush): Tweak definition to use INTUSE.
1538 2002-12-05 Paul Eggert <eggert@twinsun.com>
1540 * alloca.c [defined emacs]: Include "lisp.h".
1541 (xalloc_die) [defined emacs]: New macro.
1542 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
1543 [! defined emacs]: Include <xalloc.h>.
1544 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
1545 (pointer): Typedef to POINTER_TYPE *.
1546 (malloc): Remove decl; we now always use xmalloc.
1547 (alloca): Use old-style definition, since Emacs needs this.
1548 Check for arithmetic overflow when computing combined size.
1550 2002-12-04 Paul Eggert <eggert@twinsun.com>
1552 Do not generate unlocked-io.h automatically, since it's easier to
1553 maintain it by hand.
1555 * unlocked-io.h: New file, from GNU diffutils,
1556 but with proper copyright notice and attribution.
1558 * Makefile.am: Add copyright notice.
1559 (libfetish_a_SOURCES): Add unlocked-io.h.
1560 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
1561 (DISTCLEANFILES, io_functions): Remove macros.
1562 (EXTRA_DIST): Remove gen_uio.
1563 (unlocked-io.h): Remove rule.
1565 2002-12-04 Jim Meyering <jim@meyering.net>
1567 Reflect the fact that stat.c and lstat.c are no longer generated.
1568 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
1569 (DISTCLEANFILES): Likewise.
1570 (EXTRA_DIST): Likewise.
1571 (all_local): Don't depend on stat.c or lstat.c.
1572 (stat.c, lstat.c): Remove rules.
1573 (EXTRA_DIST): Remove xstat.in.
1575 * xstat.in: Remove file. Contents moved into stat.c.
1576 * stat.c: New file. Contents mostly from xstat.in.
1577 * stat.c: Rework so that it may serve to define rpl_lstat, too.
1578 * lstat.c: New file. Simply #define LSTAT and include stat.c.
1580 * safe-read.c: Rework so that it may serve to define safe_write, too.
1581 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
1583 2002-12-03 Jim Meyering <jim@meyering.net>
1585 * safe-read.c, safe-write.c: Change variable names and comments, but
1586 not semantics, to minimize the differences between these two files.
1587 (safe_read): Change comment to mention SAFE_READ_ERROR.
1589 * safe-read.c (IS_EINTR): Define.
1590 (safe_read): Use IS_EINTR in place of in-function cpp directives.
1592 2002-12-02 Bruno Haible <bruno@clisp.org>
1594 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
1595 Define, taken from safe-read.c.
1596 (INT_MAX): Provide fallback.
1597 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
1598 * safe-write.h (SAFE_WRITE_ERROR): Define.
1600 * safe-read.c (EINTR): Remove definition.
1601 (safe_read): Don't use EINTR if it is absent.
1603 2002-12-02 Jim Meyering <jim@meyering.net>
1605 * safe-read.c (EINTR): Define.
1606 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1607 (INT_MAX): Provide fallback.
1608 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
1610 * safe-read.h (SAFE_READ_ERROR): Define.
1612 2002-12-01 Jim Meyering <jim@meyering.net>
1614 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
1615 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
1617 2002-11-27 Paul Eggert <eggert@twinsun.com>
1619 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
1620 hash_rehash): Replace `if (limit <= value) abort ();' with
1621 `if (! (value < limit)) abort ();', for readability.
1623 2002-11-26 <karl@gnu.org>
1625 * strdup.c: copy from libc again, with jim's ok.
1626 * .cppi-disable: re-add strdup.c
1628 2002-11-25 <karl@gnu.org>
1630 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
1631 instead of "strtol.c".
1633 2002-11-25 Jim Meyering <jim@meyering.net>
1635 * mktime.c: Sync from libc, now that it has the latest fix.
1637 2002-11-24 <karl@gnu.org>
1639 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
1640 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
1642 2002-11-24 Jim Meyering <jim@meyering.net>
1644 Update from coreutils:
1646 * mktime.c: Merge in changes from libc.
1648 Avoid a link-time failure on some Linux systems.
1649 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
1650 (__mon_yday): Declare with the STATIC attribute.
1651 (__mktime_internal): Likewise.
1652 Based on a report from Greg Schafer.
1654 2002-11-23 Jim Meyering <jim@meyering.net>
1656 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
1657 Use `unsigned', not `int', as type of index.
1659 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
1661 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
1663 2002-11-22 Paul Eggert <eggert@twinsun.com>
1665 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
1666 hint that one should use `if (! x) abort ();' rather than `assert
1667 (x);', and anyway it's one less thing to worry about configuring.
1668 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
1669 hash_rehash, hash_insert): Use abort rather than assert.
1671 2002-11-22 Paul Eggert <eggert@twinsun.com>
1673 * quotearg.h: Allow multiple inclusion by surrounding with
1674 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
1675 so that we can be included first.
1676 (PARAMS): Remove; we now assume C89 or later. All uses removed.
1677 * quotearg.c: Include quotearg.h immediately after config.h.
1678 No need to include stddef.h or sys/types.h any more.
1679 Surround local include files with "", not "<>".
1680 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
1681 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
1682 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
1683 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
1684 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
1685 (ISPRINT): Remove; no longer needed now that we assume C89.
1687 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
1690 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
1691 quotearg_char): Use SIZE_MAX rather than
1692 (size_t) -1 when we are talking about "infinity".
1694 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
1696 2002-11-22 Bruno Haible <bruno@clisp.org>
1698 * safe-read.h: Assume C89. Add comments.
1699 (safe_read): Change return type to size_t.
1700 * safe-read.c (safe_read): Change return type to size_t. Handle byte
1701 counts > SSIZE_MAX correctly.
1702 * safe-write.h: New file.
1703 * safe-write.c: New file.
1704 * full-read.h: New file.
1705 * full-read.c: New file.
1706 * full-write.h: Assume C89. Add comments.
1707 * full-write.c: Include safe-write.h.
1708 (full_write): Rewritten to use safe_write.
1709 Suggested by Jim Meyering and Paul Eggert.
1711 2002-11-21 Bruno Haible <bruno@clisp.org>
1713 Remove case insensitive option matching.
1714 * argmatch.h (argcasematch): Remove declaration.
1715 (ARGCASEMATCH): Remove macro.
1716 (__xargmatch_internal): Remove case_sensitive argument.
1717 (XARGMATCH): Update.
1718 (XARGCASEMATCH): Remove macro.
1719 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
1720 case_sensitive argument.
1721 (argcasematch): Remove function.
1722 (__xargmatch_internal): Remove case_sensitive argument.
1723 (main): Use XARGMATCH instead of XARGCASEMATCH.
1725 * xmalloc.c: Change compile-time error message. Add comment about
1726 required autoconf version.
1728 2002-11-21 Jim Meyering <jim@meyering.net>
1730 * strdup.c (strdup): Tweak comment and initial #if/#include.
1732 Merge in changes from the coreutils.
1734 2002-09-25 Paul Eggert <eggert@twinsun.com>
1735 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
1736 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
1737 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
1738 int. Work more efficiently if X is the same width as uintmax_t.
1739 Do not compare X to -1, to avoid bogus compiler warning.
1740 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
1741 Don't assume that f_frsize and f_bsize are the same type.
1743 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
1746 * makepath.c (make_path): Restore umask *before* creating the final
1748 (make_path): Minor reformatting.
1750 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
1751 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
1753 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
1754 ones. At least on GNU/Linux systems, `auto' means something else.
1757 2002-11-20 Paul Eggert <eggert@twinsun.com>
1759 Merge argmatch cleanups from Bison. Assume C89.
1761 * argmatch.c: Include config.h here, not in argmatch.h.
1762 Include stdlib.h, for EXIT_FAILURE.
1763 Always include <string.h>, since we assume C89.
1764 (EXIT_FAILURE): Remove pre-C89 bug workaround.
1765 * argmatch.h: Do not include <config.h> or <sys/types.h>.
1766 Include <stddef.h> instead, since it's all we need for size_t.
1767 (PARAMS): Remove. All uses removed.
1768 (ARRAY_CARDINALITY): Do not bother to #undef.
1769 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
1770 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
1771 Remove unnecessary parentheses.
1772 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
1773 Insert necessary parentheses.
1774 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
1775 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
1777 2002-11-19 Bruno Haible <bruno@clisp.org>
1779 * mbswidth.c: Include mbswidth.h right at the beginning.
1780 * mbswidth.h: Include <stddef.h>, for size_t.
1782 * mbswidth.h (PARAMS): Remove macro.
1783 (mbswidth, mbsnwidth): Use ANSI C function declarations.
1784 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
1786 * gcd.h (PARAMS): Remove macro.
1787 (gcd): Use ANSI C function declarations.
1788 * gcd.c (gcd): Likewise.
1790 2002-11-15 Bruno Haible <bruno@clisp.org>
1792 * strcspn.c: Include <stddef.h>.
1793 (strcspn): Use ANSI C function declaration. Change return type to
1795 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
1796 (strpbrk): Use NULL.
1797 * strpbrk.h (PARAMS): Remove macro.
1798 (strpbrk): Use ANSI C function declaration.
1799 * strstr.c: Don't include <sys/types.h>.
1800 * strstr.h (PARAMS): Remove macro.
1801 (strstr): Use ANSI C function declarations.
1803 2002-11-06 Bruno Haible <bruno@clisp.org>
1805 * gcd.h (gcd): Change argument type to 'unsigned long'.
1806 * gcd.c (gcd): Likewise.
1808 2002-11-05 Bruno Haible <bruno@clisp.org>
1810 * gcd.h: New file, from gettext-0.11.5.
1811 * gcd.c: New file, from gettext-0.11.5.
1813 2002-11-05 Bruno Haible <bruno@clisp.org>
1815 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1816 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1817 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1818 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
1820 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
1821 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
1823 * closeout.c: Include gettext.h instead of <libintl.h>.
1824 * human.c: Include gettext.h instead of <libintl.h>.
1825 * quotearg.c: Include gettext.h instead of <libintl.h>.
1826 * rpmatch.c: Include gettext.h instead of <libintl.h>.
1827 * unicodeio.c: Include gettext.h instead of <libintl.h>.
1828 * userspec.c: Include gettext.h instead of <libintl.h>.
1829 * version-etc.c: Include gettext.h instead of <libintl.h>.
1830 * xmalloc.c: Include gettext.h instead of <libintl.h>.
1831 (textdomain): Remove definition.
1832 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
1834 * long-options.c: Remove include of <libintl.h> and definition of _.
1835 * same.c: Remove include of <libintl.h> and definition of _.
1837 2002-11-04 Bruno Haible <bruno@clisp.org>
1839 * stpcpy.h: New file, from GNU gettext-0.11.5.
1840 * strcase.h: New file, from GNU gettext-0.11.5.
1841 * strpbrk.h: New file, from GNU gettext-0.11.5.
1842 * strstr.h: New file, from GNU gettext-0.11.5.
1843 * xgetcwd.h: New file, from GNU gettext-0.11.5.
1845 2002-05-09 Bruno Haible <bruno@clisp.org>
1847 * config.charset: Update for newest glibc. Add canonical names
1848 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
1850 2002-05-09 Bruno Haible <bruno@clisp.org>
1852 * localcharset.c (get_charset_aliases): Add more Windows specific
1855 2002-05-08 Owen Taylor <otaylor@redhat.com>
1857 * config.charset: A few additions for Solaris.
1859 2001-12-05 Bruno Haible <bruno@clisp.org>
1861 * localcharset.c (locale_charset): Don't return an empty string.
1863 2001-10-23 Bruno Haible <haible@clisp.cons.org>
1865 * config.charset: msdos in uk_UA uses CP1125.
1867 2001-08-05 Bruno Haible <haible@clisp.cons.org>
1869 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
1870 * localcharset.c (locale_charset): Declare as extern "C".
1872 2002-02-15 Bruno Haible <bruno@clisp.org>
1874 * config.charset [msdosdjgpp]: For Russian, use CP866.
1876 2002-02-11 Bruno Haible <bruno@clisp.org>
1878 * config.charset: Add support for NetBSD.
1880 2002-09-25 <karl@gnu.org>
1882 * strdup.c: copy from libc/string (via ../config/srclist*).
1883 * getopt*: copy from libc/posix.
1884 * gettext.h: copy from gettext.
1885 * .cppi-disable: add strdup.c, gettext.h.
1887 2002-07-01 Jim Meyering <meyering@lucent.com>
1889 * c-stack.c: Include sys/time.h.
1890 From Volker Borchert.
1892 2002-06-11 Paul Eggert <eggert@twinsun.com>
1894 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
1895 New macro. Use it uniformly instead of
1896 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
1897 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
1898 reported by Vin Shelton.
1900 2002-06-22 Jim Meyering <meyering@lucent.com>
1902 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
1903 redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
1905 2002-06-22 Paul Eggert <eggert@twinsun.com>
1907 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
1908 Do not assume SA_SIGINFO behavior.
1909 Bug reported by Jim Meyering on NetBSD 1.5.2.
1911 2002-06-22 Jim Meyering <meyering@lucent.com>
1913 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
1915 * exitfail.c, exitfail.h: Likewise.
1916 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
1918 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
1920 (EXTRA_DIST): Add fnmatch_loop.c.
1921 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
1923 * fnmatch_loop.c: New file, from diffutils-2.8.2.
1924 * fnmatch.c: Update from diffutils-2.8.2.
1925 * fnmatch_.h: New file. From diffutils-2.8.2.
1926 * fnmatch.h: Remove file.
1928 2002-06-18 Paul Eggert <eggert@twinsun.com>
1930 * file-type.h: Report an error if neither S_ISREG nor
1931 S_IFREG is defined, instead of using a test specific to glibc
1932 2.2. This should be safe, since POSIX requires S_ISREG and
1933 Unix Version 7 had S_IFREG. We don't need to check for
1934 <sys/types.h> since we don't use any symbols that it defines.
1936 2002-06-15 Jim Meyering <meyering@lucent.com>
1938 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
1939 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
1940 have been included before this file.
1942 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
1944 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
1945 so that each temporary file name is unique and valid in the first
1946 8 characters, for operation under DOS.
1948 2002-06-15 Jim Meyering <meyering@lucent.com>
1950 Work even with DJGPP 2.03, which lacks support for symlinks.
1952 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
1954 * lchown.c (S_ISLNK): Likewise.
1956 2002-06-14 Jim Meyering <meyering@lucent.com>
1958 * file-type.h: Use the version from diffutils-2.8.2.
1959 * file-type.c: Likewise.
1961 2002-05-27 Jim Meyering <meyering@lucent.com>
1963 Fix a problem seen only on nonconforming systems whereby ls.c's
1964 use of localtime, and then of gettimeofday would cause trouble:
1965 the localtime call used to initialize rpl_gettimeofday's save
1966 mechanism would clobber ls's current local time information so
1967 that in any long listing the first file would always be listed
1968 with date 1970-01-01. Analysis by Volker Borchert.
1970 * gettimeofday.c (localtime): Undefine.
1971 (rpl_localtime): New function.
1973 2002-05-22 Jim Meyering <meyering@lucent.com>
1975 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
1976 * file-type.h: New file.
1977 * file-type.c (file_type): New file/function. Extracted from diffutils.
1979 2002-04-29 Paul Eggert <eggert@twinsun.com>
1981 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
1983 2002-04-28 Paul Eggert <eggert@twinsun.com>
1985 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
1986 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
1987 of 127, since 64 is the largest conceivable number for ancient
1989 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
1991 2002-04-28 Jim Meyering <meyering@lucent.com>
1993 * sig2str.c (WTERMSIG): Remove definition (unused).
1995 2002-04-28 Paul Eggert <eggert@twinsun.com>
1997 * sig2str.h, sig2str.c: New files.
1998 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
2000 2002-04-24 Jim Meyering <meyering@lucent.com>
2002 * gettext.h: New file, from Gettext.
2003 * Makefile.am (INCLUDES): Remove -I../intl.
2004 (libfetish_a_SOURCES): Add gettext.h.
2006 2002-04-16 Jim Meyering <meyering@lucent.com>
2008 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
2009 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
2010 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
2012 2002-04-12 Jim Meyering <meyering@lucent.com>
2014 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
2016 2002-03-10 Jim Meyering <meyering@lucent.com>
2018 * makepath.c (make_path): Remove a comma from a diagnostic.
2019 Suggestion from Santiago Vila.
2021 2002-03-08 Jim Meyering <meyering@lucent.com>
2023 * rename.c: Mention that this wrapper is needed also on
2024 mips-dec-ultrix4.4 systems.
2026 2002-03-02 Jim Meyering <meyering@lucent.com>
2028 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
2029 not HAVE_CLOCK_SETTIME.
2031 2002-02-27 Paul Eggert <eggert@twinsun.com>
2033 * nanosleep.h: Rename to....
2034 * timespec.h: New name for nanosleep.h. All uses changed.
2036 * gettime.c: New file.
2037 * settime.c: New file.
2040 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
2041 timespec.h. Remove nanosleep.h.
2043 2002-02-25 Paul Eggert <eggert@twinsun.com>
2045 * acl.c, acl.h: New files.
2046 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
2048 2002-02-24 Jim Meyering <meyering@lucent.com>
2050 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
2051 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
2052 cause trouble. Reported by Nelson Beebe.
2054 2002-02-23 Paul Eggert <eggert@twinsun.com>
2056 * path-concat.c (xpath_concat): Reorder code to pacify
2057 compilers that don't know that xalloc_die never returns.
2059 2002-02-20 Jim Meyering <meyering@lucent.com>
2061 * getdate.c: Regenerate using bison-1.33.
2063 2002-02-15 Paul Eggert <eggert@twinsun.com>
2065 * posixver.c, posixver.h: New files.
2066 * Makefile.am (libfetish_a_SOURCES): Add them.
2068 2002-02-02 Paul Eggert <eggert@twinsun.com>
2069 Bruno Haible <bruno@clisp.org>
2071 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
2072 (fwrite_success_callback): New declaration.
2073 * unicodeio.c (unicode_to_mb): New function, extracted from
2074 print_unicode_char. Call failure callback instead of error.
2075 (fwrite_success_callback): New function.
2076 (exit_failure_callback): New function.
2077 (fallback_failure_callback): New function.
2078 (print_unicode_char): Call unicode_to_mb.
2080 2002-01-26 Jim Meyering <meyering@lucent.com>
2082 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
2084 2002-01-22 Jim Meyering <meyering@lucent.com>
2086 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
2087 Otherwise, some versions of automake would omit the rule that makes
2088 Makefile from Makefile.in.
2090 2001-01-21 Paul Eggert <eggert@twinsun.com>
2092 * xmemcoll.h, xmemcoll.c: New files.
2093 * Makefile.am (libfetish_a_SOURCES): Add them.
2094 * memcoll.c: Include errno.h, and declare errno if not defined.
2095 (memcoll): Set errno to zero if there is no error.
2097 * quotearg.c (quotearg_buffer_restyled):
2098 Fix bug with quoting buffers containing NUL when backslashing escapes.
2099 This bug was exposed by the other changes in this patch.
2100 (quotearg_n_options): New arg ARGSIZE.
2101 All callers changed.
2102 (quoting_options_from_style): New function.
2103 (quotearg_n_style): Use it.
2104 (quotearg_n_style_mem): New function.
2106 * quotearg.h (quotearg_n_style_mem): New function.
2108 2002-01-16 Jim Meyering <meyering@lucent.com>
2110 * getdate.y: Add three semicolons, each just before a closing brace.
2111 Bison (as of version 1.31) no longer papers over that mistake.
2113 2002-02-14 Paul Eggert <eggert@twinsun.com>
2115 * backupfile.c (ISDIGIT): Comment fix.
2116 * getdate.y (ISDIGIT): Likewise.
2117 * posixtm.c (ISDIGIT, year): Likewise.
2118 * strverscmp.c (ISDIGIT): Likewise.
2119 * userspec.c (ISDIGIT): Likewise.
2121 2002-01-05 Jim Meyering <meyering@lucent.com>
2123 * version-etc.c (version_etc_copyright): Update copyright year.
2125 2001-01-19 Paul Eggert <eggert@twinsun.com>
2127 * closeout.c (close_stdout_status): If ferror (stdout), do
2128 not silently exit merely because the output buffer happens to
2129 have nothing pending.
2131 2001-12-18 Paul Eggert <eggert@twinsun.com>
2133 See the big note in ../ChangeLog.
2134 * human.c (suffixes): Prefer K to k for 1024.
2135 (generate_suffix_backwards): New function.
2136 (human_readable_inexact): Use it.
2137 * xstrtol.c (__xstrtol): If there is no number but there
2138 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
2139 Accept 'K' as well as 'k'.
2141 2001-12-15 Jim Meyering <meyering@lucent.com>
2143 * regex.h (__restrict_arr): Update from libc.
2145 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
2146 as `remote' if the name starts with `//'. Suggested by Michael Stone.
2149 2001-12-10 Jim Meyering <meyering@lucent.com>
2151 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
2152 Instead, include "xalloc.h".
2153 (initbuffer): Don't cast xmalloc return value to char*.
2154 (readline): Reword comment.
2155 Don't cast xrealloc return value to char*
2158 2001-12-09 Jim Meyering <meyering@lucent.com>
2160 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
2161 `signed and unsigned type in conditional expression'.
2162 * posixtm.c (posix_time_parse): Likewise.
2164 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
2166 * readtokens.c (readtoken): Declare an index to be of type unsigned
2167 to avoid a pedantic warning.
2169 * getstr.c: Don't include assert.h.
2170 (getstr): Remove warning-evoking assertions.
2171 Return -1 if offset parameter is out of bounds.
2172 Change the type of a local from int to size_t.
2174 * strftime.c (my_strftime_localtime_r): Include this function
2175 definition in the `#if ! HAVE_TM_GMTOFF' block.
2177 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
2178 Include xalloc.h instead.
2180 2001-12-02 Jim Meyering <meyering@lucent.com>
2182 * tempname.c: Don't declare getenv, thus reverting the change of
2183 2001-11-18. It's no longer necessary, now that stdlib.h is always
2186 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
2187 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
2189 2001-11-30 Akim Demaille <akim@epita.fr>
2191 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
2192 before being defined.
2194 2001-11-27 Paul Eggert <eggert@twinsun.com>
2196 * quotearg.h (quotearg_n, quotearg_n_style):
2197 First arg is int, not unsigned.
2198 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2199 (SIZE_MAX, UINT_MAX): New macros.
2200 (quotearg_n_options): Abort if N is negative.
2201 Avoid overflow check on hosts where size_t is 64 bits and int
2202 is 32 bits, as overflow is impossible there.
2203 Fix off-by-one typo that caused unnecessary reallocation.
2205 2001-11-27 Jim Meyering <meyering@lucent.com>
2207 * tempname.c: Merge with version from libc.
2208 * regex.c: Likewise.
2210 * tempname.c: Include stdlib.h unconditionally. On some old systems
2211 for which STDC_HEADERS is 0, it was not included, resulting in a
2212 warning about an integer-to-pointer conversion problem with getenv.
2213 Reported by Volker Borchert.
2215 2001-11-26 Jim Meyering <meyering@lucent.com>
2217 * gtod.h: Remove file.
2218 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
2219 * gettimeofday.c: Don't include gtod.h.
2220 (GTOD_init): Remove function.
2221 (rpl_gettimeofday): Do its job here instead, rather than aborting.
2222 Suggestion from Volker Borchert.
2224 2001-11-23 Jim Meyering <meyering@lucent.com>
2226 * hash.h (struct hash_table): Don't define here. Merely declare it.
2227 * hash.c (struct hash_table): Define it here instead.
2229 2001-11-22 Jim Meyering <meyering@lucent.com>
2231 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
2233 2001-11-18 Paul Eggert <eggert@twinsun.com>
2235 * tempname.c (TMP_MAX): Remove; no longer needed.
2236 (TEMPORARIES): New macro.
2237 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
2238 removes an artificial limitation (e.g. HP-UX 10.20, where
2241 2001-11-18 Jim Meyering <meyering@lucent.com>
2243 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
2246 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
2247 files will be created before anything else.
2249 2001-11-17 Jim Meyering <meyering@lucent.com>
2251 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
2252 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
2253 rather than group writable. Patch by Juan F. Codagnone.
2255 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
2256 Instead, include "xalloc.h".
2258 * mountlist.c: Include unlocked-io.h after all system headers.
2259 Remove explicit declarations of xmalloc, xrealloc,
2260 and xstrdup. Instead, include "xalloc.h".
2262 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
2263 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
2264 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
2266 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
2267 Reported by Padraig Brady.
2269 * mkstemp.c: #undef mkstemp.
2271 (rpl_mkstemp): Rename from mkstemp.
2274 2001-11-16 Jim Meyering <meyering@lucent.com>
2276 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
2277 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
2278 determine the amount of total physical memory, use pstat_getstatic.
2279 HPUX-11 doesn't define _SC_PHYS_PAGES.
2280 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
2281 If sysconf couldn't be used to determine the amount of available
2282 physical memory, use both pstat_getstatic and pstat_getdynamic.
2283 Based on a patch from Bob Proulx.
2285 2001-11-05 Jim Meyering <meyering@lucent.com>
2287 * xstat.in (slash_aware_lstat): Correct a misleading comment.
2289 2001-11-03 Jim Meyering <meyering@lucent.com>
2291 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
2292 in argmatch_to_argument call.
2294 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
2297 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
2298 e.g., a fault due to an attempt to free a NULL pointer.
2300 2001-11-01 Jim Meyering <meyering@lucent.com>
2302 * dirfd.c, dirfd.h: New files.
2303 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
2305 * hash.c (hash_print) [TESTING]: Clean up.
2307 2001-10-22 Paul Eggert <eggert@twinsun.com>
2309 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
2310 to avoid a warning if -Wall.
2312 2001-10-21 Paul Eggert <eggert@twinsun.com>
2314 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
2316 2001-10-21 Jim Meyering <meyering@lucent.com>
2318 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
2319 this code would end up calling gettext even in packages built
2321 * getopt.c (_): Likewise.
2322 * regex.c (_): Likewise.
2324 2001-10-20 Paul Eggert <eggert@twinsun.com>
2326 * error.c (strerror_r): Do not declare unless !_LIBC.
2327 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
2328 Use strerror_r that is only a macro, even if it is not a function.
2329 (strerror): Check for HAVE_DECL_STRERROR before declaring.
2330 (private_strerror): Use prototypes, not old-style function definition.
2331 (print_errno_message): New function.
2332 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
2334 (error_tail, error, error_at_line): Use it.
2336 2001-10-11 Jim Meyering <meyering@lucent.com>
2338 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
2339 and quote_n (1, ... to avoid clobbering a buffer.
2341 2001-10-05 Jim Meyering <meyering@lucent.com>
2343 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
2344 * hash-pjw.c: New file (factored out of fileutils' remove.c).
2345 * hash-pjw.h: New file.
2347 2001-09-30 Jim Meyering <meyering@lucent.com>
2349 * mountlist.c [MOUNTED_GETFSSTAT]:
2350 Include <sys/ucred.h>, for Apple Darwin.
2351 Include sys/mount.h and sys/fs_types.h only if available.
2353 (read_filesystem_list): Use FS_TYPE.
2355 2001-09-29 Paul Eggert <eggert@twinsun.com>
2357 * exclude.c (excluded_filename): 0 -> false, since it's
2360 2001-09-28 Paul Eggert <eggert@twinsun.com>
2362 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
2363 #defines strtoimax. Also treat the other strto* functions
2366 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
2367 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
2368 (strtoimax, strtoumax): Do not declare if already defined as a macro.
2370 2001-09-26 Jim Meyering <meyering@lucent.com>
2372 Most macros in unlocked-io.h had the wrong number of arguments.
2373 * gen-uio: New script.
2374 (USE_UNLOCKED_IO): Define to 1 if not already defined.
2375 * unlocked-io.hin: Remove file.
2376 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
2377 rather than trying to embed it here.
2378 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
2379 Reported by Padraig Brady.
2381 2001-09-25 Volker Borchert <bt@teknon.de>
2383 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
2385 2001-09-23 Jim Meyering <meyering@lucent.com>
2387 * mountlist.c: Remove useless parentheses in #if directives.
2388 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
2389 the deprecated MOUNTED symbol is no longer defined in mntent.h.
2391 2001-09-22 Jim Meyering <meyering@lucent.com>
2393 * localcharset.c: Update from latest gettext.
2394 * config.charset: Likewise.
2396 2001-09-20 Jim Meyering <meyering@lucent.com>
2398 * xstrtol.c (strtoimax): Guard declaration with
2399 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
2400 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
2401 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
2402 (strtoumax): Likewise, for completeness (it wasn't necessary).
2404 2001-09-06 Paul Eggert <eggert@twinsun.com>
2406 * strtoimax.c (HAVE_LONG_LONG):
2407 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
2408 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
2409 to work around bug in IBM C compiler.
2411 2001-09-16 Jim Meyering <meyering@lucent.com>
2413 * mkdir.c: New file.
2415 2001-09-04 Paul Eggert <eggert@twinsun.com>
2417 * xgetcwd.c: Revert some of the previous change; intead,
2418 fix the HAVE_GETCWD_NULL code to behave more like the
2419 !HAVE_GETCWD_NULL code used to.
2422 (xgetcwd): Do not return NULL when memory is exhausted; instead,
2425 2001-09-04 Paul Eggert <eggert@twinsun.com>
2427 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
2428 Use ssize_t, not int, to store result of readlink.
2429 Check for ssize_t overflow as well as size_t overflow,
2430 as POSIX says the result of readlink is implementation-defined
2431 when ssize_t overflows.
2432 Remove unnecessary cast to char*.
2433 Use free+malloc instead of realloc, as the storage doesn't need
2434 to be preserved and it's clearer and can be more efficient that way.
2435 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
2436 * xreadlink.h (xreadlink): Update prototype.
2438 2001-09-03 Paul Eggert <eggert@twinsun.com>
2440 * exclude.c (fnmatch_no_wildcards): Fix confusion between
2441 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
2442 spotted by Jim Meyering.
2444 2001-09-03 Jim Meyering <meyering@lucent.com>
2446 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
2448 2001-09-03 Paul Eggert <eggert@twinsun.com>
2450 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
2451 like the HAVE_GETCWD_NULL code.
2452 Include pathmax.h if not HAVE_GETCWD.
2453 Do not include xalloc.h.
2454 (INITIAL_BUFFER_SIZE): New symbol.
2455 Do not use xmalloc / xrealloc, since the caller is responsible for
2456 handling errors. Preserve errno around `free' during failure.
2457 Do not overrun buffer when using getwd.
2459 2001-09-03 Paul Eggert <eggert@twinsun.com>
2461 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
2462 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
2464 2001-09-02 Jim Meyering <meyering@lucent.com>
2466 * error.c: Update from GNU libc.
2468 2001-09-01 Jim Meyering <meyering@lucent.com>
2470 * xreadlink.c: New file.
2471 * xreadlink.h: New file.
2472 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
2474 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
2475 doesn't conflict with sparc Solaris 7's definition in
2476 /usr/include/sys/int_types.h.
2478 * exclude.c: Use `""', not `<>' to #include non-system header files.
2479 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
2480 and strncasecmp as r-values. Unixware didn't have declarations.
2482 2001-08-31 Jim Meyering <meyering@lucent.com>
2484 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
2485 Use an initial, malloc'd, buffer of length 128 rather than
2486 a statically allocated one of length 1024.
2488 2001-08-30 Paul Eggert <eggert@twinsun.com>
2490 * xgetcwd.c: Don't include pathmax.h.
2491 Include stdlib.h and unistd.h if available.
2493 (xmalloc, xstrdup, free): Remove decls.
2494 (xgetcwd): Don't assume sizes fit in unsigned.
2495 Check for overflow when computing sizes.
2496 Simplify reallocation code.
2498 2001-08-28 Paul Eggert <eggert@twinsun.com>
2500 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
2502 * strtoimax.c: Renamed from strtoxmax.c, removing the
2505 Also, make the following further changes to make this file's
2506 configuration more similar to that of strtol.c:
2507 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
2508 (strtoumax, uintmax_t, strtoull, strtol): Remove.
2509 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
2510 (strtoimax): Renamed from strtoumax. All uses of unsigned values
2511 changed to signed values.
2513 And make the following changes as well:
2514 Fix copyright notice, as 1999 was missing.
2515 (verify): New macro.
2516 (strtoimax): Check sizes at compile-time, not run-time.
2517 Prefer strtol to strtoll if both work.
2518 (main): Remove; it was not that useful and was a pain to maintain.
2520 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
2522 2001-08-30 Paul Eggert <eggert@twinsun.com>
2524 * savedir.c (savedir): Remove size parameter, as POSIX says that
2525 a directory's st_size can have an arbitrary value, so the old
2526 usage could waste an arbitrary amount of memory. All uses
2528 * savedir.h: Update prototype.
2530 2001-08-30 Paul Eggert <eggert@twinsun.com>
2532 * xstrtol.c (strtoimax): New decl.
2534 2001-08-28 Paul Eggert <eggert@twinsun.com>
2536 * xstrtol.h: Add copyright notice.
2537 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
2538 LONGINT_INVALID_SUFFIX_CHAR.
2540 2001-08-30 Paul Eggert <eggert@twinsun.com>
2542 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2545 2001-08-30 Paul Eggert <eggert@twinsun.com>
2547 * hash.c: Remove '2001' from copyright notice.
2549 2001-08-30 Paul Eggert <eggert@twinsun.com>
2551 * full-write.h: New file.
2552 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
2553 * full-write.c: Correct credits, as cccp.c no longer
2554 exists and anyway it was so heavily changed from the old cccp
2555 code as to be unrecognizable. Include full-write.h.
2556 (full_write) Return size_t, with short writes meaning failure.
2557 All callers changed. This fixes a bug with large buffers
2559 * utime.c: Include full-write.h.
2561 2001-08-30 Paul Eggert <eggert@twinsun.com>
2563 Merge 'exclude' changes from tar 1.13.22.
2564 This fixes one or two unlikely storage allocation overflow bugs,
2565 but doesn't change user-visible behavior otherwise.
2567 2001-08-30 Paul Eggert <eggert@twinsun.com>
2569 * exclude.c (bool): Declare, perhaps by including stdbool.h.
2570 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
2571 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
2572 Include if available.
2573 (<xalloc.h>): Include
2574 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
2575 (verify): New macro. Use it to verify that EXCLUDE macros do not
2576 collide with FNM macros.
2577 (struct patopts): New struct.
2578 (struct exclude): Use it, as exclude patterns now come with options.
2579 (new_exclude): Support above changes.
2580 (new_exclude, add_exclude_file):
2581 Initial size must now be a power of two to simplify overflow checking.
2582 (free_exclude, fnmatch_no_wildcards): New function.
2583 (excluded_filename): No longer requires options arg, as the options
2584 are determined by add_exclude. Now returns bool, not int.
2585 (excluded_filename, add_exclude):
2586 Add support for the fancy new exclusion options.
2587 (add_exclude, add_exclude_file): Now takes int options arg.
2588 Check for arithmetic overflow when computing sizes.
2589 (add_exclude_file): xrealloc might modify errno, so don't
2590 realloc until after errno might be used.
2592 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
2594 (free_exclude): New decl.
2595 (add_exclude, add_exclude_file): Now takes int options arg.
2596 (excluded_filename): No longer requires options arg, as the options
2597 are determined by add_exclude. Now returns bool, not int.
2599 2001-08-30 Paul Eggert <eggert@twinsun.com>
2601 * alloca.c (alloca): Arg is of type size_t, not unsigned.
2603 2001-08-27 Jim Meyering <meyering@lucent.com>
2605 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
2607 * version-etc.c (N_): Remove definition.
2608 Revert most of last change.
2609 Instead, simply don't mark the `Copyright...' string for translation.
2610 Based on advice from Paul Eggert.
2612 * strtoxmax.c: Tweak comment.
2614 2001-08-26 Jim Meyering <meyering@lucent.com>
2616 * version-etc.c (version_etc_copyright_fmt): Replace literal year
2617 of copyright with `%s' so translators don't get an untranslated
2619 (COPYRIGHT_YEAR): Define.
2620 (version_etc): Use fprintf rather than fputs.
2621 Suggestion from Ulrich Drepper.
2623 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
2625 * strtoll.c: New file, from GNU libc.
2626 * xstrtoimax.c: New file.
2628 * xstrtol.h: Add xstrtoimax.
2629 * strtoumax.c: New file. Simply include "strtoumax.c".
2630 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
2632 * strtoumax.c: Factor to work both for unsigned and signed types, ...
2633 * strtoxmax.c: ... then renamed to this.
2635 2001-08-13 Paul Eggert <eggert@twinsun.com>
2637 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
2638 Port to Solaris 8, where 'sed' requires a space after the 'r'
2639 command, and where sh dislikes "$/". Clean up the spacing a bit.
2640 Redirect output to $tmp just once.
2642 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
2644 * addext.c (<errno.h>): Include.
2645 (errno): Declare if not defined.
2646 (addext): Work correctly when pathconf returns -1 and leaves
2647 errno alone because there is no limit. Also, work even if
2648 pathconf returns a value greater than SIZE_MAX.
2650 2001-08-12 Jim Meyering <meyering@lucent.com>
2652 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
2653 Simply `return getcwd (NULL, 0);'.
2654 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
2655 Use 1300 as initial value for length, not PATH_MAX.
2657 * pathmax.h: Clean up cpp syntax.
2659 2001-08-12 Jim Meyering <meyering@lucent.com>
2661 * gettimeofday.c: New file.
2663 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
2665 2001-08-04 Jim Meyering <meyering@lucent.com>
2667 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
2668 to get in sync with glibc.
2670 2001-08-03 Paul Eggert <eggert@twinsun.com>
2672 The following changes are from gettext 0.10.39 as maintained by
2675 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
2676 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
2677 with inverted sense. All uses changed.
2679 * mbswidth.c: Don't include <limits.h>.
2680 Include <stdlib.h> and <string.h> unconditionally.
2681 (iswcntrl, mbsinit, ISCNTRL): New macros.
2682 (mbsnwidth): Use K&R style function declarations.
2683 Don't bother checking for MB_LEN_MAX == 1, since the compiler
2684 can optimize it when MB_CUR_MAX == 1.
2685 The width of control characters is zero, not 1.
2687 2001-07-15 Jim Meyering <meyering@lucent.com>
2689 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
2690 (BUILT_SOURCES): Add unlocked-io.h.
2691 (io_functions): Define.
2692 (unlocked-io.h): New rule.
2693 (DISTCLEANFILES): Add unlocked-io.h.
2694 (all-local): Depend on unlocked-io.h, to ensure it is created.
2696 * unlocked-io.hin: New file
2698 * regex.c: Update from glibc.
2700 2001-07-05 Jim Meyering <meyering@lucent.com>
2702 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
2704 (libfetish_a_SOURCES): Put all .h files here instead.
2705 Remove a thus-exposed (better checks in automake) duplicate and
2706 two unnecessary .h files.
2708 2001-06-11 Jim Meyering <meyering@lucent.com>
2710 * regex.c: Update from GNU libc.
2712 2001-05-27 Jim Meyering <meyering@lucent.com>
2714 * readutmp.h (UT_TYPE): Define.
2716 2001-05-24 Jim Meyering <meyering@lucent.com>
2718 * argmatch.c: Include "quote.h".
2719 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
2720 quote function. Reported by Göran Uddeborg.
2722 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
2724 * dirname.c (dir_name): Compute append_dot using path, not newpath
2725 which is not yet declared.
2727 2001-05-11 Paul Eggert <eggert@twinsun.com>
2729 * Makefile.am (libfetish_a_SOURCES):
2730 Add strftime.c, since we now compile it on all hosts.
2732 * strftime.c (my_strftime):
2733 Define to nstrftime if emacs, but only if my_strftime is not defined.
2734 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
2735 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
2736 Add one more extra argument: a nanoseconds value.
2739 (my_strftime function): Add %N format.
2740 (emacs_strftimeu): Renamed from emacs_strftime,
2741 with extra ut argument.
2743 2001-05-11 Paul Eggert <eggert@twinsun.com>
2745 dirname code cleanup. base_name now behaves more compatibly
2746 with POSIX basename when given file names that have trailing
2747 slashes, and similarly for dir_name. Add new primitives
2748 base_len and dir_len. Put the directory-name-related decls
2751 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
2752 * backupfile.c (base_name): Likewise.
2753 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
2754 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
2755 * makepath.c (strip_trailing_slashes): Likewise.
2756 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
2758 * rename.c (strip_trailing_slashes): Likewise.
2759 * same.c (base_name): Likewise.
2760 * stripslash.c (ISSLASH): Likewise.
2762 * addext.c: Include <dirname.h> after size_t is defined.
2763 * backupfile.c: Likewise.
2765 * addext.c (addext): Use base_len to trim redundant
2766 trailing slashes instead of doing it ourselves.
2767 But do not trim the last slash if it is not redundant.
2769 * backupfile.c (find_backup_file_name,
2770 max_backup_version): Use base_len instead of rolling it ourselves.
2771 Handle the case of "" and (on DOS) "C:" correctly.
2773 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
2774 Include <string.h>, <dirname.h>.
2775 (base_name): Allow file names ending in slashes, other than names
2776 that are all slashes. In this case, return the basename followed
2777 by the slashes. This is more general, and can be used in places
2778 where the original base_name purposely had an assertion failure.
2779 (base_len): New function.
2781 * dirname.c: Include <string.h> instead of <stdlib.h>.
2782 Do not include <assert.h>; no longer needed.
2784 (memrchr): Remove decl.
2785 (dir_name_r): Remove.
2786 (dir_len): Renamed from dirlen. All callers changed.
2787 Rewrite in terms of base_name, for simplicity and consistency.
2788 (dir_name): Never return NULL. All callers changed.
2789 Do not include <stdlib.h> in test program; no longer needed.
2790 return 0; is fine for test program.
2792 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
2794 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
2796 * path-concat.c (path_concat): Use base_len to compute
2797 base length, not strlen; this means we cannot rely on memcpy
2800 * same.c (STREQ): Remove.
2801 (same_name): Handle the case where the basename ends in trailing '/'.
2803 * stripslash.c (strip_trailing_slashes): Return nonzero if
2804 a slash was stripped. Do not strip the last slash after a
2807 2001-04-08 Jim Meyering <meyering@lucent.com>
2809 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
2810 recomputed; that's necessary when the offset spans a DST transition.
2811 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
2813 2001-04-02 Jim Meyering <meyering@lucent.com>
2815 * regex.h, regex.c: Update from GNU libc.
2817 2001-03-19 Paul Eggert <eggert@twinsun.com>
2819 * version-etc.c (version_etc_copyright): Update to 2001.
2821 2001-03-16 Paul Eggert <eggert@twinsun.com>
2823 * tempname.c (uint64_t): Define to uintmax_t if
2824 not defined, and if UINT64_MAX is not defined.
2825 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
2826 Reported by John David Anglin.
2828 2001-03-10 Bruno Haible <haible@clisp.cons.org>
2830 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
2831 alias if codeset is empty.
2832 * config.charset (BeOS): Use wildcard syntax.
2834 2001-03-13 Jim Meyering <meyering@lucent.com>
2836 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
2837 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
2840 2001-03-06 Bruno Haible <haible@clisp.cons.org>
2842 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
2844 * unicodeio.c (print_unicode_char): Simplify accordingly.
2846 2001-03-06 Bruno Haible <haible@clisp.cons.org>
2848 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
2849 support for DOS/DJGPP.
2851 2001-02-28 Paul Eggert <eggert@twinsun.com>
2853 * Makefile.am (libfetish_a_SOURCES):
2854 Add dup-safer.c, fopen-safer.c.
2855 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
2857 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
2859 2001-02-25 Paul Eggert <eggert@twinsun.com>
2861 The mkstemp replacement is taken from glibc 2.2.2, with some
2862 portability fixes for use outside glibc, as follows:
2864 * tempname.c (struct_stat64): New macro.
2865 (direxists, __gen_tempname): Use it.
2866 This avoids a portability problem with Solaris 8.
2868 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
2869 (<stddef.h>, <stdint.h>, <string.h>):
2870 Include only if STDC_HEADERS || _LIBC.
2871 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
2872 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
2873 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
2874 (__set_errno): Define this macro if <errno.h> doesn't.
2875 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
2876 Define these macros if <stdio.h> doesn't.
2877 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
2878 Define these macros if <sys/stat.h>
2879 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
2880 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
2881 __xstat64): Define if not _LIBC.
2882 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
2883 (__gen_tempname): Invoke gettimeofday only if
2884 HAVE_GETTIMEOFDAY || _LIBC;
2885 otherwise, fall back on plain "time".
2886 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
2888 * mkstemp.c (__GT_FILE): Define to zero if not defined.
2890 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
2892 2001-02-17 Jim Meyering <meyering@lucent.com>
2894 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
2895 around included file name.
2897 * strnlen.c (__strnlen): Merge in a change from GNU libc.
2899 * strftime.c: Update from GNU libc (the only changes were to comments).
2901 2001-02-13 Bruno Haible <haible@clisp.cons.org>
2903 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
2905 2001-02-17 Paul Eggert <eggert@twinsun.com>
2907 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
2908 Remove workaround macros for hosts that have mbrtowc but not
2909 mbstate_t, as we now insist on proper declarations for both
2910 before using mbrtowc.
2912 2001-02-17 Jim Meyering <meyering@lucent.com>
2914 * regex.c: Update from libc.
2916 2001-02-16 Paul Eggert <eggert@twinsun.com>
2918 * alloca.c (malloc): Undef before defining, since stdlib.h
2919 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
2920 Reported by Mark Hounschell via Paul Eggert.
2922 2001-01-30 Bruno Haible <haible@clisp.cons.org>
2924 * config.charset: Update for FreeBSD 4.2.
2926 2001-01-26 Jim Meyering <meyering@lucent.com>
2928 * quotearg.c: Include stddef.h.
2929 * quote.c: Include stddef.h.
2930 Reported by Axel Kittenberger.
2932 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
2933 line in double quotes so that it evokes a better diagnostic.
2934 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
2935 Reported by Axel Kittenberger.
2937 2001-01-15 Bruno Haible <haible@clisp.cons.org>
2939 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
2940 to avoid a warning. Add back 'const' to inptr.
2942 2001-01-16 Jim Meyering <meyering@lucent.com>
2944 * basename.c: Include <stdio.h>, needed by assert on SunOS 4.
2947 2001-01-14 Jim Meyering <meyering@lucent.com>
2949 * rename.c: New file. From Volker Borchert.
2950 Include stdlib.h, string.h or strings.h, and xalloc.h.
2951 Use strip_trailing_slashes rather than open-coding it.
2953 2001-01-03 Paul Eggert <eggert@twinsun.com>
2955 * strftime.c: Sync with glibc time/strftime.c 1.81.
2957 2001-01-03 Jim Meyering <meyering@lucent.com>
2959 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
2960 local `inptr' to avoid warning with some system declarations of iconv.
2962 2000-12-29 Paul Eggert <eggert@twinsun.com>
2964 * modechange.c: Do not assume that mode_t uses the
2965 traditional octal encoding. E.g. "chmod 1 FOO" should set
2966 the other-execute bit of FOO even if S_IXOTH != 1.
2968 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
2969 WOTH, XOTH, ALLM): New macros.
2970 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
2971 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
2973 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
2974 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
2976 No need to use uintmax_t; unsigned long is long enough.
2977 Don't bother to get suffix since we don't use it.
2979 2000-12-24 Jim Meyering <meyering@lucent.com>
2981 * hash.c (is_prime): Return explicit boolean values.
2982 (hash_get_first): Return NULL to appease Irix5.6's 89.
2983 Reported by Nelson Beebe.
2985 2000-10-31 Bruno Haible <haible@clisp.cons.org>
2987 * localcharset.c (locale_charset): Add support for Win32.
2989 2000-12-18 Paul Eggert <eggert@twinsun.com>
2991 * physmem.h, physmem.c: New files.
2993 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
2994 (noinst_HEADERS): Add physmem.h.
2996 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
2997 't' for compatibility with Solaris 8 sort.
2999 2000-12-18 Bruno Haible <haible@clisp.cons.org>
3001 * config.charset: Add support for BeOS.
3003 2000-12-16 Jim Meyering <meyering@lucent.com>
3005 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
3006 SHELLS_FILE to a file name that's useful on djgpp systems.
3008 (ADDITIONAL_DEFAULT_SHELLS): Define.
3009 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
3010 Based mostly on a patch from Prashant TR.
3012 2000-12-16 Jim Meyering <meyering@lucent.com>
3014 This bug had a serious impact on chown: `chown N:M FILE' (for integer
3015 N and M) would have treated it like `chown N:N FILE'.
3017 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
3019 2000-10-31 Bruno Haible <haible@clisp.cons.org>
3021 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
3022 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
3023 to the list of canonical encodings. Rename EUC-CN to GB2312.
3025 2000-12-08 Andreas Schwab <schwab@suse.de>
3027 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
3028 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
3030 2000-12-07 Jim Meyering <meyering@lucent.com>
3032 * stripslash.c (ISSLASH): Define.
3033 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
3036 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
3037 (dir_name_r): Declare this function as static.
3038 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
3039 manifest itself on a name containing a mix of slashes and
3041 Make this function work with names starting with a DOS-style
3042 drive letter and colon prefix.
3043 (dir_name): Append `.' if necessary.
3044 Based mostly on patches from Prashant TR and Eli Zaretskii.
3046 * dirname.h (dir_name_r): Remove prototype.
3048 2000-12-05 Jim Meyering <meyering@lucent.com>
3050 * dirname.c (dir_name_r): Add `const' in a few local declarations.
3052 2000-12-04 Jim Meyering <meyering@lucent.com>
3054 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
3055 Also include memory.h, stdlib.h, unistd.h if appropriate.
3056 Reported by Andreas Jaeger (conflicting declaration of malloc).
3058 2000-12-02 Jim Meyering <meyering@lucent.com>
3060 * closeout.h: Make idempotent, to avoid some obscure warnings.
3062 2000-12-01 Paul Eggert <eggert@twinsun.com>
3064 * memrchr.c: Include <config.h> before any system include file.
3066 2000-11-29 Paul Eggert <eggert@twinsun.com>
3068 * dirname.c (dir_name_r): Fix typo: int -> size_t.
3070 2000-11-26 Jim Meyering <meyering@lucent.com>
3072 * memcoll.c: Include sys/types.h. From Werner Almesberger.
3074 2000-11-22 Paul Eggert <eggert@twinsun.com>
3076 * strftime.c (my_strftime): Do not invoke mbrlen with a
3077 size of (size_t) -1; it's not portable.
3079 2000-11-17 Akim Demaille <akim@epita.fr>
3081 * obstack.h: Formatting changes.
3082 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
3083 prevent type checking.
3084 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3085 cast the value to (void *): assigning a `foo *' to a `void *'
3087 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3089 2000-11-17 Jim Meyering <meyering@lucent.com>
3091 * strstr.c: Update from GNU libc.
3093 2000-11-16 Jim Meyering <meyering@lucent.com>
3095 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
3097 2000-11-11 Jim Meyering <meyering@lucent.com>
3099 * error.c: Add a couple #includes, merging from GNU libc version.
3101 2000-11-10 Jim Meyering <meyering@lucent.com>
3103 * obstack.h: Update from GNU libc.
3104 * obstack.c: Likewise.
3106 2000-11-06 Paul Eggert <eggert@twinsun.com>
3108 * getusershell.c (setusershell): Use rewind rather than
3109 fseek/fseeko, to avoid configuration hassles with fseeko.
3110 Don't bother opening SHELLS_FILE if shellstream is NULL;
3113 2000-11-05 Jim Meyering <meyering@lucent.com>
3115 * makepath.h (make_dir): Declare.
3116 * makepath.c (make_dir): Remove `static' attribute.
3119 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
3121 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
3122 last one in a bucket, advance to the next bucket.
3124 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
3126 * fnmatch.c: Do not comment out all the code if we are using
3127 the GNU C library, because in some cases we are replacing buggy
3128 code in the GNU C library itself.
3130 2000-10-30 Paul Eggert <eggert@twinsun.com>
3132 * error.h, getline.h, modechange.h:
3133 Remove "2000" from Copyright line, as the file hasn't been
3134 changed this year other than in the copyright notice.
3136 * xalloc.h: Add "2000" to Copyright line, as this file
3137 was changed this year.
3139 2000-10-30 Paul Eggert <eggert@twinsun.com>
3141 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
3142 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
3143 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
3145 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
3147 * regex.h (__restrict_arr): Move definition out of #ifndef block.
3148 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
3149 doesn't define __restrict_arr.
3151 2000-10-29 Jim Meyering <meyering@lucent.com>
3153 * xstat.in: Fix grammar in comment.
3155 2000-10-28 Jim Meyering <meyering@lucent.com>
3157 * memchr.c: Update from libc.
3158 Adjust for portability:
3159 [HAVE_STDLIB_H]: Include stdlib.h.
3160 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
3161 Undef __memchr, too.
3162 [!weak_alias]: Define __memchr to memchr.
3164 * regex.c: Update from libc.
3165 * regex.h: Likewise.
3166 * getopt1.c: Likewise.
3167 * memcmp.c: Likewise.
3169 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
3170 Avoid using fseek, when possible -- it's broken by design.
3171 Patch by Ulrich Drepper.
3173 2000-10-26 Jim Meyering <meyering@lucent.com>
3175 * strftime.c: Update from libc.
3177 2000-10-25 Jim Meyering <meyering@lucent.com>
3179 * obstack.c: Update from libc.
3181 2000-10-23 Jim Meyering <meyering@lucent.com>
3183 * hard-locale.c (hard_locale): Revert last change -- it was simply
3184 wrong. That set_locale call must not have any side effects.
3187 2000-10-22 Jim Meyering <meyering@lucent.com>
3189 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
3190 [CYCLIC]: Remove now-unused definition.
3192 * save-cwd.c (O_DIRECTORY): Define, if needed.
3193 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
3194 Suggestion from Ulrich Drepper.
3196 2000-10-21 Jim Meyering <meyering@lucent.com>
3198 * dirname.c (dir_name_r): New function, factored out of dir_name.
3199 (dir_name): Use dir_name_r.
3200 * dirname.h (dir_name_r): Declare it.
3202 2000-10-21 Jim Meyering <meyering@lucent.com>
3204 * dirname.c (memrchr): Declare if necessary.
3205 (dir_name): Remove the restriction that there be no
3206 trailing slashes. Now, this code skips past them, effectively
3208 [TEST_DIRNAME] (main): New unit tests.
3210 * memrchr.c: New file from GNU libc.
3211 Undef __memrchr, too.
3212 [!weak_alias]: Define __memrchr to memrchr.
3213 Guard weak_alias use with `#ifdef weak_alias'.
3215 2000-10-17 Jim Meyering <meyering@lucent.com>
3217 * quote.h (PARAMS): Define and use.
3218 Reported by Akim Demaille.
3220 * getopt.c: Update from libc.
3222 2000-10-16 Jim Meyering <meyering@lucent.com>
3224 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
3227 2000-09-25 Jim Meyering <meyering@lucent.com>
3229 * md5.h (rol): Define (from GnuPG).
3231 * sha.c: Give credit (GnuPG) where due.
3232 (M): Use rol rather than open-coding it.
3233 Add a FIXME comment.
3235 2000-09-21 Jim Meyering <meyering@lucent.com>
3237 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
3238 Reported by Michael Stone.
3240 2000-09-20 Jim Meyering <meyering@lucent.com>
3242 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
3243 (noinst_HEADERS): Add sha.h.
3244 Based on code from Scott G. Miller and from GnuPG.
3246 2000-09-15 Jim Meyering <meyering@lucent.com>
3248 * regex.c: Update from libc.
3250 2000-09-10 Jim Meyering <meyering@lucent.com>
3252 * getopt.c (_getopt_internal): Update from glibc.
3254 2000-09-09 Jim Meyering <meyering@lucent.com>
3256 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
3257 think it should be used as a general replacement for isascii.
3258 * fnmatch.c: Likewise.
3259 * mbswidth.c: Likewise
3260 * regex.c: Likewise.
3263 * userspec.c: Include sys/param.h and limits.h.
3265 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
3266 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
3267 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
3268 UID, GID. Check range.
3270 2000-09-06 Jim Meyering <meyering@lucent.com>
3272 * getopt.c (_getopt_internal): Update from glibc.
3274 2000-08-30 Jim Meyering <meyering@lucent.com>
3276 * strftime.c: Merge in changes from GNU libc.
3278 2000-08-26 Jim Meyering <meyering@lucent.com>
3280 * closeout.c: Include "__fpending.h".
3281 (close_stdout_status): Return right away if there's nothing to flush.
3283 * Makefile.am (noinst_HEADERS): Add __fpending.h.
3284 * __fpending.c: New file.
3285 * __fpending.h: New file.
3287 2000-08-07 Paul Eggert <eggert@twinsun.com>
3289 Standardize on "memory exhausted" instead of "Memory exhausted"
3290 or "virtual memory exhausted".
3291 * obstack.c (print_and_abort): Use "memory exhausted", not
3292 "virtual memory exhausted".
3293 * same.c (same_name): Invoke xalloc_die instead of printing
3295 * userspec.c (parse_user_spec): Likewise.
3296 * bumpalloc.h: comment fix
3297 * same.c, userspec.c: Include xalloc.h.
3299 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
3300 not char *const and pointing to a constant array.
3301 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
3302 (xrealloc): Comment fix.
3304 * userspec.c (parse_user_spec):
3305 Don't translate a message until just before returning,
3306 to avoid unnecessary translation.
3308 2000-08-07 Jim Meyering <meyering@lucent.com>
3310 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
3311 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
3312 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
3313 getgroups.c, gethostname.c, getopt.h, group-member.c,
3314 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
3315 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
3316 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
3317 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
3318 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
3319 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
3320 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
3321 yesno.c: Back out Copyright date changes for each file with no change
3322 this year. This eases coordination with other programs using the same
3323 source code modules. From Paul Eggert.
3325 2000-08-03 Greg McGary <greg@mcgary.org>
3327 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
3328 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
3329 (EXTEND_BUFFER): Use them.
3331 2000-08-01 Jim Meyering <meyering@lucent.com>
3333 * dirname.c (ISSLASH): Define.
3334 (BACKSLASH_IS_PATH_SEPARATOR): Define.
3335 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
3336 both `\' and `/' may be use as path separators.
3337 Based on a patch from Prashant TR.
3339 2000-07-31 Paul Eggert <eggert@twinsun.com>
3341 * quotearg.c (quotearg_n_options): Don't make the initial
3342 slot vector a constant, since it might get modified.
3344 2000-07-31 Jim Meyering <meyering@lucent.com>
3346 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
3347 * obstack.c (print_and_abort): Likewise.
3349 2000-07-30 Paul Eggert <eggert@twinsun.com>
3351 * quotearg.c (quotearg_n_options): Preallocate a slot 0
3352 buffer, so that the caller can always quote one small
3353 component of a "memory exhausted" message in slot 0.
3354 From a suggestion by Jim Meyering.
3356 2000-07-30 Jim Meyering <meyering@lucent.com>
3358 * makepath.c (make_path): Quote the other instance, too.
3360 * quotearg.c (N_STATIC_SLOTVECS): Define.
3361 (STATIC_BUF_SIZE): Define.
3362 (quotearg_n_options): Use only statically allocated storage when
3363 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
3364 than STATIC_BUF_SIZE.
3366 2000-07-29 Jim Meyering <meyering@lucent.com>
3368 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
3369 * dirname.c (dir_name): Likewise.
3371 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
3373 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
3374 (dir_name): Assert that there are no trailing slashes.
3376 2000-07-18 Bruno Haible <haible@clisp.cons.org>
3378 * mbswidth.h (mbswidth): Add a flags argument.
3379 (mbswidth): New declaration.
3380 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
3381 * mbswidth.c (mbswidth): Add a flags argument.
3382 (mbsnwidth): New function.
3384 2000-07-24 Jim Meyering <meyering@lucent.com>
3386 * mbswidth.c: Remove useless #else. From Bruno Haible.
3388 2000-07-23 Paul Eggert <eggert@twinsun.com>
3390 * mbswidth.c (_XOPEN_SOURCE):
3391 Don't define; this causes problems on Solaris 7.
3392 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
3394 2000-07-23 Paul Eggert <eggert@twinsun.com>
3397 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
3398 so that mbstate_t is always defined.
3400 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
3401 be 1 in at least one GCC installation, and this configuration
3402 error is likely to be common. Ignoring MB_LEN_MAX hurts
3403 performance on hosts that have mbrtowc but have only unibyte
3404 locales, but I assume these hosts are rare.
3406 2000-07-23 Paul Eggert <eggert@twinsun.com>
3408 * quotearg.c: Streamline by invoking multibyte code only if needed.
3409 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
3410 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
3411 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
3412 invoke multibyte primitives.
3414 2000-07-23 Jim Meyering <meyering@lucent.com>
3416 * basename.c (base_name): Add an assertion.
3418 2000-07-15 Bruno Haible <clisp.cons.org>
3420 * quotearg.c: When the system forces us to redefine mbstate_t,
3421 shadow its mbsinit function.
3423 2000-07-16 Bruno Haible <haible@clisp.cons.org>
3425 * mbswidth.h: New file.
3426 * mbswidth.c: New file.
3427 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
3428 (noinst_HEADERS): Add mbswidth.h.
3430 2000-07-17 Bruno Haible <haible@clisp.cons.org>
3432 * config.charset: Add support for FreeBSD. Improve support for HP-UX
3435 2000-07-15 Jim Meyering <meyering@lucent.com>
3437 * makepath.c: Include quote.h.
3438 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
3439 corresponding argument in a `quote (...)' call.
3440 Give better diagnostics.
3442 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
3443 (noinst_HEADERS): Add quote.h.
3445 * quote.c (quote, quote_n): New file. Two functions taken verbatim
3446 from tar's src/misc.c.
3447 * quote.h: New file. Prototypes for same.
3449 2000-07-10 Paul Eggert <eggert@twinsun.com>
3451 From a suggestion by Bruno Haible.
3452 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
3453 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
3454 to decide whether to define the BeOS workaround macro;
3455 this adjusts to the change to AC_MBSTATE_T.
3457 2000-07-13 Paul Eggert <eggert@twinsun.com>
3459 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
3461 * quotearg.c (quoting_style_args, quoting_style_vals,
3462 quotearg_buffer_restyled): Add support for
3463 clocale_quoting_style. Undo previous change to
3464 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
3465 and "{RIGHT QUOTATION MARK}" msgids.
3467 2000-07-05 Paul Eggert <eggert@twinsun.com>
3469 The old behavior of quoting `like this' doesn't look good with
3470 newer, ISO-style fonts. See:
3471 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
3473 Instead, quote "like this" by default. Let the translator
3474 tailor the locale-specific quoting behavior by providing
3475 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
3477 * quotearg.c (N_): New macro.
3478 (gettext_default): New function.
3479 (quotearg_buffer_restyled): Use
3480 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
3481 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
3483 2000-07-09 Jim Meyering <meyering@lucent.com>
3485 * Most files: Update copyright dates to include 2000.
3487 2000-07-08 Jim Meyering <meyering@lucent.com>
3489 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
3491 (xgethostname): Remove now-unnecessary #ifdef.
3492 Move declaration of `err' into loop where it's used.
3494 2000-07-05 Bruno Haible <haible@clisp.cons.org>
3496 * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
3497 by allocating a larger buffer. Test the gethostname return value for
3498 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
3499 returns an error and ENAMETOOLONG isn't defined.
3501 2000-07-05 Paul Eggert <eggert@twinsun.com>
3502 and Bruno Haible <haible@clisp.cons.org>
3504 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
3506 2000-07-05 Bruno Haible <haible@clisp.cons.org>
3508 * quotearg.c (struct quoting_options): Simplify quote_these_too
3511 2000-07-03 Jim Meyering <meyering@lucent.com>
3513 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
3514 Reported by Bruno Haible.
3516 2000-07-04 Jim Meyering <meyering@lucent.com>
3518 * quotearg.c: Make inclusion of <wchar.h> independent of whether
3519 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
3522 2000-07-03 Paul Eggert <eggert@twinsun.com>
3523 and Bruno Haible <haible@clisp.cons.org>
3525 * quotearg.c (mbrtowc):
3526 Assign to *pwc, and return 1 only if result is nonzero.
3527 (iswprint): Use ISPRINT when substituting our own mbrtowc.
3529 2000-07-03 Jim Meyering <meyering@lucent.com>
3531 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
3532 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
3535 2000-07-02 Jim Meyering <meyering@lucent.com>
3537 * quotearg.c (mbstate_t): Don't define here.
3539 2000-07-02 Jim Meyering <meyering@lucent.com>
3541 * nanosleep.c (SIGCONT): Define if not already defined.
3543 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3545 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
3546 per change in ../m4/ls-mntd-fs.m4.
3547 (read_filesystem_list): Ignore symbolic links.
3549 2000-06-29 Jim Meyering <meyering@lucent.com>
3551 * same.c: Include <string.h> or <strings.h>, as appropriate,
3552 for declaration of strcmp.
3554 * long-options.c: Include <stdlib.h>, for declaration of exit.
3556 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
3557 Avoid warning by casting result to `char *' to remove `const'.
3559 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3561 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
3563 2000-06-26 Paul Eggert <eggert@twinsun.com>
3565 savedir now sets errno on failure and invokes xmalloc to get memory.
3566 Fix a couple of other minor bugs while we're at it.
3568 * savedir.c (<unistd.h>): Do not include; there's no need.
3569 (NAMLEN): Remove macro.
3570 (malloc, realloc): Remove decls.
3572 ("xalloc.h"): Include.
3573 (NAME_SIZE_DEFAULT): New macro.
3574 (savedir): Use xmalloc / xrealloc to allocate memory.
3575 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
3576 Skip "" directory entries.
3577 Use strlen to calculate directory entry length, since the old method
3578 is rarely used these days and isn't worth supporting.
3579 Don't use a pointer after freeing it.
3580 Check for integer overflow when calculating allocation size.
3581 Use memcpy to copy entries, instead of stpcpy.
3582 Set errno properly when returning NULL.
3583 Check for readdir error.
3585 2000-06-26 Jim Meyering <meyering@lucent.com>
3587 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
3589 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3591 * getusershell.c (xmalloc, xrealloc): Remove functions.
3593 Don't include <stdlib.h>. Don't declare malloc, realloc.
3595 2000-06-23 Bruno Haible <haible@clisp.cons.org>
3597 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
3599 2000-06-24 Jim Meyering <meyering@lucent.com>
3601 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
3603 2000-06-21 Jim Meyering <meyering@lucent.com>
3605 * getpass.c: New file, from Bruno Haible. Required for BeOS.
3607 2000-06-19 Paul Eggert <eggert@twinsun.com>
3609 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
3610 (mbrtowc, mbstate_t): Define substitutes if
3611 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
3612 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
3613 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
3615 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3617 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
3618 than 1024, return a memory chunk of least possible size, instead
3619 of size PATH_MAX + 2. In the loop, increment the size proportionally.
3620 Use free/xmalloc instead of xrealloc to avoid copying for very long
3623 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3625 * canon-host.c (canon_host): Use malloc and memcpy to copy an
3626 address, not strdup. Include <stdlib.h> and don't declare free().
3628 2000-06-17 Bruno Haible <haible@clisp.cons.org>
3630 * path-concat.c (path_concat): Don't access dir[-1] if dir is
3633 2000-06-21 Jim Meyering <meyering@lucent.com>
3635 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
3636 (noinst_HEADERS): Add getstr.h.
3638 * getline.c (getstr): Move into a separate file.
3639 * getstr.c (getstr): New file, extracted from getline.c, with
3640 the following changes: new parameter, delim2; both delim[12]
3641 parameters have type `int', not `char'. The latter would lose
3642 with 8-bit delimiters.
3643 * getstr.h: New file.
3645 2000-06-19 Jim Meyering <meyering@lucent.com>
3647 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
3649 2000-06-18 Jim Meyering <meyering@lucent.com>
3651 * mkdir.c: Remove file, due mainly to copyright incompatibility.
3652 Besides, these days every porting target provides a mkdir function.
3654 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
3655 (this snippet comes from src/system.h).
3657 2000-06-15 Paul Eggert <eggert@twinsun.com>
3659 * human.c (adjust_value): New function.
3660 (human_readable_inexact): Apply rounding style even when
3661 printing approximate values.
3663 2000-06-14 Paul Eggert <eggert@twinsun.com>
3665 * human.c (human_readable_inexact): Allow an input block
3666 size that is not a multiple of the output block size, and vice versa.
3667 Reported by Piergiorgio Sartor.
3669 2000-06-14 Paul Eggert <eggert@twinsun.com>
3671 * getdate.y (get_date): Apply relative times after time
3672 zone indicator, not before. Reported by Todd A. Jacobs.
3674 2000-06-13 Jim Meyering <meyering@lucent.com>
3676 * Makefile.am (all-local): Depend on lstat.c and stat.c.
3678 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
3680 2000-06-12 Paul Eggert <eggert@twinsun.com>
3682 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
3684 2000-06-04 Paul Eggert <eggert@twinsun.com>
3686 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
3688 2000-06-04 Jim Meyering <meyering@lucent.com>
3690 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
3691 SunOS 4.1.4 for which gid_t is an unsigned type.
3693 2000-06-03 Jim Meyering <meyering@lucent.com>
3695 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
3697 2000-05-26 Bruno Haible <haible@clisp.cons.org>
3699 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
3700 newer, don't install charset.alias.
3701 * config.charset: Change the Linux/glibc rules so they become empty
3702 on glibc-2.1 or newer.
3704 2000-06-02 Jim Meyering <meyering@lucent.com>
3706 * mountlist.c: Back out last change. Instead, do this...
3707 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
3708 member using the same `ignore'-testing code.
3709 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
3713 2000-05-29 Jim Meyering <meyering@lucent.com>
3715 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
3716 with the `ignore' attribute. Based on a patch from Mark D. Roth.
3718 2000-05-22 Jim Meyering <meyering@lucent.com>
3720 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
3722 2000-05-18 Jim Meyering <meyering@lucent.com>
3724 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
3725 back, too, since it may have been modified by allocate_entry.
3726 (hash_delete): Rewrite to use neither the assignment operator
3727 nor the comma operator in an if-expression.
3729 2000-05-15 Paul Eggert <eggert@twinsun.com>
3732 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
3733 Remove; no longer needed.
3734 "quotearg.h": Add include.
3735 (file_name): Do not bother to explicitly initialize to NULL; it's less
3736 efficient on some hosts.
3737 (close_stdout_status): Remove test as to whether stdout was already
3738 closed; it breaks for the case "echo x | sort >&-".
3739 Quote file name colons.
3740 Do not assume that _("write error") lacks format strings.
3742 2000-05-15 Jim Meyering <meyering@lucent.com>
3744 * version-etc.c (version_etc_copyright): Update the copyright string
3745 used in all --version output.
3747 2000-05-14 Jim Meyering <meyering@lucent.com>
3749 * closeout.c (close_stdout_set_file_name): New function.
3750 (close_stdout_status): Use new file-scoped global.
3751 Return right away if fstat says the stdout file descriptor is invalid.
3752 * closeout.h (close_stdout_set_file_name): Declare.
3754 2000-05-10 Jim Meyering <meyering@lucent.com>
3756 * closeout.c [default_exit_status]: New file-scoped variable.
3757 (close_stdout_set_status): New function.
3758 * closeout.h (close_stdout_set_status): Declare.
3760 2000-05-08 Jim Meyering <meyering@lucent.com>
3762 * long-options.c: Don't include closeout.h.
3763 (parse_long_options): Don't call close_stdout for --version.
3765 2000-05-06 Jim Meyering <meyering@lucent.com>
3767 * strnlen.c: Undefine __strnlen and strnlen.
3768 [!weak_alias]: Define __strnlen to strnlen.
3770 * atexit.c: New file, from libiberty.
3772 2000-05-06 Jim Meyering <meyering@lucent.com>
3774 * closeout.c (close_stdout_status): Also check for errors on the
3777 2000-05-05 Bruno Haible <haible@clisp.cons.org>
3779 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
3780 instead of xmalloc, xrealloc, path_concat.
3781 (locale_charset): Treat empty environment variables as absent.
3782 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
3784 2000-05-04 Jim Meyering <meyering@lucent.com>
3786 * getopt.c: Update from glibc.
3787 * obstack.c: Likewise.
3788 * obstack.h: Likewise.
3789 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
3791 * regex.h: Likewise.
3792 * strndup.c: Likewise.
3793 * strnlen.c: New file, from glibc.
3795 2000-05-01 Jim Meyering <meyering@lucent.com>
3797 * full-write.c (full_write): Remove `FIXME' part of comment.
3799 2000-04-29 Jim Meyering <meyering@lucent.com>
3801 * path-concat.c: Declare strdup only if it's not defined.
3802 * canon-host.c: Likewise.
3804 2000-04-28 Jim Meyering <meyering@lucent.com>
3806 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
3807 redefinition warning on some systems (HPUX). Otherwise, regex.h is
3808 included first, then limits.h is included by locale.h by libintl.h.
3809 From John David Anglin.
3811 2000-04-25 Jim Meyering <meyering@lucent.com>
3813 * makepath.c (S_IRWXUGO): Define.
3814 (make_path): Always perform explicit chmod if MODE specifies any
3815 of the `special' permission bits. Prompted by a bug report against
3816 install from Mate Wierdl and Joost van Baal.
3818 2000-04-18 Jim Meyering <meyering@lucent.com>
3822 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
3823 getpagesize. For BeOS. Based on a patch from Bruno Haible.
3825 2000-04-17 Jim Meyering <meyering@lucent.com>
3827 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
3828 the definition of it to rpl_strftime also defined-away the system's
3831 2000-04-15 Jim Meyering <meyering@lucent.com>
3833 Use `C' to denote so-called `contiguous' files, the same way
3835 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
3836 (ftypelet): Use S_ISCTG.
3837 From Michael Deutschmann.
3839 2000-04-14 Jim Meyering <meyering@lucent.com>
3841 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
3843 2000-04-08 Jim Meyering <meyering@lucent.com>
3845 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
3846 names don't conflict. Reported by Eli Zaretskii.
3848 2000-03-28 Bruno Haible <haible@clisp.cons.org>
3850 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
3851 bug. Deal with the different error behavior of Irix iconv.
3853 2000-04-07 Jim Meyering <meyering@lucent.com>
3855 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
3856 to work around system header problems on AIX 3.2.5. From Bruno Haible.
3858 2000-04-05 Jim Meyering <meyering@lucent.com>
3860 Portability tweaks required for ultrix4.3.
3861 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
3862 * readutmp.c: Include sys/types.h before sys/stat.h.
3863 * canon-host.c: Declare strdup.
3864 * path-concat.c: Likewise.
3865 From John David Anglin.
3867 2000-04-04 Jim Meyering <meyering@lucent.com>
3869 Be more DOS 8.3-friendly.
3870 * ref-add.sin: Renamed from ref-add.sed.in.
3871 * ref-del.sin: Renamed from ref-del.sed.in.
3872 * Makefile.am: Reflect renaming.
3873 Reported by Eli Zaretskii.
3875 Use a temporary file name that won't clash with `charset.alias'
3876 in the DOS 8.3 name space.
3877 * Makefile.am (charset_tmp): Define.
3878 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
3879 (uninstall-local): Likewise.
3880 Reported by Eli Zaretskii.
3882 2000-03-29 Paul Eggert <eggert@twinsun.com>
3884 * time/strftime.c (my_strftime): Make sure we call the system
3885 strftime, not ourselves, when invoking the underlying strftime.
3887 2000-03-24 Jim Meyering <meyering@lucent.com>
3889 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
3890 (charset_alias): Define.
3891 (install-exec-local): Factor out common code.
3892 (uninstall-local): Split lines longer than 80.
3893 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
3895 (.sed.in.sed): New rule. Don't redirect directly to $@.
3896 (CLEANFILES): Add ref-add.sed and ref-del.sed.
3898 2000-03-19 Bruno Haible <haible@clisp.cons.org>
3900 * config.charset: Output a line containing "Packages using this file".
3901 * ref-add.sed.in, ref-del.sed.in: New files.
3902 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
3903 ref-del.sed): New rules.
3905 2000-03-17 Jim Meyering <meyering@lucent.com>
3907 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
3908 Otherwise, include <strings.h>
3910 2000-03-17 Bruno Haible <haible@clisp.cons.org>
3912 * unicodeio.c (utf8_wctomb): New function.
3913 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
3914 format instead of in UCS-4 with platform dependent endianness.
3916 2000-03-07 Paul Eggert <eggert@twinsun.com>
3918 * savedir.c (savedir): Work even if directory size is
3919 negative; this can happen with some screwy NFS configurations.
3921 2000-03-06 Jim Meyering <meyering@lucent.com>
3923 * localcharset.c (get_charset_aliases): Don't try to free file_name
3924 if it's NULL (because we ran out of memory). From Bruno Haible.
3926 2000-03-05 Jim Meyering <meyering@lucent.com>
3928 * localcharset.c ("path-concat.h"): Include.
3929 (get_charset_aliases): Use path_concat instead of ANSI string
3932 * unicodeio.h (PARAMS): Define.
3933 Use it to guard prototype.
3935 2000-03-04 Jim Meyering <meyering@lucent.com>
3937 * Makefile.am (install-exec-local): Create $(libdir) before installing
3939 (uninstall-local): Uncomment this rule so `make distcheck' works
3942 * unicodeio.c (<errno.h>): Include it.
3943 (errno): Declare if not defined.
3945 * localcharset.c: Add Bruno's comment justifying use of volatile.
3947 * config.charset: New version, incorporating remarks from a linux
3948 i18n mailing list. From Bruno Haible.
3950 2000-03-02 Jim Meyering <meyering@lucent.com>
3952 * Makefile.am (EXTRA_DIST): Add config.charset.
3954 2000-03-01 Jim Meyering <meyering@lucent.com>
3956 * localcharset.c: Guard some #includes with `#if HAVE_...'.
3957 * unicodeio.c: Likewise.
3959 2000-02-02 Bruno Haible <haible@clisp.cons.org>
3961 * config.charset: New file.
3962 * localcharset.c: New file.
3963 * unicodeio.h, unicodeio.c: New files.
3964 * Makefile.am (DEFS): Add -DLIBDIR=...
3965 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
3966 (noinst_HEADERS): Add unicodeio.h.
3967 (all-local, install-exec-local, charset.alias): New targets.
3969 2000-02-28 Paul Eggert <eggert@twinsun.com>
3971 * quotearg.c (ALERT_CHAR): New macro.
3972 (quotearg_buffer_restyled): Use it.
3974 2000-02-27 Jim Meyering <meyering@lucent.com>
3976 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
3977 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
3979 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
3980 not `#if STDC_HEADERS'.
3981 Declare malloc if needed.
3983 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
3984 now that autoconf always defines the HAVE_DECL_ symbols.
3985 * human.c: Likewise.
3987 * strtoumax.c: Likewise.
3989 * backupfile.c: Arrange for cpp to fail if the configure-time
3990 declaration check was not run.
3992 * human.c: Likewise.
3994 * strtoumax.c: Likewise.
3996 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
3997 then first look up the entire `.'-containing string as a login name.
3999 2000-02-18 Paul Eggert <eggert@twinsun.com>
4001 * getdate.y: Handle two-digit years with leading zeros correctly.
4002 (textint): New typedef.
4003 (parser_control): Member year changed from int to textint.
4005 (YYSTYPE): Removed; replaced by %union with int and textint members.
4006 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
4007 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
4008 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
4009 (tSNUMBER, tUNUMBER): Now of type <textintval>.
4010 (date, number, to_year): Use width of number in digits, not its value,
4011 to determine whether it's a 2-digit year, or a 2-digit time.
4012 (yylex): Store number of digits of numeric tokens.
4013 Reported by John Kendall.
4015 (parser_control): Changed from struct parser_control to typedef (for
4016 consistency). All uses changed.
4018 (tID): Removed; not used.
4019 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
4021 2000-02-14 Paul Eggert <eggert@twinsun.com>
4023 * getpagesize.h (getpagesize): Port to VMS for Alpha;
4024 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
4026 2000-02-12 Jim Meyering <meyering@lucent.com>
4028 * userspec.c (ISDIGIT): Define it.
4029 (isdigit): Remove definition.
4030 (is_number): Use ISDIGIT, not isdigit.
4031 <libintl.h>: Include.
4033 (parse_user_spec): Mark translatable strings.
4035 2000-02-10 Jim Meyering <meyering@lucent.com>
4037 With these changes, nanosleep.[ch] are finally enough like the other
4038 lib/* replacement files to compile on a few more losing systems.
4040 * nanosleep.h: Don't include config.h.
4041 Remove prototype from declaration of nanosleep.
4042 (PARAMS): Remove now-unneeded definition.
4043 * nanosleep.c: #undef nanosleep.
4044 (rpl_nanosleep): Rename from nanosleep.
4046 2000-02-03 Jim Meyering <meyering@lucent.com>
4048 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
4049 rather than with `#if HAVE_UTMPNAME'.
4051 2000-02-01 Jim Meyering <meyering@lucent.com>
4053 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
4055 2000-01-31 Jim Meyering <meyering@lucent.com>
4057 * nanosleep.h (nanosleep): Guard declaration with
4058 `#if ! HAVE_DECL_NANOSLEEP'.
4059 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
4060 the declaration in that vendor's sys/timers.h.
4061 Reported by Christian Krackowizer.
4063 * quotearg.c (ISASCII): Add #undef and move definition to follow
4064 inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
4065 (ISPRINT): Likewise.
4066 Reported by Tom Tromey.
4068 2000-01-30 Jim Meyering <meyering@lucent.com>
4070 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
4071 uses of ->ut_name. The latter doesn't work with new Linux header files
4072 where only utmpx.ut_user is declared.
4074 * readutmp.h (UT_USER): Define.
4076 2000-01-23 Jim Meyering <meyering@lucent.com>
4078 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
4081 2000-01-22 Jim Meyering <meyering@lucent.com>
4083 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
4084 [! HAVE_DECL_STRTOULL]: Declare strtoull.
4085 Required for some AIX systems. Reported by Christian Krackowizer.
4086 [TESTING] (main): New function.
4088 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
4089 * dirname.c (dir_name): Support for DOS-style file names with drive
4092 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
4094 * strverscmp.c (ISDIGIT): Define.
4095 (strverscmp): Use ISDIGIT, not isdigit.
4097 2000-01-17 Paul Eggert <eggert@twinsun.com>
4099 * nanosleep.c (nanosleep):
4100 Don't use SA_INTERRUPT to decide whether to call sigaction, as
4101 POSIX.1 doesn't require SA_INTERRUPT and some systems
4102 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
4103 it's been part of POSIX.1 since day 1 (in 1988).
4105 2000-01-17 Jim Meyering <meyering@lucent.com>
4107 * interlock: Remove unused file. Reported by François Pinard.
4109 2000-01-16 Paul Eggert <eggert@twinsun.com>
4111 * quotearg.c (quotearg_buffer_restyled): Do not quote
4112 alert, backslash, formfeed, and vertical tab unnecessarily in
4113 shell quoting style.
4116 version-control: never