4770f125e3aedda8ea45e48896f40c9d967dfb17
[gnulib.git] / lib / ChangeLog
1 2001-11-05  Jim Meyering  <meyering@lucent.com>
2
3         * xstat.in (slash_aware_lstat): Correct a misleading comment.
4
5 2001-11-03  Jim Meyering  <meyering@lucent.com>
6
7         * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
8         in argmatch_to_argument call.
9
10         * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
11         argument.
12
13         * hash.c (hash_clear): Fix a bug that could lead to an infloop or
14         e.g., a fault due to an attempt to free a NULL pointer.
15
16 2001-11-01  Jim Meyering  <meyering@lucent.com>
17
18         * dirfd.c, dirfd.h: New files.
19         * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20
21         * hash.c (hash_print) [TESTING]: Clean up.
22
23 2001-10-22  Paul Eggert  <eggert@twinsun.com>
24
25         * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
26         to avoid a warning if -Wall.
27
28 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29
30         * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
31
32 2001-10-21  Jim Meyering  <meyering@lucent.com>
33
34         * obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
35         this code would end up calling gettext even in packages built
36         with --disable-nls.
37         * getopt.c (_): Likewise.
38         * regex.c (_): Likewise.
39
40 2001-10-20  Paul Eggert  <eggert@twinsun.com>
41
42         * error.c (strerror_r): Do not declare unless !_LIBC.
43         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
44         Use strerror_r that is only a macro, even if it is not a function.
45         (strerror): Check for HAVE_DECL_STRERROR before declaring.
46         (private_strerror): Use prototypes, not old-style function definition.
47         (print_errno_message): New function.
48         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
49         char*-flavored one.
50         (error_tail, error, error_at_line): Use it.
51
52 2001-10-11  Jim Meyering  <meyering@lucent.com>
53
54         * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
55         and quote_n (1, ... to avoid clobbering a buffer.
56
57 2001-10-05  Jim Meyering  <meyering@lucent.com>
58
59         * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
60         * hash-pjw.c: New file (factored out of fileutils' remove.c).
61         * hash-pjw.h: New file.
62
63 2001-09-30  Jim Meyering  <meyering@lucent.com>
64
65         * mountlist.c [MOUNTED_GETFSSTAT]:
66         Include <sys/ucred.h>, for Apple Darwin.
67         Include sys/mount.h and sys/fs_types.h only if available.
68         (FS_TYPE): Define.
69         (read_filesystem_list): Use FS_TYPE.
70
71 2001-09-29  Paul Eggert  <eggert@twinsun.com>
72
73         * exclude.c (excluded_filename): 0 -> false, since it's
74         a boolean context.
75
76 2001-09-28  Paul Eggert  <eggert@twinsun.com>
77
78         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
79         #defines strtoimax.  Also treat the other strto* functions
80         like strtoimax.
81
82         * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
83         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
84         (strtoimax, strtoumax): Do not declare if already defined as a macro.
85
86 2001-09-26  Jim Meyering  <meyering@lucent.com>
87
88         Most macros in unlocked-io.h had the wrong number of arguments.
89         * gen-uio: New script.
90         (USE_UNLOCKED_IO): Define to 1 if not already defined.
91         * unlocked-io.hin: Remove file.
92         * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
93         rather than trying to embed it here.
94         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
95         Reported by Padraig Brady.
96
97 2001-09-25  Volker Borchert  <bt@teknon.de>
98
99         * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
100
101 2001-09-23  Jim Meyering  <meyering@lucent.com>
102
103         * mountlist.c: Remove useless parentheses in #if directives.
104         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
105         the deprecated MOUNTED symbol is no longer defined in mntent.h.
106
107 2001-09-22  Jim Meyering  <meyering@lucent.com>
108
109         * localcharset.c: Update from latest gettext.
110         * config.charset: Likewise.
111
112 2001-09-20  Jim Meyering  <meyering@lucent.com>
113
114         * xstrtol.c (strtoimax): Guard declaration with
115         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
116         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
117         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
118         (strtoumax): Likewise, for completeness (it wasn't necessary).
119
120 2001-09-06  Paul Eggert  <eggert@twinsun.com>
121
122         * strtoimax.c (HAVE_LONG_LONG):
123         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
124         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
125         to work around bug in IBM C compiler.
126
127 2001-09-16  Jim Meyering  <meyering@lucent.com>
128
129         * mkdir.c: New file.
130
131 2001-09-04  Paul Eggert  <eggert@twinsun.com>
132
133         * xgetcwd.c: Revert some of the previous change; intead,
134         fix the HAVE_GETCWD_NULL code to behave more like the
135         !HAVE_GETCWD_NULL code used to.
136
137         Include "xalloc.h".
138         (xgetcwd): Do not return NULL when memory is exhausted; instead,
139         invoke xalloc_die.
140
141 2001-09-04  Paul Eggert  <eggert@twinsun.com>
142
143         * xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
144         Use ssize_t, not int, to store result of readlink.
145         Check for ssize_t overflow as well as size_t overflow,
146         as POSIX says the result of readlink is implementation-defined
147         when ssize_t overflows.
148         Remove unnecessary cast to char*.
149         Use free+malloc instead of realloc, as the storage doesn't need
150         to be preserved and it's clearer and can be more efficient that way.
151         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
152         * xreadlink.h (xreadlink): Update prototype.
153
154 2001-09-03  Paul Eggert  <eggert@twinsun.com>
155
156         * exclude.c (fnmatch_no_wildcards): Fix confusion between
157         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
158         spotted by Jim Meyering.
159
160 2001-09-03  Jim Meyering  <meyering@lucent.com>
161
162         * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
163
164 2001-09-03  Paul Eggert  <eggert@twinsun.com>
165
166         * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
167         like the HAVE_GETCWD_NULL code.
168         Include pathmax.h if not HAVE_GETCWD.
169         Do not include xalloc.h.
170         (INITIAL_BUFFER_SIZE): New symbol.
171         Do not use xmalloc / xrealloc, since the caller is responsible for
172         handling errors.  Preserve errno around `free' during failure.
173         Do not overrun buffer when using getwd.
174
175 2001-09-03  Paul Eggert  <eggert@twinsun.com>
176
177         * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
178         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
179
180 2001-09-02  Jim Meyering  <meyering@lucent.com>
181
182         * error.c: Update from GNU libc.
183
184 2001-09-01  Jim Meyering  <meyering@lucent.com>
185
186         * xreadlink.c: New file.
187         * xreadlink.h: New file.
188         * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
189
190         * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
191         doesn't conflict with sparc-sun-solaris2.7's definition in
192         /usr/include/sys/int_types.h.
193
194         * exclude.c: Use `""', not `<>' to #include non-system header files.
195         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
196         and strncasecmp as r-values.  Unixware didn't have declarations.
197
198 2001-08-31  Jim Meyering  <meyering@lucent.com>
199
200         * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
201         Use an initial, malloc'd, buffer of length 128 rather than
202         a statically allocated one of length 1024.
203
204 2001-08-30  Paul Eggert  <eggert@twinsun.com>
205
206         * xgetcwd.c: Don't include pathmax.h.
207         Include stdlib.h and unistd.h if available.
208         Include xalloc.h.
209         (xmalloc, xstrdup, free): Remove decls.
210         (xgetcwd): Don't assume sizes fit in unsigned.
211         Check for overflow when computing sizes.
212         Simplify reallocation code.
213
214 2001-08-28  Paul Eggert  <eggert@twinsun.com>
215
216         * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
217
218         * strtoimax.c: Renamed from strtoxmax.c, removing the
219         old strtoimax.c.
220
221         Also, make the following further changes to make this file's
222         configuration more similar to that of strtol.c:
223         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
224         (strtoumax, uintmax_t, strtoull, strtol): Remove.
225         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
226         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
227         changed to signed values.
228
229         And make the following changes as well:
230         Fix copyright notice, as 1999 was missing.
231         (verify): New macro.
232         (strtoimax): Check sizes at compile-time, not run-time.
233         Prefer strtol to strtoll if both work.
234         (main): Remove; it was not that useful and was a pain to maintain.
235
236         * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
237
238 2001-08-30  Paul Eggert  <eggert@twinsun.com>
239
240         * savedir.c (savedir): Remove size parameter, as POSIX says that
241         a directory's st_size can have an arbitrary value, so the old
242         usage could waste an arbitrary amount of memory.  All uses
243         changed.
244         * savedir.h: Update prototype.
245
246 2001-08-30  Paul Eggert  <eggert@twinsun.com>
247
248         * xstrtol.c (strtoimax): New decl.
249
250 2001-08-28  Paul Eggert  <eggert@twinsun.com>
251
252         * xstrtol.h: Add copyright notice.
253         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
254         LONGINT_INVALID_SUFFIX_CHAR.
255
256 2001-08-30  Paul Eggert  <eggert@twinsun.com>
257
258         * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
259         tm to be declared.
260
261 2001-08-30  Paul Eggert  <eggert@twinsun.com>
262
263         * hash.c: Remove '2001' from copyright notice.
264
265 2001-08-30  Paul Eggert  <eggert@twinsun.com>
266
267         * full-write.h: New file.
268         * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
269         * full-write.c: Correct credits, as cccp.c no longer
270         exists and anyway it was so heavily changed from the old cccp
271         code as to be unrecognizable.  Include full-write.h.
272         (full_write) Return size_t, with short writes meaning failure.
273         All callers changed.  This fixes a bug with large buffers
274         on 64-bit hosts.
275         * utime.c: Include full-write.h.
276
277 2001-08-30  Paul Eggert  <eggert@twinsun.com>
278
279         Merge 'exclude' changes from tar 1.13.22.
280         This fixes one or two unlikely storage allocation overflow bugs,
281         but doesn't change user-visible behavior otherwise.
282
283 2001-08-30  Paul Eggert  <eggert@twinsun.com>
284
285         * exclude.c (bool): Declare, perhaps by including stdbool.h.
286         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
287         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
288         Include if available.
289         (<xalloc.h>): Include
290         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
291         (verify): New macro.  Use it to verify that EXCLUDE macros do not
292         collide with FNM macros.
293         (struct patopts): New struct.
294         (struct exclude): Use it, as exclude patterns now come with options.
295         (new_exclude): Support above changes.
296         (new_exclude, add_exclude_file):
297         Initial size must now be a power of two to simplify overflow checking.
298         (free_exclude, fnmatch_no_wildcards): New function.
299         (excluded_filename): No longer requires options arg, as the options
300         are determined by add_exclude.  Now returns bool, not int.
301         (excluded_filename, add_exclude):
302         Add support for the fancy new exclusion options.
303         (add_exclude, add_exclude_file): Now takes int options arg.
304         Check for arithmetic overflow when computing sizes.
305         (add_exclude_file): xrealloc might modify errno, so don't
306         realloc until after errno might be used.
307
308         * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
309         New macros.
310         (free_exclude): New decl.
311         (add_exclude, add_exclude_file): Now takes int options arg.
312         (excluded_filename): No longer requires options arg, as the options
313         are determined by add_exclude.  Now returns bool, not int.
314
315 2001-08-30  Paul Eggert  <eggert@twinsun.com>
316
317         * alloca.c (alloca): Arg is of type size_t, not unsigned.
318
319 2001-08-27  Jim Meyering  <meyering@lucent.com>
320
321         * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
322
323         * version-etc.c (N_): Remove definition.
324         Revert most of last change.
325         Instead, simply don't mark the `Copyright...' string for translation.
326         Based on advice from Paul Eggert.
327
328         * strtoxmax.c: Tweak comment.
329
330 2001-08-26  Jim Meyering  <meyering@lucent.com>
331
332         * version-etc.c (version_etc_copyright_fmt): Replace literal year
333         of copyright with `%s' so translators don't get an untranslated
334         message in 2002.
335         (COPYRIGHT_YEAR): Define.
336         (version_etc): Use fprintf rather than fputs.
337         Suggestion from Ulrich Drepper.
338
339         * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
340
341         * strtoll.c: New file, from GNU libc.
342         * xstrtoimax.c: New file.
343
344         * xstrtol.h: Add xstrtoimax.
345         * strtoumax.c: New file.  Simply include "strtoumax.c".
346         * strtoimax.c: New file.  Likewise, but first define STRTOUXMAX_SIGNED.
347
348         * strtoumax.c: Factor to work both for unsigned and signed types, ...
349         * strtoxmax.c: ... then renamed to this.
350
351 2001-08-13  Paul Eggert  <eggert@twinsun.com>
352
353         * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
354         Port to Solaris 8, where 'sed' requires a space after the 'r'
355         command, and where sh dislikes "$/".  Clean up the spacing a bit.
356         Redirect output to $tmp just once.
357
358 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
359
360         * addext.c (<errno.h>): Include.
361         (errno): Declare if not defined.
362         (addext): Work correctly when pathconf returns -1 and leaves
363         errno alone because there is no limit.  Also, work even if
364         pathconf returns a value greater than SIZE_MAX.
365
366 2001-08-12  Jim Meyering  <meyering@lucent.com>
367
368         * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
369         Simply `return getcwd (NULL, 0);'.
370         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
371         Use 1300 as initial value for length, not PATH_MAX.
372
373         * pathmax.h: Clean up cpp syntax.
374
375 2001-08-12  Jim Meyering  <meyering@lucent.com>
376
377         * gettimeofday.c: New file.
378         * gtod.h: New file.
379         * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
380
381 2001-08-04  Jim Meyering  <meyering@lucent.com>
382
383         * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
384         to get in sync with glibc.
385
386 2001-08-03  Paul Eggert  <eggert@twinsun.com>
387
388         The following changes are from gettext 0.10.39 as maintained by
389         Bruno Haible.
390
391         * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
392         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
393         with inverted sense.  All uses changed.
394
395         * mbswidth.c: Don't include <limits.h>.
396         Include <stdlib.h> and <string.h> unconditionally.
397         (iswcntrl, mbsinit, ISCNTRL): New macros.
398         (mbsnwidth): Use K&R style function declarations.
399         Don't bother checking for MB_LEN_MAX == 1, since the compiler
400         can optimize it when MB_CUR_MAX == 1.
401         The width of control characters is zero, not 1.
402
403 2001-07-15  Jim Meyering  <meyering@lucent.com>
404
405         * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
406         (BUILT_SOURCES): Add unlocked-io.h.
407         (io_functions): Define.
408         (unlocked-io.h): New rule.
409         (DISTCLEANFILES): Add unlocked-io.h.
410         (all-local): Depend on unlocked-io.h, to ensure it is created.
411
412         * unlocked-io.hin: New file
413
414         * regex.c: Update from glibc.
415
416 2001-07-05  Jim Meyering  <meyering@lucent.com>
417
418         * Makefile.am (noinst_HEADERS): Remove definition, per new automake
419         recommendation.
420         (libfetish_a_SOURCES): Put all .h files here instead.
421         Remove a thus-exposed (better checks in automake) duplicate and
422         two unnecessary .h files.
423
424 2001-06-11  Jim Meyering  <meyering@lucent.com>
425
426         * regex.c: Update from GNU libc.
427
428 2001-05-27  Jim Meyering  <meyering@lucent.com>
429
430         * readutmp.h (UT_TYPE): Define.
431
432 2001-05-24  Jim Meyering  <meyering@lucent.com>
433
434         * argmatch.c: Include "quote.h".
435         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
436         quote function.  Reported by Göran Uddeborg.
437
438 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
439
440         * dirname.c (dir_name): Compute append_dot using path, not newpath
441         which is not yet declared.
442
443 2001-05-11  Paul Eggert  <eggert@twinsun.com>
444
445         * Makefile.am (libfetish_a_SOURCES):
446         Add strftime.c, since we now compile it on all hosts.
447
448         * strftime.c (my_strftime):
449         Define to nstrftime if emacs, but only if my_strftime is not defined.
450         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
451         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
452         Add one more extra argument: a nanoseconds value.
453         All uses changed.
454         (ns): New macro.
455         (my_strftime function): Add %N format.
456         (emacs_strftimeu): Renamed from emacs_strftime,
457         with extra ut argument.
458
459 2001-05-11  Paul Eggert  <eggert@twinsun.com>
460
461         dirname code cleanup.  base_name now behaves more compatibly
462         with POSIX basename when given file names that have trailing
463         slashes, and similarly for dir_name.  Add new primitives
464         base_len and dir_len.  Put the directory-name-related decls
465         into dirname.h.
466
467         * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
468         * backupfile.c (base_name): Likewise.
469         * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
470         * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
471         * makepath.c (strip_trailing_slashes): Likewise.
472         * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
473         Likewise.
474         * rename.c (strip_trailing_slashes): Likewise.
475         * same.c (base_name): Likewise.
476         * stripslash.c (ISSLASH): Likewise.
477
478         * addext.c: Include <dirname.h> after size_t is defined.
479         * backupfile.c: Likewise.
480
481         * addext.c (addext): Use base_len to trim redundant
482         trailing slashes instead of doing it ourselves.
483         But do not trim the last slash if it is not redundant.
484
485         * backupfile.c (find_backup_file_name,
486         max_backup_version): Use base_len instead of rolling it ourselves.
487         Handle the case of "" and (on DOS) "C:" correctly.
488
489         * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
490         Include <string.h>, <dirname.h>.
491         (base_name): Allow file names ending in slashes, other than names
492         that are all slashes.  In this case, return the basename followed
493         by the slashes.  This is more general, and can be used in places
494         where the original base_name purposely had an assertion failure.
495         (base_len): New function.
496
497         * dirname.c: Include <string.h> instead of <stdlib.h>.
498         Do not include <assert.h>; no longer needed.
499         Include xalloc.h.
500         (memrchr): Remove decl.
501         (dir_name_r): Remove.
502         (dir_len): Renamed from dirlen.  All callers changed.
503         Rewrite in terms of base_name, for simplicity and consistency.
504         (dir_name): Never return NULL.  All callers changed.
505         Do not include <stdlib.h> in test program; no longer needed.
506         return 0; is fine for test program.
507
508         * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
509         New macros.
510         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
511
512         * path-concat.c (path_concat): Use base_len to compute
513         base length, not strlen; this means we cannot rely on memcpy
514         to null-terminate.
515
516         * same.c (STREQ): Remove.
517         (same_name): Handle the case where the basename ends in trailing '/'.
518
519         * stripslash.c (strip_trailing_slashes): Return nonzero if
520         a slash was stripped.  Do not strip the last slash after a
521         file system prefix.
522
523 2001-04-08  Jim Meyering  <meyering@lucent.com>
524
525         * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
526         recomputed; that's necessary when the offset spans a DST transition.
527         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
528
529 2001-04-02  Jim Meyering  <meyering@lucent.com>
530
531         * regex.h, regex.c: Update from GNU libc.
532
533 2001-03-19  Paul Eggert  <eggert@twinsun.com>
534
535         * version-etc.c (version_etc_copyright): Update to 2001.
536
537 2001-03-16  Paul Eggert  <eggert@twinsun.com>
538
539         * tempname.c (uint64_t): Define to uintmax_t if
540         not defined, and if UINT64_MAX is not defined.
541         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
542         Reported by John David Anglin.
543
544 2001-03-10  Bruno Haible  <haible@clisp.cons.org>
545
546         * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
547         alias if codeset is empty.
548         * config.charset (BeOS): Use wildcard syntax.
549
550 2001-03-13  Jim Meyering  <meyering@lucent.com>
551
552         * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
553         Don't insert a backslash when concatenating e.g., `C:' and `foo'.
554         From Bruno Haible.
555
556 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
557
558         * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
559         Don't return NULL.
560         * unicodeio.c (print_unicode_char): Simplify accordingly.
561
562 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
563
564         * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
565         support for DOS/DJGPP.
566
567 2001-02-28  Paul Eggert  <eggert@twinsun.com>
568
569         * Makefile.am (libfetish_a_SOURCES):
570         Add dup-safer.c, fopen-safer.c.
571         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
572
573         * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
574
575 2001-02-25  Paul Eggert  <eggert@twinsun.com>
576
577         The mkstemp replacement is taken from glibc 2.2.2, with some
578         portability fixes for use outside glibc, as follows:
579
580         * tempname.c (struct_stat64): New macro.
581         (direxists, __gen_tempname): Use it.
582         This avoids a portability problem with Solaris 8.
583
584         * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
585         (<stddef.h>, <stdint.h>, <string.h>):
586         Include only if STDC_HEADERS || _LIBC.
587         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
588         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
589         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
590         (__set_errno): Define this macro if <errno.h> doesn't.
591         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
592         Define these macros if <stdio.h> doesn't.
593         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
594         Define these macros if <sys/stat.h>
595         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
596         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
597         __xstat64): Define if not _LIBC.
598         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
599         (__gen_tempname): Invoke gettimeofday only if
600         HAVE_GETTIMEOFDAY || _LIBC;
601         otherwise, fall back on plain "time".
602         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
603
604         * mkstemp.c (__GT_FILE): Define to zero if not defined.
605
606         * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
607
608 2001-02-17  Jim Meyering  <meyering@lucent.com>
609
610         * strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
611         around included file name.
612
613         * strnlen.c (__strnlen): Merge in a change from GNU libc.
614
615         * strftime.c: Update from GNU libc (the only changes were to comments).
616
617 2001-02-13  Bruno Haible  <haible@clisp.cons.org>
618
619         * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
620
621 2001-02-17  Paul Eggert  <eggert@twinsun.com>
622
623         * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
624         Remove workaround macros for hosts that have mbrtowc but not
625         mbstate_t, as we now insist on proper declarations for both
626         before using mbrtowc.
627
628 2001-02-17  Jim Meyering  <meyering@lucent.com>
629
630         * regex.c: Update from libc.
631
632 2001-02-16  Paul Eggert  <eggert@twinsun.com>
633
634         * alloca.c (malloc): Undef before defining, since stdlib.h
635         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
636         Reported by Mark Hounschell via Paul Eggert.
637
638 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
639
640         * config.charset: Update for FreeBSD 4.2.
641
642 2001-01-26  Jim Meyering  <meyering@lucent.com>
643
644         * quotearg.c: Include stddef.h.
645         * quote.c: Include stddef.h.
646         Reported by Axel Kittenberger.
647
648         * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
649         line in double quotes so that it evokes a better diagnostic.
650         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
651         Reported by Axel Kittenberger.
652
653 2001-01-15  Bruno Haible  <haible@clisp.cons.org>
654
655         * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
656         to avoid a warning.  Add back 'const' to inptr.
657
658 2001-01-16  Jim Meyering  <meyering@lucent.com>
659
660         * basename.c: Include <stdio.h>, needed by assert on SunOS4.
661         From Bruno Haible.
662
663 2001-01-14  Jim Meyering  <meyering@lucent.com>
664
665         * rename.c: New file.  From Volker Borchert.
666         Include stdlib.h, string.h or strings.h, and xalloc.h.
667         Use strip_trailing_slashes rather than open-coding it.
668
669 2001-01-03  Paul Eggert  <eggert@twinsun.com>
670
671         * strftime.c: Sync with glibc time/strftime.c 1.81.
672
673 2001-01-03  Jim Meyering  <meyering@lucent.com>
674
675         * unicodeio.c (print_unicode_char): Remove `const' from declaration of
676         local `inptr' to avoid warning with some system declarations of iconv.
677
678 2000-12-29  Paul Eggert  <eggert@twinsun.com>
679
680         * modechange.c: Do not assume that mode_t uses the
681         traditional octal encoding.  E.g. "chmod 1 FOO" should set
682         the other-execute bit of FOO even if S_IXOTH != 1.
683
684         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
685         WOTH, XOTH, ALLM): New macros.
686         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
687          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
688         Use them.
689         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
690         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
691         (mode_compile):
692         No need to use uintmax_t; unsigned long is long enough.
693         Don't bother to get suffix since we don't use it.
694
695 2000-12-24  Jim Meyering  <meyering@lucent.com>
696
697         * hash.c (is_prime): Return explicit boolean values.
698         (hash_get_first): Return NULL to appease Irix5.6's 89.
699         Reported by Nelson Beebe.
700
701 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
702
703         * localcharset.c (locale_charset): Add support for Win32.
704
705 2000-12-18  Paul Eggert  <eggert@twinsun.com>
706
707         * physmem.h, physmem.c: New files.
708
709         * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
710         (noinst_HEADERS): Add physmem.h.
711
712         * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
713         't' for compatibility with Solaris 8 sort.
714
715 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
716
717         * config.charset: Add support for BeOS.
718
719 2000-12-16  Jim Meyering  <meyering@lucent.com>
720
721         * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
722         SHELLS_FILE to a file name that's useful on djgpp systems.
723         Include stdlib.h.
724         (ADDITIONAL_DEFAULT_SHELLS): Define.
725         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
726         Based mostly on a patch from Prashant TR.
727
728 2000-12-16  Jim Meyering  <meyering@lucent.com>
729
730         This bug had a serious impact on chown: `chown N:M FILE' (for integer
731         N and M) would have treated it like `chown N:N FILE'.
732
733         * userspec.c (parse_user_spec): Fix typo: s/u/g/.
734
735 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
736
737         * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
738         CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
739         to the list of canonical encodings. Rename EUC-CN to GB2312.
740
741 2000-12-08  Andreas Schwab  <schwab@suse.de>
742
743         * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
744         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
745
746 2000-12-07  Jim Meyering  <meyering@lucent.com>
747
748         * stripslash.c (ISSLASH): Define.
749         (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
750         From Prashant TR.
751
752         * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
753         (dir_name_r): Declare this function as static.
754         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
755         manifest itself on a name containing a mix of slashes and
756         backslashes.
757         Make this function work with names starting with a DOS-style
758         drive letter and colon prefix.
759         (dir_name): Append `.' if necessary.
760         Based mostly on patches from Prashant TR and Eli Zaretskii.
761
762         * dirname.h (dir_name_r): Remove prototype.
763
764 2000-12-05  Jim Meyering  <meyering@lucent.com>
765
766         * dirname.c (dir_name_r): Add `const' in a few local declarations.
767
768 2000-12-04  Jim Meyering  <meyering@lucent.com>
769
770         * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
771         Also include memory.h, stdlib.h, unistd.h if appropriate.
772         Reported by Andreas Jaeger (conflicting declaration of malloc).
773
774 2000-12-02  Jim Meyering  <meyering@lucent.com>
775
776         * closeout.h: Make idempotent, to avoid some obscure warnings.
777
778 2000-12-01  Paul Eggert  <eggert@twinsun.com>
779
780         * memrchr.c: Include <config.h> before any system include file.
781
782 2000-11-29  Paul Eggert  <eggert@twinsun.com>
783
784         * dirname.c (dir_name_r): Fix typo: int -> size_t.
785
786 2000-11-26  Jim Meyering  <meyering@lucent.com>
787
788         * memcoll.c: Include sys/types.h.  From Werner Almesberger.
789
790 2000-11-22  Paul Eggert  <eggert@twinsun.com>
791
792         * strftime.c (my_strftime): Do not invoke mbrlen with a
793         size of (size_t) -1; it's not portable.
794
795 2000-11-17  Akim Demaille  <akim@epita.fr>
796
797         * obstack.h: Formatting changes.
798         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
799         prevent type checking.
800         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
801         cast the value to (void *): assigning a `foo *' to a `void *'
802         variable is valid.
803         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
804
805 2000-11-17  Jim Meyering  <meyering@lucent.com>
806
807         * strstr.c: Update from GNU libc.
808
809 2000-11-16  Jim Meyering  <meyering@lucent.com>
810
811         * strverscmp.c: Incorporate weak-alias-related changes from glibc.
812
813 2000-11-11  Jim Meyering  <meyering@lucent.com>
814
815         * error.c: Add a couple #includes, merging from GNU libc version.
816
817 2000-11-10  Jim Meyering  <meyering@lucent.com>
818
819         * obstack.h: Update from GNU libc.
820         * obstack.c: Likewise.
821
822 2000-11-06  Paul Eggert  <eggert@twinsun.com>
823
824         * getusershell.c (setusershell): Use rewind rather than
825         fseek/fseeko, to avoid configuration hassles with fseeko.
826         Don't bother opening SHELLS_FILE if shellstream is NULL;
827         it's not necessary.
828
829 2000-11-05  Jim Meyering  <meyering@lucent.com>
830
831         * makepath.h (make_dir): Declare.
832         * makepath.c (make_dir): Remove `static' attribute.
833         Tweak a comment.
834
835 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
836
837         * hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
838         last one in a bucket, advance to the next bucket.
839
840 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
841
842         * fnmatch.c: Do not comment out all the code if we are using
843         the GNU C library, because in some cases we are replacing buggy
844         code in the GNU C library itself.
845
846 2000-10-30  Paul Eggert  <eggert@twinsun.com>
847
848         * error.h, getline.h, modechange.h:
849         Remove "2000" from Copyright line, as the file hasn't been
850         changed this year other than in the copyright notice.
851
852         * xalloc.h: Add "2000" to Copyright line, as this file
853         was changed this year.
854
855 2000-10-30  Paul Eggert  <eggert@twinsun.com>
856
857         * fnmatch.c (FOLD): Do not assume that characters are unsigned.
858         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
859         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
860
861 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
862
863         * regex.h (__restrict_arr): Move definition out of #ifndef block.
864         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
865         doesn't define __restrict_arr.
866
867 2000-10-29  Jim Meyering  <meyering@lucent.com>
868
869         * xstat.in: Fix grammar in comment.
870
871 2000-10-28  Jim Meyering  <meyering@lucent.com>
872
873         * memchr.c: Update from libc.
874         Adjust for portability:
875         [HAVE_STDLIB_H]: Include stdlib.h.
876         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
877         Undef __memchr, too.
878         [!weak_alias]: Define __memchr to memchr.
879
880         * regex.c: Update from libc.
881         * regex.h: Likewise.
882         * getopt1.c: Likewise.
883         * memcmp.c: Likewise.
884
885         * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
886         Avoid using fseek, when possible -- it's broken by design.
887         Patch by Ulrich Drepper.
888
889 2000-10-26  Jim Meyering  <meyering@lucent.com>
890
891         * strftime.c: Update from libc.
892
893 2000-10-25  Jim Meyering  <meyering@lucent.com>
894
895         * obstack.c: Update from libc.
896
897 2000-10-23  Jim Meyering  <meyering@lucent.com>
898
899         * hard-locale.c (hard_locale): Revert last change -- it was simply
900         wrong.  That set_locale call must not have any side effects.
901         From Paul Eggert.
902
903 2000-10-22  Jim Meyering  <meyering@lucent.com>
904
905         * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
906         [CYCLIC]: Remove now-unused definition.
907
908         * save-cwd.c (O_DIRECTORY): Define, if needed.
909         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
910         Suggestion from Ulrich Drepper.
911
912 2000-10-21  Jim Meyering  <meyering@lucent.com>
913
914         * dirname.c (dir_name_r): New function, factored out of dir_name.
915         (dir_name): Use dir_name_r.
916         * dirname.h (dir_name_r): Declare it.
917
918 2000-10-21  Jim Meyering  <meyering@lucent.com>
919
920         * dirname.c (memrchr): Declare if necessary.
921         (dir_name): Remove the restriction that there be no
922         trailing slashes.  Now, this code skips past them, effectively
923         ignoring them.
924         [TEST_DIRNAME] (main): New unit tests.
925
926         * memrchr.c: New file from GNU libc.
927         Undef __memrchr, too.
928         [!weak_alias]: Define __memrchr to memrchr.
929         Guard weak_alias use with `#ifdef weak_alias'.
930
931 2000-10-17  Jim Meyering  <meyering@lucent.com>
932
933         * quote.h (PARAMS): Define and use.
934         Reported by Akim Demaille.
935
936         * getopt.c: Update from libc.
937
938 2000-10-16  Jim Meyering  <meyering@lucent.com>
939
940         * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
941         From Jan Fedak.
942
943 2000-09-25  Jim Meyering  <meyering@lucent.com>
944
945         * md5.h (rol): Define (from GnuPG).
946
947         * sha.c: Give credit (GnuPG) where due.
948         (M): Use rol rather than open-coding it.
949         Add a FIXME comment.
950
951 2000-09-21  Jim Meyering  <meyering@lucent.com>
952
953         * userspec.c (parse_user_spec): Remove debugging printf I'd added.
954         Reported by Michael Stone.
955
956 2000-09-20  Jim Meyering  <meyering@lucent.com>
957
958         * Makefile.am (libfetish_a_SOURCES): Add sha.c.
959         (noinst_HEADERS): Add sha.h.
960         Based on code from Scott G. Miller and from GnuPG.
961
962 2000-09-15  Jim Meyering  <meyering@lucent.com>
963
964         * regex.c: Update from libc.
965
966 2000-09-10  Jim Meyering  <meyering@lucent.com>
967
968         * getopt.c (_getopt_internal): Update from glibc.
969
970 2000-09-09  Jim Meyering  <meyering@lucent.com>
971
972         * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
973         think it should be used as a general replacement for isascii.
974         * fnmatch.c: Likewise.
975         * mbswidth.c: Likewise
976         * regex.c: Likewise.
977
978         Don't use atoi.
979         * userspec.c: Include sys/param.h and limits.h.
980         Include xstrtol.h.
981         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
982         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
983         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
984         UID, GID.  Check range.
985
986 2000-09-06  Jim Meyering  <meyering@lucent.com>
987
988         * getopt.c (_getopt_internal): Update from glibc.
989
990 2000-08-30  Jim Meyering  <meyering@lucent.com>
991
992         * strftime.c: Merge in changes from GNU libc.
993
994 2000-08-26  Jim Meyering  <meyering@lucent.com>
995
996         * closeout.c: Include "__fpending.h".
997         (close_stdout_status): Return right away if there's nothing to flush.
998
999         * Makefile.am (noinst_HEADERS): Add __fpending.h.
1000         * __fpending.c: New file.
1001         * __fpending.h: New file.
1002
1003 2000-08-07  Paul Eggert  <eggert@twinsun.com>
1004
1005         Standardize on "memory exhausted" instead of "Memory exhausted"
1006         or "virtual memory exhausted".
1007         * obstack.c (print_and_abort): Use "memory exhausted", not
1008         "virtual memory exhausted".
1009         * same.c (same_name): Invoke xalloc_die instead of printing
1010         our own message.
1011         * userspec.c (parse_user_spec): Likewise.
1012         * bumpalloc.h: comment fix
1013         * same.c, userspec.c: Include xalloc.h.
1014
1015         * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
1016         not char *const and pointing to a constant array.
1017         * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
1018         (xrealloc): Comment fix.
1019
1020         * userspec.c (parse_user_spec):
1021         Don't translate a message until just before returning,
1022         to avoid unnecessary translation.
1023
1024 2000-08-07  Jim Meyering  <meyering@lucent.com>
1025
1026         * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
1027         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
1028         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
1029         getgroups.c, gethostname.c, getopt.h, group-member.c,
1030         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
1031         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
1032         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
1033         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
1034         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
1035         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
1036         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
1037         yesno.c: Back out Copyright date changes for each file with no change
1038         this year.  This eases coordination with other programs using the same
1039         source code modules.  From Paul Eggert.
1040
1041 2000-08-03  Greg McGary  <greg@mcgary.org>
1042
1043         * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
1044         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
1045         (EXTEND_BUFFER): Use them.
1046
1047 2000-08-01  Jim Meyering  <meyering@lucent.com>
1048
1049         * dirname.c (ISSLASH): Define.
1050         (BACKSLASH_IS_PATH_SEPARATOR): Define.
1051         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
1052         both `\' and `/' may be use as path separators.
1053         Based on a patch from Prashant TR.
1054
1055 2000-07-31  Paul Eggert  <eggert@twinsun.com>
1056
1057         * quotearg.c (quotearg_n_options): Don't make the initial
1058         slot vector a constant, since it might get modified.
1059
1060 2000-07-31  Jim Meyering  <meyering@lucent.com>
1061
1062         * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
1063         * obstack.c (print_and_abort): Likewise.
1064
1065 2000-07-30  Paul Eggert  <eggert@twinsun.com>
1066
1067         * quotearg.c (quotearg_n_options): Preallocate a slot 0
1068         buffer, so that the caller can always quote one small
1069         component of a "memory exhausted" message in slot 0.
1070         From a suggestion by Jim Meyering.
1071
1072 2000-07-30  Jim Meyering  <meyering@lucent.com>
1073
1074         * makepath.c (make_path): Quote the other instance, too.
1075
1076         * quotearg.c (N_STATIC_SLOTVECS): Define.
1077         (STATIC_BUF_SIZE): Define.
1078         (quotearg_n_options): Use only statically allocated storage when
1079         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
1080         than STATIC_BUF_SIZE.
1081
1082 2000-07-29  Jim Meyering  <meyering@lucent.com>
1083
1084         * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
1085         * dirname.c (dir_name): Likewise.
1086
1087         * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
1088
1089         * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
1090         (dir_name): Assert that there are no trailing slashes.
1091
1092 2000-07-18  Bruno Haible  <haible@clisp.cons.org>
1093
1094         * mbswidth.h (mbswidth): Add a flags argument.
1095         (mbswidth): New declaration.
1096         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
1097         * mbswidth.c (mbswidth): Add a flags argument.
1098         (mbsnwidth): New function.
1099
1100 2000-07-24  Jim Meyering  <meyering@lucent.com>
1101
1102         * mbswidth.c: Remove useless #else.  From Bruno Haible.
1103
1104 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1105
1106         * mbswidth.c (_XOPEN_SOURCE):
1107         Don't define; this causes problems on Solaris 7.
1108         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
1109
1110 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1111
1112         * quotearg.c:
1113         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
1114         so that mbstate_t is always defined.
1115
1116         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
1117         be 1 in at least one GCC installation, and this configuration
1118         error is likely to be common.  Ignoring MB_LEN_MAX hurts
1119         performance on hosts that have mbrtowc but have only unibyte
1120         locales, but I assume these hosts are rare.
1121
1122 2000-07-23  Paul Eggert  <eggert@twinsun.com>
1123
1124         * quotearg.c: Streamline by invoking multibyte code only if needed.
1125         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
1126         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
1127         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
1128         invoke multibyte primitives.
1129
1130 2000-07-23  Jim Meyering  <meyering@lucent.com>
1131
1132         * basename.c (base_name): Add an assertion.
1133
1134 2000-07-15  Bruno Haible  <clisp.cons.org>
1135
1136         * quotearg.c: When the system forces us to redefine mbstate_t,
1137         shadow its mbsinit function.
1138
1139 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
1140
1141         * mbswidth.h: New file.
1142         * mbswidth.c: New file.
1143         * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
1144         (noinst_HEADERS): Add mbswidth.h.
1145
1146 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
1147
1148         * config.charset: Add support for FreeBSD. Improve support for HP-UX
1149         and IRIX 6.
1150
1151 2000-07-15  Jim Meyering  <meyering@lucent.com>
1152
1153         * makepath.c: Include quote.h.
1154         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
1155         corresponding argument in a `quote (...)' call.
1156         Give better diagnostics.
1157
1158         * Makefile.am (libfetish_a_SOURCES): Add quote.c.
1159         (noinst_HEADERS): Add quote.h.
1160
1161         * quote.c (quote, quote_n): New file.  Two functions taken verbatim
1162         from tar's src/misc.c.
1163         * quote.h: New file.  Prototypes for same.
1164
1165 2000-07-10  Paul Eggert  <eggert@twinsun.com>
1166
1167         From a suggestion by Bruno Haible.
1168         * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
1169         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
1170         to decide whether to define the BeOS workaround macro;
1171         this adjusts to the change to AC_MBSTATE_T.
1172
1173 2000-07-13  Paul Eggert  <eggert@twinsun.com>
1174
1175         * quotearg.h (enum quoting style): New enum clocale_quoting_style.
1176
1177         * quotearg.c (quoting_style_args, quoting_style_vals,
1178         quotearg_buffer_restyled): Add support for
1179         clocale_quoting_style.  Undo previous change to
1180         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
1181         and "{RIGHT QUOTATION MARK}" msgids.
1182
1183 2000-07-05  Paul Eggert  <eggert@twinsun.com>
1184
1185         The old behavior of quoting `like this' doesn't look good with
1186         newer, ISO-style fonts.  See:
1187         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
1188
1189         Instead, quote "like this" by default.  Let the translator
1190         tailor the locale-specific quoting behavior by providing
1191         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
1192
1193         * quotearg.c (N_): New macro.
1194         (gettext_default): New function.
1195         (quotearg_buffer_restyled): Use
1196         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
1197         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
1198
1199 2000-07-09  Jim Meyering  <meyering@lucent.com>
1200
1201         * Most files: Update copyright dates to include 2000.
1202
1203 2000-07-08  Jim Meyering  <meyering@lucent.com>
1204
1205         * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
1206         if not defined.
1207         (xgethostname): Remove now-unnecessary #ifdef.
1208         Move declaration of `err' into loop where it's used.
1209
1210 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
1211
1212         * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
1213         by allocating a larger buffer. Test the gethostname return value for
1214         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
1215         returns an error and ENAMETOOLONG isn't defined.
1216
1217 2000-07-05  Paul Eggert  <eggert@twinsun.com>
1218         and Bruno Haible  <haible@clisp.cons.org>
1219
1220         * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
1221
1222 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
1223
1224         * quotearg.c (struct quoting_options): Simplify quote_these_too
1225         dimension.
1226
1227 2000-07-03  Jim Meyering  <meyering@lucent.com>
1228
1229         * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
1230         Reported by Bruno Haible.
1231
1232 2000-07-04  Jim Meyering  <meyering@lucent.com>
1233
1234         * quotearg.c: Make inclusion of <wchar.h> independent of whether
1235         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
1236         lacks mbrtowc.
1237
1238 2000-07-03  Paul Eggert  <eggert@twinsun.com>
1239         and Bruno Haible  <haible@clisp.cons.org>
1240
1241         * quotearg.c (mbrtowc):
1242         Assign to *pwc, and return 1 only if result is nonzero.
1243         (iswprint): Use ISPRINT when substituting our own mbrtowc.
1244
1245 2000-07-03  Jim Meyering  <meyering@lucent.com>
1246
1247         * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
1248         This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
1249         From Bob Proulx.
1250
1251 2000-07-02  Jim Meyering  <meyering@lucent.com>
1252
1253         * quotearg.c (mbstate_t): Don't define here.
1254
1255 2000-07-02  Jim Meyering  <meyering@lucent.com>
1256
1257         * nanosleep.c (SIGCONT): Define if not already defined.
1258
1259 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1260
1261         * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
1262         per change in ../m4/ls-mntd-fs.m4.
1263         (read_filesystem_list): Ignore symbolic links.
1264
1265 2000-06-29  Jim Meyering  <meyering@lucent.com>
1266
1267         * same.c: Include <string.h> or <strings.h>, as appropriate,
1268         for declaration of strcmp.
1269
1270         * long-options.c: Include <stdlib.h>, for declaration of exit.
1271
1272         * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
1273         Avoid warning by casting result to `char *' to remove `const'.
1274
1275 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1276
1277         * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
1278
1279 2000-06-26  Paul Eggert  <eggert@twinsun.com>
1280
1281         savedir now sets errno on failure and invokes xmalloc to get memory.
1282         Fix a couple of other minor bugs while we're at it.
1283
1284         * savedir.c (<unistd.h>): Do not include; there's no need.
1285         (NAMLEN): Remove macro.
1286         (malloc, realloc): Remove decls.
1287         (stpcpy): Likewise.
1288         ("xalloc.h"): Include.
1289         (NAME_SIZE_DEFAULT): New macro.
1290         (savedir): Use xmalloc / xrealloc to allocate memory.
1291         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
1292         Skip "" directory entries.
1293         Use strlen to calculate directory entry length, since the old method
1294         is rarely used these days and isn't worth supporting.
1295         Don't use a pointer after freeing it.
1296         Check for integer overflow when calculating allocation size.
1297         Use memcpy to copy entries, instead of stpcpy.
1298         Set errno properly when returning NULL.
1299         Check for readdir error.
1300
1301 2000-06-26  Jim Meyering  <meyering@lucent.com>
1302
1303         * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
1304
1305 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1306
1307         * getusershell.c (xmalloc, xrealloc): Remove functions.
1308         Include xalloc.h.
1309         Don't include <stdlib.h>.  Don't declare malloc, realloc.
1310
1311 2000-06-23  Bruno Haible  <haible@clisp.cons.org>
1312
1313         * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
1314
1315 2000-06-24  Jim Meyering  <meyering@lucent.com>
1316
1317         * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
1318
1319 2000-06-21  Jim Meyering  <meyering@lucent.com>
1320
1321         * getpass.c: New file, from Bruno Haible.  Required for BeOS.
1322
1323 2000-06-19  Paul Eggert  <eggert@twinsun.com>
1324
1325         * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
1326         (mbrtowc, mbstate_t): Define substitutes if
1327         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
1328         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
1329         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
1330
1331 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1332
1333         * xgetcwd.c (xgetcwd): If the required pathname length is smaller
1334         than 1024, return a memory chunk of least possible size, instead
1335         of size PATH_MAX + 2. In the loop, increment the size proportionally.
1336         Use free/xmalloc instead of xrealloc to avoid copying for very long
1337         paths.
1338
1339 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1340
1341         * canon-host.c (canon_host): Use malloc and memcpy to copy an
1342         address, not strdup.  Include <stdlib.h> and don't declare free().
1343
1344 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
1345
1346         * path-concat.c (path_concat): Don't access dir[-1] if dir is
1347         the empty string.
1348
1349 2000-06-21  Jim Meyering  <meyering@lucent.com>
1350
1351         * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
1352         (noinst_HEADERS): Add getstr.h.
1353
1354         * getline.c (getstr): Move into a separate file.
1355         * getstr.c (getstr): New file, extracted from getline.c, with
1356         the following changes: new parameter, delim2; both delim[12]
1357         parameters have type `int', not `char'.  The latter would lose
1358         with 8-bit delimiters.
1359         * getstr.h: New file.
1360
1361 2000-06-19  Jim Meyering  <meyering@lucent.com>
1362
1363         * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
1364
1365 2000-06-18  Jim Meyering  <meyering@lucent.com>
1366
1367         * mkdir.c: Remove file, due mainly to copyright incompatibility.
1368         Besides, these days every porting target provides a mkdir function.
1369
1370         * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
1371         (this snippet comes from src/system.h).
1372
1373 2000-06-15  Paul Eggert  <eggert@twinsun.com>
1374
1375         * human.c (adjust_value): New function.
1376         (human_readable_inexact): Apply rounding style even when
1377         printing approximate values.
1378
1379 2000-06-14  Paul Eggert  <eggert@twinsun.com>
1380
1381         * human.c (human_readable_inexact): Allow an input block
1382         size that is not a multiple of the output block size, and vice versa.
1383         Reported by Piergiorgio Sartor.
1384
1385 2000-06-14  Paul Eggert  <eggert@twinsun.com>
1386
1387         * getdate.y (get_date): Apply relative times after time
1388         zone indicator, not before.  Reported by Todd A. Jacobs.
1389
1390 2000-06-13  Jim Meyering  <meyering@lucent.com>
1391
1392         * Makefile.am (all-local): Depend on lstat.c and stat.c.
1393
1394         * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
1395
1396 2000-06-12  Paul Eggert  <eggert@twinsun.com>
1397
1398         * xstat.in: Include <stdlib.h> in lstat, to declare "free".
1399
1400 2000-06-04  Paul Eggert  <eggert@twinsun.com>
1401
1402         * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
1403
1404 2000-06-04  Jim Meyering  <meyering@lucent.com>
1405
1406         * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
1407         SunOS4.1.4 for which gid_t is an unsigned type.
1408
1409 2000-06-03  Jim Meyering  <meyering@lucent.com>
1410
1411         * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
1412
1413 2000-05-26  Bruno Haible  <haible@clisp.cons.org>
1414
1415         * Makefile.am (install-exec-local): On systems with glibc-2.1 or
1416         newer, don't install charset.alias.
1417         * config.charset: Change the Linux/glibc rules so they become empty
1418         on glibc-2.1 or newer.
1419
1420 2000-06-02  Jim Meyering  <meyering@lucent.com>
1421
1422         * mountlist.c: Back out last change.  Instead, do this...
1423         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
1424         member using the same `ignore'-testing code.
1425         * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
1426         fs_type strings.
1427         From Mark D. Roth.
1428
1429 2000-05-29  Jim Meyering  <meyering@lucent.com>
1430
1431         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
1432         with the `ignore' attribute.  Based on a patch from Mark D. Roth.
1433
1434 2000-05-22  Jim Meyering  <meyering@lucent.com>
1435
1436         * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
1437
1438 2000-05-18  Jim Meyering  <meyering@lucent.com>
1439
1440         * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
1441         back, too, since it may have been modified by allocate_entry.
1442         (hash_delete): Rewrite to use neither the assignment operator
1443         nor the comma operator in an if-expression.
1444
1445 2000-05-15  Paul Eggert  <eggert@twinsun.com>
1446
1447         * closeout.c:
1448         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
1449         Remove; no longer needed.
1450         "quotearg.h": Add include.
1451         (file_name): Do not bother to explicitly initialize to NULL; it's less
1452         efficient on some hosts.
1453         (close_stdout_status): Remove test as to whether stdout was already
1454         closed; it breaks for the case "echo x | sort >&-".
1455         Quote file name colons.
1456         Do not assume that _("write error") lacks format strings.
1457
1458 2000-05-15  Jim Meyering  <meyering@lucent.com>
1459
1460         * version-etc.c (version_etc_copyright): Update the copyright string
1461         used in all --version output.
1462
1463 2000-05-14  Jim Meyering  <meyering@lucent.com>
1464
1465         * closeout.c (close_stdout_set_file_name): New function.
1466         (close_stdout_status): Use new file-scoped global.
1467         Return right away if fstat says the stdout file descriptor is invalid.
1468         * closeout.h (close_stdout_set_file_name): Declare.
1469
1470 2000-05-10  Jim Meyering  <meyering@lucent.com>
1471
1472         * closeout.c [default_exit_status]: New file-scoped variable.
1473         (close_stdout_set_status): New function.
1474         * closeout.h (close_stdout_set_status): Declare.
1475
1476 2000-05-08  Jim Meyering  <meyering@lucent.com>
1477
1478         * long-options.c: Don't include closeout.h.
1479         (parse_long_options): Don't call close_stdout for --version.
1480
1481 2000-05-06  Jim Meyering  <meyering@lucent.com>
1482
1483         * strnlen.c: Undefine __strnlen and strnlen.
1484         [!weak_alias]: Define __strnlen to strnlen.
1485
1486         * atexit.c: New file, from libiberty.
1487
1488 2000-05-06  Jim Meyering  <meyering@lucent.com>
1489
1490         * closeout.c (close_stdout_status): Also check for errors on the
1491         stderr stream.
1492
1493 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
1494
1495         * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
1496         instead of xmalloc, xrealloc, path_concat.
1497         (locale_charset): Treat empty environment variables as absent.
1498         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
1499
1500 2000-05-04  Jim Meyering  <meyering@lucent.com>
1501
1502         * getopt.c: Update from glibc.
1503         * obstack.c: Likewise.
1504         * obstack.h: Likewise.
1505         * regex.c: Likewise.  NB: K&R compiler support is dropped for this file
1506
1507         * regex.h: Likewise.
1508         * strndup.c: Likewise.
1509         * strnlen.c: New file, from glibc.
1510
1511 2000-05-01  Jim Meyering  <meyering@lucent.com>
1512
1513         * full-write.c (full_write): Remove `FIXME' part of comment.
1514
1515 2000-04-29  Jim Meyering  <meyering@lucent.com>
1516
1517         * path-concat.c: Declare strdup only if it's not defined.
1518         * canon-host.c: Likewise.
1519
1520 2000-04-28  Jim Meyering  <meyering@lucent.com>
1521
1522         * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
1523         redefinition warning on some systems (HPUX).  Otherwise, regex.h is
1524         included first, then limits.h is included by locale.h by libintl.h.
1525         From John David Anglin.
1526
1527 2000-04-25  Jim Meyering  <meyering@lucent.com>
1528
1529         * makepath.c (S_IRWXUGO): Define.
1530         (make_path): Always perform explicit chmod if MODE specifies any
1531         of the `special' permission bits.  Prompted by a bug report against
1532         install from Mate Wierdl and Joost van Baal.
1533
1534 2000-04-18  Jim Meyering  <meyering@lucent.com>
1535
1536         * README: New file.
1537
1538         * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
1539         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
1540
1541 2000-04-17  Jim Meyering  <meyering@lucent.com>
1542
1543         * strftime.c (my_strftime) [strftime]: Declare strftime here, since
1544         the definition of it to rpl_strftime also defined-away the system's
1545         declaration.
1546
1547 2000-04-15  Jim Meyering  <meyering@lucent.com>
1548
1549         Use `C' to denote so-called `contiguous' files, the same way
1550         that tar does.
1551         * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
1552         (ftypelet): Use S_ISCTG.
1553         From Michael Deutschmann.
1554
1555 2000-04-14  Jim Meyering  <meyering@lucent.com>
1556
1557         * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
1558
1559 2000-04-08  Jim Meyering  <meyering@lucent.com>
1560
1561         * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
1562         names don't conflict.  Reported by Eli Zaretskii.
1563
1564 2000-03-28  Bruno Haible  <haible@clisp.cons.org>
1565
1566         * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
1567         bug.  Deal with the different error behavior of Irix iconv.
1568
1569 2000-04-07  Jim Meyering  <meyering@lucent.com>
1570
1571         * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
1572         to work around system header problems on AIX 3.2.5.  From Bruno Haible.
1573
1574 2000-04-05  Jim Meyering  <meyering@lucent.com>
1575
1576         Portability tweaks required for ultrix4.3.
1577         * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
1578         * readutmp.c: Include sys/types.h before sys/stat.h.
1579         * canon-host.c: Declare strdup.
1580         * path-concat.c: Likewise.
1581         From John David Anglin.
1582
1583 2000-04-04  Jim Meyering  <meyering@lucent.com>
1584
1585         Be more DOS 8.3-friendly.
1586         * ref-add.sin: Renamed from ref-add.sed.in.
1587         * ref-del.sin: Renamed from ref-del.sed.in.
1588         * Makefile.am: Reflect renaming.
1589         Reported by Eli Zaretskii.
1590
1591         Use a temporary file name that won't clash with `charset.alias'
1592         in the DOS 8.3 name space.
1593         * Makefile.am (charset_tmp): Define.
1594         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
1595         (uninstall-local): Likewise.
1596         Reported by Eli Zaretskii.
1597
1598 2000-03-29  Paul Eggert  <eggert@twinsun.com>
1599
1600         * time/strftime.c (my_strftime): Make sure we call the system
1601         strftime, not ourselves, when invoking the underlying strftime.
1602
1603 2000-03-24  Jim Meyering  <meyering@lucent.com>
1604
1605         * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
1606         (charset_alias): Define.
1607         (install-exec-local): Factor out common code.
1608         (uninstall-local): Split lines longer than 80.
1609         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
1610         (SUFFIXES): Define.
1611         (.sed.in.sed): New rule.  Don't redirect directly to $@.
1612         (CLEANFILES): Add ref-add.sed and ref-del.sed.
1613
1614 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
1615
1616         * config.charset: Output a line containing "Packages using this file".
1617         * ref-add.sed.in, ref-del.sed.in: New files.
1618         * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
1619         ref-del.sed): New rules.
1620
1621 2000-03-17  Jim Meyering  <meyering@lucent.com>
1622
1623         * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
1624         Otherwise, include <strings.h>
1625
1626 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
1627
1628         * unicodeio.c (utf8_wctomb): New function.
1629         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
1630         format instead of in UCS-4 with platform dependent endianness.
1631
1632 2000-03-07  Paul Eggert  <eggert@twinsun.com>
1633
1634         * savedir.c (savedir): Work even if directory size is
1635         negative; this can happen with some screwy NFS configurations.
1636
1637 2000-03-06  Jim Meyering  <meyering@lucent.com>
1638
1639         * localcharset.c (get_charset_aliases): Don't try to free file_name
1640         if it's NULL (because we ran out of memory).  From Bruno Haible.
1641
1642 2000-03-05  Jim Meyering  <meyering@lucent.com>
1643
1644         * localcharset.c ("path-concat.h"): Include.
1645         (get_charset_aliases): Use path_concat instead of ANSI string
1646         concatenation.
1647
1648         * unicodeio.h (PARAMS): Define.
1649         Use it to guard prototype.
1650
1651 2000-03-04  Jim Meyering  <meyering@lucent.com>
1652
1653         * Makefile.am (install-exec-local): Create $(libdir) before installing
1654         into it.
1655         (uninstall-local): Uncomment this rule so `make distcheck' works
1656         once again.
1657
1658         * unicodeio.c (<errno.h>): Include it.
1659         (errno): Declare if not defined.
1660
1661         * localcharset.c: Add Bruno's comment justifying use of volatile.
1662
1663         * config.charset: New version, incorporating remarks from a linux
1664         i18n mailing list.  From Bruno Haible.
1665
1666 2000-03-02  Jim Meyering  <meyering@lucent.com>
1667
1668         * Makefile.am (EXTRA_DIST): Add config.charset.
1669
1670 2000-03-01  Jim Meyering  <meyering@lucent.com>
1671
1672         * localcharset.c: Guard some #includes with `#if HAVE_...'.
1673         * unicodeio.c: Likewise.
1674
1675 2000-02-02  Bruno Haible  <haible@clisp.cons.org>
1676
1677         * config.charset: New file.
1678         * localcharset.c: New file.
1679         * unicodeio.h, unicodeio.c: New files.
1680         * Makefile.am (DEFS): Add -DLIBDIR=...
1681         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
1682         (noinst_HEADERS): Add unicodeio.h.
1683         (all-local, install-exec-local, charset.alias): New targets.
1684
1685 2000-02-28  Paul Eggert  <eggert@twinsun.com>
1686
1687         * quotearg.c (ALERT_CHAR): New macro.
1688         (quotearg_buffer_restyled): Use it.
1689
1690 2000-02-27  Jim Meyering  <meyering@lucent.com>
1691
1692         * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
1693         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
1694
1695         * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
1696         not `#if STDC_HEADERS'.
1697         Declare malloc if needed.
1698
1699         * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
1700         now that autoconf always defines the HAVE_DECL_ symbols.
1701         * human.c: Likewise.
1702         * same.c: Likewise.
1703         * strtoumax.c: Likewise.
1704
1705         * backupfile.c: Arrange for cpp to fail if the configure-time
1706         declaration check was not run.
1707         * hash.c: Likewise.
1708         * human.c: Likewise.
1709         * same.c: Likewise.
1710         * strtoumax.c: Likewise.
1711
1712         * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
1713         then first look up the entire `.'-containing string as a login name.
1714
1715 2000-02-18  Paul Eggert  <eggert@twinsun.com>
1716
1717         * getdate.y: Handle two-digit years with leading zeros correctly.
1718         (textint): New typedef.
1719         (parser_control): Member year changed from int to textint.
1720         All uses changed.
1721         (YYSTYPE): Removed; replaced by %union with int and textint members.
1722         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
1723         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
1724         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
1725         (tSNUMBER, tUNUMBER): Now of type <textintval>.
1726         (date, number, to_year): Use width of number in digits, not its value,
1727         to determine whether it's a 2-digit year, or a 2-digit time.
1728         (yylex): Store number of digits of numeric tokens.
1729         Reported by John Kendall.
1730
1731         (parser_control): Changed from struct parser_control to typedef (for
1732         consistency).  All uses changed.
1733
1734         (tID): Removed; not used.
1735         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
1736
1737 2000-02-14  Paul Eggert  <eggert@twinsun.com>
1738
1739         * getpagesize.h (getpagesize): Port to VMS for Alpha;
1740         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
1741
1742 2000-02-12  Jim Meyering  <meyering@lucent.com>
1743
1744         * userspec.c (ISDIGIT): Define it.
1745         (isdigit): Remove definition.
1746         (is_number): Use ISDIGIT, not isdigit.
1747         <libintl.h>: Include.
1748         (_ and N_): Define.
1749         (parse_user_spec): Mark translatable strings.
1750
1751 2000-02-10  Jim Meyering  <meyering@lucent.com>
1752
1753         With these changes, nanosleep.[ch] are finally enough like the other
1754         lib/* replacement files to compile on a few more losing systems.
1755
1756         * nanosleep.h: Don't include config.h.
1757         Remove prototype from declaration of nanosleep.
1758         (PARAMS): Remove now-unneeded definition.
1759         * nanosleep.c: #undef nanosleep.
1760         (rpl_nanosleep): Rename from nanosleep.
1761
1762 2000-02-03  Jim Meyering  <meyering@lucent.com>
1763
1764         * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
1765         rather than with `#if HAVE_UTMPNAME'.
1766
1767 2000-02-01  Jim Meyering  <meyering@lucent.com>
1768
1769         * readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
1770
1771 2000-01-31  Jim Meyering  <meyering@lucent.com>
1772
1773         * nanosleep.h (nanosleep): Guard declaration with
1774         `#if ! HAVE_DECL_NANOSLEEP'.
1775         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
1776         the declaration in that vendor's sys/timers.h.
1777         Reported by Christian Krackowizer.
1778
1779         * quotearg.c (ISASCII): Add #undef and move definition to follow
1780         inclusion of wctype.h to work around solaris2.6 namespace pollution.
1781         (ISPRINT): Likewise.
1782         Reported by Tom Tromey.
1783
1784 2000-01-30  Jim Meyering  <meyering@lucent.com>
1785
1786         * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
1787         uses of ->ut_name.  The latter doesn't work with new Linux header files
1788         where only utmpx.ut_user is declared.
1789
1790         * readutmp.h (UT_USER): Define.
1791
1792 2000-01-23  Jim Meyering  <meyering@lucent.com>
1793
1794         * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
1795         obstack.c.
1796
1797 2000-01-22  Jim Meyering  <meyering@lucent.com>
1798
1799         * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
1800         [! HAVE_DECL_STRTOULL]: Declare strtoull.
1801         Required for some AIX systems.  Reported by Christian Krackowizer.
1802         [TESTING] (main): New function.
1803
1804         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
1805         * dirname.c (dir_name): Support for DOS-style file names with drive
1806         letters.
1807
1808         * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
1809
1810         * strverscmp.c (ISDIGIT): Define.
1811         (strverscmp): Use ISDIGIT, not isdigit.
1812
1813 2000-01-17  Paul Eggert  <eggert@twinsun.com>
1814
1815         * nanosleep.c (nanosleep):
1816         Don't use SA_INTERRUPT to decide whether to call sigaction, as
1817         POSIX.1 doesn't require SA_INTERRUPT and some systems
1818         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
1819         it's been part of POSIX.1 since day 1 (in 1988).
1820
1821 2000-01-17  Jim Meyering  <meyering@lucent.com>
1822
1823         * interlock: Remove unused file.  Reported by François Pinard.
1824
1825 2000-01-16  Paul Eggert  <eggert@twinsun.com>
1826
1827         * quotearg.c (quotearg_buffer_restyled): Do not quote
1828         alert, backslash, formfeed, and vertical tab unnecessarily in
1829         shell quoting style.
1830
1831 Local Variables:
1832 version-control: never
1833 End: