Avoid bug with non-ASCII characters.
[pspp] / lib / ChangeLog
1 2003-01-11  Bruno Haible  <bruno@clisp.org>
2
3         * readtokens.c (readtoken): Cast character to 'unsigned char', not
4         'unsigned int'.
5
6 2003-01-11  Bruno Haible  <bruno@clisp.org>
7
8         * hash-pjw.c: Add comment about low quality of this function.
9
10 2003-01-12  Paul Eggert  <eggert@twinsun.com>
11
12         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
13         to avoid collisions with libcurses and libreadline.
14
15         * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
16         * getstr.h, getstr.c: Remove.
17         * getline.c: Include "getline.h", to check interface.
18         Move body of old getstr.c here: this defines MIN_CHUNK and
19         declares getdelim2, which is renamed from getstr.
20         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
21
22         * linebuffer.c (readlinebuffer): Renamed from readline.
23         All uses changed.
24         * linebuffer.h: Likewise.
25         (readline): Remove backward-compatibility macro.
26
27 2003-01-12  Jim Meyering  <jim@meyering.net>
28
29         * makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
30
31 2003-01-10  Bruno Haible  <bruno@clisp.org>
32
33         * alloca_.h: New file.
34         * getdate.y: Unconditionally include alloca.h.
35         * makepath.c: Likewise.
36         * setenv.c: Likewise.
37         * userspec.c: Likewise.
38
39 2003-01-09  Bruno Haible  <bruno@clisp.org>
40
41         * stdbool.h.in: New file.
42
43 2003-01-08  Bruno Haible  <bruno@clisp.org>
44
45         * safe-read.c: Include specification header first, to ensure its
46         selfcontainedness.
47         * full-write.c: Likewise.
48
49 2003-01-08  Jim Meyering  <jim@meyering.net>
50
51         * full-write.c: Undefine and define-away `const' after inclusion
52         of errno.h, not before.  Suggestion from Bruno Haible.
53
54 2003-01-07  Jim Meyering  <jim@meyering.net>
55
56         * full-write.c: Rework so that it may serve to define full_read, too.
57         * full-read.c: Simply #define FULL_READ and include full-write.c.
58
59 2003-01-06  Jim Meyering  <jim@meyering.net>
60
61         * version-etc.c: Update year in translatable copyright string.
62
63 2002-12-25  Bruno Haible  <bruno@clisp.org>
64
65         * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
66         * xstrtol.h: Likewise.
67         * xstrtoimax.c: Likewise.
68         * xstrtoumax.c: Likewise.
69         * human.h: Likewise.
70
71         * tempname.c: Include <inttypes.h> too. Avoids a compilation error
72         on systems that have <inttypes.h> but not <stdint.h>.
73
74 2002-12-31  Paul Eggert  <eggert@twinsun.com>
75
76         * memcoll.c (memcoll): Fall back on a simple algorithm using
77         memcmp if strcoll doesn't work.
78
79 2002-12-23  Bruno Haible  <bruno@clisp.org>
80
81         * localcharset.h: New file.
82         * localcharset.c: Include it.
83         * unicodeio.c: Likewise.
84
85 2002-12-22  Bruno Haible  <bruno@clisp.org>
86
87         * utime.c (utime_null): No need to call ftruncate if the file was
88         nonempty.
89
90 2002-12-23  Bruno Haible  <bruno@clisp.org>
91
92         * memcoll.c (STRCOLL): New macro.
93         (memcoll): Use it.
94
95 2002-12-22  Bruno Haible  <bruno@clisp.org>
96
97         * getstr.h (getstr): Define, to avoid clash with libcurses.
98         * linebuffer.h (readline): Define, to avoid clash with libreadline.
99
100 2002-12-22  Bruno Haible  <bruno@clisp.org>
101
102         * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
103
104 2002-12-23  Bruno Haible  <bruno@clisp.org>
105
106         * getline.h: Include <stddef.h>, for size_t.
107
108         * unicodeio.h: Include <stddef.h>, for size_t.
109         * unicodeio.c: Don't include <stddef.h>.
110
111 2002-12-17  Bruno Haible  <bruno@clisp.org>
112
113         * canon-host.c (strdup): Remove unused declaration.
114
115         * fsusage.c: Include full_read.h.
116         (get_fs_usage): Use full_read instead of safe_read.
117
118         * utime.c (utime_null): Use SAFE_READ_ERROR.
119
120 2002-12-11  Bruno Haible  <bruno@clisp.org>
121
122         * setenv.h: Rewritten to cope with systems that have setenv() but not
123         unsetenv().
124         * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
125         modifications:
126
127         2002-12-11  Bruno Haible  <bruno@clisp.org>
128
129                 * setenv.c (alloca): Fall back to malloc.
130                 (freea): New macro.
131                 (setenv): Use freea() to free memory allocated with alloca().
132
133         2002-11-13  Bruno Haible  <bruno@clisp.org>
134
135                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
136                 function declarations.
137                 * unsetenv.c (unsetenv): Likewise.
138
139         2002-03-04  Bruno Haible  <bruno@clisp.org>
140
141                 Portability to AIX 4.3.3.
142                 * unsetenv.c: New file, extracted from setenv.c.
143                 * setenv.c: Move the unsetenv() function to unsetenv.c.
144
145         2001-12-20  Bruno Haible  <bruno@clisp.org>
146
147                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
148                 use malloc instead. For SunOS4.
149
150         2001-12-11  Bruno Haible  <bruno@clisp.org>
151
152                 * setenv.c: Declare alloca.
153                 (compar_fn_t): New typedef.
154                 (KNOWN_VALUE, STORE_VALUE): Use it.
155
156         * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
157         setenv.h.
158
159 2002-12-10  Paul Eggert  <eggert@twinsun.com>
160
161         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
162         * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
163         Choose values that are less likely to collide with system fnmatch
164         options.
165         * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
166         defined (e.g., a pure POSIX system).
167         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
168         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
169
170 2002-12-06  Jim Meyering  <jim@meyering.net>
171
172         * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
173
174         Merge in changes from libc's misc/error.c, in preparation
175         for the merge of gnulib's changes back into libc.
176
177         * error.c (_): Define only if not already defined.
178         Move definition to follow all #include directives.
179         Include unlocked-io.h only if !_LIBC.
180         [_LIBC]: Include <libio/libioP.h>.
181         [USE_IN_LIBIO]: Include <libio/iolibio.h>
182         (fflush): Tweak definition to use INTUSE.
183         (putc): Define.
184
185 2002-12-05  Paul Eggert  <eggert@twinsun.com>
186
187         * alloca.c [defined emacs]: Include "lisp.h".
188         (xalloc_die) [defined emacs]: New macro.
189         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
190         [! defined emacs]: Include <xalloc.h>.
191         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
192         (pointer): Typedef to POINTER_TYPE *.
193         (malloc): Remove decl; we now always use xmalloc.
194         (alloca): Use old-style definition, since Emacs needs this.
195         Check for arithmetic overflow when computing combined size.
196
197 2002-12-04  Paul Eggert  <eggert@twinsun.com>
198
199         Do not generate unlocked-io.h automatically, since it's easier to
200         maintain it by hand.
201
202         * unlocked-io.h: New file, from GNU diffutils,
203         but with proper copyright notice and attribution.
204         * gen-uio: Remove.
205         * Makefile.am: Add copyright notice.
206         (libfetish_a_SOURCES): Add unlocked-io.h.
207         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
208         (DISTCLEANFILES, io_functions): Remove macros.
209         (EXTRA_DIST): Remove gen_uio.
210         (unlocked-io.h): Remove rule.
211
212 2002-12-04  Jim Meyering  <jim@meyering.net>
213
214         Reflect the fact that stat.c and lstat.c are no longer generated.
215         * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
216         (DISTCLEANFILES): Likewise.
217         (EXTRA_DIST): Likewise.
218         (all_local): Don't depend on stat.c or lstat.c.
219         (stat.c, lstat.c): Remove rules.
220         (EXTRA_DIST): Remove xstat.in.
221
222         * xstat.in: Remove file.  Contents moved into stat.c.
223         * stat.c: New file.  Contents mostly from xstat.in.
224         * stat.c: Rework so that it may serve to define rpl_lstat, too.
225         * lstat.c: New file. Simply #define LSTAT and include stat.c.
226
227         * safe-read.c: Rework so that it may serve to define safe_write, too.
228         * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
229
230 2002-12-03  Jim Meyering  <jim@meyering.net>
231
232         * safe-read.c, safe-write.c: Change variable names and comments, but
233         not semantics, to minimize the differences between these two files.
234         (safe_read): Change comment to mention SAFE_READ_ERROR.
235
236         * safe-read.c (IS_EINTR): Define.
237         (safe_read): Use IS_EINTR in place of in-function cpp directives.
238
239 2002-12-02  Bruno Haible  <bruno@clisp.org>
240
241         * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
242         Define, taken from safe-read.c.
243         (INT_MAX): Provide fallback.
244         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
245         * safe-write.h (SAFE_WRITE_ERROR): Define.
246
247         * safe-read.c (EINTR): Remove definition.
248         (safe_read): Don't use EINTR if it is absent.
249
250 2002-12-02  Jim Meyering  <jim@meyering.net>
251
252         * safe-read.c (EINTR): Define.
253         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
254         (INT_MAX): Provide fallback.
255         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
256
257         * safe-read.h (SAFE_READ_ERROR): Define.
258
259 2002-12-01  Jim Meyering  <jim@meyering.net>
260
261         * safe-read.c: (safe_read): Also exit the loop when read returns zero.
262         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
263
264 2002-11-27  Paul Eggert  <eggert@twinsun.com>
265
266         * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
267         hash_rehash): Replace `if (limit <= value) abort ();' with
268         `if (! (value < limit)) abort ();', for readability.
269
270 2002-11-26    <karl@gnu.org>
271
272         * strdup.c: copy from libc again, with jim's ok.
273         * .cppi-disable: re-add strdup.c
274
275 2002-11-25    <karl@gnu.org>
276
277         * strtoll.c: copy from libc, meaning we now #include <strtol.c>
278         instead of "strtol.c".
279
280 2002-11-25  Jim Meyering  <jim@meyering.net>
281
282         * mktime.c: Sync from libc, now that it has the latest fix.
283
284 2002-11-24    <karl@gnu.org>
285
286         * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
287         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
288
289 2002-11-24  Jim Meyering  <jim@meyering.net>
290
291         Update from coreutils:
292
293         * mktime.c: Merge in changes from libc.
294
295         Avoid a link-time failure on some Linux systems.
296         * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
297         (__mon_yday): Declare with the STATIC attribute.
298         (__mktime_internal): Likewise.
299         Based on a report from Greg Schafer.
300
301 2002-11-23  Jim Meyering  <jim@meyering.net>
302
303         * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
304         Use `unsigned', not `int', as type of index.
305
306         * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
307
308         * fsusage.c: Remove unneeded parentheses around operands of `defined'.
309
310 2002-11-22  Paul Eggert  <eggert@twinsun.com>
311
312         * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
313         hint that one should use `if (! x) abort ();' rather than `assert
314         (x);', and anyway it's one less thing to worry about configuring.
315         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
316         hash_rehash, hash_insert): Use abort rather than assert.
317
318 2002-11-22  Paul Eggert  <eggert@twinsun.com>
319
320         * quotearg.h: Allow multiple inclusion by surrounding with
321         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
322         so that we can be included first.
323         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
324         * quotearg.c: Include quotearg.h immediately after config.h.
325         No need to include stddef.h or sys/types.h any more.
326         Surround local include files with "", not "<>".
327         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
328         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
329         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
330         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
331         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
332         (ISPRINT): Remove; no longer needed now that we assume C89.
333
334         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
335         Preserve errno.
336
337         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
338         quotearg_char): Use SIZE_MAX rather than
339         (size_t) -1 when we are talking about "infinity".
340
341         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
342
343 2002-11-22  Bruno Haible  <bruno@clisp.org>
344
345         * safe-read.h: Assume C89. Add comments.
346         (safe_read): Change return type to size_t.
347         * safe-read.c (safe_read): Change return type to size_t. Handle byte
348         counts > SSIZE_MAX correctly.
349         * safe-write.h: New file.
350         * safe-write.c: New file.
351         * full-read.h: New file.
352         * full-read.c: New file.
353         * full-write.h: Assume C89. Add comments.
354         * full-write.c: Include safe-write.h.
355         (full_write): Rewritten to use safe_write.
356         Suggested by Jim Meyering and Paul Eggert.
357
358 2002-11-21  Bruno Haible  <bruno@clisp.org>
359
360         Remove case insensitive option matching.
361         * argmatch.h (argcasematch): Remove declaration.
362         (ARGCASEMATCH): Remove macro.
363         (__xargmatch_internal): Remove case_sensitive argument.
364         (XARGMATCH): Update.
365         (XARGCASEMATCH): Remove macro.
366         * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
367         case_sensitive argument.
368         (argcasematch): Remove function.
369         (__xargmatch_internal): Remove case_sensitive argument.
370         (main): Use XARGMATCH instead of XARGCASEMATCH.
371
372         * xmalloc.c: Change compile-time error message. Add comment about
373         required autoconf version.
374
375 2002-11-21  Jim Meyering  <jim@meyering.net>
376
377         * strdup.c (strdup): Tweak comment and initial #if/#include.
378
379         Merge in changes from the coreutils.
380
381         2002-09-25  Paul Eggert  <eggert@twinsun.com>
382         * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
383         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
384         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
385         int.  Work more efficiently if X is the same width as uintmax_t.
386         Do not compare X to -1, to avoid bogus compiler warning.
387         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
388         Don't assume that f_frsize and f_bsize are the same type.
389
390         * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
391         on FreeBSD.
392
393         * makepath.c (make_path): Restore umask *before* creating the final
394         component.
395         (make_path): Minor reformatting.
396
397         * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
398         and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
399
400         * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
401         ones.  At least on GNU/Linux systems, `auto' means something else.
402         From Michael Stone.
403
404 2002-11-20  Paul Eggert  <eggert@twinsun.com>
405
406         Merge argmatch cleanups from Bison.  Assume C89.
407
408         * argmatch.c: Include config.h here, not in argmatch.h.
409         Include stdlib.h, for EXIT_FAILURE.
410         Always include <string.h>, since we assume C89.
411         (EXIT_FAILURE): Remove pre-C89 bug workaround.
412         * argmatch.h: Do not include <config.h> or <sys/types.h>.
413         Include <stddef.h> instead, since it's all we need for size_t.
414         (PARAMS): Remove.  All uses removed.
415         (ARRAY_CARDINALITY): Do not bother to #undef.
416         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
417         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
418         Remove unnecessary parentheses.
419         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
420         Insert necessary parentheses.
421         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
422         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
423
424 2002-11-19  Bruno Haible  <bruno@clisp.org>
425
426         * mbswidth.c: Include mbswidth.h right at the beginning.
427         * mbswidth.h: Include <stddef.h>, for size_t.
428
429         * mbswidth.h (PARAMS): Remove macro.
430         (mbswidth, mbsnwidth): Use ANSI C function declarations.
431         * mbswidth.c (mbswidth, mbsnwidth): Likewise.
432
433         * gcd.h (PARAMS): Remove macro.
434         (gcd): Use ANSI C function declarations.
435         * gcd.c (gcd): Likewise.
436
437 2002-11-15  Bruno Haible  <bruno@clisp.org>
438
439         * strcspn.c: Include <stddef.h>.
440         (strcspn): Use ANSI C function declaration. Change return type to
441         size_t. Use NULL.
442         * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
443         (strpbrk): Use NULL.
444         * strpbrk.h (PARAMS): Remove macro.
445         (strpbrk): Use ANSI C function declaration.
446         * strstr.c: Don't include <sys/types.h>.
447         * strstr.h (PARAMS): Remove macro.
448         (strstr): Use ANSI C function declarations.
449
450 2002-11-06  Bruno Haible  <bruno@clisp.org>
451
452         * gcd.h (gcd): Change argument type to 'unsigned long'.
453         * gcd.c (gcd): Likewise.
454
455 2002-11-05  Bruno Haible  <bruno@clisp.org>
456
457         * gcd.h: New file, from gettext-0.11.5.
458         * gcd.c: New file, from gettext-0.11.5.
459
460 2002-11-05  Bruno Haible  <bruno@clisp.org>
461
462         * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
463         * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
464         * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
465         * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
466
467         * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
468         * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
469
470         * closeout.c: Include gettext.h instead of <libintl.h>.
471         * human.c: Include gettext.h instead of <libintl.h>.
472         * quotearg.c: Include gettext.h instead of <libintl.h>.
473         * rpmatch.c: Include gettext.h instead of <libintl.h>.
474         * unicodeio.c: Include gettext.h instead of <libintl.h>.
475         * userspec.c: Include gettext.h instead of <libintl.h>.
476         * version-etc.c: Include gettext.h instead of <libintl.h>.
477         * xmalloc.c: Include gettext.h instead of <libintl.h>.
478         (textdomain): Remove definition.
479         * xmemcoll.c: Include gettext.h instead of <libintl.h>.
480
481         * long-options.c: Remove include of <libintl.h> and definition of _.
482         * same.c: Remove include of <libintl.h> and definition of _.
483
484 2002-11-04  Bruno Haible  <bruno@clisp.org>
485
486         * stpcpy.h: New file, from GNU gettext-0.11.5.
487         * strcase.h: New file, from GNU gettext-0.11.5.
488         * strpbrk.h: New file, from GNU gettext-0.11.5.
489         * strstr.h: New file, from GNU gettext-0.11.5.
490         * xgetcwd.h: New file, from GNU gettext-0.11.5.
491
492 2002-05-09  Bruno Haible  <bruno@clisp.org>
493
494         * config.charset: Update for newest glibc. Add canonical names
495         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
496
497 2002-05-09  Bruno Haible  <bruno@clisp.org>
498
499         * localcharset.c (get_charset_aliases): Add more Windows specific
500         aliases.
501
502 2002-05-08  Owen Taylor  <otaylor@redhat.com>
503
504         * config.charset: A few additions for Solaris.
505
506 2001-12-05  Bruno Haible  <bruno@clisp.org>
507
508         * localcharset.c (locale_charset): Don't return an empty string.
509
510 2001-10-23  Bruno Haible  <haible@clisp.cons.org>
511
512         * config.charset: msdos in uk_UA uses CP1125.
513
514 2001-08-05  Bruno Haible  <haible@clisp.cons.org>
515
516         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
517         * localcharset.c (locale_charset): Declare as extern "C".
518
519 2002-02-15  Bruno Haible  <bruno@clisp.org>
520
521         * config.charset [msdosdjgpp]: For Russian, use CP866.
522
523 2002-02-11  Bruno Haible  <bruno@clisp.org>
524
525         * config.charset: Add support for NetBSD.
526
527 2002-09-25    <karl@gnu.org>
528
529         * strdup.c: copy from libc/string (via ../config/srclist*).
530         * getopt*: copy from libc/posix.
531         * gettext.h: copy from gettext.
532         * .cppi-disable: add strdup.c, gettext.h.
533
534 2002-07-01  Jim Meyering  <meyering@lucent.com>
535
536         * c-stack.c: Include sys/time.h.
537         From Volker Borchert.
538
539 2002-06-11  Paul Eggert  <eggert@twinsun.com>
540
541         * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
542         New macro.  Use it uniformly instead of
543         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
544         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
545         reported by Vin Shelton.
546
547 2002-06-22  Jim Meyering  <meyering@lucent.com>
548
549         * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
550         redefinition due to Solaris5.6's definition in /usr/include/sys/euc.h.
551
552 2002-06-22  Paul Eggert  <eggert@twinsun.com>
553
554         * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
555         Do not assume SA_SIGINFO behavior.
556         Bug reported by Jim Meyering on NetBSD 1.5.2.
557
558 2002-06-22  Jim Meyering  <meyering@lucent.com>
559
560         * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
561
562         * exitfail.c, exitfail.h: Likewise.
563         * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
564
565         * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
566         of fnmatch.h.
567         (EXTRA_DIST): Add fnmatch_loop.c.
568         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
569
570         * fnmatch_loop.c: New file, from diffutils-2.8.2.
571         * fnmatch.c: Update from diffutils-2.8.2.
572         * fnmatch_.h: New file.  From diffutils-2.8.2.
573         * fnmatch.h: Remove file.
574
575 2002-06-18  Paul Eggert  <eggert@twinsun.com>
576
577         * file-type.h: Report an error if neither S_ISREG nor
578         S_IFREG is defined, instead of using a test specific to glibc
579         2.2.  This should be safe, since POSIX requires S_ISREG and
580         Unix Version 7 had S_IFREG.  We don't need to check for
581         <sys/types.h> since we don't use any symbols that it defines.
582
583 2002-06-15  Jim Meyering  <meyering@lucent.com>
584
585         * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
586         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
587         have been included before this file.
588
589 2002-06-13  Richard Dawe  <richdawe@bigfoot.com>
590
591         * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
592         so that each temporary file name is unique and valid in the first
593         8 characters, for operation under DOS.
594
595 2002-06-15  Jim Meyering  <meyering@lucent.com>
596
597         Work even with DJGPP 2.03, which lacks support for symlinks.
598         From Richard Dawe.
599         * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
600         is defined.
601         * lchown.c (S_ISLNK): Likewise.
602
603 2002-06-14  Jim Meyering  <meyering@lucent.com>
604
605         * file-type.h: Use the version from diffutils-2.8.2.
606         * file-type.c: Likewise.
607
608 2002-05-27  Jim Meyering  <meyering@lucent.com>
609
610         Fix a problem seen only on nonconforming systems whereby ls.c's
611         use of localtime, and then of gettimeofday would cause trouble:
612         the localtime call used to initialize rpl_gettimeofday's save
613         mechanism would clobber ls's current local time information so
614         that in any long listing the first file would always be listed
615         with date 1970-01-01.  Analysis by Volker Borchert.
616
617         * gettimeofday.c (localtime): Undefine.
618         (rpl_localtime): New function.
619
620 2002-05-22  Jim Meyering  <meyering@lucent.com>
621
622         * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
623         * file-type.h: New file.
624         * file-type.c (file_type): New file/function.  Extracted from diffutils.
625
626 2002-04-29  Paul Eggert  <eggert@twinsun.com>
627
628         * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
629
630 2002-04-28  Paul Eggert  <eggert@twinsun.com>
631
632         * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
633         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
634         of 127, since 64 is the largest conceivable number for ancient
635         nonstandard hosts.
636         * sig2str.c: Do not include <sys/wait.h>; no longer needed.
637
638 2002-04-28  Jim Meyering  <meyering@lucent.com>
639
640         * sig2str.c (WTERMSIG): Remove definition (unused).
641
642 2002-04-28  Paul Eggert  <eggert@twinsun.com>
643
644         * sig2str.h, sig2str.c: New files.
645         * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
646
647 2002-04-24  Jim Meyering  <meyering@lucent.com>
648
649         * gettext.h: New file, from Gettext.
650         * Makefile.am (INCLUDES): Remove -I../intl.
651         (libfetish_a_SOURCES): Add gettext.h.
652
653 2002-04-16  Jim Meyering  <meyering@lucent.com>
654
655         * readutmp.h (UT_TYPE): Remove definition (now in who.c).
656         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
657         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
658
659 2002-04-12  Jim Meyering  <meyering@lucent.com>
660
661         * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
662
663 2002-03-10  Jim Meyering  <meyering@lucent.com>
664
665         * makepath.c (make_path): Remove a comma from a diagnostic.
666         Suggestion from Santiago Vila.
667
668 2002-03-08  Jim Meyering  <meyering@lucent.com>
669
670         * rename.c: Mention that this wrapper is needed also on
671         mips-dec-ultrix4.4 systems.
672
673 2002-03-02  Jim Meyering  <meyering@lucent.com>
674
675         * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
676         not HAVE_CLOCK_SETTIME.
677
678 2002-02-27  Paul Eggert  <eggert@twinsun.com>
679
680         * nanosleep.h: Rename to....
681         * timespec.h: New name for nanosleep.h.  All uses changed.
682
683         * gettime.c: New file.
684         * settime.c: New file.
685         * stime.c: Remove.
686
687         * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
688         timespec.h.  Remove nanosleep.h.
689
690 2002-02-25  Paul Eggert  <eggert@twinsun.com>
691
692         * acl.c, acl.h: New files.
693         * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
694
695 2002-02-24  Jim Meyering  <meyering@lucent.com>
696
697         * strnlen.c (strnlen): Define-away/undef so that an inconsistent
698         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
699         cause trouble.  Reported by Nelson Beebe.
700
701 2002-02-23  Paul Eggert  <eggert@twinsun.com>
702
703         * path-concat.c (xpath_concat): Reorder code to pacify
704         compilers that don't know that xalloc_die never returns.
705
706 2002-02-20  Jim Meyering  <meyering@lucent.com>
707
708         * getdate.c: Regenerate using bison-1.33.
709
710 2002-02-15  Paul Eggert  <eggert@twinsun.com>
711
712         * posixver.c, posixver.h: New files.
713         * Makefile.am (libfetish_a_SOURCES): Add them.
714
715 2002-02-02  Paul Eggert  <eggert@twinsun.com>
716             Bruno Haible  <bruno@clisp.org>
717
718         * unicodeio.h (print_unicode_char): Add exit_on_error argument.
719         (fwrite_success_callback): New declaration.
720         * unicodeio.c (unicode_to_mb): New function, extracted from
721         print_unicode_char. Call failure callback instead of error.
722         (fwrite_success_callback): New function.
723         (exit_failure_callback): New function.
724         (fallback_failure_callback): New function.
725         (print_unicode_char): Call unicode_to_mb.
726
727 2002-01-26  Jim Meyering  <meyering@lucent.com>
728
729         * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
730
731 2002-01-22  Jim Meyering  <meyering@lucent.com>
732
733         * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
734         Otherwise, some versions of automake would omit the rule that makes
735         Makefile from Makefile.in.
736
737 2001-01-21  Paul Eggert  <eggert@twinsun.com>
738
739         * xmemcoll.h, xmemcoll.c: New files.
740         * Makefile.am (libfetish_a_SOURCES): Add them.
741         * memcoll.c: Include errno.h, and declare errno if not defined.
742         (memcoll): Set errno to zero if there is no error.
743
744         * quotearg.c (quotearg_buffer_restyled):
745         Fix bug with quoting buffers containing NUL when backslashing escapes.
746         This bug was exposed by the other changes in this patch.
747         (quotearg_n_options): New arg ARGSIZE.
748         All callers changed.
749         (quoting_options_from_style): New function.
750         (quotearg_n_style): Use it.
751         (quotearg_n_style_mem): New function.
752
753         * quotearg.h (quotearg_n_style_mem): New function.
754
755 2002-01-16  Jim Meyering  <meyering@lucent.com>
756
757         * getdate.y: Add three semicolons, each just before a closing brace.
758         Bison (as of version 1.31) no longer papers over that mistake.
759
760 2002-02-14  Paul Eggert  <eggert@twinsun.com>
761
762         * backupfile.c (ISDIGIT): Comment fix.
763         * getdate.y (ISDIGIT): Likewise.
764         * posixtm.c (ISDIGIT, year): Likewise.
765         * strverscmp.c (ISDIGIT): Likewise.
766         * userspec.c (ISDIGIT): Likewise.
767
768 2002-01-05  Jim Meyering  <meyering@lucent.com>
769
770         * version-etc.c (version_etc_copyright): Update copyright year.
771
772 2001-01-19  Paul Eggert  <eggert@twinsun.com>
773
774         * closeout.c (close_stdout_status): If ferror (stdout), do
775         not silently exit merely because the output buffer happens to
776         have nothing pending.
777
778 2001-12-18  Paul Eggert  <eggert@twinsun.com>
779
780         See the big note in ../ChangeLog.
781         * human.c (suffixes): Prefer K to k for 1024.
782         (generate_suffix_backwards): New function.
783         (human_readable_inexact): Use it.
784         * xstrtol.c (__xstrtol): If there is no number but there
785         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
786         Accept 'K' as well as 'k'.
787
788 2001-12-15  Jim Meyering  <meyering@lucent.com>
789
790         * regex.h (__restrict_arr): Update from libc.
791
792         * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
793         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
794         (STREQ): Define.
795
796 2001-12-10  Jim Meyering  <meyering@lucent.com>
797
798         * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
799         Instead, include "xalloc.h".
800         (initbuffer): Don't cast xmalloc return value to char*.
801         (readline): Reword comment.
802         Don't cast xrealloc return value to char*
803         Return NULL, not 0.
804
805 2001-12-09  Jim Meyering  <meyering@lucent.com>
806
807         * modechange.c (mode_compile): Add cast to avoid pedantic warning about
808         `signed and unsigned type in conditional expression'.
809         * posixtm.c (posix_time_parse): Likewise.
810
811         * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
812
813         * readtokens.c (readtoken): Declare an index to be of type unsigned
814         to avoid a pedantic warning.
815
816         * getstr.c: Don't include assert.h.
817         (getstr): Remove warning-evoking assertions.
818         Return -1 if offset parameter is out of bounds.
819         Change the type of a local from int to size_t.
820
821         * strftime.c (my_strftime_localtime_r): Include this function
822         definition in the `#if ! HAVE_TM_GMTOFF' block.
823
824         * xgethostname.c: Remove declarations of xmalloc and xrealloc.
825         Include xalloc.h instead.
826
827 2001-12-02  Jim Meyering  <meyering@lucent.com>
828
829         * tempname.c: Don't declare getenv, thus reverting the change of
830         2001-11-18.  It's no longer necessary, now that stdlib.h is always
831         included.
832
833         * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
834         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
835
836 2001-11-30  Akim Demaille  <akim@epita.fr>
837
838         * xstrdup.c: Include xalloc.h, so that xstrdup is declared
839         before being defined.
840
841 2001-11-27  Paul Eggert  <eggert@twinsun.com>
842
843         * quotearg.h (quotearg_n, quotearg_n_style):
844         First arg is int, not unsigned.
845         * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
846         (SIZE_MAX, UINT_MAX): New macros.
847         (quotearg_n_options): Abort if N is negative.
848         Avoid overflow check on hosts where size_t is 64 bits and int
849         is 32 bits, as overflow is impossible there.
850         Fix off-by-one typo that caused unnecessary reallocation.
851
852 2001-11-27  Jim Meyering  <meyering@lucent.com>
853
854         * tempname.c: Merge with version from libc.
855         * regex.c: Likewise.
856
857         * tempname.c: Include stdlib.h unconditionally.  On some old systems
858         for which STDC_HEADERS is 0, it was not included, resulting in a
859         warning about an integer-to-pointer conversion problem with getenv.
860         Reported by Volker Borchert.
861
862 2001-11-26  Jim Meyering  <meyering@lucent.com>
863
864         * gtod.h: Remove file.
865         * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
866         * gettimeofday.c: Don't include gtod.h.
867         (GTOD_init): Remove function.
868         (rpl_gettimeofday): Do its job here instead, rather than aborting.
869         Suggestion from Volker Borchert.
870
871 2001-11-23  Jim Meyering  <meyering@lucent.com>
872
873         * hash.h (struct hash_table): Don't define here.  Merely declare it.
874         * hash.c (struct hash_table): Define it here instead.
875
876 2001-11-22  Jim Meyering  <meyering@lucent.com>
877
878         * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
879
880 2001-11-18  Paul Eggert  <eggert@twinsun.com>
881
882         * tempname.c (TMP_MAX): Remove; no longer needed.
883         (TEMPORARIES): New macro.
884         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
885         removes an artificial limitation (e.g. HP-UX 10.20, where
886         TMP_MAX is 17576).
887
888 2001-11-18  Jim Meyering  <meyering@lucent.com>
889
890         * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
891         on SunOS4.
892
893         * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
894         files will be created before anything else.
895
896 2001-11-17  Jim Meyering  <meyering@lucent.com>
897
898         * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
899         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
900         rather than group writable.  Patch by Juan F. Codagnone.
901
902         * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
903         Instead, include "xalloc.h".
904
905         * mountlist.c: Include unlocked-io.h after all system headers.
906         Remove explicit declarations of xmalloc, xrealloc,
907         and xstrdup.  Instead, include "xalloc.h".
908
909         * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
910         * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
911         * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
912
913         * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
914         Reported by Padraig Brady.
915
916         * mkstemp.c: #undef mkstemp.
917         Include config.h.
918         (rpl_mkstemp): Rename from mkstemp.
919         Protoize.
920
921 2001-11-16  Jim Meyering  <meyering@lucent.com>
922
923         * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
924         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
925         determine the amount of total physical memory, use pstat_getstatic.
926         HPUX-11 doesn't define _SC_PHYS_PAGES.
927         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
928         If sysconf couldn't be used to determine the amount of available
929         physical memory, use both pstat_getstatic and pstat_getdynamic.
930         Based on a patch from Bob Proulx.
931
932 2001-11-05  Jim Meyering  <meyering@lucent.com>
933
934         * xstat.in (slash_aware_lstat): Correct a misleading comment.
935
936 2001-11-03  Jim Meyering  <meyering@lucent.com>
937
938         * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
939         in argmatch_to_argument call.
940
941         * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
942         argument.
943
944         * hash.c (hash_clear): Fix a bug that could lead to an infloop or
945         e.g., a fault due to an attempt to free a NULL pointer.
946
947 2001-11-01  Jim Meyering  <meyering@lucent.com>
948
949         * dirfd.c, dirfd.h: New files.
950         * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
951
952         * hash.c (hash_print) [TESTING]: Clean up.
953
954 2001-10-22  Paul Eggert  <eggert@twinsun.com>
955
956         * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
957         to avoid a warning if -Wall.
958
959 2001-10-21  Paul Eggert  <eggert@twinsun.com>
960
961         * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
962
963 2001-10-21  Jim Meyering  <meyering@lucent.com>
964
965         * obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
966         this code would end up calling gettext even in packages built
967         with --disable-nls.
968         * getopt.c (_): Likewise.
969         * regex.c (_): Likewise.
970
971 2001-10-20  Paul Eggert  <eggert@twinsun.com>
972
973         * error.c (strerror_r): Do not declare unless !_LIBC.
974         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
975         Use strerror_r that is only a macro, even if it is not a function.
976         (strerror): Check for HAVE_DECL_STRERROR before declaring.
977         (private_strerror): Use prototypes, not old-style function definition.
978         (print_errno_message): New function.
979         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
980         char*-flavored one.
981         (error_tail, error, error_at_line): Use it.
982
983 2001-10-11  Jim Meyering  <meyering@lucent.com>
984
985         * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
986         and quote_n (1, ... to avoid clobbering a buffer.
987
988 2001-10-05  Jim Meyering  <meyering@lucent.com>
989
990         * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
991         * hash-pjw.c: New file (factored out of fileutils' remove.c).
992         * hash-pjw.h: New file.
993
994 2001-09-30  Jim Meyering  <meyering@lucent.com>
995
996         * mountlist.c [MOUNTED_GETFSSTAT]:
997         Include <sys/ucred.h>, for Apple Darwin.
998         Include sys/mount.h and sys/fs_types.h only if available.
999         (FS_TYPE): Define.
1000         (read_filesystem_list): Use FS_TYPE.
1001
1002 2001-09-29  Paul Eggert  <eggert@twinsun.com>
1003
1004         * exclude.c (excluded_filename): 0 -> false, since it's
1005         a boolean context.
1006
1007 2001-09-28  Paul Eggert  <eggert@twinsun.com>
1008
1009         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
1010         #defines strtoimax.  Also treat the other strto* functions
1011         like strtoimax.
1012
1013         * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
1014         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
1015         (strtoimax, strtoumax): Do not declare if already defined as a macro.
1016
1017 2001-09-26  Jim Meyering  <meyering@lucent.com>
1018
1019         Most macros in unlocked-io.h had the wrong number of arguments.
1020         * gen-uio: New script.
1021         (USE_UNLOCKED_IO): Define to 1 if not already defined.
1022         * unlocked-io.hin: Remove file.
1023         * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
1024         rather than trying to embed it here.
1025         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
1026         Reported by Padraig Brady.
1027
1028 2001-09-25  Volker Borchert  <bt@teknon.de>
1029
1030         * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
1031
1032 2001-09-23  Jim Meyering  <meyering@lucent.com>
1033
1034         * mountlist.c: Remove useless parentheses in #if directives.
1035         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
1036         the deprecated MOUNTED symbol is no longer defined in mntent.h.
1037
1038 2001-09-22  Jim Meyering  <meyering@lucent.com>
1039
1040         * localcharset.c: Update from latest gettext.
1041         * config.charset: Likewise.
1042
1043 2001-09-20  Jim Meyering  <meyering@lucent.com>
1044
1045         * xstrtol.c (strtoimax): Guard declaration with
1046         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
1047         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
1048         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
1049         (strtoumax): Likewise, for completeness (it wasn't necessary).
1050
1051 2001-09-06  Paul Eggert  <eggert@twinsun.com>
1052
1053         * strtoimax.c (HAVE_LONG_LONG):
1054         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
1055         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
1056         to work around bug in IBM C compiler.
1057
1058 2001-09-16  Jim Meyering  <meyering@lucent.com>
1059
1060         * mkdir.c: New file.
1061
1062 2001-09-04  Paul Eggert  <eggert@twinsun.com>
1063
1064         * xgetcwd.c: Revert some of the previous change; intead,
1065         fix the HAVE_GETCWD_NULL code to behave more like the
1066         !HAVE_GETCWD_NULL code used to.
1067
1068         Include "xalloc.h".
1069         (xgetcwd): Do not return NULL when memory is exhausted; instead,
1070         invoke xalloc_die.
1071
1072 2001-09-04  Paul Eggert  <eggert@twinsun.com>
1073
1074         * xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
1075         Use ssize_t, not int, to store result of readlink.
1076         Check for ssize_t overflow as well as size_t overflow,
1077         as POSIX says the result of readlink is implementation-defined
1078         when ssize_t overflows.
1079         Remove unnecessary cast to char*.
1080         Use free+malloc instead of realloc, as the storage doesn't need
1081         to be preserved and it's clearer and can be more efficient that way.
1082         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
1083         * xreadlink.h (xreadlink): Update prototype.
1084
1085 2001-09-03  Paul Eggert  <eggert@twinsun.com>
1086
1087         * exclude.c (fnmatch_no_wildcards): Fix confusion between
1088         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
1089         spotted by Jim Meyering.
1090
1091 2001-09-03  Jim Meyering  <meyering@lucent.com>
1092
1093         * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
1094
1095 2001-09-03  Paul Eggert  <eggert@twinsun.com>
1096
1097         * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
1098         like the HAVE_GETCWD_NULL code.
1099         Include pathmax.h if not HAVE_GETCWD.
1100         Do not include xalloc.h.
1101         (INITIAL_BUFFER_SIZE): New symbol.
1102         Do not use xmalloc / xrealloc, since the caller is responsible for
1103         handling errors.  Preserve errno around `free' during failure.
1104         Do not overrun buffer when using getwd.
1105
1106 2001-09-03  Paul Eggert  <eggert@twinsun.com>
1107
1108         * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
1109         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
1110
1111 2001-09-02  Jim Meyering  <meyering@lucent.com>
1112
1113         * error.c: Update from GNU libc.
1114
1115 2001-09-01  Jim Meyering  <meyering@lucent.com>
1116
1117         * xreadlink.c: New file.
1118         * xreadlink.h: New file.
1119         * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
1120
1121         * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
1122         doesn't conflict with sparc-sun-solaris2.7's definition in
1123         /usr/include/sys/int_types.h.
1124
1125         * exclude.c: Use `""', not `<>' to #include non-system header files.
1126         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
1127         and strncasecmp as r-values.  Unixware didn't have declarations.
1128
1129 2001-08-31  Jim Meyering  <meyering@lucent.com>
1130
1131         * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
1132         Use an initial, malloc'd, buffer of length 128 rather than
1133         a statically allocated one of length 1024.
1134
1135 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1136
1137         * xgetcwd.c: Don't include pathmax.h.
1138         Include stdlib.h and unistd.h if available.
1139         Include xalloc.h.
1140         (xmalloc, xstrdup, free): Remove decls.
1141         (xgetcwd): Don't assume sizes fit in unsigned.
1142         Check for overflow when computing sizes.
1143         Simplify reallocation code.
1144
1145 2001-08-28  Paul Eggert  <eggert@twinsun.com>
1146
1147         * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
1148
1149         * strtoimax.c: Renamed from strtoxmax.c, removing the
1150         old strtoimax.c.
1151
1152         Also, make the following further changes to make this file's
1153         configuration more similar to that of strtol.c:
1154         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
1155         (strtoumax, uintmax_t, strtoull, strtol): Remove.
1156         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
1157         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
1158         changed to signed values.
1159
1160         And make the following changes as well:
1161         Fix copyright notice, as 1999 was missing.
1162         (verify): New macro.
1163         (strtoimax): Check sizes at compile-time, not run-time.
1164         Prefer strtol to strtoll if both work.
1165         (main): Remove; it was not that useful and was a pain to maintain.
1166
1167         * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
1168
1169 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1170
1171         * savedir.c (savedir): Remove size parameter, as POSIX says that
1172         a directory's st_size can have an arbitrary value, so the old
1173         usage could waste an arbitrary amount of memory.  All uses
1174         changed.
1175         * savedir.h: Update prototype.
1176
1177 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1178
1179         * xstrtol.c (strtoimax): New decl.
1180
1181 2001-08-28  Paul Eggert  <eggert@twinsun.com>
1182
1183         * xstrtol.h: Add copyright notice.
1184         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
1185         LONGINT_INVALID_SUFFIX_CHAR.
1186
1187 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1188
1189         * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
1190         tm to be declared.
1191
1192 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1193
1194         * hash.c: Remove '2001' from copyright notice.
1195
1196 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1197
1198         * full-write.h: New file.
1199         * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
1200         * full-write.c: Correct credits, as cccp.c no longer
1201         exists and anyway it was so heavily changed from the old cccp
1202         code as to be unrecognizable.  Include full-write.h.
1203         (full_write) Return size_t, with short writes meaning failure.
1204         All callers changed.  This fixes a bug with large buffers
1205         on 64-bit hosts.
1206         * utime.c: Include full-write.h.
1207
1208 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1209
1210         Merge 'exclude' changes from tar 1.13.22.
1211         This fixes one or two unlikely storage allocation overflow bugs,
1212         but doesn't change user-visible behavior otherwise.
1213
1214 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1215
1216         * exclude.c (bool): Declare, perhaps by including stdbool.h.
1217         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
1218         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
1219         Include if available.
1220         (<xalloc.h>): Include
1221         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
1222         (verify): New macro.  Use it to verify that EXCLUDE macros do not
1223         collide with FNM macros.
1224         (struct patopts): New struct.
1225         (struct exclude): Use it, as exclude patterns now come with options.
1226         (new_exclude): Support above changes.
1227         (new_exclude, add_exclude_file):
1228         Initial size must now be a power of two to simplify overflow checking.
1229         (free_exclude, fnmatch_no_wildcards): New function.
1230         (excluded_filename): No longer requires options arg, as the options
1231         are determined by add_exclude.  Now returns bool, not int.
1232         (excluded_filename, add_exclude):
1233         Add support for the fancy new exclusion options.
1234         (add_exclude, add_exclude_file): Now takes int options arg.
1235         Check for arithmetic overflow when computing sizes.
1236         (add_exclude_file): xrealloc might modify errno, so don't
1237         realloc until after errno might be used.
1238
1239         * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
1240         New macros.
1241         (free_exclude): New decl.
1242         (add_exclude, add_exclude_file): Now takes int options arg.
1243         (excluded_filename): No longer requires options arg, as the options
1244         are determined by add_exclude.  Now returns bool, not int.
1245
1246 2001-08-30  Paul Eggert  <eggert@twinsun.com>
1247
1248         * alloca.c (alloca): Arg is of type size_t, not unsigned.
1249
1250 2001-08-27  Jim Meyering  <meyering@lucent.com>
1251
1252         * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
1253
1254         * version-etc.c (N_): Remove definition.
1255         Revert most of last change.
1256         Instead, simply don't mark the `Copyright...' string for translation.
1257         Based on advice from Paul Eggert.
1258
1259         * strtoxmax.c: Tweak comment.
1260
1261 2001-08-26  Jim Meyering  <meyering@lucent.com>
1262
1263         * version-etc.c (version_etc_copyright_fmt): Replace literal year
1264         of copyright with `%s' so translators don't get an untranslated
1265         message in 2002.
1266         (COPYRIGHT_YEAR): Define.
1267         (version_etc): Use fprintf rather than fputs.
1268         Suggestion from Ulrich Drepper.
1269
1270         * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
1271
1272         * strtoll.c: New file, from GNU libc.
1273         * xstrtoimax.c: New file.
1274
1275         * xstrtol.h: Add xstrtoimax.
1276         * strtoumax.c: New file.  Simply include "strtoumax.c".
1277         * strtoimax.c: New file.  Likewise, but first define STRTOUXMAX_SIGNED.
1278
1279         * strtoumax.c: Factor to work both for unsigned and signed types, ...
1280         * strtoxmax.c: ... then renamed to this.
1281
1282 2001-08-13  Paul Eggert  <eggert@twinsun.com>
1283
1284         * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
1285         Port to Solaris 8, where 'sed' requires a space after the 'r'
1286         command, and where sh dislikes "$/".  Clean up the spacing a bit.
1287         Redirect output to $tmp just once.
1288
1289 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
1290
1291         * addext.c (<errno.h>): Include.
1292         (errno): Declare if not defined.
1293         (addext): Work correctly when pathconf returns -1 and leaves
1294         errno alone because there is no limit.  Also, work even if
1295         pathconf returns a value greater than SIZE_MAX.
1296
1297 2001-08-12  Jim Meyering  <meyering@lucent.com>
1298
1299         * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
1300         Simply `return getcwd (NULL, 0);'.
1301         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
1302         Use 1300 as initial value for length, not PATH_MAX.
1303
1304         * pathmax.h: Clean up cpp syntax.
1305
1306 2001-08-12  Jim Meyering  <meyering@lucent.com>
1307
1308         * gettimeofday.c: New file.
1309         * gtod.h: New file.
1310         * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
1311
1312 2001-08-04  Jim Meyering  <meyering@lucent.com>
1313
1314         * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
1315         to get in sync with glibc.
1316
1317 2001-08-03  Paul Eggert  <eggert@twinsun.com>
1318
1319         The following changes are from gettext 0.10.39 as maintained by
1320         Bruno Haible.
1321
1322         * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
1323         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
1324         with inverted sense.  All uses changed.
1325
1326         * mbswidth.c: Don't include <limits.h>.
1327         Include <stdlib.h> and <string.h> unconditionally.
1328         (iswcntrl, mbsinit, ISCNTRL): New macros.
1329         (mbsnwidth): Use K&R style function declarations.
1330         Don't bother checking for MB_LEN_MAX == 1, since the compiler
1331         can optimize it when MB_CUR_MAX == 1.
1332         The width of control characters is zero, not 1.
1333
1334 2001-07-15  Jim Meyering  <meyering@lucent.com>
1335
1336         * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
1337         (BUILT_SOURCES): Add unlocked-io.h.
1338         (io_functions): Define.
1339         (unlocked-io.h): New rule.
1340         (DISTCLEANFILES): Add unlocked-io.h.
1341         (all-local): Depend on unlocked-io.h, to ensure it is created.
1342
1343         * unlocked-io.hin: New file
1344
1345         * regex.c: Update from glibc.
1346
1347 2001-07-05  Jim Meyering  <meyering@lucent.com>
1348
1349         * Makefile.am (noinst_HEADERS): Remove definition, per new automake
1350         recommendation.
1351         (libfetish_a_SOURCES): Put all .h files here instead.
1352         Remove a thus-exposed (better checks in automake) duplicate and
1353         two unnecessary .h files.
1354
1355 2001-06-11  Jim Meyering  <meyering@lucent.com>
1356
1357         * regex.c: Update from GNU libc.
1358
1359 2001-05-27  Jim Meyering  <meyering@lucent.com>
1360
1361         * readutmp.h (UT_TYPE): Define.
1362
1363 2001-05-24  Jim Meyering  <meyering@lucent.com>
1364
1365         * argmatch.c: Include "quote.h".
1366         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
1367         quote function.  Reported by Göran Uddeborg.
1368
1369 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
1370
1371         * dirname.c (dir_name): Compute append_dot using path, not newpath
1372         which is not yet declared.
1373
1374 2001-05-11  Paul Eggert  <eggert@twinsun.com>
1375
1376         * Makefile.am (libfetish_a_SOURCES):
1377         Add strftime.c, since we now compile it on all hosts.
1378
1379         * strftime.c (my_strftime):
1380         Define to nstrftime if emacs, but only if my_strftime is not defined.
1381         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
1382         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
1383         Add one more extra argument: a nanoseconds value.
1384         All uses changed.
1385         (ns): New macro.
1386         (my_strftime function): Add %N format.
1387         (emacs_strftimeu): Renamed from emacs_strftime,
1388         with extra ut argument.
1389
1390 2001-05-11  Paul Eggert  <eggert@twinsun.com>
1391
1392         dirname code cleanup.  base_name now behaves more compatibly
1393         with POSIX basename when given file names that have trailing
1394         slashes, and similarly for dir_name.  Add new primitives
1395         base_len and dir_len.  Put the directory-name-related decls
1396         into dirname.h.
1397
1398         * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
1399         * backupfile.c (base_name): Likewise.
1400         * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
1401         * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
1402         * makepath.c (strip_trailing_slashes): Likewise.
1403         * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
1404         Likewise.
1405         * rename.c (strip_trailing_slashes): Likewise.
1406         * same.c (base_name): Likewise.
1407         * stripslash.c (ISSLASH): Likewise.
1408
1409         * addext.c: Include <dirname.h> after size_t is defined.
1410         * backupfile.c: Likewise.
1411
1412         * addext.c (addext): Use base_len to trim redundant
1413         trailing slashes instead of doing it ourselves.
1414         But do not trim the last slash if it is not redundant.
1415
1416         * backupfile.c (find_backup_file_name,
1417         max_backup_version): Use base_len instead of rolling it ourselves.
1418         Handle the case of "" and (on DOS) "C:" correctly.
1419
1420         * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
1421         Include <string.h>, <dirname.h>.
1422         (base_name): Allow file names ending in slashes, other than names
1423         that are all slashes.  In this case, return the basename followed
1424         by the slashes.  This is more general, and can be used in places
1425         where the original base_name purposely had an assertion failure.
1426         (base_len): New function.
1427
1428         * dirname.c: Include <string.h> instead of <stdlib.h>.
1429         Do not include <assert.h>; no longer needed.
1430         Include xalloc.h.
1431         (memrchr): Remove decl.
1432         (dir_name_r): Remove.
1433         (dir_len): Renamed from dirlen.  All callers changed.
1434         Rewrite in terms of base_name, for simplicity and consistency.
1435         (dir_name): Never return NULL.  All callers changed.
1436         Do not include <stdlib.h> in test program; no longer needed.
1437         return 0; is fine for test program.
1438
1439         * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
1440         New macros.
1441         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
1442
1443         * path-concat.c (path_concat): Use base_len to compute
1444         base length, not strlen; this means we cannot rely on memcpy
1445         to null-terminate.
1446
1447         * same.c (STREQ): Remove.
1448         (same_name): Handle the case where the basename ends in trailing '/'.
1449
1450         * stripslash.c (strip_trailing_slashes): Return nonzero if
1451         a slash was stripped.  Do not strip the last slash after a
1452         file system prefix.
1453
1454 2001-04-08  Jim Meyering  <meyering@lucent.com>
1455
1456         * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
1457         recomputed; that's necessary when the offset spans a DST transition.
1458         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
1459
1460 2001-04-02  Jim Meyering  <meyering@lucent.com>
1461
1462         * regex.h, regex.c: Update from GNU libc.
1463
1464 2001-03-19  Paul Eggert  <eggert@twinsun.com>
1465
1466         * version-etc.c (version_etc_copyright): Update to 2001.
1467
1468 2001-03-16  Paul Eggert  <eggert@twinsun.com>
1469
1470         * tempname.c (uint64_t): Define to uintmax_t if
1471         not defined, and if UINT64_MAX is not defined.
1472         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
1473         Reported by John David Anglin.
1474
1475 2001-03-10  Bruno Haible  <haible@clisp.cons.org>
1476
1477         * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
1478         alias if codeset is empty.
1479         * config.charset (BeOS): Use wildcard syntax.
1480
1481 2001-03-13  Jim Meyering  <meyering@lucent.com>
1482
1483         * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
1484         Don't insert a backslash when concatenating e.g., `C:' and `foo'.
1485         From Bruno Haible.
1486
1487 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
1488
1489         * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
1490         Don't return NULL.
1491         * unicodeio.c (print_unicode_char): Simplify accordingly.
1492
1493 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
1494
1495         * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
1496         support for DOS/DJGPP.
1497
1498 2001-02-28  Paul Eggert  <eggert@twinsun.com>
1499
1500         * Makefile.am (libfetish_a_SOURCES):
1501         Add dup-safer.c, fopen-safer.c.
1502         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
1503
1504         * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
1505
1506 2001-02-25  Paul Eggert  <eggert@twinsun.com>
1507
1508         The mkstemp replacement is taken from glibc 2.2.2, with some
1509         portability fixes for use outside glibc, as follows:
1510
1511         * tempname.c (struct_stat64): New macro.
1512         (direxists, __gen_tempname): Use it.
1513         This avoids a portability problem with Solaris 8.
1514
1515         * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
1516         (<stddef.h>, <stdint.h>, <string.h>):
1517         Include only if STDC_HEADERS || _LIBC.
1518         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
1519         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
1520         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
1521         (__set_errno): Define this macro if <errno.h> doesn't.
1522         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
1523         Define these macros if <stdio.h> doesn't.
1524         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
1525         Define these macros if <sys/stat.h>
1526         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
1527         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
1528         __xstat64): Define if not _LIBC.
1529         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
1530         (__gen_tempname): Invoke gettimeofday only if
1531         HAVE_GETTIMEOFDAY || _LIBC;
1532         otherwise, fall back on plain "time".
1533         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
1534
1535         * mkstemp.c (__GT_FILE): Define to zero if not defined.
1536
1537         * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
1538
1539 2001-02-17  Jim Meyering  <meyering@lucent.com>
1540
1541         * strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
1542         around included file name.
1543
1544         * strnlen.c (__strnlen): Merge in a change from GNU libc.
1545
1546         * strftime.c: Update from GNU libc (the only changes were to comments).
1547
1548 2001-02-13  Bruno Haible  <haible@clisp.cons.org>
1549
1550         * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
1551
1552 2001-02-17  Paul Eggert  <eggert@twinsun.com>
1553
1554         * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
1555         Remove workaround macros for hosts that have mbrtowc but not
1556         mbstate_t, as we now insist on proper declarations for both
1557         before using mbrtowc.
1558
1559 2001-02-17  Jim Meyering  <meyering@lucent.com>
1560
1561         * regex.c: Update from libc.
1562
1563 2001-02-16  Paul Eggert  <eggert@twinsun.com>
1564
1565         * alloca.c (malloc): Undef before defining, since stdlib.h
1566         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
1567         Reported by Mark Hounschell via Paul Eggert.
1568
1569 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
1570
1571         * config.charset: Update for FreeBSD 4.2.
1572
1573 2001-01-26  Jim Meyering  <meyering@lucent.com>
1574
1575         * quotearg.c: Include stddef.h.
1576         * quote.c: Include stddef.h.
1577         Reported by Axel Kittenberger.
1578
1579         * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
1580         line in double quotes so that it evokes a better diagnostic.
1581         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
1582         Reported by Axel Kittenberger.
1583
1584 2001-01-15  Bruno Haible  <haible@clisp.cons.org>
1585
1586         * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
1587         to avoid a warning.  Add back 'const' to inptr.
1588
1589 2001-01-16  Jim Meyering  <meyering@lucent.com>
1590
1591         * basename.c: Include <stdio.h>, needed by assert on SunOS4.
1592         From Bruno Haible.
1593
1594 2001-01-14  Jim Meyering  <meyering@lucent.com>
1595
1596         * rename.c: New file.  From Volker Borchert.
1597         Include stdlib.h, string.h or strings.h, and xalloc.h.
1598         Use strip_trailing_slashes rather than open-coding it.
1599
1600 2001-01-03  Paul Eggert  <eggert@twinsun.com>
1601
1602         * strftime.c: Sync with glibc time/strftime.c 1.81.
1603
1604 2001-01-03  Jim Meyering  <meyering@lucent.com>
1605
1606         * unicodeio.c (print_unicode_char): Remove `const' from declaration of
1607         local `inptr' to avoid warning with some system declarations of iconv.
1608
1609 2000-12-29  Paul Eggert  <eggert@twinsun.com>
1610
1611         * modechange.c: Do not assume that mode_t uses the
1612         traditional octal encoding.  E.g. "chmod 1 FOO" should set
1613         the other-execute bit of FOO even if S_IXOTH != 1.
1614
1615         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
1616         WOTH, XOTH, ALLM): New macros.
1617         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
1618          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
1619         Use them.
1620         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
1621         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
1622         (mode_compile):
1623         No need to use uintmax_t; unsigned long is long enough.
1624         Don't bother to get suffix since we don't use it.
1625
1626 2000-12-24  Jim Meyering  <meyering@lucent.com>
1627
1628         * hash.c (is_prime): Return explicit boolean values.
1629         (hash_get_first): Return NULL to appease Irix5.6's 89.
1630         Reported by Nelson Beebe.
1631
1632 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
1633
1634         * localcharset.c (locale_charset): Add support for Win32.
1635
1636 2000-12-18  Paul Eggert  <eggert@twinsun.com>
1637
1638         * physmem.h, physmem.c: New files.
1639
1640         * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
1641         (noinst_HEADERS): Add physmem.h.
1642
1643         * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
1644         't' for compatibility with Solaris 8 sort.
1645
1646 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
1647
1648         * config.charset: Add support for BeOS.
1649
1650 2000-12-16  Jim Meyering  <meyering@lucent.com>
1651
1652         * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
1653         SHELLS_FILE to a file name that's useful on djgpp systems.
1654         Include stdlib.h.
1655         (ADDITIONAL_DEFAULT_SHELLS): Define.
1656         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
1657         Based mostly on a patch from Prashant TR.
1658
1659 2000-12-16  Jim Meyering  <meyering@lucent.com>
1660
1661         This bug had a serious impact on chown: `chown N:M FILE' (for integer
1662         N and M) would have treated it like `chown N:N FILE'.
1663
1664         * userspec.c (parse_user_spec): Fix typo: s/u/g/.
1665
1666 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
1667
1668         * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
1669         CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
1670         to the list of canonical encodings. Rename EUC-CN to GB2312.
1671
1672 2000-12-08  Andreas Schwab  <schwab@suse.de>
1673
1674         * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
1675         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
1676
1677 2000-12-07  Jim Meyering  <meyering@lucent.com>
1678
1679         * stripslash.c (ISSLASH): Define.
1680         (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
1681         From Prashant TR.
1682
1683         * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
1684         (dir_name_r): Declare this function as static.
1685         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
1686         manifest itself on a name containing a mix of slashes and
1687         backslashes.
1688         Make this function work with names starting with a DOS-style
1689         drive letter and colon prefix.
1690         (dir_name): Append `.' if necessary.
1691         Based mostly on patches from Prashant TR and Eli Zaretskii.
1692
1693         * dirname.h (dir_name_r): Remove prototype.
1694
1695 2000-12-05  Jim Meyering  <meyering@lucent.com>
1696
1697         * dirname.c (dir_name_r): Add `const' in a few local declarations.
1698
1699 2000-12-04  Jim Meyering  <meyering@lucent.com>
1700
1701         * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
1702         Also include memory.h, stdlib.h, unistd.h if appropriate.
1703         Reported by Andreas Jaeger (conflicting declaration of malloc).
1704
1705 2000-12-02  Jim Meyering  <meyering@lucent.com>
1706
1707         * closeout.h: Make idempotent, to avoid some obscure warnings.
1708
1709 2000-12-01  Paul Eggert  <eggert@twinsun.com>
1710
1711         * memrchr.c: Include <config.h> before any system include file.
1712
1713 2000-11-29  Paul Eggert  <eggert@twinsun.com>
1714
1715         * dirname.c (dir_name_r): Fix typo: int -> size_t.
1716
1717 2000-11-26  Jim Meyering  <meyering@lucent.com>
1718
1719         * memcoll.c: Include sys/types.h.  From Werner Almesberger.
1720
1721 2000-11-22  Paul Eggert  <eggert@twinsun.com>
1722
1723         * strftime.c (my_strftime): Do not invoke mbrlen with a
1724         size of (size_t) -1; it's not portable.
1725
1726 2000-11-17  Akim Demaille  <akim@epita.fr>
1727
1728         * obstack.h: Formatting changes.
1729         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
1730         prevent type checking.
1731         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
1732         cast the value to (void *): assigning a `foo *' to a `void *'
1733         variable is valid.
1734         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
1735
1736 2000-11-17  Jim Meyering  <meyering@lucent.com>
1737
1738         * strstr.c: Update from GNU libc.
1739
1740 2000-11-16  Jim Meyering  <meyering@lucent.com>
1741
1742         * strverscmp.c: Incorporate weak-alias-related changes from glibc.
1743
1744 2000-11-11  Jim Meyering  <meyering@lucent.com>
1745
1746         * error.c: Add a couple #includes, merging from GNU libc version.
1747
1748 2000-11-10  Jim Meyering  <meyering@lucent.com>
1749
1750         * obstack.h: Update from GNU libc.
1751         * obstack.c: Likewise.
1752
1753 2000-11-06  Paul Eggert  <eggert@twinsun.com>
1754
1755         * getusershell.c (setusershell): Use rewind rather than
1756         fseek/fseeko, to avoid configuration hassles with fseeko.
1757         Don't bother opening SHELLS_FILE if shellstream is NULL;
1758         it's not necessary.
1759
1760 2000-11-05  Jim Meyering  <meyering@lucent.com>
1761
1762         * makepath.h (make_dir): Declare.
1763         * makepath.c (make_dir): Remove `static' attribute.
1764         Tweak a comment.
1765
1766 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
1767
1768         * hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
1769         last one in a bucket, advance to the next bucket.
1770
1771 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
1772
1773         * fnmatch.c: Do not comment out all the code if we are using
1774         the GNU C library, because in some cases we are replacing buggy
1775         code in the GNU C library itself.
1776
1777 2000-10-30  Paul Eggert  <eggert@twinsun.com>
1778
1779         * error.h, getline.h, modechange.h:
1780         Remove "2000" from Copyright line, as the file hasn't been
1781         changed this year other than in the copyright notice.
1782
1783         * xalloc.h: Add "2000" to Copyright line, as this file
1784         was changed this year.
1785
1786 2000-10-30  Paul Eggert  <eggert@twinsun.com>
1787
1788         * fnmatch.c (FOLD): Do not assume that characters are unsigned.
1789         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
1790         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
1791
1792 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
1793
1794         * regex.h (__restrict_arr): Move definition out of #ifndef block.
1795         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
1796         doesn't define __restrict_arr.
1797
1798 2000-10-29  Jim Meyering  <meyering@lucent.com>
1799
1800         * xstat.in: Fix grammar in comment.
1801
1802 2000-10-28  Jim Meyering  <meyering@lucent.com>
1803
1804         * memchr.c: Update from libc.
1805         Adjust for portability:
1806         [HAVE_STDLIB_H]: Include stdlib.h.
1807         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
1808         Undef __memchr, too.
1809         [!weak_alias]: Define __memchr to memchr.
1810
1811         * regex.c: Update from libc.
1812         * regex.h: Likewise.
1813         * getopt1.c: Likewise.
1814         * memcmp.c: Likewise.
1815
1816         * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
1817         Avoid using fseek, when possible -- it's broken by design.
1818         Patch by Ulrich Drepper.
1819
1820 2000-10-26  Jim Meyering  <meyering@lucent.com>
1821
1822         * strftime.c: Update from libc.
1823
1824 2000-10-25  Jim Meyering  <meyering@lucent.com>
1825
1826         * obstack.c: Update from libc.
1827
1828 2000-10-23  Jim Meyering  <meyering@lucent.com>
1829
1830         * hard-locale.c (hard_locale): Revert last change -- it was simply
1831         wrong.  That set_locale call must not have any side effects.
1832         From Paul Eggert.
1833
1834 2000-10-22  Jim Meyering  <meyering@lucent.com>
1835
1836         * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
1837         [CYCLIC]: Remove now-unused definition.
1838
1839         * save-cwd.c (O_DIRECTORY): Define, if needed.
1840         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
1841         Suggestion from Ulrich Drepper.
1842
1843 2000-10-21  Jim Meyering  <meyering@lucent.com>
1844
1845         * dirname.c (dir_name_r): New function, factored out of dir_name.
1846         (dir_name): Use dir_name_r.
1847         * dirname.h (dir_name_r): Declare it.
1848
1849 2000-10-21  Jim Meyering  <meyering@lucent.com>
1850
1851         * dirname.c (memrchr): Declare if necessary.
1852         (dir_name): Remove the restriction that there be no
1853         trailing slashes.  Now, this code skips past them, effectively
1854         ignoring them.
1855         [TEST_DIRNAME] (main): New unit tests.
1856
1857         * memrchr.c: New file from GNU libc.
1858         Undef __memrchr, too.
1859         [!weak_alias]: Define __memrchr to memrchr.
1860         Guard weak_alias use with `#ifdef weak_alias'.
1861
1862 2000-10-17  Jim Meyering  <meyering@lucent.com>
1863
1864         * quote.h (PARAMS): Define and use.
1865         Reported by Akim Demaille.
1866
1867         * getopt.c: Update from libc.
1868
1869 2000-10-16  Jim Meyering  <meyering@lucent.com>
1870
1871         * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
1872         From Jan Fedak.
1873
1874 2000-09-25  Jim Meyering  <meyering@lucent.com>
1875
1876         * md5.h (rol): Define (from GnuPG).
1877
1878         * sha.c: Give credit (GnuPG) where due.
1879         (M): Use rol rather than open-coding it.
1880         Add a FIXME comment.
1881
1882 2000-09-21  Jim Meyering  <meyering@lucent.com>
1883
1884         * userspec.c (parse_user_spec): Remove debugging printf I'd added.
1885         Reported by Michael Stone.
1886
1887 2000-09-20  Jim Meyering  <meyering@lucent.com>
1888
1889         * Makefile.am (libfetish_a_SOURCES): Add sha.c.
1890         (noinst_HEADERS): Add sha.h.
1891         Based on code from Scott G. Miller and from GnuPG.
1892
1893 2000-09-15  Jim Meyering  <meyering@lucent.com>
1894
1895         * regex.c: Update from libc.
1896
1897 2000-09-10  Jim Meyering  <meyering@lucent.com>
1898
1899         * getopt.c (_getopt_internal): Update from glibc.
1900
1901 2000-09-09  Jim Meyering  <meyering@lucent.com>
1902
1903         * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
1904         think it should be used as a general replacement for isascii.
1905         * fnmatch.c: Likewise.
1906         * mbswidth.c: Likewise
1907         * regex.c: Likewise.
1908
1909         Don't use atoi.
1910         * userspec.c: Include sys/param.h and limits.h.
1911         Include xstrtol.h.
1912         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1913         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
1914         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
1915         UID, GID.  Check range.
1916
1917 2000-09-06  Jim Meyering  <meyering@lucent.com>
1918
1919         * getopt.c (_getopt_internal): Update from glibc.
1920
1921 2000-08-30  Jim Meyering  <meyering@lucent.com>
1922
1923         * strftime.c: Merge in changes from GNU libc.
1924
1925 2000-08-26  Jim Meyering  <meyering@lucent.com>
1926
1927         * closeout.c: Include "__fpending.h".
1928         (close_stdout_status): Return right away if there's nothing to flush.
1929
1930         * Makefile.am (noinst_HEADERS): Add __fpending.h.
1931         * __fpending.c: New file.
1932         * __fpending.h: New file.
1933
1934 2000-08-07  Paul Eggert  <eggert@twinsun.com>
1935
1936         Standardize on "memory exhausted" instead of "Memory exhausted"
1937         or "virtual memory exhausted".
1938         * obstack.c (print_and_abort): Use "memory exhausted", not
1939         "virtual memory exhausted".
1940         * same.c (same_name): Invoke xalloc_die instead of printing
1941         our own message.
1942         * userspec.c (parse_user_spec): Likewise.
1943         * bumpalloc.h: comment fix
1944         * same.c, userspec.c: Include xalloc.h.
1945
1946         * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
1947         not char *const and pointing to a constant array.
1948         * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
1949         (xrealloc): Comment fix.
1950
1951         * userspec.c (parse_user_spec):
1952         Don't translate a message until just before returning,
1953         to avoid unnecessary translation.
1954
1955 2000-08-07  Jim Meyering  <meyering@lucent.com>
1956
1957         * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
1958         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
1959         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
1960         getgroups.c, gethostname.c, getopt.h, group-member.c,
1961         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
1962         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
1963         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
1964         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
1965         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
1966         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
1967         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
1968         yesno.c: Back out Copyright date changes for each file with no change
1969         this year.  This eases coordination with other programs using the same
1970         source code modules.  From Paul Eggert.
1971
1972 2000-08-03  Greg McGary  <greg@mcgary.org>
1973
1974         * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
1975         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
1976         (EXTEND_BUFFER): Use them.
1977
1978 2000-08-01  Jim Meyering  <meyering@lucent.com>
1979
1980         * dirname.c (ISSLASH): Define.
1981         (BACKSLASH_IS_PATH_SEPARATOR): Define.
1982         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
1983         both `\' and `/' may be use as path separators.
1984         Based on a patch from Prashant TR.
1985
1986 2000-07-31  Paul Eggert  <eggert@twinsun.com>
1987
1988         * quotearg.c (quotearg_n_options): Don't make the initial
1989         slot vector a constant, since it might get modified.
1990
1991 2000-07-31  Jim Meyering  <meyering@lucent.com>
1992
1993         * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
1994         * obstack.c (print_and_abort): Likewise.
1995
1996 2000-07-30  Paul Eggert  <eggert@twinsun.com>
1997
1998         * quotearg.c (quotearg_n_options): Preallocate a slot 0
1999         buffer, so that the caller can always quote one small
2000         component of a "memory exhausted" message in slot 0.
2001         From a suggestion by Jim Meyering.
2002
2003 2000-07-30  Jim Meyering  <meyering@lucent.com>
2004
2005         * makepath.c (make_path): Quote the other instance, too.
2006
2007         * quotearg.c (N_STATIC_SLOTVECS): Define.
2008         (STATIC_BUF_SIZE): Define.
2009         (quotearg_n_options): Use only statically allocated storage when
2010         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
2011         than STATIC_BUF_SIZE.
2012
2013 2000-07-29  Jim Meyering  <meyering@lucent.com>
2014
2015         * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
2016         * dirname.c (dir_name): Likewise.
2017
2018         * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
2019
2020         * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
2021         (dir_name): Assert that there are no trailing slashes.
2022
2023 2000-07-18  Bruno Haible  <haible@clisp.cons.org>
2024
2025         * mbswidth.h (mbswidth): Add a flags argument.
2026         (mbswidth): New declaration.
2027         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
2028         * mbswidth.c (mbswidth): Add a flags argument.
2029         (mbsnwidth): New function.
2030
2031 2000-07-24  Jim Meyering  <meyering@lucent.com>
2032
2033         * mbswidth.c: Remove useless #else.  From Bruno Haible.
2034
2035 2000-07-23  Paul Eggert  <eggert@twinsun.com>
2036
2037         * mbswidth.c (_XOPEN_SOURCE):
2038         Don't define; this causes problems on Solaris 7.
2039         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
2040
2041 2000-07-23  Paul Eggert  <eggert@twinsun.com>
2042
2043         * quotearg.c:
2044         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
2045         so that mbstate_t is always defined.
2046
2047         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
2048         be 1 in at least one GCC installation, and this configuration
2049         error is likely to be common.  Ignoring MB_LEN_MAX hurts
2050         performance on hosts that have mbrtowc but have only unibyte
2051         locales, but I assume these hosts are rare.
2052
2053 2000-07-23  Paul Eggert  <eggert@twinsun.com>
2054
2055         * quotearg.c: Streamline by invoking multibyte code only if needed.
2056         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
2057         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
2058         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
2059         invoke multibyte primitives.
2060
2061 2000-07-23  Jim Meyering  <meyering@lucent.com>
2062
2063         * basename.c (base_name): Add an assertion.
2064
2065 2000-07-15  Bruno Haible  <clisp.cons.org>
2066
2067         * quotearg.c: When the system forces us to redefine mbstate_t,
2068         shadow its mbsinit function.
2069
2070 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
2071
2072         * mbswidth.h: New file.
2073         * mbswidth.c: New file.
2074         * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
2075         (noinst_HEADERS): Add mbswidth.h.
2076
2077 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
2078
2079         * config.charset: Add support for FreeBSD. Improve support for HP-UX
2080         and IRIX 6.
2081
2082 2000-07-15  Jim Meyering  <meyering@lucent.com>
2083
2084         * makepath.c: Include quote.h.
2085         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
2086         corresponding argument in a `quote (...)' call.
2087         Give better diagnostics.
2088
2089         * Makefile.am (libfetish_a_SOURCES): Add quote.c.
2090         (noinst_HEADERS): Add quote.h.
2091
2092         * quote.c (quote, quote_n): New file.  Two functions taken verbatim
2093         from tar's src/misc.c.
2094         * quote.h: New file.  Prototypes for same.
2095
2096 2000-07-10  Paul Eggert  <eggert@twinsun.com>
2097
2098         From a suggestion by Bruno Haible.
2099         * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
2100         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
2101         to decide whether to define the BeOS workaround macro;
2102         this adjusts to the change to AC_MBSTATE_T.
2103
2104 2000-07-13  Paul Eggert  <eggert@twinsun.com>
2105
2106         * quotearg.h (enum quoting style): New enum clocale_quoting_style.
2107
2108         * quotearg.c (quoting_style_args, quoting_style_vals,
2109         quotearg_buffer_restyled): Add support for
2110         clocale_quoting_style.  Undo previous change to
2111         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
2112         and "{RIGHT QUOTATION MARK}" msgids.
2113
2114 2000-07-05  Paul Eggert  <eggert@twinsun.com>
2115
2116         The old behavior of quoting `like this' doesn't look good with
2117         newer, ISO-style fonts.  See:
2118         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2119
2120         Instead, quote "like this" by default.  Let the translator
2121         tailor the locale-specific quoting behavior by providing
2122         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
2123
2124         * quotearg.c (N_): New macro.
2125         (gettext_default): New function.
2126         (quotearg_buffer_restyled): Use
2127         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
2128         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
2129
2130 2000-07-09  Jim Meyering  <meyering@lucent.com>
2131
2132         * Most files: Update copyright dates to include 2000.
2133
2134 2000-07-08  Jim Meyering  <meyering@lucent.com>
2135
2136         * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
2137         if not defined.
2138         (xgethostname): Remove now-unnecessary #ifdef.
2139         Move declaration of `err' into loop where it's used.
2140
2141 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
2142
2143         * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
2144         by allocating a larger buffer. Test the gethostname return value for
2145         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
2146         returns an error and ENAMETOOLONG isn't defined.
2147
2148 2000-07-05  Paul Eggert  <eggert@twinsun.com>
2149         and Bruno Haible  <haible@clisp.cons.org>
2150
2151         * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
2152
2153 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
2154
2155         * quotearg.c (struct quoting_options): Simplify quote_these_too
2156         dimension.
2157
2158 2000-07-03  Jim Meyering  <meyering@lucent.com>
2159
2160         * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
2161         Reported by Bruno Haible.
2162
2163 2000-07-04  Jim Meyering  <meyering@lucent.com>
2164
2165         * quotearg.c: Make inclusion of <wchar.h> independent of whether
2166         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
2167         lacks mbrtowc.
2168
2169 2000-07-03  Paul Eggert  <eggert@twinsun.com>
2170         and Bruno Haible  <haible@clisp.cons.org>
2171
2172         * quotearg.c (mbrtowc):
2173         Assign to *pwc, and return 1 only if result is nonzero.
2174         (iswprint): Use ISPRINT when substituting our own mbrtowc.
2175
2176 2000-07-03  Jim Meyering  <meyering@lucent.com>
2177
2178         * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
2179         This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
2180         From Bob Proulx.
2181
2182 2000-07-02  Jim Meyering  <meyering@lucent.com>
2183
2184         * quotearg.c (mbstate_t): Don't define here.
2185
2186 2000-07-02  Jim Meyering  <meyering@lucent.com>
2187
2188         * nanosleep.c (SIGCONT): Define if not already defined.
2189
2190 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
2191
2192         * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
2193         per change in ../m4/ls-mntd-fs.m4.
2194         (read_filesystem_list): Ignore symbolic links.
2195
2196 2000-06-29  Jim Meyering  <meyering@lucent.com>
2197
2198         * same.c: Include <string.h> or <strings.h>, as appropriate,
2199         for declaration of strcmp.
2200
2201         * long-options.c: Include <stdlib.h>, for declaration of exit.
2202
2203         * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
2204         Avoid warning by casting result to `char *' to remove `const'.
2205
2206 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
2207
2208         * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
2209
2210 2000-06-26  Paul Eggert  <eggert@twinsun.com>
2211
2212         savedir now sets errno on failure and invokes xmalloc to get memory.
2213         Fix a couple of other minor bugs while we're at it.
2214
2215         * savedir.c (<unistd.h>): Do not include; there's no need.
2216         (NAMLEN): Remove macro.
2217         (malloc, realloc): Remove decls.
2218         (stpcpy): Likewise.
2219         ("xalloc.h"): Include.
2220         (NAME_SIZE_DEFAULT): New macro.
2221         (savedir): Use xmalloc / xrealloc to allocate memory.
2222         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
2223         Skip "" directory entries.
2224         Use strlen to calculate directory entry length, since the old method
2225         is rarely used these days and isn't worth supporting.
2226         Don't use a pointer after freeing it.
2227         Check for integer overflow when calculating allocation size.
2228         Use memcpy to copy entries, instead of stpcpy.
2229         Set errno properly when returning NULL.
2230         Check for readdir error.
2231
2232 2000-06-26  Jim Meyering  <meyering@lucent.com>
2233
2234         * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
2235
2236 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
2237
2238         * getusershell.c (xmalloc, xrealloc): Remove functions.
2239         Include xalloc.h.
2240         Don't include <stdlib.h>.  Don't declare malloc, realloc.
2241
2242 2000-06-23  Bruno Haible  <haible@clisp.cons.org>
2243
2244         * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
2245
2246 2000-06-24  Jim Meyering  <meyering@lucent.com>
2247
2248         * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
2249
2250 2000-06-21  Jim Meyering  <meyering@lucent.com>
2251
2252         * getpass.c: New file, from Bruno Haible.  Required for BeOS.
2253
2254 2000-06-19  Paul Eggert  <eggert@twinsun.com>
2255
2256         * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
2257         (mbrtowc, mbstate_t): Define substitutes if
2258         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
2259         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
2260         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2261
2262 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
2263
2264         * xgetcwd.c (xgetcwd): If the required pathname length is smaller
2265         than 1024, return a memory chunk of least possible size, instead
2266         of size PATH_MAX + 2. In the loop, increment the size proportionally.
2267         Use free/xmalloc instead of xrealloc to avoid copying for very long
2268         paths.
2269
2270 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
2271
2272         * canon-host.c (canon_host): Use malloc and memcpy to copy an
2273         address, not strdup.  Include <stdlib.h> and don't declare free().
2274
2275 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
2276
2277         * path-concat.c (path_concat): Don't access dir[-1] if dir is
2278         the empty string.
2279
2280 2000-06-21  Jim Meyering  <meyering@lucent.com>
2281
2282         * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
2283         (noinst_HEADERS): Add getstr.h.
2284
2285         * getline.c (getstr): Move into a separate file.
2286         * getstr.c (getstr): New file, extracted from getline.c, with
2287         the following changes: new parameter, delim2; both delim[12]
2288         parameters have type `int', not `char'.  The latter would lose
2289         with 8-bit delimiters.
2290         * getstr.h: New file.
2291
2292 2000-06-19  Jim Meyering  <meyering@lucent.com>
2293
2294         * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
2295
2296 2000-06-18  Jim Meyering  <meyering@lucent.com>
2297
2298         * mkdir.c: Remove file, due mainly to copyright incompatibility.
2299         Besides, these days every porting target provides a mkdir function.
2300
2301         * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
2302         (this snippet comes from src/system.h).
2303
2304 2000-06-15  Paul Eggert  <eggert@twinsun.com>
2305
2306         * human.c (adjust_value): New function.
2307         (human_readable_inexact): Apply rounding style even when
2308         printing approximate values.
2309
2310 2000-06-14  Paul Eggert  <eggert@twinsun.com>
2311
2312         * human.c (human_readable_inexact): Allow an input block
2313         size that is not a multiple of the output block size, and vice versa.
2314         Reported by Piergiorgio Sartor.
2315
2316 2000-06-14  Paul Eggert  <eggert@twinsun.com>
2317
2318         * getdate.y (get_date): Apply relative times after time
2319         zone indicator, not before.  Reported by Todd A. Jacobs.
2320
2321 2000-06-13  Jim Meyering  <meyering@lucent.com>
2322
2323         * Makefile.am (all-local): Depend on lstat.c and stat.c.
2324
2325         * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
2326
2327 2000-06-12  Paul Eggert  <eggert@twinsun.com>
2328
2329         * xstat.in: Include <stdlib.h> in lstat, to declare "free".
2330
2331 2000-06-04  Paul Eggert  <eggert@twinsun.com>
2332
2333         * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
2334
2335 2000-06-04  Jim Meyering  <meyering@lucent.com>
2336
2337         * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
2338         SunOS4.1.4 for which gid_t is an unsigned type.
2339
2340 2000-06-03  Jim Meyering  <meyering@lucent.com>
2341
2342         * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
2343
2344 2000-05-26  Bruno Haible  <haible@clisp.cons.org>
2345
2346         * Makefile.am (install-exec-local): On systems with glibc-2.1 or
2347         newer, don't install charset.alias.
2348         * config.charset: Change the Linux/glibc rules so they become empty
2349         on glibc-2.1 or newer.
2350
2351 2000-06-02  Jim Meyering  <meyering@lucent.com>
2352
2353         * mountlist.c: Back out last change.  Instead, do this...
2354         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
2355         member using the same `ignore'-testing code.
2356         * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
2357         fs_type strings.
2358         From Mark D. Roth.
2359
2360 2000-05-29  Jim Meyering  <meyering@lucent.com>
2361
2362         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
2363         with the `ignore' attribute.  Based on a patch from Mark D. Roth.
2364
2365 2000-05-22  Jim Meyering  <meyering@lucent.com>
2366
2367         * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
2368
2369 2000-05-18  Jim Meyering  <meyering@lucent.com>
2370
2371         * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
2372         back, too, since it may have been modified by allocate_entry.
2373         (hash_delete): Rewrite to use neither the assignment operator
2374         nor the comma operator in an if-expression.
2375
2376 2000-05-15  Paul Eggert  <eggert@twinsun.com>
2377
2378         * closeout.c:
2379         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
2380         Remove; no longer needed.
2381         "quotearg.h": Add include.
2382         (file_name): Do not bother to explicitly initialize to NULL; it's less
2383         efficient on some hosts.
2384         (close_stdout_status): Remove test as to whether stdout was already
2385         closed; it breaks for the case "echo x | sort >&-".
2386         Quote file name colons.
2387         Do not assume that _("write error") lacks format strings.
2388
2389 2000-05-15  Jim Meyering  <meyering@lucent.com>
2390
2391         * version-etc.c (version_etc_copyright): Update the copyright string
2392         used in all --version output.
2393
2394 2000-05-14  Jim Meyering  <meyering@lucent.com>
2395
2396         * closeout.c (close_stdout_set_file_name): New function.
2397         (close_stdout_status): Use new file-scoped global.
2398         Return right away if fstat says the stdout file descriptor is invalid.
2399         * closeout.h (close_stdout_set_file_name): Declare.
2400
2401 2000-05-10  Jim Meyering  <meyering@lucent.com>
2402
2403         * closeout.c [default_exit_status]: New file-scoped variable.
2404         (close_stdout_set_status): New function.
2405         * closeout.h (close_stdout_set_status): Declare.
2406
2407 2000-05-08  Jim Meyering  <meyering@lucent.com>
2408
2409         * long-options.c: Don't include closeout.h.
2410         (parse_long_options): Don't call close_stdout for --version.
2411
2412 2000-05-06  Jim Meyering  <meyering@lucent.com>
2413
2414         * strnlen.c: Undefine __strnlen and strnlen.
2415         [!weak_alias]: Define __strnlen to strnlen.
2416
2417         * atexit.c: New file, from libiberty.
2418
2419 2000-05-06  Jim Meyering  <meyering@lucent.com>
2420
2421         * closeout.c (close_stdout_status): Also check for errors on the
2422         stderr stream.
2423
2424 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
2425
2426         * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
2427         instead of xmalloc, xrealloc, path_concat.
2428         (locale_charset): Treat empty environment variables as absent.
2429         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
2430
2431 2000-05-04  Jim Meyering  <meyering@lucent.com>
2432
2433         * getopt.c: Update from glibc.
2434         * obstack.c: Likewise.
2435         * obstack.h: Likewise.
2436         * regex.c: Likewise.  NB: K&R compiler support is dropped for this file
2437
2438         * regex.h: Likewise.
2439         * strndup.c: Likewise.
2440         * strnlen.c: New file, from glibc.
2441
2442 2000-05-01  Jim Meyering  <meyering@lucent.com>
2443
2444         * full-write.c (full_write): Remove `FIXME' part of comment.
2445
2446 2000-04-29  Jim Meyering  <meyering@lucent.com>
2447
2448         * path-concat.c: Declare strdup only if it's not defined.
2449         * canon-host.c: Likewise.
2450
2451 2000-04-28  Jim Meyering  <meyering@lucent.com>
2452
2453         * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
2454         redefinition warning on some systems (HPUX).  Otherwise, regex.h is
2455         included first, then limits.h is included by locale.h by libintl.h.
2456         From John David Anglin.
2457
2458 2000-04-25  Jim Meyering  <meyering@lucent.com>
2459
2460         * makepath.c (S_IRWXUGO): Define.
2461         (make_path): Always perform explicit chmod if MODE specifies any
2462         of the `special' permission bits.  Prompted by a bug report against
2463         install from Mate Wierdl and Joost van Baal.
2464
2465 2000-04-18  Jim Meyering  <meyering@lucent.com>
2466
2467         * README: New file.
2468
2469         * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
2470         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
2471
2472 2000-04-17  Jim Meyering  <meyering@lucent.com>
2473
2474         * strftime.c (my_strftime) [strftime]: Declare strftime here, since
2475         the definition of it to rpl_strftime also defined-away the system's
2476         declaration.
2477
2478 2000-04-15  Jim Meyering  <meyering@lucent.com>
2479
2480         Use `C' to denote so-called `contiguous' files, the same way
2481         that tar does.
2482         * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
2483         (ftypelet): Use S_ISCTG.
2484         From Michael Deutschmann.
2485
2486 2000-04-14  Jim Meyering  <meyering@lucent.com>
2487
2488         * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
2489
2490 2000-04-08  Jim Meyering  <meyering@lucent.com>
2491
2492         * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
2493         names don't conflict.  Reported by Eli Zaretskii.
2494
2495 2000-03-28  Bruno Haible  <haible@clisp.cons.org>
2496
2497         * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
2498         bug.  Deal with the different error behavior of Irix iconv.
2499
2500 2000-04-07  Jim Meyering  <meyering@lucent.com>
2501
2502         * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
2503         to work around system header problems on AIX 3.2.5.  From Bruno Haible.
2504
2505 2000-04-05  Jim Meyering  <meyering@lucent.com>
2506
2507         Portability tweaks required for ultrix4.3.
2508         * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
2509         * readutmp.c: Include sys/types.h before sys/stat.h.
2510         * canon-host.c: Declare strdup.
2511         * path-concat.c: Likewise.
2512         From John David Anglin.
2513
2514 2000-04-04  Jim Meyering  <meyering@lucent.com>
2515
2516         Be more DOS 8.3-friendly.
2517         * ref-add.sin: Renamed from ref-add.sed.in.
2518         * ref-del.sin: Renamed from ref-del.sed.in.
2519         * Makefile.am: Reflect renaming.
2520         Reported by Eli Zaretskii.
2521
2522         Use a temporary file name that won't clash with `charset.alias'
2523         in the DOS 8.3 name space.
2524         * Makefile.am (charset_tmp): Define.
2525         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
2526         (uninstall-local): Likewise.
2527         Reported by Eli Zaretskii.
2528
2529 2000-03-29  Paul Eggert  <eggert@twinsun.com>
2530
2531         * time/strftime.c (my_strftime): Make sure we call the system
2532         strftime, not ourselves, when invoking the underlying strftime.
2533
2534 2000-03-24  Jim Meyering  <meyering@lucent.com>
2535
2536         * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
2537         (charset_alias): Define.
2538         (install-exec-local): Factor out common code.
2539         (uninstall-local): Split lines longer than 80.
2540         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
2541         (SUFFIXES): Define.
2542         (.sed.in.sed): New rule.  Don't redirect directly to $@.
2543         (CLEANFILES): Add ref-add.sed and ref-del.sed.
2544
2545 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
2546
2547         * config.charset: Output a line containing "Packages using this file".
2548         * ref-add.sed.in, ref-del.sed.in: New files.
2549         * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
2550         ref-del.sed): New rules.
2551
2552 2000-03-17  Jim Meyering  <meyering@lucent.com>
2553
2554         * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
2555         Otherwise, include <strings.h>
2556
2557 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
2558
2559         * unicodeio.c (utf8_wctomb): New function.
2560         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
2561         format instead of in UCS-4 with platform dependent endianness.
2562
2563 2000-03-07  Paul Eggert  <eggert@twinsun.com>
2564
2565         * savedir.c (savedir): Work even if directory size is
2566         negative; this can happen with some screwy NFS configurations.
2567
2568 2000-03-06  Jim Meyering  <meyering@lucent.com>
2569
2570         * localcharset.c (get_charset_aliases): Don't try to free file_name
2571         if it's NULL (because we ran out of memory).  From Bruno Haible.
2572
2573 2000-03-05  Jim Meyering  <meyering@lucent.com>
2574
2575         * localcharset.c ("path-concat.h"): Include.
2576         (get_charset_aliases): Use path_concat instead of ANSI string
2577         concatenation.
2578
2579         * unicodeio.h (PARAMS): Define.
2580         Use it to guard prototype.
2581
2582 2000-03-04  Jim Meyering  <meyering@lucent.com>
2583
2584         * Makefile.am (install-exec-local): Create $(libdir) before installing
2585         into it.
2586         (uninstall-local): Uncomment this rule so `make distcheck' works
2587         once again.
2588
2589         * unicodeio.c (<errno.h>): Include it.
2590         (errno): Declare if not defined.
2591
2592         * localcharset.c: Add Bruno's comment justifying use of volatile.
2593
2594         * config.charset: New version, incorporating remarks from a linux
2595         i18n mailing list.  From Bruno Haible.
2596
2597 2000-03-02  Jim Meyering  <meyering@lucent.com>
2598
2599         * Makefile.am (EXTRA_DIST): Add config.charset.
2600
2601 2000-03-01  Jim Meyering  <meyering@lucent.com>
2602
2603         * localcharset.c: Guard some #includes with `#if HAVE_...'.
2604         * unicodeio.c: Likewise.
2605
2606 2000-02-02  Bruno Haible  <haible@clisp.cons.org>
2607
2608         * config.charset: New file.
2609         * localcharset.c: New file.
2610         * unicodeio.h, unicodeio.c: New files.
2611         * Makefile.am (DEFS): Add -DLIBDIR=...
2612         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
2613         (noinst_HEADERS): Add unicodeio.h.
2614         (all-local, install-exec-local, charset.alias): New targets.
2615
2616 2000-02-28  Paul Eggert  <eggert@twinsun.com>
2617
2618         * quotearg.c (ALERT_CHAR): New macro.
2619         (quotearg_buffer_restyled): Use it.
2620
2621 2000-02-27  Jim Meyering  <meyering@lucent.com>
2622
2623         * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
2624         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
2625
2626         * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
2627         not `#if STDC_HEADERS'.
2628         Declare malloc if needed.
2629
2630         * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
2631         now that autoconf always defines the HAVE_DECL_ symbols.
2632         * human.c: Likewise.
2633         * same.c: Likewise.
2634         * strtoumax.c: Likewise.
2635
2636         * backupfile.c: Arrange for cpp to fail if the configure-time
2637         declaration check was not run.
2638         * hash.c: Likewise.
2639         * human.c: Likewise.
2640         * same.c: Likewise.
2641         * strtoumax.c: Likewise.
2642
2643         * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
2644         then first look up the entire `.'-containing string as a login name.
2645
2646 2000-02-18  Paul Eggert  <eggert@twinsun.com>
2647
2648         * getdate.y: Handle two-digit years with leading zeros correctly.
2649         (textint): New typedef.
2650         (parser_control): Member year changed from int to textint.
2651         All uses changed.
2652         (YYSTYPE): Removed; replaced by %union with int and textint members.
2653         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
2654         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
2655         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
2656         (tSNUMBER, tUNUMBER): Now of type <textintval>.
2657         (date, number, to_year): Use width of number in digits, not its value,
2658         to determine whether it's a 2-digit year, or a 2-digit time.
2659         (yylex): Store number of digits of numeric tokens.
2660         Reported by John Kendall.
2661
2662         (parser_control): Changed from struct parser_control to typedef (for
2663         consistency).  All uses changed.
2664
2665         (tID): Removed; not used.
2666         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
2667
2668 2000-02-14  Paul Eggert  <eggert@twinsun.com>
2669
2670         * getpagesize.h (getpagesize): Port to VMS for Alpha;
2671         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
2672
2673 2000-02-12  Jim Meyering  <meyering@lucent.com>
2674
2675         * userspec.c (ISDIGIT): Define it.
2676         (isdigit): Remove definition.
2677         (is_number): Use ISDIGIT, not isdigit.
2678         <libintl.h>: Include.
2679         (_ and N_): Define.
2680         (parse_user_spec): Mark translatable strings.
2681
2682 2000-02-10  Jim Meyering  <meyering@lucent.com>
2683
2684         With these changes, nanosleep.[ch] are finally enough like the other
2685         lib/* replacement files to compile on a few more losing systems.
2686
2687         * nanosleep.h: Don't include config.h.
2688         Remove prototype from declaration of nanosleep.
2689         (PARAMS): Remove now-unneeded definition.
2690         * nanosleep.c: #undef nanosleep.
2691         (rpl_nanosleep): Rename from nanosleep.
2692
2693 2000-02-03  Jim Meyering  <meyering@lucent.com>
2694
2695         * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
2696         rather than with `#if HAVE_UTMPNAME'.
2697
2698 2000-02-01  Jim Meyering  <meyering@lucent.com>
2699
2700         * readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
2701
2702 2000-01-31  Jim Meyering  <meyering@lucent.com>
2703
2704         * nanosleep.h (nanosleep): Guard declaration with
2705         `#if ! HAVE_DECL_NANOSLEEP'.
2706         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
2707         the declaration in that vendor's sys/timers.h.
2708         Reported by Christian Krackowizer.
2709
2710         * quotearg.c (ISASCII): Add #undef and move definition to follow
2711         inclusion of wctype.h to work around solaris2.6 namespace pollution.
2712         (ISPRINT): Likewise.
2713         Reported by Tom Tromey.
2714
2715 2000-01-30  Jim Meyering  <meyering@lucent.com>
2716
2717         * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
2718         uses of ->ut_name.  The latter doesn't work with new Linux header files
2719         where only utmpx.ut_user is declared.
2720
2721         * readutmp.h (UT_USER): Define.
2722
2723 2000-01-23  Jim Meyering  <meyering@lucent.com>
2724
2725         * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
2726         obstack.c.
2727
2728 2000-01-22  Jim Meyering  <meyering@lucent.com>
2729
2730         * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
2731         [! HAVE_DECL_STRTOULL]: Declare strtoull.
2732         Required for some AIX systems.  Reported by Christian Krackowizer.
2733         [TESTING] (main): New function.
2734
2735         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
2736         * dirname.c (dir_name): Support for DOS-style file names with drive
2737         letters.
2738
2739         * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
2740
2741         * strverscmp.c (ISDIGIT): Define.
2742         (strverscmp): Use ISDIGIT, not isdigit.
2743
2744 2000-01-17  Paul Eggert  <eggert@twinsun.com>
2745
2746         * nanosleep.c (nanosleep):
2747         Don't use SA_INTERRUPT to decide whether to call sigaction, as
2748         POSIX.1 doesn't require SA_INTERRUPT and some systems
2749         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
2750         it's been part of POSIX.1 since day 1 (in 1988).
2751
2752 2000-01-17  Jim Meyering  <meyering@lucent.com>
2753
2754         * interlock: Remove unused file.  Reported by François Pinard.
2755
2756 2000-01-16  Paul Eggert  <eggert@twinsun.com>
2757
2758         * quotearg.c (quotearg_buffer_restyled): Do not quote
2759         alert, backslash, formfeed, and vertical tab unnecessarily in
2760         shell quoting style.
2761
2762 Local Variables:
2763 version-control: never
2764 End: