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