*** empty log message ***
[gnulib.git] / lib / ChangeLog
1 2000-06-29  Jim Meyering  <meyering@lucent.com>
2
3         * same.c: Include <string.h> or <strings.h>, as appropriate,
4         for declaration of strcmp.
5
6         * long-options.c: Include <stdlib.h>, for declaration of exit.
7
8         * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
9         Avoid warning by casting result to `char *' to remove `const'.
10
11 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
12
13         * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
14
15 2000-06-26  Paul Eggert  <eggert@twinsun.com>
16
17         savedir now sets errno on failure and invokes xmalloc to get memory.
18         Fix a couple of other minor bugs while we're at it.
19
20         * savedir.c (<unistd.h>): Do not include; there's no need.
21         (NAMLEN): Remove macro.
22         (malloc, realloc): Remove decls.
23         (stpcpy): Likewise.
24         ("xalloc.h"): Include.
25         (NAME_SIZE_DEFAULT): New macro.
26         (savedir): Use xmalloc / xrealloc to allocate memory.
27         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
28         Skip "" directory entries.
29         Use strlen to calculate directory entry length, since the old method
30         is rarely used these days and isn't worth supporting.
31         Don't use a pointer after freeing it.
32         Check for integer overflow when calculating allocation size.
33         Use memcpy to copy entries, instead of stpcpy.
34         Set errno properly when returning NULL.
35         Check for readdir error.
36
37 2000-06-26  Jim Meyering  <meyering@lucent.com>
38
39         * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
40
41 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
42
43         * getusershell.c (xmalloc, xrealloc): Remove functions.
44         Include xalloc.h.
45         Don't include <stdlib.h>.  Don't declare malloc, realloc.
46
47 2000-06-23  Bruno Haible  <haible@clisp.cons.org>
48
49         * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
50
51 2000-06-24  Jim Meyering  <meyering@lucent.com>
52
53         * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
54
55 2000-06-21  Jim Meyering  <meyering@lucent.com>
56
57         * getpass.c: New file, from Bruno Haible.  Required for BeOS.
58
59 2000-06-19  Paul Eggert  <eggert@twinsun.com>
60
61         * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
62         (mbrtowc, mbstate_t): Define substitutes if
63         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
64         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
65         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
66
67 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
68
69         * xgetcwd.c (xgetcwd): If the required pathname length is smaller
70         than 1024, return a memory chunk of least possible size, instead
71         of size PATH_MAX + 2. In the loop, increment the size proportionally.
72         Use free/xmalloc instead of xrealloc to avoid copying for very long
73         paths.
74
75 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
76
77         * canon-host.c (canon_host): Use malloc and memcpy to copy an
78         address, not strdup.  Include <stdlib.h> and don't declare free().
79
80 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
81
82         * path-concat.c (path_concat): Don't access dir[-1] if dir is
83         the empty string.
84
85 2000-06-21  Jim Meyering  <meyering@lucent.com>
86
87         * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
88         (noinst_HEADERS): Add getstr.h.
89
90         * getline.c (getstr): Move into a separate file.
91         * getstr.c (getstr): New file, extracted from getline.c, with
92         the following changes: new parameter, delim2; both delim[12]
93         parameters have type `int', not `char'.  The latter would lose
94         with 8-bit delimiters.
95         * getstr.h: New file.
96
97 2000-06-19  Jim Meyering  <meyering@lucent.com>
98
99         * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
100
101 2000-06-18  Jim Meyering  <meyering@lucent.com>
102
103         * mkdir.c: Remove file, due mainly to copyright incompatibility.
104         Besides, these days every porting target provides a mkdir function.
105
106         * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
107         (this snippet comes from src/system.h).
108
109 2000-06-15  Paul Eggert  <eggert@twinsun.com>
110
111         * human.c (adjust_value): New function.
112         (human_readable_inexact): Apply rounding style even when
113         printing approximate values.
114
115 2000-06-14  Paul Eggert  <eggert@twinsun.com>
116
117         * human.c (human_readable_inexact): Allow an input block
118         size that is not a multiple of the output block size, and vice versa.
119         Reported by Piergiorgio Sartor.
120
121 2000-06-14  Paul Eggert  <eggert@twinsun.com>
122
123         * getdate.y (get_date): Apply relative times after time
124         zone indicator, not before.  Reported by Todd A. Jacobs.
125
126 2000-06-13  Jim Meyering  <meyering@lucent.com>
127
128         * Makefile.am (all-local): Depend on lstat.c and stat.c.
129
130         * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
131
132 2000-06-12  Paul Eggert  <eggert@twinsun.com>
133
134         * xstat.in: Include <stdlib.h> in lstat, to declare "free".
135
136 2000-06-04  Paul Eggert  <eggert@twinsun.com>
137
138         * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
139
140 2000-06-04  Jim Meyering  <meyering@lucent.com>
141
142         * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
143         SunOS4.1.4 for which gid_t is an unsigned type.
144
145 2000-06-03  Jim Meyering  <meyering@lucent.com>
146
147         * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
148
149 2000-05-26  Bruno Haible  <haible@clisp.cons.org>
150
151         * Makefile.am (install-exec-local): On systems with glibc-2.1 or
152         newer, don't install charset.alias.
153         * config.charset: Change the Linux/glibc rules so they become empty
154         on glibc-2.1 or newer.
155
156 2000-06-02  Jim Meyering  <meyering@lucent.com>
157
158         * mountlist.c: Back out last change.  Instead, do this...
159         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
160         member using the same `ignore'-testing code.
161         * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
162         fs_type strings.
163         From Mark D. Roth.
164
165 2000-05-29  Jim Meyering  <meyering@lucent.com>
166
167         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
168         with the `ignore' attribute.  Based on a patch from Mark D. Roth.
169
170 2000-05-22  Jim Meyering  <meyering@lucent.com>
171
172         * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
173
174 2000-05-18  Jim Meyering  <meyering@lucent.com>
175
176         * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
177         back, too, since it may have been modified by allocate_entry.
178         (hash_delete): Rewrite to use neither the assignment operator
179         nor the comma operator in an if-expression.
180
181 2000-05-15  Paul Eggert  <eggert@twinsun.com>
182
183         * closeout.c:
184         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
185         Remove; no longer needed.
186         "quotearg.h": Add include.
187         (file_name): Do not bother to explicitly initialize to NULL; it's less
188         efficient on some hosts.
189         (close_stdout_status): Remove test as to whether stdout was already
190         closed; it breaks for the case "echo x | sort >&-".
191         Quote file name colons.
192         Do not assume that _("write error") lacks format strings.
193
194 2000-05-15  Jim Meyering  <meyering@lucent.com>
195
196         * version-etc.c (version_etc_copyright): Update the copyright string
197         used in all --version output.
198
199 2000-05-14  Jim Meyering  <meyering@lucent.com>
200
201         * closeout.c (close_stdout_set_file_name): New function.
202         (close_stdout_status): Use new file-scoped global.
203         Return right away if fstat says the stdout file descriptor is invalid.
204         * closeout.h (close_stdout_set_file_name): Declare.
205
206 2000-05-10  Jim Meyering  <meyering@lucent.com>
207
208         * closeout.c [default_exit_status]: New file-scoped variable.
209         (close_stdout_set_status): New function.
210         * closeout.h (close_stdout_set_status): Declare.
211
212 2000-05-08  Jim Meyering  <meyering@lucent.com>
213
214         * long-options.c: Don't include closeout.h.
215         (parse_long_options): Don't call close_stdout for --version.
216
217 2000-05-06  Jim Meyering  <meyering@lucent.com>
218
219         * strnlen.c: Undefine __strnlen and strnlen.
220         [!weak_alias]: Define __strnlen to strnlen.
221
222         * atexit.c: New file, from libiberty.
223
224 2000-05-06  Jim Meyering  <meyering@lucent.com>
225
226         * closeout.c (close_stdout_status): Also check for errors on the
227         stderr stream.
228
229 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
230
231         * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
232         instead of xmalloc, xrealloc, path_concat.
233         (locale_charset): Treat empty environment variables as absent.
234         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
235
236 2000-05-04  Jim Meyering  <meyering@lucent.com>
237
238         * getopt.c: Update from glibc.
239         * obstack.c: Likewise.
240         * obstack.h: Likewise.
241         * regex.c: Likewise.  NB: K&R compiler support is dropped for this file
242
243         * regex.h: Likewise.
244         * strndup.c: Likewise.
245         * strnlen.c: New file, from glibc.
246
247 2000-05-01  Jim Meyering  <meyering@lucent.com>
248
249         * full-write.c (full_write): Remove `FIXME' part of comment.
250
251 2000-04-29  Jim Meyering  <meyering@lucent.com>
252
253         * path-concat.c: Declare strdup only if it's not defined.
254         * canon-host.c: Likewise.
255
256 2000-04-28  Jim Meyering  <meyering@lucent.com>
257
258         * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
259         redefinition warning on some systems (HPUX).  Otherwise, regex.h is
260         included first, then limits.h is included by locale.h by libintl.h.
261         From John David Anglin.
262
263 2000-04-25  Jim Meyering  <meyering@lucent.com>
264
265         * makepath.c (S_IRWXUGO): Define.
266         (make_path): Always perform explicit chmod if MODE specifies any
267         of the `special' permission bits.  Prompted by a bug report against
268         install from Mate Wierdl and Joost van Baal.
269
270 2000-04-18  Jim Meyering  <meyering@lucent.com>
271
272         * README: New file.
273
274         * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
275         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
276
277 2000-04-17  Jim Meyering  <meyering@lucent.com>
278
279         * strftime.c (my_strftime) [strftime]: Declare strftime here, since
280         the definition of it to rpl_strftime also defined-away the system's
281         declaration.
282
283 2000-04-15  Jim Meyering  <meyering@lucent.com>
284
285         Use `C' to denote so-called `contiguous' files, the same way
286         that tar does.
287         * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
288         (ftypelet): Use S_ISCTG.
289         From Michael Deutschmann.
290
291 2000-04-14  Jim Meyering  <meyering@lucent.com>
292
293         * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
294
295 2000-04-08  Jim Meyering  <meyering@lucent.com>
296
297         * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
298         names don't conflict.  Reported by Eli Zaretskii.
299
300 2000-03-28  Bruno Haible  <haible@clisp.cons.org>
301
302         * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
303         bug.  Deal with the different error behavior of Irix iconv.
304
305 2000-04-07  Jim Meyering  <meyering@lucent.com>
306
307         * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
308         to work around system header problems on AIX 3.2.5.  From Bruno Haible.
309
310 2000-04-05  Jim Meyering  <meyering@lucent.com>
311
312         Portability tweaks required for ultrix4.3.
313         * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
314         * readutmp.c: Include sys/types.h before sys/stat.h.
315         * canon-host.c: Declare strdup.
316         * path-concat.c: Likewise.
317         From John David Anglin.
318
319 2000-04-04  Jim Meyering  <meyering@lucent.com>
320
321         Be more DOS 8.3-friendly.
322         * ref-add.sin: Renamed from ref-add.sed.in.
323         * ref-del.sin: Renamed from ref-del.sed.in.
324         * Makefile.am: Reflect renaming.
325         Reported by Eli Zaretskii.
326
327         Use a temporary file name that won't clash with `charset.alias'
328         in the DOS 8.3 name space.
329         * Makefile.am (charset_tmp): Define.
330         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
331         (uninstall-local): Likewise.
332         Reported by Eli Zaretskii.
333
334 2000-03-29  Paul Eggert  <eggert@twinsun.com>
335
336         * time/strftime.c (my_strftime): Make sure we call the system
337         strftime, not ourselves, when invoking the underlying strftime.
338
339 2000-03-24  Jim Meyering  <meyering@lucent.com>
340
341         * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
342         (charset_alias): Define.
343         (install-exec-local): Factor out common code.
344         (uninstall-local): Split lines longer than 80.
345         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
346         (SUFFIXES): Define.
347         (.sed.in.sed): New rule.  Don't redirect directly to $@.
348         (CLEANFILES): Add ref-add.sed and ref-del.sed.
349
350 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
351
352         * config.charset: Output a line containing "Packages using this file".
353         * ref-add.sed.in, ref-del.sed.in: New files.
354         * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
355         ref-del.sed): New rules.
356
357 2000-03-17  Jim Meyering  <meyering@lucent.com>
358
359         * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
360         Otherwise, include <strings.h>
361
362 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
363
364         * unicodeio.c (utf8_wctomb): New function.
365         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
366         format instead of in UCS-4 with platform dependent endianness.
367
368 2000-03-07  Paul Eggert  <eggert@twinsun.com>
369
370         * savedir.c (savedir): Work even if directory size is
371         negative; this can happen with some screwy NFS configurations.
372
373 2000-03-06  Jim Meyering  <meyering@lucent.com>
374
375         * localcharset.c (get_charset_aliases): Don't try to free file_name
376         if it's NULL (because we ran out of memory).  From Bruno Haible.
377
378 2000-03-05  Jim Meyering  <meyering@lucent.com>
379
380         * localcharset.c ("path-concat.h"): Include.
381         (get_charset_aliases): Use path_concat instead of ANSI string
382         concatenation.
383
384         * unicodeio.h (PARAMS): Define.
385         Use it to guard prototype.
386
387 2000-03-04  Jim Meyering  <meyering@lucent.com>
388
389         * Makefile.am (install-exec-local): Create $(libdir) before installing
390         into it.
391         (uninstall-local): Uncomment this rule so `make distcheck' works
392         once again.
393
394         * unicodeio.c (<errno.h>): Include it.
395         (errno): Declare if not defined.
396
397         * localcharset.c: Add Bruno's comment justifying use of volatile.
398
399         * config.charset: New version, incorporating remarks from a linux
400         i18n mailing list.  From Bruno Haible.
401
402 2000-03-02  Jim Meyering  <meyering@lucent.com>
403
404         * Makefile.am (EXTRA_DIST): Add config.charset.
405
406 2000-03-01  Jim Meyering  <meyering@lucent.com>
407
408         * localcharset.c: Guard some #includes with `#if HAVE_...'.
409         * unicodeio.c: Likewise.
410
411 2000-02-02  Bruno Haible  <haible@clisp.cons.org>
412
413         * config.charset: New file.
414         * localcharset.c: New file.
415         * unicodeio.h, unicodeio.c: New files.
416         * Makefile.am (DEFS): Add -DLIBDIR=...
417         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
418         (noinst_HEADERS): Add unicodeio.h.
419         (all-local, install-exec-local, charset.alias): New targets.
420
421 2000-02-28  Paul Eggert  <eggert@twinsun.com>
422
423         * quotearg.c (ALERT_CHAR): New macro.
424         (quotearg_buffer_restyled): Use it.
425
426 2000-02-27  Jim Meyering  <meyering@lucent.com>
427
428         * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
429         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
430
431         * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
432         not `#if STDC_HEADERS'.
433         Declare malloc if needed.
434
435         * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
436         now that autoconf always defines the HAVE_DECL_ symbols.
437         * human.c: Likewise.
438         * same.c: Likewise.
439         * strtoumax.c: Likewise.
440
441         * backupfile.c: Arrange for cpp to fail if the configure-time
442         declaration check was not run.
443         * hash.c: Likewise.
444         * human.c: Likewise.
445         * same.c: Likewise.
446         * strtoumax.c: Likewise.
447
448         * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
449         then first look up the entire `.'-containing string as a login name.
450
451 2000-02-18  Paul Eggert  <eggert@twinsun.com>
452
453         * getdate.y: Handle two-digit years with leading zeros correctly.
454         (textint): New typedef.
455         (parser_control): Member year changed from int to textint.
456         All uses changed.
457         (YYSTYPE): Removed; replaced by %union with int and textint members.
458         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
459         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
460         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
461         (tSNUMBER, tUNUMBER): Now of type <textintval>.
462         (date, number, to_year): Use width of number in digits, not its value,
463         to determine whether it's a 2-digit year, or a 2-digit time.
464         (yylex): Store number of digits of numeric tokens.
465         Reported by John Kendall.
466
467         (parser_control): Changed from struct parser_control to typedef (for
468         consistency).  All uses changed.
469
470         (tID): Removed; not used.
471         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
472
473 2000-02-14  Paul Eggert  <eggert@twinsun.com>
474
475         * getpagesize.h (getpagesize): Port to VMS for Alpha;
476         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
477
478 2000-02-12  Jim Meyering  <meyering@lucent.com>
479
480         * userspec.c (ISDIGIT): Define it.
481         (isdigit): Remove definition.
482         (is_number): Use ISDIGIT, not isdigit.
483         <libintl.h>: Include.
484         (_ and N_): Define.
485         (parse_user_spec): Mark translatable strings.
486
487 2000-02-10  Jim Meyering  <meyering@lucent.com>
488
489         With these changes, nanosleep.[ch] are finally enough like the other
490         lib/* replacement files to compile on a few more losing systems.
491
492         * nanosleep.h: Don't include config.h.
493         Remove prototype from declaration of nanosleep.
494         (PARAMS): Remove now-unneeded definition.
495         * nanosleep.c: #undef nanosleep.
496         (rpl_nanosleep): Rename from nanosleep.
497
498 2000-02-03  Jim Meyering  <meyering@lucent.com>
499
500         * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
501         rather than with `#if HAVE_UTMPNAME'.
502
503 2000-02-01  Jim Meyering  <meyering@lucent.com>
504
505         * readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
506
507 2000-01-31  Jim Meyering  <meyering@lucent.com>
508
509         * nanosleep.h (nanosleep): Guard declaration with
510         `#if ! HAVE_DECL_NANOSLEEP'.
511         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
512         the declaration in that vendor's sys/timers.h.
513         Reported by Christian Krackowizer.
514
515         * quotearg.c (ISASCII): Add #undef and move definition to follow
516         inclusion of wctype.h to work around solaris2.6 namespace pollution.
517         (ISPRINT): Likewise.
518         Reported by Tom Tromey.
519
520 2000-01-30  Jim Meyering  <meyering@lucent.com>
521
522         * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
523         uses of ->ut_name.  The latter doesn't work with new Linux header files
524         where only utmpx.ut_user is declared.
525
526         * readutmp.h (UT_USER): Define.
527
528 2000-01-23  Jim Meyering  <meyering@lucent.com>
529
530         * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
531         obstack.c.
532
533 2000-01-22  Jim Meyering  <meyering@lucent.com>
534
535         * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
536         [! HAVE_DECL_STRTOULL]: Declare strtoull.
537         Required for some AIX systems.  Reported by Christian Krackowizer.
538         [TESTING] (main): New function.
539
540         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
541         * dirname.c (dir_name): Support for DOS-style file names with drive
542         letters.
543
544         * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
545
546         * strverscmp.c (ISDIGIT): Define.
547         (strverscmp): Use ISDIGIT, not isdigit.
548
549 2000-01-17  Paul Eggert  <eggert@twinsun.com>
550
551         * nanosleep.c (nanosleep):
552         Don't use SA_INTERRUPT to decide whether to call sigaction, as
553         POSIX.1 doesn't require SA_INTERRUPT and some systems
554         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
555         it's been part of POSIX.1 since day 1 (in 1988).
556
557 2000-01-17  Jim Meyering  <meyering@lucent.com>
558
559         * interlock: Remove unused file.  Reported by François Pinard.
560
561 2000-01-16  Paul Eggert  <eggert@twinsun.com>
562
563         * quotearg.c (quotearg_buffer_restyled): Do not quote
564         alert, backslash, formfeed, and vertical tab unnecessarily in
565         shell quoting style.
566
567 Local Variables:
568 version-control: never
569 End: