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