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