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