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