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