606a3ada66f9479a1f25b70c6bf6cae70fac67ad
[gnulib.git] / lib / ChangeLog
1 2002-01-16  Jim Meyering  <meyering@lucent.com>
2
3         * getdate.y: Add three semicolons, each just before a closing brace.
4         Bison (as of version 1.31) no longer papers over that mistake.
5
6 2002-02-14  Paul Eggert  <eggert@twinsun.com>
7
8         * backupfile.c (ISDIGIT): Comment fix.
9         * getdate.y (ISDIGIT): Likewise.
10         * posixtm.c (ISDIGIT, year): Likewise.
11         * strverscmp.c (ISDIGIT): Likewise.
12         * userspec.c (ISDIGIT): Likewise.
13
14 2002-01-05  Jim Meyering  <meyering@lucent.com>
15
16         * version-etc.c (version_etc_copyright): Update copyright year.
17
18 2001-01-19  Paul Eggert  <eggert@twinsun.com>
19
20         * closeout.c (close_stdout_status): If ferror (stdout), do
21         not silently exit merely because the output buffer happens to
22         have nothing pending.
23
24 2001-12-18  Paul Eggert  <eggert@twinsun.com>
25
26         See the big note in ../ChangeLog.
27         * human.c (suffixes): Prefer K to k for 1024.
28         (generate_suffix_backwards): New function.
29         (human_readable_inexact): Use it.
30         * xstrtol.c (__xstrtol): If there is no number but there
31         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
32         Accept 'K' as well as 'k'.
33
34 2001-12-15  Jim Meyering  <meyering@lucent.com>
35
36         * regex.h (__restrict_arr): Update from libc.
37
38         * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
39         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
40         (STREQ): Define.
41
42 2001-12-10  Jim Meyering  <meyering@lucent.com>
43
44         * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
45         Instead, include "xalloc.h".
46         (initbuffer): Don't cast xmalloc return value to char*.
47         (readline): Reword comment.
48         Don't cast xrealloc return value to char*
49         Return NULL, not 0.
50
51 2001-12-09  Jim Meyering  <meyering@lucent.com>
52
53         * modechange.c (mode_compile): Add cast to avoid pedantic warning about
54         `signed and unsigned type in conditional expression'.
55         * posixtm.c (posix_time_parse): Likewise.
56
57         * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
58
59         * readtokens.c (readtoken): Declare an index to be of type unsigned
60         to avoid a pedantic warning.
61
62         * getstr.c: Don't include assert.h.
63         (getstr): Remove warning-evoking assertions.
64         Return -1 if offset parameter is out of bounds.
65         Change the type of a local from int to size_t.
66
67         * strftime.c (my_strftime_localtime_r): Include this function
68         definition in the `#if ! HAVE_TM_GMTOFF' block.
69
70         * xgethostname.c: Remove declarations of xmalloc and xrealloc.
71         Include xalloc.h instead.
72
73 2001-12-02  Jim Meyering  <meyering@lucent.com>
74
75         * tempname.c: Don't declare getenv, thus reverting the change of
76         2001-11-18.  It's no longer necessary, now that stdlib.h is always
77         included.
78
79         * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
80         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
81
82 2001-11-30  Akim Demaille  <akim@epita.fr>
83
84         * xstrdup.c: Include xalloc.h, so that xstrdup is declared
85         before being defined.
86
87 2001-11-27  Paul Eggert  <eggert@twinsun.com>
88
89         * quotearg.h (quotearg_n, quotearg_n_style):
90         First arg is int, not unsigned.
91         * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
92         (SIZE_MAX, UINT_MAX): New macros.
93         (quotearg_n_options): Abort if N is negative.
94         Avoid overflow check on hosts where size_t is 64 bits and int
95         is 32 bits, as overflow is impossible there.
96         Fix off-by-one typo that caused unnecessary reallocation.
97
98 2001-11-27  Jim Meyering  <meyering@lucent.com>
99
100         * tempname.c: Merge with version from libc.
101         * regex.c: Likewise.
102
103         * tempname.c: Include stdlib.h unconditionally.  On some old systems
104         for which STDC_HEADERS is 0, it was not included, resulting in a
105         warning about an integer-to-pointer conversion problem with getenv.
106         Reported by Volker Borchert.
107
108 2001-11-26  Jim Meyering  <meyering@lucent.com>
109
110         * gtod.h: Remove file.
111         * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
112         * gettimeofday.c: Don't include gtod.h.
113         (GTOD_init): Remove function.
114         (rpl_gettimeofday): Do its job here instead, rather than aborting.
115         Suggestion from Volker Borchert.
116
117 2001-11-23  Jim Meyering  <meyering@lucent.com>
118
119         * hash.h (struct hash_table): Don't define here.  Merely declare it.
120         * hash.c (struct hash_table): Define it here instead.
121
122 2001-11-22  Jim Meyering  <meyering@lucent.com>
123
124         * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
125
126 2001-11-18  Paul Eggert  <eggert@twinsun.com>
127
128         * tempname.c (TMP_MAX): Remove; no longer needed.
129         (TEMPORARIES): New macro.
130         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
131         removes an artificial limitation (e.g. HP-UX 10.20, where
132         TMP_MAX is 17576).
133
134 2001-11-18  Jim Meyering  <meyering@lucent.com>
135
136         * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
137         on SunOS4.
138
139         * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
140         files will be created before anything else.
141
142 2001-11-17  Jim Meyering  <meyering@lucent.com>
143
144         * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
145         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
146         rather than group writable.  Patch by Juan F. Codagnone.
147
148         * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
149         Instead, include "xalloc.h".
150
151         * mountlist.c: Include unlocked-io.h after all system headers.
152         Remove explicit declarations of xmalloc, xrealloc,
153         and xstrdup.  Instead, include "xalloc.h".
154
155         * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
156         * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
157         * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
158
159         * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
160         Reported by Padraig Brady.
161
162         * mkstemp.c: #undef mkstemp.
163         Include config.h.
164         (rpl_mkstemp): Rename from mkstemp.
165         Protoize.
166
167 2001-11-16  Jim Meyering  <meyering@lucent.com>
168
169         * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
170         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
171         determine the amount of total physical memory, use pstat_getstatic.
172         HPUX-11 doesn't define _SC_PHYS_PAGES.
173         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
174         If sysconf couldn't be used to determine the amount of available
175         physical memory, use both pstat_getstatic and pstat_getdynamic.
176         Based on a patch from Bob Proulx.
177
178 2001-11-05  Jim Meyering  <meyering@lucent.com>
179
180         * xstat.in (slash_aware_lstat): Correct a misleading comment.
181
182 2001-11-03  Jim Meyering  <meyering@lucent.com>
183
184         * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
185         in argmatch_to_argument call.
186
187         * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
188         argument.
189
190         * hash.c (hash_clear): Fix a bug that could lead to an infloop or
191         e.g., a fault due to an attempt to free a NULL pointer.
192
193 2001-11-01  Jim Meyering  <meyering@lucent.com>
194
195         * dirfd.c, dirfd.h: New files.
196         * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
197
198         * hash.c (hash_print) [TESTING]: Clean up.
199
200 2001-10-22  Paul Eggert  <eggert@twinsun.com>
201
202         * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
203         to avoid a warning if -Wall.
204
205 2001-10-21  Paul Eggert  <eggert@twinsun.com>
206
207         * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
208
209 2001-10-21  Jim Meyering  <meyering@lucent.com>
210
211         * obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
212         this code would end up calling gettext even in packages built
213         with --disable-nls.
214         * getopt.c (_): Likewise.
215         * regex.c (_): Likewise.
216
217 2001-10-20  Paul Eggert  <eggert@twinsun.com>
218
219         * error.c (strerror_r): Do not declare unless !_LIBC.
220         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
221         Use strerror_r that is only a macro, even if it is not a function.
222         (strerror): Check for HAVE_DECL_STRERROR before declaring.
223         (private_strerror): Use prototypes, not old-style function definition.
224         (print_errno_message): New function.
225         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
226         char*-flavored one.
227         (error_tail, error, error_at_line): Use it.
228
229 2001-10-11  Jim Meyering  <meyering@lucent.com>
230
231         * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
232         and quote_n (1, ... to avoid clobbering a buffer.
233
234 2001-10-05  Jim Meyering  <meyering@lucent.com>
235
236         * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
237         * hash-pjw.c: New file (factored out of fileutils' remove.c).
238         * hash-pjw.h: New file.
239
240 2001-09-30  Jim Meyering  <meyering@lucent.com>
241
242         * mountlist.c [MOUNTED_GETFSSTAT]:
243         Include <sys/ucred.h>, for Apple Darwin.
244         Include sys/mount.h and sys/fs_types.h only if available.
245         (FS_TYPE): Define.
246         (read_filesystem_list): Use FS_TYPE.
247
248 2001-09-29  Paul Eggert  <eggert@twinsun.com>
249
250         * exclude.c (excluded_filename): 0 -> false, since it's
251         a boolean context.
252
253 2001-09-28  Paul Eggert  <eggert@twinsun.com>
254
255         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
256         #defines strtoimax.  Also treat the other strto* functions
257         like strtoimax.
258
259         * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
260         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
261         (strtoimax, strtoumax): Do not declare if already defined as a macro.
262
263 2001-09-26  Jim Meyering  <meyering@lucent.com>
264
265         Most macros in unlocked-io.h had the wrong number of arguments.
266         * gen-uio: New script.
267         (USE_UNLOCKED_IO): Define to 1 if not already defined.
268         * unlocked-io.hin: Remove file.
269         * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
270         rather than trying to embed it here.
271         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
272         Reported by Padraig Brady.
273
274 2001-09-25  Volker Borchert  <bt@teknon.de>
275
276         * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
277
278 2001-09-23  Jim Meyering  <meyering@lucent.com>
279
280         * mountlist.c: Remove useless parentheses in #if directives.
281         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
282         the deprecated MOUNTED symbol is no longer defined in mntent.h.
283
284 2001-09-22  Jim Meyering  <meyering@lucent.com>
285
286         * localcharset.c: Update from latest gettext.
287         * config.charset: Likewise.
288
289 2001-09-20  Jim Meyering  <meyering@lucent.com>
290
291         * xstrtol.c (strtoimax): Guard declaration with
292         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
293         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
294         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
295         (strtoumax): Likewise, for completeness (it wasn't necessary).
296
297 2001-09-06  Paul Eggert  <eggert@twinsun.com>
298
299         * strtoimax.c (HAVE_LONG_LONG):
300         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
301         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
302         to work around bug in IBM C compiler.
303
304 2001-09-16  Jim Meyering  <meyering@lucent.com>
305
306         * mkdir.c: New file.
307
308 2001-09-04  Paul Eggert  <eggert@twinsun.com>
309
310         * xgetcwd.c: Revert some of the previous change; intead,
311         fix the HAVE_GETCWD_NULL code to behave more like the
312         !HAVE_GETCWD_NULL code used to.
313
314         Include "xalloc.h".
315         (xgetcwd): Do not return NULL when memory is exhausted; instead,
316         invoke xalloc_die.
317
318 2001-09-04  Paul Eggert  <eggert@twinsun.com>
319
320         * xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
321         Use ssize_t, not int, to store result of readlink.
322         Check for ssize_t overflow as well as size_t overflow,
323         as POSIX says the result of readlink is implementation-defined
324         when ssize_t overflows.
325         Remove unnecessary cast to char*.
326         Use free+malloc instead of realloc, as the storage doesn't need
327         to be preserved and it's clearer and can be more efficient that way.
328         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
329         * xreadlink.h (xreadlink): Update prototype.
330
331 2001-09-03  Paul Eggert  <eggert@twinsun.com>
332
333         * exclude.c (fnmatch_no_wildcards): Fix confusion between
334         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
335         spotted by Jim Meyering.
336
337 2001-09-03  Jim Meyering  <meyering@lucent.com>
338
339         * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
340
341 2001-09-03  Paul Eggert  <eggert@twinsun.com>
342
343         * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
344         like the HAVE_GETCWD_NULL code.
345         Include pathmax.h if not HAVE_GETCWD.
346         Do not include xalloc.h.
347         (INITIAL_BUFFER_SIZE): New symbol.
348         Do not use xmalloc / xrealloc, since the caller is responsible for
349         handling errors.  Preserve errno around `free' during failure.
350         Do not overrun buffer when using getwd.
351
352 2001-09-03  Paul Eggert  <eggert@twinsun.com>
353
354         * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
355         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
356
357 2001-09-02  Jim Meyering  <meyering@lucent.com>
358
359         * error.c: Update from GNU libc.
360
361 2001-09-01  Jim Meyering  <meyering@lucent.com>
362
363         * xreadlink.c: New file.
364         * xreadlink.h: New file.
365         * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
366
367         * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
368         doesn't conflict with sparc-sun-solaris2.7's definition in
369         /usr/include/sys/int_types.h.
370
371         * exclude.c: Use `""', not `<>' to #include non-system header files.
372         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
373         and strncasecmp as r-values.  Unixware didn't have declarations.
374
375 2001-08-31  Jim Meyering  <meyering@lucent.com>
376
377         * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
378         Use an initial, malloc'd, buffer of length 128 rather than
379         a statically allocated one of length 1024.
380
381 2001-08-30  Paul Eggert  <eggert@twinsun.com>
382
383         * xgetcwd.c: Don't include pathmax.h.
384         Include stdlib.h and unistd.h if available.
385         Include xalloc.h.
386         (xmalloc, xstrdup, free): Remove decls.
387         (xgetcwd): Don't assume sizes fit in unsigned.
388         Check for overflow when computing sizes.
389         Simplify reallocation code.
390
391 2001-08-28  Paul Eggert  <eggert@twinsun.com>
392
393         * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
394
395         * strtoimax.c: Renamed from strtoxmax.c, removing the
396         old strtoimax.c.
397
398         Also, make the following further changes to make this file's
399         configuration more similar to that of strtol.c:
400         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
401         (strtoumax, uintmax_t, strtoull, strtol): Remove.
402         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
403         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
404         changed to signed values.
405
406         And make the following changes as well:
407         Fix copyright notice, as 1999 was missing.
408         (verify): New macro.
409         (strtoimax): Check sizes at compile-time, not run-time.
410         Prefer strtol to strtoll if both work.
411         (main): Remove; it was not that useful and was a pain to maintain.
412
413         * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
414
415 2001-08-30  Paul Eggert  <eggert@twinsun.com>
416
417         * savedir.c (savedir): Remove size parameter, as POSIX says that
418         a directory's st_size can have an arbitrary value, so the old
419         usage could waste an arbitrary amount of memory.  All uses
420         changed.
421         * savedir.h: Update prototype.
422
423 2001-08-30  Paul Eggert  <eggert@twinsun.com>
424
425         * xstrtol.c (strtoimax): New decl.
426
427 2001-08-28  Paul Eggert  <eggert@twinsun.com>
428
429         * xstrtol.h: Add copyright notice.
430         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
431         LONGINT_INVALID_SUFFIX_CHAR.
432
433 2001-08-30  Paul Eggert  <eggert@twinsun.com>
434
435         * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
436         tm to be declared.
437
438 2001-08-30  Paul Eggert  <eggert@twinsun.com>
439
440         * hash.c: Remove '2001' from copyright notice.
441
442 2001-08-30  Paul Eggert  <eggert@twinsun.com>
443
444         * full-write.h: New file.
445         * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
446         * full-write.c: Correct credits, as cccp.c no longer
447         exists and anyway it was so heavily changed from the old cccp
448         code as to be unrecognizable.  Include full-write.h.
449         (full_write) Return size_t, with short writes meaning failure.
450         All callers changed.  This fixes a bug with large buffers
451         on 64-bit hosts.
452         * utime.c: Include full-write.h.
453
454 2001-08-30  Paul Eggert  <eggert@twinsun.com>
455
456         Merge 'exclude' changes from tar 1.13.22.
457         This fixes one or two unlikely storage allocation overflow bugs,
458         but doesn't change user-visible behavior otherwise.
459
460 2001-08-30  Paul Eggert  <eggert@twinsun.com>
461
462         * exclude.c (bool): Declare, perhaps by including stdbool.h.
463         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
464         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
465         Include if available.
466         (<xalloc.h>): Include
467         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
468         (verify): New macro.  Use it to verify that EXCLUDE macros do not
469         collide with FNM macros.
470         (struct patopts): New struct.
471         (struct exclude): Use it, as exclude patterns now come with options.
472         (new_exclude): Support above changes.
473         (new_exclude, add_exclude_file):
474         Initial size must now be a power of two to simplify overflow checking.
475         (free_exclude, fnmatch_no_wildcards): New function.
476         (excluded_filename): No longer requires options arg, as the options
477         are determined by add_exclude.  Now returns bool, not int.
478         (excluded_filename, add_exclude):
479         Add support for the fancy new exclusion options.
480         (add_exclude, add_exclude_file): Now takes int options arg.
481         Check for arithmetic overflow when computing sizes.
482         (add_exclude_file): xrealloc might modify errno, so don't
483         realloc until after errno might be used.
484
485         * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
486         New macros.
487         (free_exclude): New decl.
488         (add_exclude, add_exclude_file): Now takes int options arg.
489         (excluded_filename): No longer requires options arg, as the options
490         are determined by add_exclude.  Now returns bool, not int.
491
492 2001-08-30  Paul Eggert  <eggert@twinsun.com>
493
494         * alloca.c (alloca): Arg is of type size_t, not unsigned.
495
496 2001-08-27  Jim Meyering  <meyering@lucent.com>
497
498         * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
499
500         * version-etc.c (N_): Remove definition.
501         Revert most of last change.
502         Instead, simply don't mark the `Copyright...' string for translation.
503         Based on advice from Paul Eggert.
504
505         * strtoxmax.c: Tweak comment.
506
507 2001-08-26  Jim Meyering  <meyering@lucent.com>
508
509         * version-etc.c (version_etc_copyright_fmt): Replace literal year
510         of copyright with `%s' so translators don't get an untranslated
511         message in 2002.
512         (COPYRIGHT_YEAR): Define.
513         (version_etc): Use fprintf rather than fputs.
514         Suggestion from Ulrich Drepper.
515
516         * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
517
518         * strtoll.c: New file, from GNU libc.
519         * xstrtoimax.c: New file.
520
521         * xstrtol.h: Add xstrtoimax.
522         * strtoumax.c: New file.  Simply include "strtoumax.c".
523         * strtoimax.c: New file.  Likewise, but first define STRTOUXMAX_SIGNED.
524
525         * strtoumax.c: Factor to work both for unsigned and signed types, ...
526         * strtoxmax.c: ... then renamed to this.
527
528 2001-08-13  Paul Eggert  <eggert@twinsun.com>
529
530         * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
531         Port to Solaris 8, where 'sed' requires a space after the 'r'
532         command, and where sh dislikes "$/".  Clean up the spacing a bit.
533         Redirect output to $tmp just once.
534
535 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
536
537         * addext.c (<errno.h>): Include.
538         (errno): Declare if not defined.
539         (addext): Work correctly when pathconf returns -1 and leaves
540         errno alone because there is no limit.  Also, work even if
541         pathconf returns a value greater than SIZE_MAX.
542
543 2001-08-12  Jim Meyering  <meyering@lucent.com>
544
545         * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
546         Simply `return getcwd (NULL, 0);'.
547         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
548         Use 1300 as initial value for length, not PATH_MAX.
549
550         * pathmax.h: Clean up cpp syntax.
551
552 2001-08-12  Jim Meyering  <meyering@lucent.com>
553
554         * gettimeofday.c: New file.
555         * gtod.h: New file.
556         * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
557
558 2001-08-04  Jim Meyering  <meyering@lucent.com>
559
560         * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
561         to get in sync with glibc.
562
563 2001-08-03  Paul Eggert  <eggert@twinsun.com>
564
565         The following changes are from gettext 0.10.39 as maintained by
566         Bruno Haible.
567
568         * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
569         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
570         with inverted sense.  All uses changed.
571
572         * mbswidth.c: Don't include <limits.h>.
573         Include <stdlib.h> and <string.h> unconditionally.
574         (iswcntrl, mbsinit, ISCNTRL): New macros.
575         (mbsnwidth): Use K&R style function declarations.
576         Don't bother checking for MB_LEN_MAX == 1, since the compiler
577         can optimize it when MB_CUR_MAX == 1.
578         The width of control characters is zero, not 1.
579
580 2001-07-15  Jim Meyering  <meyering@lucent.com>
581
582         * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
583         (BUILT_SOURCES): Add unlocked-io.h.
584         (io_functions): Define.
585         (unlocked-io.h): New rule.
586         (DISTCLEANFILES): Add unlocked-io.h.
587         (all-local): Depend on unlocked-io.h, to ensure it is created.
588
589         * unlocked-io.hin: New file
590
591         * regex.c: Update from glibc.
592
593 2001-07-05  Jim Meyering  <meyering@lucent.com>
594
595         * Makefile.am (noinst_HEADERS): Remove definition, per new automake
596         recommendation.
597         (libfetish_a_SOURCES): Put all .h files here instead.
598         Remove a thus-exposed (better checks in automake) duplicate and
599         two unnecessary .h files.
600
601 2001-06-11  Jim Meyering  <meyering@lucent.com>
602
603         * regex.c: Update from GNU libc.
604
605 2001-05-27  Jim Meyering  <meyering@lucent.com>
606
607         * readutmp.h (UT_TYPE): Define.
608
609 2001-05-24  Jim Meyering  <meyering@lucent.com>
610
611         * argmatch.c: Include "quote.h".
612         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
613         quote function.  Reported by Göran Uddeborg.
614
615 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
616
617         * dirname.c (dir_name): Compute append_dot using path, not newpath
618         which is not yet declared.
619
620 2001-05-11  Paul Eggert  <eggert@twinsun.com>
621
622         * Makefile.am (libfetish_a_SOURCES):
623         Add strftime.c, since we now compile it on all hosts.
624
625         * strftime.c (my_strftime):
626         Define to nstrftime if emacs, but only if my_strftime is not defined.
627         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
628         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
629         Add one more extra argument: a nanoseconds value.
630         All uses changed.
631         (ns): New macro.
632         (my_strftime function): Add %N format.
633         (emacs_strftimeu): Renamed from emacs_strftime,
634         with extra ut argument.
635
636 2001-05-11  Paul Eggert  <eggert@twinsun.com>
637
638         dirname code cleanup.  base_name now behaves more compatibly
639         with POSIX basename when given file names that have trailing
640         slashes, and similarly for dir_name.  Add new primitives
641         base_len and dir_len.  Put the directory-name-related decls
642         into dirname.h.
643
644         * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
645         * backupfile.c (base_name): Likewise.
646         * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
647         * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
648         * makepath.c (strip_trailing_slashes): Likewise.
649         * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
650         Likewise.
651         * rename.c (strip_trailing_slashes): Likewise.
652         * same.c (base_name): Likewise.
653         * stripslash.c (ISSLASH): Likewise.
654
655         * addext.c: Include <dirname.h> after size_t is defined.
656         * backupfile.c: Likewise.
657
658         * addext.c (addext): Use base_len to trim redundant
659         trailing slashes instead of doing it ourselves.
660         But do not trim the last slash if it is not redundant.
661
662         * backupfile.c (find_backup_file_name,
663         max_backup_version): Use base_len instead of rolling it ourselves.
664         Handle the case of "" and (on DOS) "C:" correctly.
665
666         * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
667         Include <string.h>, <dirname.h>.
668         (base_name): Allow file names ending in slashes, other than names
669         that are all slashes.  In this case, return the basename followed
670         by the slashes.  This is more general, and can be used in places
671         where the original base_name purposely had an assertion failure.
672         (base_len): New function.
673
674         * dirname.c: Include <string.h> instead of <stdlib.h>.
675         Do not include <assert.h>; no longer needed.
676         Include xalloc.h.
677         (memrchr): Remove decl.
678         (dir_name_r): Remove.
679         (dir_len): Renamed from dirlen.  All callers changed.
680         Rewrite in terms of base_name, for simplicity and consistency.
681         (dir_name): Never return NULL.  All callers changed.
682         Do not include <stdlib.h> in test program; no longer needed.
683         return 0; is fine for test program.
684
685         * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
686         New macros.
687         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
688
689         * path-concat.c (path_concat): Use base_len to compute
690         base length, not strlen; this means we cannot rely on memcpy
691         to null-terminate.
692
693         * same.c (STREQ): Remove.
694         (same_name): Handle the case where the basename ends in trailing '/'.
695
696         * stripslash.c (strip_trailing_slashes): Return nonzero if
697         a slash was stripped.  Do not strip the last slash after a
698         file system prefix.
699
700 2001-04-08  Jim Meyering  <meyering@lucent.com>
701
702         * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
703         recomputed; that's necessary when the offset spans a DST transition.
704         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
705
706 2001-04-02  Jim Meyering  <meyering@lucent.com>
707
708         * regex.h, regex.c: Update from GNU libc.
709
710 2001-03-19  Paul Eggert  <eggert@twinsun.com>
711
712         * version-etc.c (version_etc_copyright): Update to 2001.
713
714 2001-03-16  Paul Eggert  <eggert@twinsun.com>
715
716         * tempname.c (uint64_t): Define to uintmax_t if
717         not defined, and if UINT64_MAX is not defined.
718         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
719         Reported by John David Anglin.
720
721 2001-03-10  Bruno Haible  <haible@clisp.cons.org>
722
723         * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
724         alias if codeset is empty.
725         * config.charset (BeOS): Use wildcard syntax.
726
727 2001-03-13  Jim Meyering  <meyering@lucent.com>
728
729         * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
730         Don't insert a backslash when concatenating e.g., `C:' and `foo'.
731         From Bruno Haible.
732
733 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
734
735         * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
736         Don't return NULL.
737         * unicodeio.c (print_unicode_char): Simplify accordingly.
738
739 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
740
741         * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
742         support for DOS/DJGPP.
743
744 2001-02-28  Paul Eggert  <eggert@twinsun.com>
745
746         * Makefile.am (libfetish_a_SOURCES):
747         Add dup-safer.c, fopen-safer.c.
748         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
749
750         * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
751
752 2001-02-25  Paul Eggert  <eggert@twinsun.com>
753
754         The mkstemp replacement is taken from glibc 2.2.2, with some
755         portability fixes for use outside glibc, as follows:
756
757         * tempname.c (struct_stat64): New macro.
758         (direxists, __gen_tempname): Use it.
759         This avoids a portability problem with Solaris 8.
760
761         * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
762         (<stddef.h>, <stdint.h>, <string.h>):
763         Include only if STDC_HEADERS || _LIBC.
764         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
765         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
766         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
767         (__set_errno): Define this macro if <errno.h> doesn't.
768         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
769         Define these macros if <stdio.h> doesn't.
770         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
771         Define these macros if <sys/stat.h>
772         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
773         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
774         __xstat64): Define if not _LIBC.
775         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
776         (__gen_tempname): Invoke gettimeofday only if
777         HAVE_GETTIMEOFDAY || _LIBC;
778         otherwise, fall back on plain "time".
779         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
780
781         * mkstemp.c (__GT_FILE): Define to zero if not defined.
782
783         * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
784
785 2001-02-17  Jim Meyering  <meyering@lucent.com>
786
787         * strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
788         around included file name.
789
790         * strnlen.c (__strnlen): Merge in a change from GNU libc.
791
792         * strftime.c: Update from GNU libc (the only changes were to comments).
793
794 2001-02-13  Bruno Haible  <haible@clisp.cons.org>
795
796         * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
797
798 2001-02-17  Paul Eggert  <eggert@twinsun.com>
799
800         * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
801         Remove workaround macros for hosts that have mbrtowc but not
802         mbstate_t, as we now insist on proper declarations for both
803         before using mbrtowc.
804
805 2001-02-17  Jim Meyering  <meyering@lucent.com>
806
807         * regex.c: Update from libc.
808
809 2001-02-16  Paul Eggert  <eggert@twinsun.com>
810
811         * alloca.c (malloc): Undef before defining, since stdlib.h
812         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
813         Reported by Mark Hounschell via Paul Eggert.
814
815 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
816
817         * config.charset: Update for FreeBSD 4.2.
818
819 2001-01-26  Jim Meyering  <meyering@lucent.com>
820
821         * quotearg.c: Include stddef.h.
822         * quote.c: Include stddef.h.
823         Reported by Axel Kittenberger.
824
825         * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
826         line in double quotes so that it evokes a better diagnostic.
827         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
828         Reported by Axel Kittenberger.
829
830 2001-01-15  Bruno Haible  <haible@clisp.cons.org>
831
832         * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
833         to avoid a warning.  Add back 'const' to inptr.
834
835 2001-01-16  Jim Meyering  <meyering@lucent.com>
836
837         * basename.c: Include <stdio.h>, needed by assert on SunOS4.
838         From Bruno Haible.
839
840 2001-01-14  Jim Meyering  <meyering@lucent.com>
841
842         * rename.c: New file.  From Volker Borchert.
843         Include stdlib.h, string.h or strings.h, and xalloc.h.
844         Use strip_trailing_slashes rather than open-coding it.
845
846 2001-01-03  Paul Eggert  <eggert@twinsun.com>
847
848         * strftime.c: Sync with glibc time/strftime.c 1.81.
849
850 2001-01-03  Jim Meyering  <meyering@lucent.com>
851
852         * unicodeio.c (print_unicode_char): Remove `const' from declaration of
853         local `inptr' to avoid warning with some system declarations of iconv.
854
855 2000-12-29  Paul Eggert  <eggert@twinsun.com>
856
857         * modechange.c: Do not assume that mode_t uses the
858         traditional octal encoding.  E.g. "chmod 1 FOO" should set
859         the other-execute bit of FOO even if S_IXOTH != 1.
860
861         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
862         WOTH, XOTH, ALLM): New macros.
863         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
864          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
865         Use them.
866         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
867         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
868         (mode_compile):
869         No need to use uintmax_t; unsigned long is long enough.
870         Don't bother to get suffix since we don't use it.
871
872 2000-12-24  Jim Meyering  <meyering@lucent.com>
873
874         * hash.c (is_prime): Return explicit boolean values.
875         (hash_get_first): Return NULL to appease Irix5.6's 89.
876         Reported by Nelson Beebe.
877
878 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
879
880         * localcharset.c (locale_charset): Add support for Win32.
881
882 2000-12-18  Paul Eggert  <eggert@twinsun.com>
883
884         * physmem.h, physmem.c: New files.
885
886         * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
887         (noinst_HEADERS): Add physmem.h.
888
889         * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
890         't' for compatibility with Solaris 8 sort.
891
892 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
893
894         * config.charset: Add support for BeOS.
895
896 2000-12-16  Jim Meyering  <meyering@lucent.com>
897
898         * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
899         SHELLS_FILE to a file name that's useful on djgpp systems.
900         Include stdlib.h.
901         (ADDITIONAL_DEFAULT_SHELLS): Define.
902         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
903         Based mostly on a patch from Prashant TR.
904
905 2000-12-16  Jim Meyering  <meyering@lucent.com>
906
907         This bug had a serious impact on chown: `chown N:M FILE' (for integer
908         N and M) would have treated it like `chown N:N FILE'.
909
910         * userspec.c (parse_user_spec): Fix typo: s/u/g/.
911
912 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
913
914         * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
915         CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
916         to the list of canonical encodings. Rename EUC-CN to GB2312.
917
918 2000-12-08  Andreas Schwab  <schwab@suse.de>
919
920         * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
921         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
922
923 2000-12-07  Jim Meyering  <meyering@lucent.com>
924
925         * stripslash.c (ISSLASH): Define.
926         (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
927         From Prashant TR.
928
929         * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
930         (dir_name_r): Declare this function as static.
931         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
932         manifest itself on a name containing a mix of slashes and
933         backslashes.
934         Make this function work with names starting with a DOS-style
935         drive letter and colon prefix.
936         (dir_name): Append `.' if necessary.
937         Based mostly on patches from Prashant TR and Eli Zaretskii.
938
939         * dirname.h (dir_name_r): Remove prototype.
940
941 2000-12-05  Jim Meyering  <meyering@lucent.com>
942
943         * dirname.c (dir_name_r): Add `const' in a few local declarations.
944
945 2000-12-04  Jim Meyering  <meyering@lucent.com>
946
947         * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
948         Also include memory.h, stdlib.h, unistd.h if appropriate.
949         Reported by Andreas Jaeger (conflicting declaration of malloc).
950
951 2000-12-02  Jim Meyering  <meyering@lucent.com>
952
953         * closeout.h: Make idempotent, to avoid some obscure warnings.
954
955 2000-12-01  Paul Eggert  <eggert@twinsun.com>
956
957         * memrchr.c: Include <config.h> before any system include file.
958
959 2000-11-29  Paul Eggert  <eggert@twinsun.com>
960
961         * dirname.c (dir_name_r): Fix typo: int -> size_t.
962
963 2000-11-26  Jim Meyering  <meyering@lucent.com>
964
965         * memcoll.c: Include sys/types.h.  From Werner Almesberger.
966
967 2000-11-22  Paul Eggert  <eggert@twinsun.com>
968
969         * strftime.c (my_strftime): Do not invoke mbrlen with a
970         size of (size_t) -1; it's not portable.
971
972 2000-11-17  Akim Demaille  <akim@epita.fr>
973
974         * obstack.h: Formatting changes.
975         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
976         prevent type checking.
977         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
978         cast the value to (void *): assigning a `foo *' to a `void *'
979         variable is valid.
980         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
981
982 2000-11-17  Jim Meyering  <meyering@lucent.com>
983
984         * strstr.c: Update from GNU libc.
985
986 2000-11-16  Jim Meyering  <meyering@lucent.com>
987
988         * strverscmp.c: Incorporate weak-alias-related changes from glibc.
989
990 2000-11-11  Jim Meyering  <meyering@lucent.com>
991
992         * error.c: Add a couple #includes, merging from GNU libc version.
993
994 2000-11-10  Jim Meyering  <meyering@lucent.com>
995
996         * obstack.h: Update from GNU libc.
997         * obstack.c: Likewise.
998
999 2000-11-06  Paul Eggert  <eggert@twinsun.com>
1000
1001         * getusershell.c (setusershell): Use rewind rather than
1002         fseek/fseeko, to avoid configuration hassles with fseeko.
1003         Don't bother opening SHELLS_FILE if shellstream is NULL;
1004         it's not necessary.
1005
1006 2000-11-05  Jim Meyering  <meyering@lucent.com>
1007
1008         * makepath.h (make_dir): Declare.
1009         * makepath.c (make_dir): Remove `static' attribute.
1010         Tweak a comment.
1011
1012 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
1013
1014         * hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
1015         last one in a bucket, advance to the next bucket.
1016
1017 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
1018
1019         * fnmatch.c: Do not comment out all the code if we are using
1020         the GNU C library, because in some cases we are replacing buggy
1021         code in the GNU C library itself.
1022
1023 2000-10-30  Paul Eggert  <eggert@twinsun.com>
1024
1025         * error.h, getline.h, modechange.h:
1026         Remove "2000" from Copyright line, as the file hasn't been
1027         changed this year other than in the copyright notice.
1028
1029         * xalloc.h: Add "2000" to Copyright line, as this file
1030         was changed this year.
1031
1032 2000-10-30  Paul Eggert  <eggert@twinsun.com>
1033
1034         * fnmatch.c (FOLD): Do not assume that characters are unsigned.
1035         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
1036         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
1037
1038 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
1039
1040         * regex.h (__restrict_arr): Move definition out of #ifndef block.
1041         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
1042         doesn't define __restrict_arr.
1043
1044 2000-10-29  Jim Meyering  <meyering@lucent.com>
1045
1046         * xstat.in: Fix grammar in comment.
1047
1048 2000-10-28  Jim Meyering  <meyering@lucent.com>
1049
1050         * memchr.c: Update from libc.
1051         Adjust for portability:
1052         [HAVE_STDLIB_H]: Include stdlib.h.
1053         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
1054         Undef __memchr, too.
1055         [!weak_alias]: Define __memchr to memchr.
1056
1057         * regex.c: Update from libc.
1058         * regex.h: Likewise.
1059         * getopt1.c: Likewise.
1060         * memcmp.c: Likewise.
1061
1062         * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
1063         Avoid using fseek, when possible -- it's broken by design.
1064         Patch by Ulrich Drepper.
1065
1066 2000-10-26  Jim Meyering  <meyering@lucent.com>
1067
1068         * strftime.c: Update from libc.
1069
1070 2000-10-25  Jim Meyering  <meyering@lucent.com>
1071
1072         * obstack.c: Update from libc.
1073
1074 2000-10-23  Jim Meyering  <meyering@lucent.com>
1075
1076         * hard-locale.c (hard_locale): Revert last change -- it was simply
1077         wrong.  That set_locale call must not have any side effects.
1078         From Paul Eggert.
1079
1080 2000-10-22  Jim Meyering  <meyering@lucent.com>
1081
1082         * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
1083         [CYCLIC]: Remove now-unused definition.
1084
1085         * save-cwd.c (O_DIRECTORY): Define, if needed.
1086         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
1087         Suggestion from Ulrich Drepper.
1088
1089 2000-10-21  Jim Meyering  <meyering@lucent.com>
1090
1091         * dirname.c (dir_name_r): New function, factored out of dir_name.
1092         (dir_name): Use dir_name_r.
1093         * dirname.h (dir_name_r): Declare it.
1094
1095 2000-10-21  Jim Meyering  <meyering@lucent.com>
1096
1097         * dirname.c (memrchr): Declare if necessary.
1098         (dir_name): Remove the restriction that there be no
1099         trailing slashes.  Now, this code skips past them, effectively
1100         ignoring them.
1101         [TEST_DIRNAME] (main): New unit tests.
1102
1103         * memrchr.c: New file from GNU libc.
1104         Undef __memrchr, too.
1105         [!weak_alias]: Define __memrchr to memrchr.
1106         Guard weak_alias use with `#ifdef weak_alias'.
1107
1108 2000-10-17  Jim Meyering  <meyering@lucent.com>
1109
1110         * quote.h (PARAMS): Define and use.
1111         Reported by Akim Demaille.
1112
1113         * getopt.c: Update from libc.
1114
1115 2000-10-16  Jim Meyering  <meyering@lucent.com>
1116
1117         * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
1118         From Jan Fedak.
1119
1120 2000-09-25  Jim Meyering  <meyering@lucent.com>
1121
1122         * md5.h (rol): Define (from GnuPG).
1123
1124         * sha.c: Give credit (GnuPG) where due.
1125         (M): Use rol rather than open-coding it.
1126         Add a FIXME comment.
1127
1128 2000-09-21  Jim Meyering  <meyering@lucent.com>
1129
1130         * userspec.c (parse_user_spec): Remove debugging printf I'd added.
1131         Reported by Michael Stone.
1132
1133 2000-09-20  Jim Meyering  <meyering@lucent.com>
1134
1135         * Makefile.am (libfetish_a_SOURCES): Add sha.c.
1136         (noinst_HEADERS): Add sha.h.
1137         Based on code from Scott G. Miller and from GnuPG.
1138
1139 2000-09-15  Jim Meyering  <meyering@lucent.com>
1140
1141         * regex.c: Update from libc.
1142
1143 2000-09-10  Jim Meyering  <meyering@lucent.com>
1144
1145         * getopt.c (_getopt_internal): Update from glibc.
1146
1147 2000-09-09  Jim Meyering  <meyering@lucent.com>
1148
1149         * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
1150         think it should be used as a general replacement for isascii.
1151         * fnmatch.c: Likewise.
1152         * mbswidth.c: Likewise
1153         * regex.c: Likewise.
1154
1155         Don't use atoi.
1156         * userspec.c: Include sys/param.h and limits.h.
1157         Include xstrtol.h.
1158         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1159         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
1160         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
1161         UID, GID.  Check range.
1162
1163 2000-09-06  Jim Meyering  <meyering@lucent.com>
1164
1165         * getopt.c (_getopt_internal): Update from glibc.
1166
1167 2000-08-30  Jim Meyering  <meyering@lucent.com>
1168
1169         * strftime.c: Merge in changes from GNU libc.
1170
1171 2000-08-26  Jim Meyering  <meyering@lucent.com>
1172
1173         * closeout.c: Include "__fpending.h".
1174         (close_stdout_status): Return right away if there's nothing to flush.
1175
1176         * Makefile.am (noinst_HEADERS): Add __fpending.h.
1177         * __fpending.c: New file.
1178         * __fpending.h: New file.
1179
1180 2000-08-07  Paul Eggert  <eggert@twinsun.com>
1181
1182         Standardize on "memory exhausted" instead of "Memory exhausted"
1183         or "virtual memory exhausted".
1184         * obstack.c (print_and_abort): Use "memory exhausted", not
1185         "virtual memory exhausted".
1186         * same.c (same_name): Invoke xalloc_die instead of printing
1187         our own message.
1188         * userspec.c (parse_user_spec): Likewise.
1189         * bumpalloc.h: comment fix
1190         * same.c, userspec.c: Include xalloc.h.
1191
1192         * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
1193         not char *const and pointing to a constant array.
1194         * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
1195         (xrealloc): Comment fix.
1196
1197         * userspec.c (parse_user_spec):
1198         Don't translate a message until just before returning,
1199         to avoid unnecessary translation.
1200
1201 2000-08-07  Jim Meyering  <meyering@lucent.com>
1202
1203         * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
1204         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
1205         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
1206         getgroups.c, gethostname.c, getopt.h, group-member.c,
1207         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
1208         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
1209         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
1210         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
1211         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
1212         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
1213         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
1214         yesno.c: Back out Copyright date changes for each file with no change
1215         this year.  This eases coordination with other programs using the same
1216         source code modules.  From Paul Eggert.
1217
1218 2000-08-03  Greg McGary  <greg@mcgary.org>
1219
1220         * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
1221         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
1222         (EXTEND_BUFFER): Use them.
1223
1224 2000-08-01  Jim Meyering  <meyering@lucent.com>
1225
1226         * dirname.c (ISSLASH): Define.
1227         (BACKSLASH_IS_PATH_SEPARATOR): Define.
1228         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
1229         both `\' and `/' may be use as path separators.
1230         Based on a patch from Prashant TR.
1231
1232 2000-07-31  Paul Eggert  <eggert@twinsun.com>
1233
1234         * quotearg.c (quotearg_n_options): Don't make the initial
1235         slot vector a constant, since it might get modified.
1236
1237 2000-07-31  Jim Meyering  <meyering@lucent.com>
1238
1239         * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
1240         * obstack.c (print_and_abort): Likewise.
1241
1242 2000-07-30  Paul Eggert  <eggert@twinsun.com>
1243
1244         * quotearg.c (quotearg_n_options): Preallocate a slot 0
1245         buffer, so that the caller can always quote one small
1246         component of a "memory exhausted" message in slot 0.
1247         From a suggestion by Jim Meyering.
1248
1249 2000-07-30  Jim Meyering  <meyering@lucent.com>
1250
1251         * makepath.c (make_path): Quote the other instance, too.
1252
1253         * quotearg.c (N_STATIC_SLOTVECS): Define.
1254         (STATIC_BUF_SIZE): Define.
1255         (quotearg_n_options): Use only statically allocated storage when
1256         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
1257         than STATIC_BUF_SIZE.
1258
1259 2000-07-29  Jim Meyering  <meyering@lucent.com>
1260
1261         * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
1262         * dirname.c (dir_name): Likewise.
1263
1264         * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
1265
1266         * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
1267         (dir_name): Assert that there are no trailing slashes.
1268
1269 2000-07-18  Bruno Haible  <haible@clisp.cons.org>
1270
1271         * mbswidth.h (mbswidth): Add a flags argument.
1272         (mbswidth): New declaration.
1273         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
1274         * mbswidth.c (mbswidth): Add a flags argument.
1275         (mbsnwidth): New function.
1276
1277 2000-07-24  Jim Meyering  <meyering@lucent.com>
1278
1279         * mbswidth.c: Remove useless #else.  From Bruno Haible.
1280
1281 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1282
1283         * mbswidth.c (_XOPEN_SOURCE):
1284         Don't define; this causes problems on Solaris 7.
1285         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
1286
1287 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1288
1289         * quotearg.c:
1290         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
1291         so that mbstate_t is always defined.
1292
1293         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
1294         be 1 in at least one GCC installation, and this configuration
1295         error is likely to be common.  Ignoring MB_LEN_MAX hurts
1296         performance on hosts that have mbrtowc but have only unibyte
1297         locales, but I assume these hosts are rare.
1298
1299 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1300
1301         * quotearg.c: Streamline by invoking multibyte code only if needed.
1302         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
1303         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
1304         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
1305         invoke multibyte primitives.
1306
1307 2000-07-23  Jim Meyering  <meyering@lucent.com>
1308
1309         * basename.c (base_name): Add an assertion.
1310
1311 2000-07-15  Bruno Haible  <clisp.cons.org>
1312
1313         * quotearg.c: When the system forces us to redefine mbstate_t,
1314         shadow its mbsinit function.
1315
1316 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
1317
1318         * mbswidth.h: New file.
1319         * mbswidth.c: New file.
1320         * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
1321         (noinst_HEADERS): Add mbswidth.h.
1322
1323 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
1324
1325         * config.charset: Add support for FreeBSD. Improve support for HP-UX
1326         and IRIX 6.
1327
1328 2000-07-15  Jim Meyering  <meyering@lucent.com>
1329
1330         * makepath.c: Include quote.h.
1331         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
1332         corresponding argument in a `quote (...)' call.
1333         Give better diagnostics.
1334
1335         * Makefile.am (libfetish_a_SOURCES): Add quote.c.
1336         (noinst_HEADERS): Add quote.h.
1337
1338         * quote.c (quote, quote_n): New file.  Two functions taken verbatim
1339         from tar's src/misc.c.
1340         * quote.h: New file.  Prototypes for same.
1341
1342 2000-07-10  Paul Eggert  <eggert@twinsun.com>
1343
1344         From a suggestion by Bruno Haible.
1345         * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
1346         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
1347         to decide whether to define the BeOS workaround macro;
1348         this adjusts to the change to AC_MBSTATE_T.
1349
1350 2000-07-13  Paul Eggert  <eggert@twinsun.com>
1351
1352         * quotearg.h (enum quoting style): New enum clocale_quoting_style.
1353
1354         * quotearg.c (quoting_style_args, quoting_style_vals,
1355         quotearg_buffer_restyled): Add support for
1356         clocale_quoting_style.  Undo previous change to
1357         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
1358         and "{RIGHT QUOTATION MARK}" msgids.
1359
1360 2000-07-05  Paul Eggert  <eggert@twinsun.com>
1361
1362         The old behavior of quoting `like this' doesn't look good with
1363         newer, ISO-style fonts.  See:
1364         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
1365
1366         Instead, quote "like this" by default.  Let the translator
1367         tailor the locale-specific quoting behavior by providing
1368         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
1369
1370         * quotearg.c (N_): New macro.
1371         (gettext_default): New function.
1372         (quotearg_buffer_restyled): Use
1373         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
1374         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
1375
1376 2000-07-09  Jim Meyering  <meyering@lucent.com>
1377
1378         * Most files: Update copyright dates to include 2000.
1379
1380 2000-07-08  Jim Meyering  <meyering@lucent.com>
1381
1382         * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
1383         if not defined.
1384         (xgethostname): Remove now-unnecessary #ifdef.
1385         Move declaration of `err' into loop where it's used.
1386
1387 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
1388
1389         * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
1390         by allocating a larger buffer. Test the gethostname return value for
1391         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
1392         returns an error and ENAMETOOLONG isn't defined.
1393
1394 2000-07-05  Paul Eggert  <eggert@twinsun.com>
1395         and Bruno Haible  <haible@clisp.cons.org>
1396
1397         * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
1398
1399 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
1400
1401         * quotearg.c (struct quoting_options): Simplify quote_these_too
1402         dimension.
1403
1404 2000-07-03  Jim Meyering  <meyering@lucent.com>
1405
1406         * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
1407         Reported by Bruno Haible.
1408
1409 2000-07-04  Jim Meyering  <meyering@lucent.com>
1410
1411         * quotearg.c: Make inclusion of <wchar.h> independent of whether
1412         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
1413         lacks mbrtowc.
1414
1415 2000-07-03  Paul Eggert  <eggert@twinsun.com>
1416         and Bruno Haible  <haible@clisp.cons.org>
1417
1418         * quotearg.c (mbrtowc):
1419         Assign to *pwc, and return 1 only if result is nonzero.
1420         (iswprint): Use ISPRINT when substituting our own mbrtowc.
1421
1422 2000-07-03  Jim Meyering  <meyering@lucent.com>
1423
1424         * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
1425         This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
1426         From Bob Proulx.
1427
1428 2000-07-02  Jim Meyering  <meyering@lucent.com>
1429
1430         * quotearg.c (mbstate_t): Don't define here.
1431
1432 2000-07-02  Jim Meyering  <meyering@lucent.com>
1433
1434         * nanosleep.c (SIGCONT): Define if not already defined.
1435
1436 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1437
1438         * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
1439         per change in ../m4/ls-mntd-fs.m4.
1440         (read_filesystem_list): Ignore symbolic links.
1441
1442 2000-06-29  Jim Meyering  <meyering@lucent.com>
1443
1444         * same.c: Include <string.h> or <strings.h>, as appropriate,
1445         for declaration of strcmp.
1446
1447         * long-options.c: Include <stdlib.h>, for declaration of exit.
1448
1449         * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
1450         Avoid warning by casting result to `char *' to remove `const'.
1451
1452 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1453
1454         * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
1455
1456 2000-06-26  Paul Eggert  <eggert@twinsun.com>
1457
1458         savedir now sets errno on failure and invokes xmalloc to get memory.
1459         Fix a couple of other minor bugs while we're at it.
1460
1461         * savedir.c (<unistd.h>): Do not include; there's no need.
1462         (NAMLEN): Remove macro.
1463         (malloc, realloc): Remove decls.
1464         (stpcpy): Likewise.
1465         ("xalloc.h"): Include.
1466         (NAME_SIZE_DEFAULT): New macro.
1467         (savedir): Use xmalloc / xrealloc to allocate memory.
1468         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
1469         Skip "" directory entries.
1470         Use strlen to calculate directory entry length, since the old method
1471         is rarely used these days and isn't worth supporting.
1472         Don't use a pointer after freeing it.
1473         Check for integer overflow when calculating allocation size.
1474         Use memcpy to copy entries, instead of stpcpy.
1475         Set errno properly when returning NULL.
1476         Check for readdir error.
1477
1478 2000-06-26  Jim Meyering  <meyering@lucent.com>
1479
1480         * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
1481
1482 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1483
1484         * getusershell.c (xmalloc, xrealloc): Remove functions.
1485         Include xalloc.h.
1486         Don't include <stdlib.h>.  Don't declare malloc, realloc.
1487
1488 2000-06-23  Bruno Haible  <haible@clisp.cons.org>
1489
1490         * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
1491
1492 2000-06-24  Jim Meyering  <meyering@lucent.com>
1493
1494         * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
1495
1496 2000-06-21  Jim Meyering  <meyering@lucent.com>
1497
1498         * getpass.c: New file, from Bruno Haible.  Required for BeOS.
1499
1500 2000-06-19  Paul Eggert  <eggert@twinsun.com>
1501
1502         * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
1503         (mbrtowc, mbstate_t): Define substitutes if
1504         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
1505         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
1506         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
1507
1508 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1509
1510         * xgetcwd.c (xgetcwd): If the required pathname length is smaller
1511         than 1024, return a memory chunk of least possible size, instead
1512         of size PATH_MAX + 2. In the loop, increment the size proportionally.
1513         Use free/xmalloc instead of xrealloc to avoid copying for very long
1514         paths.
1515
1516 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1517
1518         * canon-host.c (canon_host): Use malloc and memcpy to copy an
1519         address, not strdup.  Include <stdlib.h> and don't declare free().
1520
1521 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1522
1523         * path-concat.c (path_concat): Don't access dir[-1] if dir is
1524         the empty string.
1525
1526 2000-06-21  Jim Meyering  <meyering@lucent.com>
1527
1528         * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
1529         (noinst_HEADERS): Add getstr.h.
1530
1531         * getline.c (getstr): Move into a separate file.
1532         * getstr.c (getstr): New file, extracted from getline.c, with
1533         the following changes: new parameter, delim2; both delim[12]
1534         parameters have type `int', not `char'.  The latter would lose
1535         with 8-bit delimiters.
1536         * getstr.h: New file.
1537
1538 2000-06-19  Jim Meyering  <meyering@lucent.com>
1539
1540         * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
1541
1542 2000-06-18  Jim Meyering  <meyering@lucent.com>
1543
1544         * mkdir.c: Remove file, due mainly to copyright incompatibility.
1545         Besides, these days every porting target provides a mkdir function.
1546
1547         * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
1548         (this snippet comes from src/system.h).
1549
1550 2000-06-15  Paul Eggert  <eggert@twinsun.com>
1551
1552         * human.c (adjust_value): New function.
1553         (human_readable_inexact): Apply rounding style even when
1554         printing approximate values.
1555
1556 2000-06-14  Paul Eggert  <eggert@twinsun.com>
1557
1558         * human.c (human_readable_inexact): Allow an input block
1559         size that is not a multiple of the output block size, and vice versa.
1560         Reported by Piergiorgio Sartor.
1561
1562 2000-06-14  Paul Eggert  <eggert@twinsun.com>
1563
1564         * getdate.y (get_date): Apply relative times after time
1565         zone indicator, not before.  Reported by Todd A. Jacobs.
1566
1567 2000-06-13  Jim Meyering  <meyering@lucent.com>
1568
1569         * Makefile.am (all-local): Depend on lstat.c and stat.c.
1570
1571         * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
1572
1573 2000-06-12  Paul Eggert  <eggert@twinsun.com>
1574
1575         * xstat.in: Include <stdlib.h> in lstat, to declare "free".
1576
1577 2000-06-04  Paul Eggert  <eggert@twinsun.com>
1578
1579         * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
1580
1581 2000-06-04  Jim Meyering  <meyering@lucent.com>
1582
1583         * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
1584         SunOS4.1.4 for which gid_t is an unsigned type.
1585
1586 2000-06-03  Jim Meyering  <meyering@lucent.com>
1587
1588         * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
1589
1590 2000-05-26  Bruno Haible  <haible@clisp.cons.org>
1591
1592         * Makefile.am (install-exec-local): On systems with glibc-2.1 or
1593         newer, don't install charset.alias.
1594         * config.charset: Change the Linux/glibc rules so they become empty
1595         on glibc-2.1 or newer.
1596
1597 2000-06-02  Jim Meyering  <meyering@lucent.com>
1598
1599         * mountlist.c: Back out last change.  Instead, do this...
1600         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
1601         member using the same `ignore'-testing code.
1602         * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
1603         fs_type strings.
1604         From Mark D. Roth.
1605
1606 2000-05-29  Jim Meyering  <meyering@lucent.com>
1607
1608         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
1609         with the `ignore' attribute.  Based on a patch from Mark D. Roth.
1610
1611 2000-05-22  Jim Meyering  <meyering@lucent.com>
1612
1613         * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
1614
1615 2000-05-18  Jim Meyering  <meyering@lucent.com>
1616
1617         * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
1618         back, too, since it may have been modified by allocate_entry.
1619         (hash_delete): Rewrite to use neither the assignment operator
1620         nor the comma operator in an if-expression.
1621
1622 2000-05-15  Paul Eggert  <eggert@twinsun.com>
1623
1624         * closeout.c:
1625         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
1626         Remove; no longer needed.
1627         "quotearg.h": Add include.
1628         (file_name): Do not bother to explicitly initialize to NULL; it's less
1629         efficient on some hosts.
1630         (close_stdout_status): Remove test as to whether stdout was already
1631         closed; it breaks for the case "echo x | sort >&-".
1632         Quote file name colons.
1633         Do not assume that _("write error") lacks format strings.
1634
1635 2000-05-15  Jim Meyering  <meyering@lucent.com>
1636
1637         * version-etc.c (version_etc_copyright): Update the copyright string
1638         used in all --version output.
1639
1640 2000-05-14  Jim Meyering  <meyering@lucent.com>
1641
1642         * closeout.c (close_stdout_set_file_name): New function.
1643         (close_stdout_status): Use new file-scoped global.
1644         Return right away if fstat says the stdout file descriptor is invalid.
1645         * closeout.h (close_stdout_set_file_name): Declare.
1646
1647 2000-05-10  Jim Meyering  <meyering@lucent.com>
1648
1649         * closeout.c [default_exit_status]: New file-scoped variable.
1650         (close_stdout_set_status): New function.
1651         * closeout.h (close_stdout_set_status): Declare.
1652
1653 2000-05-08  Jim Meyering  <meyering@lucent.com>
1654
1655         * long-options.c: Don't include closeout.h.
1656         (parse_long_options): Don't call close_stdout for --version.
1657
1658 2000-05-06  Jim Meyering  <meyering@lucent.com>
1659
1660         * strnlen.c: Undefine __strnlen and strnlen.
1661         [!weak_alias]: Define __strnlen to strnlen.
1662
1663         * atexit.c: New file, from libiberty.
1664
1665 2000-05-06  Jim Meyering  <meyering@lucent.com>
1666
1667         * closeout.c (close_stdout_status): Also check for errors on the
1668         stderr stream.
1669
1670 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
1671
1672         * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
1673         instead of xmalloc, xrealloc, path_concat.
1674         (locale_charset): Treat empty environment variables as absent.
1675         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
1676
1677 2000-05-04  Jim Meyering  <meyering@lucent.com>
1678
1679         * getopt.c: Update from glibc.
1680         * obstack.c: Likewise.
1681         * obstack.h: Likewise.
1682         * regex.c: Likewise.  NB: K&R compiler support is dropped for this file
1683
1684         * regex.h: Likewise.
1685         * strndup.c: Likewise.
1686         * strnlen.c: New file, from glibc.
1687
1688 2000-05-01  Jim Meyering  <meyering@lucent.com>
1689
1690         * full-write.c (full_write): Remove `FIXME' part of comment.
1691
1692 2000-04-29  Jim Meyering  <meyering@lucent.com>
1693
1694         * path-concat.c: Declare strdup only if it's not defined.
1695         * canon-host.c: Likewise.
1696
1697 2000-04-28  Jim Meyering  <meyering@lucent.com>
1698
1699         * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
1700         redefinition warning on some systems (HPUX).  Otherwise, regex.h is
1701         included first, then limits.h is included by locale.h by libintl.h.
1702         From John David Anglin.
1703
1704 2000-04-25  Jim Meyering  <meyering@lucent.com>
1705
1706         * makepath.c (S_IRWXUGO): Define.
1707         (make_path): Always perform explicit chmod if MODE specifies any
1708         of the `special' permission bits.  Prompted by a bug report against
1709         install from Mate Wierdl and Joost van Baal.
1710
1711 2000-04-18  Jim Meyering  <meyering@lucent.com>
1712
1713         * README: New file.
1714
1715         * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
1716         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
1717
1718 2000-04-17  Jim Meyering  <meyering@lucent.com>
1719
1720         * strftime.c (my_strftime) [strftime]: Declare strftime here, since
1721         the definition of it to rpl_strftime also defined-away the system's
1722         declaration.
1723
1724 2000-04-15  Jim Meyering  <meyering@lucent.com>
1725
1726         Use `C' to denote so-called `contiguous' files, the same way
1727         that tar does.
1728         * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
1729         (ftypelet): Use S_ISCTG.
1730         From Michael Deutschmann.
1731
1732 2000-04-14  Jim Meyering  <meyering@lucent.com>
1733
1734         * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
1735
1736 2000-04-08  Jim Meyering  <meyering@lucent.com>
1737
1738         * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
1739         names don't conflict.  Reported by Eli Zaretskii.
1740
1741 2000-03-28  Bruno Haible  <haible@clisp.cons.org>
1742
1743         * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
1744         bug.  Deal with the different error behavior of Irix iconv.
1745
1746 2000-04-07  Jim Meyering  <meyering@lucent.com>
1747
1748         * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
1749         to work around system header problems on AIX 3.2.5.  From Bruno Haible.
1750
1751 2000-04-05  Jim Meyering  <meyering@lucent.com>
1752
1753         Portability tweaks required for ultrix4.3.
1754         * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
1755         * readutmp.c: Include sys/types.h before sys/stat.h.
1756         * canon-host.c: Declare strdup.
1757         * path-concat.c: Likewise.
1758         From John David Anglin.
1759
1760 2000-04-04  Jim Meyering  <meyering@lucent.com>
1761
1762         Be more DOS 8.3-friendly.
1763         * ref-add.sin: Renamed from ref-add.sed.in.
1764         * ref-del.sin: Renamed from ref-del.sed.in.
1765         * Makefile.am: Reflect renaming.
1766         Reported by Eli Zaretskii.
1767
1768         Use a temporary file name that won't clash with `charset.alias'
1769         in the DOS 8.3 name space.
1770         * Makefile.am (charset_tmp): Define.
1771         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
1772         (uninstall-local): Likewise.
1773         Reported by Eli Zaretskii.
1774
1775 2000-03-29  Paul Eggert  <eggert@twinsun.com>
1776
1777         * time/strftime.c (my_strftime): Make sure we call the system
1778         strftime, not ourselves, when invoking the underlying strftime.
1779
1780 2000-03-24  Jim Meyering  <meyering@lucent.com>
1781
1782         * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
1783         (charset_alias): Define.
1784         (install-exec-local): Factor out common code.
1785         (uninstall-local): Split lines longer than 80.
1786         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
1787         (SUFFIXES): Define.
1788         (.sed.in.sed): New rule.  Don't redirect directly to $@.
1789         (CLEANFILES): Add ref-add.sed and ref-del.sed.
1790
1791 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
1792
1793         * config.charset: Output a line containing "Packages using this file".
1794         * ref-add.sed.in, ref-del.sed.in: New files.
1795         * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
1796         ref-del.sed): New rules.
1797
1798 2000-03-17  Jim Meyering  <meyering@lucent.com>
1799
1800         * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
1801         Otherwise, include <strings.h>
1802
1803 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
1804
1805         * unicodeio.c (utf8_wctomb): New function.
1806         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
1807         format instead of in UCS-4 with platform dependent endianness.
1808
1809 2000-03-07  Paul Eggert  <eggert@twinsun.com>
1810
1811         * savedir.c (savedir): Work even if directory size is
1812         negative; this can happen with some screwy NFS configurations.
1813
1814 2000-03-06  Jim Meyering  <meyering@lucent.com>
1815
1816         * localcharset.c (get_charset_aliases): Don't try to free file_name
1817         if it's NULL (because we ran out of memory).  From Bruno Haible.
1818
1819 2000-03-05  Jim Meyering  <meyering@lucent.com>
1820
1821         * localcharset.c ("path-concat.h"): Include.
1822         (get_charset_aliases): Use path_concat instead of ANSI string
1823         concatenation.
1824
1825         * unicodeio.h (PARAMS): Define.
1826         Use it to guard prototype.
1827
1828 2000-03-04  Jim Meyering  <meyering@lucent.com>
1829
1830         * Makefile.am (install-exec-local): Create $(libdir) before installing
1831         into it.
1832         (uninstall-local): Uncomment this rule so `make distcheck' works
1833         once again.
1834
1835         * unicodeio.c (<errno.h>): Include it.
1836         (errno): Declare if not defined.
1837
1838         * localcharset.c: Add Bruno's comment justifying use of volatile.
1839
1840         * config.charset: New version, incorporating remarks from a linux
1841         i18n mailing list.  From Bruno Haible.
1842
1843 2000-03-02  Jim Meyering  <meyering@lucent.com>
1844
1845         * Makefile.am (EXTRA_DIST): Add config.charset.
1846
1847 2000-03-01  Jim Meyering  <meyering@lucent.com>
1848
1849         * localcharset.c: Guard some #includes with `#if HAVE_...'.
1850         * unicodeio.c: Likewise.
1851
1852 2000-02-02  Bruno Haible  <haible@clisp.cons.org>
1853
1854         * config.charset: New file.
1855         * localcharset.c: New file.
1856         * unicodeio.h, unicodeio.c: New files.
1857         * Makefile.am (DEFS): Add -DLIBDIR=...
1858         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
1859         (noinst_HEADERS): Add unicodeio.h.
1860         (all-local, install-exec-local, charset.alias): New targets.
1861
1862 2000-02-28  Paul Eggert  <eggert@twinsun.com>
1863
1864         * quotearg.c (ALERT_CHAR): New macro.
1865         (quotearg_buffer_restyled): Use it.
1866
1867 2000-02-27  Jim Meyering  <meyering@lucent.com>
1868
1869         * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
1870         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
1871
1872         * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
1873         not `#if STDC_HEADERS'.
1874         Declare malloc if needed.
1875
1876         * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
1877         now that autoconf always defines the HAVE_DECL_ symbols.
1878         * human.c: Likewise.
1879         * same.c: Likewise.
1880         * strtoumax.c: Likewise.
1881
1882         * backupfile.c: Arrange for cpp to fail if the configure-time
1883         declaration check was not run.
1884         * hash.c: Likewise.
1885         * human.c: Likewise.
1886         * same.c: Likewise.
1887         * strtoumax.c: Likewise.
1888
1889         * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
1890         then first look up the entire `.'-containing string as a login name.
1891
1892 2000-02-18  Paul Eggert  <eggert@twinsun.com>
1893
1894         * getdate.y: Handle two-digit years with leading zeros correctly.
1895         (textint): New typedef.
1896         (parser_control): Member year changed from int to textint.
1897         All uses changed.
1898         (YYSTYPE): Removed; replaced by %union with int and textint members.
1899         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
1900         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
1901         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
1902         (tSNUMBER, tUNUMBER): Now of type <textintval>.
1903         (date, number, to_year): Use width of number in digits, not its value,
1904         to determine whether it's a 2-digit year, or a 2-digit time.
1905         (yylex): Store number of digits of numeric tokens.
1906         Reported by John Kendall.
1907
1908         (parser_control): Changed from struct parser_control to typedef (for
1909         consistency).  All uses changed.
1910
1911         (tID): Removed; not used.
1912         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
1913
1914 2000-02-14  Paul Eggert  <eggert@twinsun.com>
1915
1916         * getpagesize.h (getpagesize): Port to VMS for Alpha;
1917         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
1918
1919 2000-02-12  Jim Meyering  <meyering@lucent.com>
1920
1921         * userspec.c (ISDIGIT): Define it.
1922         (isdigit): Remove definition.
1923         (is_number): Use ISDIGIT, not isdigit.
1924         <libintl.h>: Include.
1925         (_ and N_): Define.
1926         (parse_user_spec): Mark translatable strings.
1927
1928 2000-02-10  Jim Meyering  <meyering@lucent.com>
1929
1930         With these changes, nanosleep.[ch] are finally enough like the other
1931         lib/* replacement files to compile on a few more losing systems.
1932
1933         * nanosleep.h: Don't include config.h.
1934         Remove prototype from declaration of nanosleep.
1935         (PARAMS): Remove now-unneeded definition.
1936         * nanosleep.c: #undef nanosleep.
1937         (rpl_nanosleep): Rename from nanosleep.
1938
1939 2000-02-03  Jim Meyering  <meyering@lucent.com>
1940
1941         * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
1942         rather than with `#if HAVE_UTMPNAME'.
1943
1944 2000-02-01  Jim Meyering  <meyering@lucent.com>
1945
1946         * readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
1947
1948 2000-01-31  Jim Meyering  <meyering@lucent.com>
1949
1950         * nanosleep.h (nanosleep): Guard declaration with
1951         `#if ! HAVE_DECL_NANOSLEEP'.
1952         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
1953         the declaration in that vendor's sys/timers.h.
1954         Reported by Christian Krackowizer.
1955
1956         * quotearg.c (ISASCII): Add #undef and move definition to follow
1957         inclusion of wctype.h to work around solaris2.6 namespace pollution.
1958         (ISPRINT): Likewise.
1959         Reported by Tom Tromey.
1960
1961 2000-01-30  Jim Meyering  <meyering@lucent.com>
1962
1963         * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
1964         uses of ->ut_name.  The latter doesn't work with new Linux header files
1965         where only utmpx.ut_user is declared.
1966
1967         * readutmp.h (UT_USER): Define.
1968
1969 2000-01-23  Jim Meyering  <meyering@lucent.com>
1970
1971         * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
1972         obstack.c.
1973
1974 2000-01-22  Jim Meyering  <meyering@lucent.com>
1975
1976         * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
1977         [! HAVE_DECL_STRTOULL]: Declare strtoull.
1978         Required for some AIX systems.  Reported by Christian Krackowizer.
1979         [TESTING] (main): New function.
1980
1981         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
1982         * dirname.c (dir_name): Support for DOS-style file names with drive
1983         letters.
1984
1985         * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
1986
1987         * strverscmp.c (ISDIGIT): Define.
1988         (strverscmp): Use ISDIGIT, not isdigit.
1989
1990 2000-01-17  Paul Eggert  <eggert@twinsun.com>
1991
1992         * nanosleep.c (nanosleep):
1993         Don't use SA_INTERRUPT to decide whether to call sigaction, as
1994         POSIX.1 doesn't require SA_INTERRUPT and some systems
1995         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
1996         it's been part of POSIX.1 since day 1 (in 1988).
1997
1998 2000-01-17  Jim Meyering  <meyering@lucent.com>
1999
2000         * interlock: Remove unused file.  Reported by François Pinard.
2001
2002 2000-01-16  Paul Eggert  <eggert@twinsun.com>
2003
2004         * quotearg.c (quotearg_buffer_restyled): Do not quote
2005         alert, backslash, formfeed, and vertical tab unnecessarily in
2006         shell quoting style.
2007
2008 Local Variables:
2009 version-control: never
2010 End: