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