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