1 2005-05-13 Bruno Haible <bruno@clisp.org>
3 * stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
4 int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
5 UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
6 INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
7 INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
8 Add support for 64-bit integers in the MSVC compiler.
10 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
12 * byteswap_.h, getsubopt.h, iconvme.h, strsep.c, strsep.h:
13 Change the initial comment to refer to GPL, not LGPL.
14 gnulib-tool will change it to LGPL as needed.
16 * __fpending.c, acl.c, acl.h, alloca_.h, allocsa.c, allocsa.h,
17 argmatch.c, argmatch.h, argp-ba.c, argp-eexst.c, argp-fmtstream.c,
18 argp-fmtstream.h, argp-fs-xinl.c, argp-help.c, argp-namefrob.h,
19 argp-parse.c, argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, argz.c,
20 argz_.h, asnprintf.c, asprintf.c, atanl.c, backupfile.c,
21 backupfile.h, base64.c, base64.h, basename.c, binary-io.h,
22 byteswap_.h, c-ctype.c, c-ctype.h, c-stack.c, c-stack.h,
23 c-strtod.c, calloc.c, canon-host.c, canonicalize.c,
24 canonicalize.h, ceill.c, chdir-long.c, chdir-long.h, chown.c,
25 classpath.c, classpath.h, cloexec.c, closeout.c, closeout.h,
26 concatpath.c, config.charset, copy-file.c, copy-file.h,
27 cycle-check.c, cycle-check.h, diacrit.c, diacrit.h, dirfd.c,
28 dirfd.h, dirname.c, dirname.h, dummy.c, dup-safer.c, dup2.c,
29 eealloc.h, error.c, error.h, euidaccess.c, exclude.c, exclude.h,
30 execute.c, execute.h, exit.h, exitfail.c, exitfail.h, expl.c,
31 fatal-signal.c, fatal-signal.h, fd-safer.c, file-type.c,
32 file-type.h, fileblocks.c, filemode.c, filemode.h, findprog.c,
33 findprog.h, floorl.c, fnmatch.c, fnmatch_.h, fnmatch_loop.c,
34 fopen-safer.c, free.c, frexpl.c, fsusage.c, fsusage.h,
35 full-read.c, full-read.h, full-write.c, full-write.h,
36 fwriteerror.c, fwriteerror.h, gai_strerror.c, gcd.c, gcd.h,
37 getaddrinfo.c, getaddrinfo.h, getcwd.c, getcwd.h, getdate.h,
38 getdate.y, getdomainname.c, getdomainname.h, getgroups.c,
39 gethostname.c, gethrxtime.c, gethrxtime.h, getline.c, getline.h,
40 getloadavg.c, getndelim2.c, getndelim2.h, getnline.c, getnline.h,
41 getopt.c, getopt1.c, getopt_.h, getopt_int.h, getpagesize.h,
42 getpass.c, getpass.h, getsubopt.c, getsubopt.h, gettext.h,
43 gettime.c, gettimeofday.c, getugroups.c, getusershell.c,
44 group-member.c, group-member.h, hard-locale.c, hard-locale.h,
45 hash-pjw.c, hash-pjw.h, hash.c, hash.h, human.c, human.h,
46 iconvme.c, iconvme.h, idcache.c, inet_ntop.h, intprops.h,
47 inttostr.c, inttostr.h, isdir.c, javacomp.c, javacomp.h,
48 javacomp.sh.in, javaexec.c, javaexec.h, javaexec.sh.in,
49 lbrkprop.h, lchown.c, ldexpl.c, linebreak.c, linebreak.h,
50 linebuffer.c, linebuffer.h, localcharset.c, localcharset.h,
51 logl.c, long-options.c, long-options.h, lstat.c, makepath.c,
52 makepath.h, malloc.c, mathl.h, mbswidth.c, mbswidth.h, md5.c,
53 md5.h, memcasecmp.c, memcasecmp.h, memchr.c, memcmp.c, memcoll.c,
54 memcoll.h, memcpy.c, memmem.c, memmem.h, mempcpy.c, mempcpy.h,
55 memrchr.c, memrchr.h, memset.c, minmax.h, mkdir.c, mkdtemp.c,
56 mkdtemp.h, mkstemp.c, mktime.c, modechange.c, modechange.h,
57 mountlist.c, mountlist.h, nanosleep.c, obstack.c, obstack.h,
58 openat.c, openat.h, pagealign_alloc.c, pagealign_alloc.h,
59 path-concat.c, path-concat.h, pathmax.h, pathname.h, physmem.c,
60 physmem.h, pipe.c, pipe.h, poll.c, poll_.h, posixtm.c, posixtm.h,
61 posixver.c, printf-args.c, printf-args.h, printf-parse.c,
62 printf-parse.h, progname.c, progname.h, progreloc.c, putenv.c,
63 quote.c, quote.h, quotearg.c, quotearg.h, raise.c, readlink.c,
64 readtokens.c, readtokens.h, readtokens0.c, readtokens0.h,
65 readutmp.c, readutmp.h, realloc.c, ref-add.sin, ref-del.sin,
66 regex.c, regex.h, rename.c, rmdir.c, rpmatch.c, safe-read.c,
67 safe-read.h, safe-write.c, safe-write.h, same.c, same.h,
68 save-cwd.c, save-cwd.h, savedir.c, savedir.h, setenv.c, setenv.h,
69 settime.c, sh-quote.c, sh-quote.h, sha1.c, sha1.h, sig2str.c,
70 sig2str.h, sincosl.c, snprintf.c, snprintf.h, sqrtl.c,
71 stat-macros.h, stat.c, stdbool_.h, stdint_.h, stdio-safer.h,
72 stpcpy.c, stpcpy.h, stpncpy.c, stpncpy.h, strcase.h, strcasecmp.c,
73 strchrnul.c, strchrnul.h, strcspn.c, strdup.c, strdup.h,
74 strerror.c, strftime.c, strftime.h, stripslash.c, strndup.c,
75 strndup.h, strnlen.c, strpbrk.c, strpbrk.h, strsep.c, strsep.h,
76 strstr.c, strstr.h, strtod.c, strtoimax.c, strtok_r.c, strtok_r.h,
77 strtol.c, strtoll.c, strtoul.c, strtoull.c, strverscmp.c,
78 strverscmp.h, sysexit_.h, tempname.c, time_r.c, time_r.h,
79 timegm.c, timegm.h, timespec.h, trigl.c, trigl.h, ucs4-utf16.h,
80 ucs4-utf8.h, unicodeio.c, unicodeio.h, unistd-safer.h,
81 unlocked-io.h, unsetenv.c, userspec.c, utf16-ucs4.h, utf8-ucs4.h,
82 utime.c, utimecmp.c, utimecmp.h, utimens.c, vasnprintf.c,
83 vasnprintf.h, vasprintf.c, vasprintf.h, version-etc-fsf.c,
84 version-etc.c, version-etc.h, vsnprintf.c, vsnprintf.h,
85 w32spawn.h, wait-process.c, wait-process.h, xalloc-die.c,
86 xalloc.h, xallocsa.c, xallocsa.h, xasprintf.c, xgetcwd.c,
87 xgetcwd.h, xgetdomainname.c, xgetdomainname.h, xgethostname.c,
88 xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xreadlink.h,
89 xsetenv.c, xsetenv.h, xsize.h, xstrndup.c, xstrndup.h, xstrtod.c,
90 xstrtod.h, xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtoumax.c,
91 xtime.h, xvasprintf.c, xvasprintf.h, yesno.c, yesno.h:
92 Update FSF postal mail address.
94 2005-05-10 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
96 * getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
97 specified in ai_socktype. Fix invalid ai_protocol
98 check. ai_protocol is usually set to 0 or depending on
99 ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP. Checking for
100 SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid. Set
101 ai_socktype / ai_protocol in the returned addrinfo structure.
103 2005-05-09 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
104 Bruno Haible <bruno@clisp.org>
106 * inet_ntop.h: New file.
107 * inet_ntop.c: New file, from glibc with modifications.
109 2005-05-08 Jim Meyering <jim@meyering.net>
111 * classpath.c (PATH_SEPARATOR): Remove insignificant trailing blank.
113 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
115 Merge from coreutils. Among other things,
116 add bulletproofing for cases where stdin, stdout, or stderr are closed.
117 * fd-safer.c: New file.
118 * fcntl-safer.h, open-safer.c: Remove.
119 * chdir-long.c: Fix comment "fetish" -> "coreutils".
120 * dup-safer.c: Include unistd-safer.h first.
121 Don't include errno.h.
122 (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
123 * file-type.h: Don't assume invoker included sys/stat.h first.
124 * file-type.c: Rely on file-type.h change.
125 * getloadavg.c: Include unistd-safer.h.
126 (getloadavg): Use safer open.
127 * getusershell.c: Include "stdio-safer.h".
128 (getusershell): Use safer fopen.
129 * long-options.c (long_options): Use NULL rather than 0.
130 * modechange.h (mode_free): Remove; all callers changed to invoke
132 * modechange.c: Likewise.
133 xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
134 (MODE_DONE): New constant.
135 (struct mode_change): Remove 'next' member.
136 (make_node_op_equals): New function; like the old one of the
137 same name, except it allocates an array.
138 (mode_compile, mode_create_from_ref): Use it.
139 (mode_compile): Allocate result as an array, not a linked list.
140 Parse octal string ourself, so that we catch mistakes like "+0".
141 (mode_adjust): Arg is an array, not a linked list.
142 * modechange.c: Include stat-macros.h, xalloc.h.
143 (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
144 (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
145 (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
146 Remove. This is now stat-macros.h's job.
147 (talloc): Remove. All callers replaced by xalloc, so that
148 our invokers don't have to worry about reporting memory failures.
149 (make_node_op_equals): Remove.
150 (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
152 (struct mode_change): Moved here from modechange.h.
153 (mode_append_entry): Remove.
154 (mode_compile): Remove MASKED_OPS arg, since it encouraged
155 apps to have incorrect behavior. Use simpler algorithm for head
156 and tail. Don't futz with umask; that's now the job of mode_adjust.
157 Detect more invalid usages rather than having somewhat-random behavior.
158 Don't insert an "a=" action, as that leads to incorrect behavior.
159 (mode_compile, mode_create_from_ref): Return NULL on error instead
160 of an enum, since now there's only one way to have an error. All
162 (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
163 at the correct time. Simplify calculation of "+u" and its ilk.
164 Don't mishandle "+X".
165 (mode_free): Remove "register" and localize decls.
166 * modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
167 (struct mode_change): Move to modechange.c; callers don't
168 need to see this stuff.
169 (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
170 (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
171 (mode_change, mode_adjust): Reflect the new signatures noted above.
172 * nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
173 that might redefine system include files.
174 (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
175 (my_usleep): Use NULL rather than (void *) 0.
176 (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
177 Use siginterrupt to specify that system calls should be interrupted.
178 (rpl_nanosleep): Move initialization of suspended closer to call of
180 * readutmp.h (read_utmp): New arg OPTIONS. All uses changed.
181 * readutmp.c: Likewise. Include signal.h, stdbool.h.
182 (desirable_utmp_entry): New function.
183 (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
184 using x2nrealloc, to simplify logic.
185 (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
186 size calculation. Do not assume utmp file is a regular file.
187 * readutmp.h (UT_PID): Moved here from ../src/who.c.
188 (READ_UTMP_CHECK_PIDS): New constant.
189 * save-cwd.c: Include unistd-safer.h.
190 (save_cwd): Use fd_safer.
191 * tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
192 [!_LIBC] Include "stat-macros.h" instead.
193 * unistd-safer.h (fd_safer): New decl.
195 2005-05-01 Oskar Liljeblad <oskar@osk.mine.nu>
197 * byteswap_.h: New file.
199 2005-04-25 Albert Chin <china@thewrittenword.com>
201 * regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
204 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
206 * getdate.y (zone): Allow relunit_snumber after tZONE, so
207 that "UTC +1 second" continues to work. Problem reported
209 (relunit_snumber): New rule.
212 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
214 * getdate.y (universal_time_zone_table): New constant.
215 (time_zone_table): Remove GMT, UT, UTC entries; they're now in
216 universal_time_zone_table.
217 (lookup_zone): Prefer universal_time_zone_table to
218 local_time_zone_table, so that "GMT" time stamps are allowed in
219 London during the summer. Problem reported by Ian Abbott.
221 2005-04-12 Jim Meyering <jim@meyering.net>
223 * human.c (humblock): Set *options even when returning due to
224 xstrtoumax conversion failure. Thanks to a used-uninitialized
227 2005-04-09 Jim Meyering <jim@meyering.net>
229 * posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
230 -Wuninitialized: initialize tm0.tm_year.
232 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
234 * getdate.y (parser_control): rels_seen is now a boolean, not a
235 count, since there's no maximum. All uses changed.
236 Add member dsts_seen.
237 (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
239 (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
240 Use pc_rels_seen to decide whther a date is absolute.
242 * getdate.y (number): Don't overwrite year.
243 (get_date): Initialize pc.year.digits to 0, not 4, to enable above
246 2005-04-02 Simon Josefsson <jas@extundo.com>
248 * getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
249 patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
251 2005-03-27 Jim Meyering <jim@meyering.net>
253 * argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
255 2005-03-26 Paul Eggert <eggert@cs.ucla.edu>
257 * intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
258 "one's complement" -> "ones' complement" in comment, as per Knuth.
259 "value of type" -> "type or expression" in comment.
260 * mktime.c, strftime.c: Propagate intprops.h comment nits.
262 2005-03-26 Jim Meyering <jim@meyering.net>
265 * intprops.h: Add the apostrophe in `(one|two)'s complement'.
266 Correct typos: s/or/of/.
268 2005-03-23 Jim Meyering <jim@meyering.net>
270 * canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
272 2005-03-21 Jim Meyering <jim@meyering.net>
274 Changes imported from coreutils.
276 * cycle-check.c: Don't include xalloc.h.
278 * path-concat.c: Don't include assert.h.
279 (path_concat): Remove assertion that would have triggered
280 for ABASE starting with more than one slash.
281 Reported by Andreas Schwab.
283 * path-concat.c (path_concat): Set *BASE_IN_RESULT
284 properly when ABASE is an absolute file name.
285 Correct the description of this function.
287 Add an assertion and a test driver.
288 This fixes a bug introduced on 2004-07-02.
289 Andreas Schwab reported the resulting failure of cp --parents:
290 http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
292 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
294 * strftime.c (my_strftime): If the underlying strftime returns 0
295 (which shouldn't happen), generate nothing instead of returning 0
296 immediately, so that nstrftime (NULL, ...) doesn't return 0.
298 2005-03-16 Bruno Haible <bruno@clisp.org>
300 * stdint_.h: Use HAVE_LONG_LONG_64BIT instead of HAVE_LONGLONG_64BIT.
302 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
304 * strftime.c (my_strftime): Prepend space to format so that we can
305 reliably distinguish strftime failure from empty output on POSIX
308 2005-03-08 Paul Eggert <eggert@cs.ucla.edu>
310 * iconvme.c (SIZE_MAX): New macro, if not already defined.
311 (iconv_string): Don't guess a size-zero buffer, as that might cause
312 buffer overrun. Instead, avoid multiplying by MB_LEN_MAX if the
313 result would be 'too large', where 'too large' is (heuristically)
314 the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
315 overflow concerns. This will prevent some unwanted malloc failures
316 when the inputs are very large.
318 2005-03-15 Bruno Haible <bruno@clisp.org>
320 * regex.c (byte_re_match_2_internal): Rename local variable 'not' to
323 * regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
326 * regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc results.
328 2005-03-14 Paul Eggert <eggert@cs.ucla.edu>
330 * mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
331 TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
333 * strtol.c: Likewise.
335 2005-03-14 Simon Josefsson <jas@extundo.com>
337 * timegm.h: Use proper prototype CPP guards, reported by Dave Love
340 2005-03-14 Jim Meyering <jim@meyering.net>
342 * strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
343 && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
344 to be nonzero so that we (and caller) can detect the difference
345 between a valid zero-length expansion and an error return, even
346 when the underlying strftime fails before writing anything into
349 2005-03-10 Jim Meyering <jim@meyering.net>
351 * save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
352 so that this module works on systems without fchdir.
354 2005-03-09 Paul Eggert <eggert@cs.ucla.edu>
356 Factor int-properties macros into a single file, except for
358 * intprops.h: New file.
359 * getloadavg.c: Include it instead of limits.h.
360 (INT_STRLEN_BOUND): Remove.
361 * human.c: Include intprops.h.
362 (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
363 * human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000.
364 * inttostr.h: Include intprops.h instead of limits.h.
365 (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
366 * mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
367 for consistency with intprops.h.
368 (time_t_is_integer, twos_complement_arithmetic): Use them.
369 * sig2str.h: Include <signal.h>, intprops.h.
370 (INT_STRLEN_BOUND): Remove.
371 * strftime.c (TYPE_SIGNED): Remove.
372 (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
373 * strtol.c: Adjust comments to match intprops.h.
374 * userspec.c: Include intprops.h.
375 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
376 * utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
377 * utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
378 instead of rolling our own expressions.
379 * xstrtol.c: Include xstrtol.h first, to test interface.
381 * strftime.c: Include <stdbool.h>. Use bool where appropriate,
383 (my_strftime): Do not mishandle years close to INT_MAX, by doing
384 the right thing even if adding 1900 would overflow. Similarly
385 for tm_mon + 1 and tm_yday + 1.
386 Make %Y always equivalent to %C%y, and similarly for %G and %g.
387 (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
388 (DO_SIGNED_NUMBER): New macro.
389 (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
391 2005-03-07 Bruno Haible <bruno@clisp.org>
393 * pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
395 2005-03-03 Derek R. Price <derek@ximbiot.com>
396 Bruno Haible <bruno@clisp.org>
398 * pagealign_alloc.h: New file.
399 * pagealign_alloc.c: New file.
401 2005-01-28 Bruno Haible <bruno@clisp.org>
403 * stpncpy.h (stpncpy): Define as a macro without arguments, so that
406 2005-03-01 Paul Eggert <eggert@cs.ucla.edu>
408 Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
409 The workaround isn't strictly needed for POSIX conformance, and
410 it's too much of a pain to configure and maintain. We'll ask
411 people to fix their kernels instead.
412 * xnanosleep.c: Don't include gethrxtime.h or xtime.h.
413 (NANOSLEEP_BUG_WORKAROUND): Remove.
414 (xnanosleep): Remove the workaround.
416 2005-02-12 Bruno Haible <bruno@clisp.org>
418 * vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
420 2005-02-25 Paul Eggert <eggert@cs.ucla.edu>
422 * gethrxtime.h, gethrxtime.c, xtime.h: New files.
423 * timespec.h (gettime): Return void, since it always
424 succeeds now. All uses changed.
425 * gettime.c (gettime) Likewise.
426 [HAVE_NANOTIME]: Prefer nanotime.
427 Assume gettimeofday succeeds, as POSIX requires.
428 Assime time () succeeds, since other code already does.
429 * xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
430 (timespec_subtract): Remove.
431 (NANOSLEEP_BUG_WORKAROUND): New constant.
432 (xnanosleep): Use gethrxtime rather than gettime; this simplifies
433 things considerably. Use it only on GNU/Linux hosts, since the
434 workaround shouldn't be needed elsewhere.
436 2005-02-24 Bruno Haible <bruno@clisp.org>
438 * gettext.h: Update from GNU gettext 0.14.2.
440 2005-02-24 Bruno Haible <bruno@clisp.org>
442 * localcharset.c: Update from GNU gettext 0.14.2.
443 * config.charset: Update from GNU gettext 0.14.2.
445 2005-02-22 Simon Josefsson <jas@extundo.com>
447 * iconvme.h, iconvme.c: New files, from libc.
449 2005-02-20 Neil Conway <neilc@samurai.com>
451 * xgethostname.c (xgethostname): Check for ENOMEM, which is
452 returned by OSX/Darwin if the specified buffer is not large
453 enough for the hostname.
455 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
457 * memrchr.h: New file.
458 * chdir-long.c: Include it.
459 * memrchr.c [!defined _LIBC]: Include it rather than <string.h>
460 Don't bother including stddef.h.
462 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
464 * argp-help.c (__argp_help): Create a fake struct argp_state and
465 pass it to _help, otherwise the latter coredumps trying to
466 dereference state.root_argp.
468 2005-02-01 Paul Eggert <eggert@cs.ucla.edu>
470 * mountlist.h (MOUNTLIST_H_): New macro, to protect against double
472 Include <sys/types.h>, for dev_t.
473 (ME_DUMMY, ME_REMOTE): Move from here....
474 * mountlist.c (ME_DUMMY, ME_REMOTE): To here.
475 (ME_DUMMY): Count "subfs" as a dummy. Problem reported by
477 Include mountlist.h first, to test the interface.
479 2005-01-29 Bruno Haible <bruno@clisp.org>
481 * progname.c (program_name): Initialize.
482 Needed when linking statically on MacOS X.
484 2005-01-28 Bruno Haible <bruno@clisp.org>
486 * javacomp.sh.in: New file, from GNU gettext.
487 * javacomp.h: New file, from GNU gettext.
488 * javacomp.c: New file, from GNU gettext.
490 2005-01-26 Bruno Haible <bruno@clisp.org>
492 * javaexec.sh.in: New file, from GNU gettext.
493 * javaexec.h: New file, from GNU gettext.
494 * javaexec.c: New file, from GNU gettext.
496 2005-01-26 Simon Josefsson <jas@extundo.com>
498 * gai_strerror.c: Use GPL in header.
500 2005-01-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
502 * argp-help.c (hol_entry_help): Avoid using non-constant
503 initializers for struct pentry_state.
504 (__argp_error): Check return value of __asprintf
505 (__argp_failure): Translate error message
507 * argp-parse.c: Removed braces around the expansion of N_()
509 2005-01-21 Jim Meyering <jim@meyering.net>
511 * openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
512 same value as for Solaris 9.
514 * chdir-long.c (chdir_long): Rewrite to remove limitation on
515 component length. This included changing the parameter to be
516 of type `char *' rather than `char const *'.
517 * chdir-long.h (chdir_long): Update prototype.
519 * openat.c (fdopendir, fstatat): New functions.
520 * openat.h: Include headers required for use of DIR and struct stat.
521 [AT_SYMLINK_NOFOLLOW]: Define.
522 (fdopendir, fstatat): Add prototypes.
524 2005-01-21 Bruno Haible <bruno@clisp.org>
526 * classpath.h: New file, from GNU gettext.
527 * classpath.c: New file, from GNU gettext.
529 2005-01-20 Simon Josefsson <jas@extundo.com>
531 * version-etc-fsf.c: New file, with version_etc_copyright.
532 * version-etc.c: Remove version_etc_copyright.
533 * version-etc.h (version_etc_copyright): Use [] instead of * in
534 prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
536 2005-01-20 Paul Eggert <eggert@cs.ucla.edu>
538 * save-cwd.c (save_cwd): Remove code to support the case
539 where fchdir is missing or flaky.
541 2005-01-20 Simon Josefsson <jas@extundo.com>
543 * base64.h (isbase64): Add.
545 * base64.c (isb64): Rename to isbase64, use to_uchar instead of
546 using a unsigned prototype, don't inline.
547 (base64_decode): Use it.
549 2005-01-19 Bruno Haible <bruno@clisp.org>
551 * sh-quote.h: New file, from GNU gettext.
552 * sh-quote.c: New file, from GNU gettext.
554 2005-01-18 Paul Eggert <eggert@cs.ucla.edu>
556 Merge changes from coreutils, as described below in several
557 changelogs dated today.
559 * save-cwd.c: Include "save-cwd.h" before other include files.
560 (O_DIRECTORY): Remove; not needed here, since "." must be
561 a directory. All uses removed.
562 (save_cwd): Use __sgi || __sun, not sun || __sun. __sun is
563 universal on Suns, and we also need to test for IRIX.
564 Revamp code to use 'if' rather than '#if'.
565 Avoid unnecessary comparison of cwd->desc to 0.
567 * utimens.c (futimens): Robustify the previous patch, by checking
568 for known valid error numbers rather than observed invalid ones.
570 2005-01-18 Jim Meyering <jim@meyering.net>
572 * version-etc.c (version_etc_copyright): Update copyright date.
574 * utimens.c (futimens): Account for the fact that futimes
575 can also fail with errno == ENOSYS or errno == ENOENT.
576 Patch from Dmitry V. Levin.
578 Change the name of the robust chdir function from chdir to chdir_long.
579 * save-cwd.c: Include chdir-long.h rather than chdir.h.
580 (restore_cwd): Use chdir_long, not chdir.
581 * chdir-long.c: Renamed from chdir.c.
582 * chdir-long.h: Renamed from chdir.h.
583 [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
586 2005-01-18 Bob Proulx <bob@proulx.com>
588 * obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to simplify
589 offsetof() macro construct to avoid compile failure with native HP-UX
590 11.0 ANSI C compiler.
592 2005-01-06 Bruno Haible <bruno@clisp.org>
594 * stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming, redundant
595 because stpncpy.m4 takes care of it.
597 2004-01-24 Bruno Haible <bruno@clisp.org>
599 * progreloc.c (xstrdup): Define as strdup if no xmalloc should be used.
601 2003-10-09 Bruno Haible <bruno@clisp.org>
603 * progreloc.c: Include xalloc.h instead of xmalloc.h.
605 2005-01-06 Bruno Haible <bruno@clisp.org>
607 * fwriteerror.h (fwriteerror): Change specification to include fclose.
608 * fwriteerror.c: Include <stdbool.h>.
609 (fwriteerror): At the end, close the file stream. Record whether
610 stdout was already closed.
612 2004-05-27 Bruno Haible <bruno@clisp.org>
614 * execute.c (environ): Declare if needed.
615 * pipe.c (environ): Likewise.
616 Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
618 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
620 * human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
621 definitions to be after all include files, to avoid collisions.
622 Problem reported by Bob Proulx.
624 2004-12-28 Paul Eggert <eggert@cs.ucla.edu>
626 * error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
627 not needed. This removes a dependency on the gettext module.
628 [defined _LIBC]: Do not include <libintl.h>; not needed.
630 2004-12-24 Paul Eggert <eggert@cs.ucla.edu>
632 * c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
635 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
637 * argp-parse.c: Include <stddef.h>.
638 (alignof, alignto): New macros.
639 (parser_init): Don't assume that void * is aligned sufficiently
642 * getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
643 need to extend the stack.
644 (YYINITDEPTH): New macro, so that the initial stack isn't overly
647 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
649 * argp-parse.c (parser_init): Avoid arithmetics on void pointers.
651 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
653 * alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
654 Remove now-obsolete comment about AIX.
655 * getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
656 (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
657 (YYMAXDEPTH): New macro.
659 2004-12-18 Bruno Haible <bruno@clisp.org>
661 * fatal-signal.c (fatal_signals): Make non-const.
662 (init_fatal_signals): New function.
663 (uninstall_handlers, install_handlers): Ignore signals that were set to
665 (at_fatal_signal): Call init_fatal_signals.
666 (init_fatal_signal_set): Likewise. Ignore signals that were set to
668 Reported by Paul Eggert.
670 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
672 * getdate.y (textint): New member "negative".
673 (time_zone_hhmm): New function.
674 Expect 14 shift-reduce conflicts, not 13.
675 (o_colon_minutes): New rule.
676 (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
677 (yylex): Set the "negative" member of signed numbers.
679 2004-12-04 Paul Eggert <eggert@cs.ucla.edu>
681 Changes imported from coreutils.
682 * hard-locale.c: Assume <locale.h> exists.
684 (GLIBC_VERSION): New macro.
685 (hard_locale): Assume setlocale exists.
686 Rewrite to avoid #ifdef.
687 Use strdup rather than malloc + strcpy.
688 * human.c: Assume <locale.h> exists.
689 (human_readable): Assume localeconv exists.
691 2004-12-01 Jakub Jelinek <jakub@redhat.com>
693 * mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
694 convert T2, not T. (Imported from libc.)
696 2004-11-30 Paul Eggert <eggert@cs.ucla.edu>
698 * getcwd.c (is_ENAMETOOLONG): New macro.
699 (__getcwd.c): Don't restore errno; glibc doesn't.
700 [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
701 first, falling back to our code only if its results look suspicious.
702 Ensure that the resulting buffer is only as large as necessary.
704 * readutmp.c: Include readutmp.h first.
705 Include <errno.h>, since readutmp.h no longer does that.
706 * readutmp.h: Don't include <errno.h>,
707 <sys/param.h>, <time.h>; not needed to establish interface.
708 (errno): Remove decl.
709 (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
710 (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
711 UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
713 2004-11-28 Simon Josefsson <jas@extundo.com>
715 * base64.h, base64.c: New file.
717 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
719 * getcwd.h: New file, which I forgot to check in on 2004-11-25.
721 2004-11-25 Paul Eggert <eggert@cs.ucla.edu>
723 Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
724 HP's ANSI C compiler.
725 * fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
726 Declaring int functions causes warnings on some modern systems and
727 shouldn't be needed to compile on ancient ones.
728 * same.c (MIN) [defined MIN]: Don't define, since it's already
731 * getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
732 with the following changes.
733 (__set_errno): Parenthesize properly.
735 (MIN, MAX, MATCHING_INO): New macros.
736 (__getcwd): Define with prototype, not K&R form.
737 Use heuristics to allocate default buffer on stack if possible.
738 If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
739 behavior, and to avoid the PATH_MAX limit when computing
741 Use MATCHING_INO to compare inode number to file.
742 Check for arithmetic overflow in size calculations.
743 Fix bug in reallocation of dot array that caused getcwd to fail
744 on directories nested deeper than 75.
745 Be more careful about saving errno on error.
746 Do not use realloc; use only free+malloc, as this is a bit
747 more flexible and avoids a needless copy operation.
748 Do not inspect st_dev and st_ino for symbolic links; POSIX
749 doesn't specify the latter.
750 Check for closedir errors.
751 Avoid needless casts.
752 Use "#ifdef weak_alias" around weak_alias, to be like other
754 The following changes to getcwd.c have effect only when used in
755 gnulib; they have no effect inside glibc proper.
756 (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
757 as alloca isn't used.
758 (alloca, __alloca): Likewise.
759 [!_LIBC]: Include "getcwd.h", "mempcpy.h".
760 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
761 unconditionally, as gnulib assumes C89 or better.
762 Do not include <sys/param.h>.
763 (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
764 no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
766 (NULL) [!defined NULL]: Remove; we assume C89 or better.
767 Include <dirent.h> in a way that is compatible with modern Autoconf.
768 (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
769 New macros, if not already defined.
770 Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
771 Use "_LIBC", not "defined _LIBC", for consistency.
772 (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
774 (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
775 (GETCWD_RETURN_TYPE): Remove. All uses replaced by char *.
776 * xgetcwd.c: David MacKenzie's old code was removed, so give
777 credit only to Jim Meyering and adjust the copyright dates.
778 Do not include <limits.h>, <stdio.h>, <sys/types.h>,
779 <stdlib.h>, <unistd.h>, "pathmax.h".
780 Instead, include "xgetcwd.h" (first) and "getcwd.h".
781 (INITIAL_BUFFER_SIZE): Remove.
782 (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
784 2004-11-23 Jim Meyering <jim@meyering.net>
786 * getopt_.h: Remove trailing blanks.
788 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
790 * utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
791 (futimens): New function, which uses futimes if available.
792 (futimens, utimens): Support timespec==NULL, with same semantics
793 as utime and utimens.
794 * utimens.h (futimens): New decl.
796 2004-11-23 Jim Meyering <jim@meyering.net>
798 * __fpending.c: Add comment.
800 2004-11-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
802 * getopt_.h: Re-addition of __getopt_argv_const caused
803 redefinition warnings. To avoid them, include the defines
804 in `#if !defined __need_getopt ... #endif'. The only place
805 where __getopt_argv_const is used is in definitions
806 of getopt_long and getopt_long_only below, which are as well
807 protected by `#ifndef __need_getopt'.
808 [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
809 __need_getopt after including <stdio.h> and <unistd.h> These
810 headers might have defined it.
812 2004-11-20 Paul Eggert <eggert@cs.ucla.edu>
814 * getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
816 (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
817 optopt): Use them instead of invoking ## directly; otherwise, the
818 symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
820 2004-11-19 Bruno Haible <bruno@clisp.org>
822 * strtok_r.c: Move comments from here...
823 * strtok_r.h: ... to here.
825 2004-11-17 Paul Eggert <eggert@cs.ucla.edu>
827 * realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
828 might fail. Problem reported by Yoann Vandoorselaere.
829 * calloc.c (rpl_calloc): Defend against buggy calloc implementations
830 that mishandle size_t overflow.
832 2004-11-16 Paul Eggert <eggert@cs.ucla.edu>
834 * canon-host.c: Include "strdup.h".
835 (canon_host): Use getaddrinfo if available, so that IPv6 works.
836 Use strdup instead of malloc/strcpy to duplicate strings.
838 * human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
839 (human_space_before_unit): New constant.
840 * human.c (human_readable): Support it.
842 * xgetcwd.c: Include <limits.h>, for PATH_MAX.
843 (xgetcwd): Set errno correctly when failing.
844 Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
845 the failure is actually due to a PATH_MAX problem.
847 Further getopt changes to make it more likely that glibc will
848 buy the changes back.
849 * getopt.c (POSIXLY_CORRECT): New constant.
850 (getopt): Use it, so to preserve glibc semantic
851 * getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
852 when compiling for libc.
853 * getopt_.h (__getopt_argv_const): Bring it back.
854 (getopt_long, getopt_long_only): Use it.
856 * getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal):
857 New arg POSIXLY_CORRECT. All callers changed.
858 (getopt): Argv is now char * const *, as per standard.
859 (_getopt_internal_r, _getopt_internal): Argv is now char **,
860 not char *__getopt_argv_const *.
861 * getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
862 _getopt_long_only_r): Likewise.
863 * getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
864 * getopt_int.h (_getopt_internal, _getopt_internal_r,
865 _getopt_long_r, _getopt_long_only_r): Likewise.
866 * getopt_.h (__getopt_argv_const): Remove.
867 (getopt): Argv is now char * const *, as per standard.
869 * getdate.y (tORDINAL): New token.
870 (day, relunit): Allow it for relative times.
871 (relative_time_table): Use tORDINAL for ordinals.
873 2004-11-15 Jim Meyering <jim@meyering.net>
875 * closeout.c: Include "__fpending.h" once again.
877 (close_stdout): Don't fail just because stdout was closed initially,
878 since some programs don't write to stdout in the normal course of
879 operation (other than --version and --help), and we don't want this
880 function to make e.g. `touch file >&-' fail.
881 But do fail if it was closed and someone has tried to write to it.
882 E.g., `printf foo >&-' must fail.
884 2004-11-11 Simon Josefsson <jas@extundo.com>
886 * strtok_r.h, strtok_r.c: New file.
888 2004-11-11 Paul Eggert <eggert@cs.ucla.edu>
890 * getopt_.h (__getopt_argv_const): New macro, to be used so that
891 we can stop lying to compilers about the constness of argv when we
892 are compiled outside glibc.
893 (getopt, getopt_long, getopt_long_only): Use it.
894 * getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal,
896 * getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
897 _getopt_long_only_r): Likewise.
898 * getopt_int.h (_getopt_internal, _getopt_internal_r, _getopt_long_r,
899 _getopt_long_only_r): Likewise.
901 * getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
902 Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
903 Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
904 the other external symbols.
905 (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
906 declaration, since the above renaming now works around collisions.
908 2004-11-11 Jim Meyering <jim@meyering.net>
910 * linebreak.c: Remove trailing blanks.
911 * alloca_.h: Likewise.
913 * euidaccess.c: Likewise.
914 * allocsa.h: Likewise.
916 2004-11-10 Paul Eggert <eggert@cs.ucla.edu>
918 * mktime.c (SHR): New macro, which is a portable
919 substitute for >> that should work even on Crays.
920 (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
921 Problem reported by Mark D. Baushke in
922 <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
923 * getdate.y (SHR): Likewise.
925 * strftime.c (SHR): Likewise.
927 * quotearg.c (struct quoting_options): Use unsigned int for
928 quote_these_too, so that right shifts are well defined. All uses
931 2004-11-10 Simon Josefsson <jas@extundo.com>
933 * getaddrinfo.h, getaddrinfo.c: New files.
935 2004-11-10 Jim Meyering <jim@meyering.net>
937 Ensure that no close failure goes unreported.
938 * closeout.c (close_stdout): Always close stdout. I.e., don't
939 return early when it seems there's nothing to flush.
940 Don't include __fpending.h.
942 2004-11-09 Paul Eggert <eggert@cs.ucla.edu>
944 * strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
946 2004-11-05 Bruno Haible <bruno@clisp.org>
948 * readlink.c: Include stddef.h, needed for size_t on Woe32.
949 Reported by Mark D. Baushke <mdb@cvshome.org>.
951 2004-11-04 Bruno Haible <bruno@clisp.org>
953 2004-09-11 Bruno Haible <bruno@clisp.org>
954 * allocsa.valgrind: New file.
955 2004-02-06 Bruno Haible <bruno@clisp.org>
956 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
957 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
958 Reported by Christopher Seip <chris.seip@hp.com>.
960 2004-11-03 Paul Eggert <eggert@cs.ucla.edu>
962 * xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
963 with errno == ERANGE if the buffer is too small.
964 Problem reported by Mark D. Baushke.
966 2004-11-02 Paul Eggert <eggert@cs.ucla.edu>
968 * xreadlink.c (MAXSIZE): New macro.
969 (xreadlink): Use it instead of SSIZE_MAX. Ensure initial buffer
970 size does not exceed MAXSIZE. Avoid cast.
971 As suggested by Mark D. Baushke in
972 <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
973 if readlink fails with buffer size just under MAXSIZE, try again
976 2004-11-02 Derek R. Price <derek@ximbiot.com>
977 and Paul Eggert <eggert@cs.ucla.edu>
979 * getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
980 (get_date): Overparenthesize to avoid GCC warning.
982 2004-11-02 Bruno Haible <bruno@clisp.org>
984 * setenv.h (unsetenv): Define as a macro if the system's unsetenv()
985 function returns void.
987 2004-11-01 Paul Eggert <eggert@cs.ucla.edu>
989 * getpass.c (fflush_unlocked, flockfile, funlockfile)
990 (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
993 2004-10-29 Paul Eggert <eggert@cs.ucla.edu>
995 * getdate.y: Add support for TZ="foo" within a date string.
996 Fix some bugs near time_t boundaries. Reject dates with
997 out-of-range components, e.g., "Sept 31".
998 Include <stdlib.h>, "setenv.h", "xalloc.h".
999 (ISDIGIT_LOCALE): Remove; unused.
1000 Note that the TZ and time functions used here are not reentrant.
1001 (mktime_ok, get_tz): New functions.
1002 (TZBUFSIZE): New constant.
1003 (get_date): Parse leading TZ="foo". Reject out-of-range components;.
1004 This requires that we sometimes generate our own TZ="XXX..." setting.
1006 2004-10-27 Derek R. Price <derek@ximbiot.com>
1008 * mktime.c (not_equal_tm): Remove redundant check.
1010 2004-10-24 Paul Eggert <eggert@cs.ucla.edu>
1012 * getdate.y: Use Bison 1.875 features, and some minor
1013 code cleanups. This change does not affect semantics.
1014 Don't include <stdlib.h>; no longer needed.
1015 Don't include unlocked-io.h; only the "#if TEST" code uses
1016 stdio, and performance isn't crucial there.
1017 (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
1018 Bison 1.875 features as described below.
1019 All uses of "PC." replaced by "pc->".
1020 (YYSTYPE): Add a forward declaration.
1021 (yylex, yyerror): Use full prototypes in forward decls.
1022 Use "%pure-parser" rather than obsolescent "%pure_parser".
1023 Use %parse-param and %lex-param instead of obsolescent
1024 YYPARSE_PARAM and YYLEX_PARAM.
1025 (meridian_table, month_and_day_table, time_units_table,
1026 relative_time_table, time_zone_table, military_table,
1027 lookup_zone, lookup_word, get_date):
1028 Use NULL instead of 0 where appropriate.
1029 (to_hour): Avoid abort (), to avoid a dependency on
1031 (yyerror, yylex): Now accepts parser_control * arg.
1032 (main) [TEST]: Use '\0' rather than 0 for char.
1034 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1036 * getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
1037 It's now the caller's responsibility to handle the case where
1038 !HAVE_GETPAGESIZE && !defined getpagesize.
1040 * mktime.c (leapyear): Arg is long int, not int.
1042 2004-10-18 Paul Eggert <eggert@cs.ucla.edu>
1044 * argp-fs-xinl.c, argp-xinl.c: Update from glibc.
1046 2004-10-12 Simon Josefsson <jas@extundo.com>
1048 * getpass.c (fflush_unlocked, flockfile, funlockfile)
1049 (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
1052 2004-10-11 Yoann Vandoorselaere <yoann@prelude-ids.org>
1054 * vsnprintf.h: New file.
1055 * vsnprintf.c: New file.
1057 2004-10-07 Bruno Haible <bruno@clisp.org>
1059 * snprintf.c (snprintf): Avoid a memory allocation if the result fits
1060 into the provided buffer.
1062 2004-10-06 Paul Eggert <eggert@cs.ucla.edu>
1064 * diacrit.c, diacrit.h: Add GPL notice.
1066 * atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL notice.
1067 * atanl.c (atanl): Keep the code as similar to glibc as possible.
1068 * logl.c (logl): Keep the code as similar to glibc as possible.
1069 This avoids a potential constant-folding bug.
1071 2004-10-05 Bruno Haible <bruno@clisp.org>
1073 * strsep.h: Don't declare strsep() if HAVE_STRSEP.
1075 2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
1077 * xalloc.h (xmemdup): Renamed from xclone. All uses changed.
1078 * xmalloc.c (xmemdup): Likewise.
1079 * xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
1080 XFREE): Remove these long-obsolescent macros.
1081 * xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
1082 * xstrdup.c: Remove.
1084 * regex.c (re_comp): Cast gettext return value to char *,
1085 Problem reported by Martin Neitzel via Mark D. Baushke.
1087 2004-10-04 Simon Josefsson <jas@extundo.com>
1089 * error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
1090 '#ifdef USE_UNLOCKED_IO'.
1092 2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
1094 * argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
1095 getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
1096 md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
1097 regex.c, sha1.c, version-etc.c, yesno.c:
1098 Include "unlocked-io.h" only if USE_UNLOCKED_IO.
1099 * unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
1100 the includer's responsibility.
1102 Sync from coreutils.
1104 * modechange.c (mode_compile): Don't decrement a pointer that
1105 points to the start of a string, as the C Standard says the
1106 resulting behavior is undefined.
1108 * backupfile.h (enum backuptype): Rename none -> no_backups,
1109 simple -> simple_backups, numbered_existing ->
1110 numbered_existing_backups, numbered -> numbered_backups
1111 to avoid shadowing problems. All uses changed.
1112 * argmatch.c (enum backuptype) [defined TEST]: Likewise.
1113 * backupfile.c (check_extension, numbered_backup):
1114 Rename locals to avoid shadowing 'basename'.
1115 * backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
1118 * .cppi-disable: Add getopt_.h, getopt_int.h.
1119 * .cvsignore: Add getopt.h.
1121 2004-10-04 Simon Josefsson <jas@extundo.com>
1123 * memmem.h: New file.
1124 * memmem.c: New file, taken from glibc.
1126 2004-10-02 Jim Meyering <jim@meyering.net>
1128 * dirfd.h, getpagesize.h: Add copyright notice.
1130 2004-10-01 Paul Eggert <eggert@cs.ucla.edu>
1132 * snprintf.c: Remove comments as to why each header is needed.
1134 2004-10-01 Yoann Vandoorselaere <yoann@prelude-ids.org>
1136 * strsep.h: New file.
1137 * strsep.c: New file.
1139 2004-10-01 Simon Josefsson <jas@extundo.com>
1141 * snprintf.c (snprintf): Handle size==0.
1143 2004-10-01 Simon Josefsson <jas@extundo.com>
1144 Bruno Haible <bruno@clisp.org>
1146 * snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
1147 (snprintf): Declare 'args'.
1149 2004-09-30 Simon Josefsson <jas@extundo.com>
1151 * snprintf.h, snprintf.c: New files.
1153 2004-09-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
1155 * argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
1156 (hol_entry_help): Never translate an empty string.
1157 Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
1158 * argp.h (OPTION_NO_TRANS): New option.
1160 2004-09-29 Oskar Liljeblad <oskar@osk.mine.nu>
1162 * xvasprintf.c: Include xalloc.h.
1163 (xvasprintf): Use xalloc_die, not xmalloc_die.
1165 2004-09-28 Paul Eggert <eggert@cs.ucla.edu>
1167 * dummy.c: Change copyright notice to FSF, and license to GPL.
1169 2004-09-13 Paul Eggert <eggert@cs.ucla.edu>
1171 * argp-pvh.c (argp_program_version_hook): Provide initial value.
1172 Problem reported by Bruno Haible in:
1173 http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
1175 2004-09-11 Paul Eggert <eggert@cs.ucla.edu>
1177 * mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
1178 in case some system header has #define'd it. Problem reported by
1179 Soeren D. Schulze in
1180 <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
1182 2004-09-08 Bruno Haible <bruno@clisp.org>
1184 * stdint_.h.in: New file, taken from GNU clisp.
1186 2004-09-08 Oskar Liljeblad <oskar@osk.mine.nu>
1188 * xvasprintf.h: New file.
1189 * xvasprintf.c: New file.
1190 * xasprintf.c: New file.
1192 2004-09-08 Bruno Haible <bruno@clisp.org>
1194 * vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting length
1196 * vasprintf.c (vasprintf): Don't test for length > INT_MAX any more.
1198 2004-08-19 Paul Eggert <eggert@cs.ucla.edu>
1200 Import from coreutils.
1201 * userspec.c: Don't use <alloca.h>, so that we don't use alloca on
1202 strings on unbounded length. alloca's performance benefits aren't
1203 that important here.
1205 (parse_with_separator): New function, with most of the internals
1206 of the old parse_user_spec. Allow user to omit both user and group,
1207 for compatibility with FreeBSD.
1208 Clone only the user name, not the entire spec.
1209 Do not set *uid, *gid unless entirely successful.
1210 Avoid memory leak in some failing cases.
1211 Fix regression for USER.GROUP reported by Dmitry V. Levin in
1212 <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
1213 (parse_user_spec): Rewrite to use parse_with_separator.
1215 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
1217 * argp-help.c, argp-parse.c: Use "gettext.h" instead of
1218 its complicated substitute.
1219 * argp-help.c: Include <errno.h>, for program_invocation_short_name
1220 and program_invocation_name.
1221 (__argp_basename) [!_LIBC]: Remove; the only use was
1222 replaced by its body.
1223 (__argp_short_program_name): Change condition from
1224 !defined __argp_short_program_name to
1225 ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
1226 to match argp-namefrob.h.
1227 (__argp_failure): Don't assume strerror_r returns char *.
1228 * argp-parse.c (N_): Define unconditionally.
1229 (argp_default_options): Fill out initializers with 0 to avoid
1232 2004-08-12 Simon Josefsson <jas@extundo.com>
1234 * getopt.c, getopt1.c: Remove ELIDE_CODE hack.
1235 * getopt_.h: Renamed from getopt.h.
1237 2004-08-11 Paul Eggert <eggert@cs.ucla.edu>
1239 Merge from coreutils.
1241 * fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
1242 wmemchr or wmemcpy. Problem reported by Robert Dahlem
1243 for Reliant Unix 5.43.
1245 * obstack.c: Include <inttypes.h> and <stdint.h> if available.
1246 (union fooround): Use uintmax_t, not long int.
1247 The rest is a merge from libc:
1248 [defined _LIBC]: Include <shlib-compat.h>.
1249 (_obstack) [defined _LIBC]: Remove after 2.3.4.
1251 * settime.c (settime): Recode to avoid warning with Sun Forte C 6U2.
1253 * strverscmp.c: Convert to UTF-8.
1255 2004-08-09 Paul Eggert <eggert@cs.ucla.edu>
1257 * obstack.h (obstack_empty_p):
1258 Don't assume that chunk->contents is suitably aligned.
1259 * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
1260 Likewise. Problem reported by Benno in
1261 <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
1263 * chown.c (rpl_chown): Work even if the file is writeable but not
1264 readable. This could be improved further but it'd take some work.
1266 2004-08-08 Simon Josefsson <jas@extundo.com>
1268 * xgethostname.c: Don't include error.h (not used).
1271 * getpass.c: Include getpass.h first.
1273 2004-08-08 Paul Eggert <eggert@cs.ucla.edu>
1275 * xalloc-die.c: New files.
1276 * xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
1278 * xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted): Likewise.
1279 Move inclusions of gettext.h, error.h, exitfail.h to xalloc-die.c.
1280 (_, N_, xalloc_die): Move to xalloc-die.c.
1281 * userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
1282 so that we needn't mess with xalloc_msg_memory_exhausted.
1284 * sha1.h: Renamed from sha.h.
1285 (SHA1_H): Renamed from _SHA_H.
1286 (sha1_ctx): Renamed from sha_ctx.
1287 (sha1_init_ctx): Renamed from sha_init_ctx.
1288 (sha1_process_block): Renamed from sha_process_block.
1289 (sha1_process_bytes): Renamed from sha_process_bytes.
1290 (sha1_finish_ctx): Renamed from sha_finish_ctx.
1291 (sha1_read_ctx): Renamed from sha_read_ctx.
1292 (sha1_stream): Renamed from sha_stream.
1293 (sha1_buffer): Renamed from sha_buffer.
1294 * sha1.c: Likewise; renamed from sha.c.
1295 Do not include <sys/types.h>.
1296 Include <stddef.h> rather than <stdlib.h>.
1298 2004-08-08 Bruno Haible <bruno@clisp.org>
1300 * pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
1301 FILESYSTEM_PREFIX_LEN.
1302 * progreloc.c: Likewise.
1303 * concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
1305 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
1308 * argp-help.c (make_hol, hol_append): Don't assume that
1309 SIZE_MAX is a valid preprocessor constant.
1310 (__argp_basename): Change from "#ifndef _LIBC"
1311 to "#ifndef __argp_short_program_name", so that
1312 we don't compile these functions for tar.
1314 More merges from coreutils.
1315 * raise.c, readtokens0.h, readtokens0.c, strftime.h, utimens.h,
1316 utimens.c, utimecmp.h, utimecmp.c, xnanosleep.h, xnanosleep.c,
1318 * addext.c: Remove; no longer needed.
1319 * yesno.c, argmatch.h, argmatch.c, backupfile.h, backupfile.c,
1320 euidaccess.c, filemode.c, closeout.c, dup2.c, exclude.c,
1321 fileblocks.c, filemode.c, fnmatch.c, fnmtahc_loop.c,
1322 fopen-safer.c, fsusage.c, fsusage.h, ftruncate.c, full-write.c,
1323 getdate.y, getloadavg.c, getugroups.c, hard-locale.c, hard-locale.h,
1324 hash.c, human.c, human.h, lchown.c, lchown.h, makepath.c, makepath.h,
1325 md5.c, md5.h, memchr.c, memcoll.c, memrchr.c, modechange.c,
1326 modechange.h, mountlist.c, mountlist.h, nanosleep.c, posixtm.c,
1327 putenv.c, quotearg.c, quotearg.h, readtokens.c, readutmp.c,
1328 readutmp.h, rmdir.c, safe-read.c, save-cwd.c, savedir.c, setenv.c,
1329 sig2str.c, stat.c, strtoimax.c, strverscmp.c, userspec.c, utime.c,
1330 version-etc.c., xgethostname.c, xmemcoll.c, xreadlink.c, xstrtod.c,
1331 xstrtod.h, xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtoumax.c:
1332 Import changes from coreutils.
1334 2004-08-05 Paul Eggert <eggert@cs.ucla.edu>
1336 Merge from coreutils.
1338 * .gdb-history: Remove; this doesn't belong here.
1340 * c-strtod.c, c-strtod.h, c-strtold.c, cycle-check.c,
1341 cycle-check.h, dev-ino.h, canonicalize.h, canonicalize.c,
1342 fcntl-safer.h, fcntl-safer.c, getcwd.c: New files.
1344 * dirname.h: Include <stdbool.h>.
1345 (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
1346 for consistency with POSIX terminology. All uses changed.
1347 (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
1348 (strip_trailing_slashes): Use bool for booleans.
1349 * stripslash.c (strip_trailing_slashes): Likewise.
1351 * error.c: Work around bug in OpenBSD 3.4 sterror_r: it
1352 sometimes returns a positive errno value even when it succeeds.
1353 (print_errno_message) [!LIBC]: Fall back on strerror if
1356 * path-concat.c (mempcpy): Don't define if a system header defines it.
1357 Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
1358 (longest_relative_suffix): New function.
1359 (path_concat): Use it. Assume first argument is not NULL.
1360 Port to DOS. Omit redundant separators.
1361 Report an error instead of returning NULL.
1362 Use mempcpy instead of memcpy.
1363 (xpath_concat): Remove: not declared or used.
1365 * same.h: Include <stdbool.h>
1366 (same_name): Return bool, not int.
1367 * same.c (same_name): Likewise.
1368 (errno): Don't declare; we assume C89 or better now.
1370 * stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
1371 if not already defined.
1373 * xgetcwd.c (errno): Don't declare; we assume C89 or better now.
1374 * dup-safer.c (errno): Likewise.
1376 2004-08-03 Paul Eggert <eggert@cs.ucla.edu>
1378 * fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
1381 2004-08-03 Simon Josefsson <jas@extundo.com>
1383 * strdup.h: Only use HAVE_DECL_STRDUP if defined.
1384 * progname.h: Don't include stdbool.h.
1386 2004-08-02 Simon Josefsson <jas@extundo.com>
1388 * getsubopt.h: New file, with comments from Bruno Haible.
1389 * getsubopt.c: New file, from glibc, but slightly modified based on
1390 suggestions from Paul Eggert <eggert@cs.ucla.edu>.
1392 2004-08-01 Simon Josefsson <jas@extundo.com>
1394 * xgetdomainname.c: Include stdlib.h, for free().
1396 2004-07-16 Simon Josefsson <jas@extundo.com>
1398 * dummy.c: New file.
1400 2004-07-16 Bruno Haible <bruno@clisp.org>
1402 * backupfile.h: Add extern "C" for C++.
1403 * closeout.h: Likewise.
1404 * copy-file.h: Likewise.
1405 * findprog.h: Likewise.
1406 * full-write.h: Likewise.
1407 * pathname.h: Likewise.
1408 * progname.h: Likewise.
1409 * stpcpy.h: Likewise.
1410 * stpncpy.h: Likewise.
1411 * strcase.h: Likewise.
1412 * strstr.h: Likewise.
1413 * xalloc.h: Likewise.
1415 * mbswidth.h: Add extern "C" for C++.
1416 Reported by Albert Chin-A-Young <china@thewrittenword.com>.
1418 2004-07-09 Simon Josefsson <jas@extundo.com>
1420 * getndelim2.c: Include stddef.h, for ptrdiff_t. (FreeBSD 4.9
1421 failed without this.)
1423 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
1425 * fchown-stub.c: New file.
1427 2004-06-24 Jim Meyering <jim@meyering.net>
1429 * obstack.h (obstack_base): Cast to (void *), per documentation.
1431 2004-06-22 Paul Eggert <eggert@cs.ucla.edu>
1433 * argz.c, argz_.h: New files, which are autoupdated from libtool.
1435 2004-06-01 Jim Meyering <jim@meyering.net>
1437 * calloc.c: New file.
1439 2004-06-06 Paul Eggert <eggert@cs.ucla.edu>
1441 * getdate.y (yylex): Allow space between sign and number.
1442 Problem reported by Dan Jacobson.
1444 2004-06-01 Paul Eggert <eggert@cs.ucla.edu>
1445 and Jim Meyering <jim@meyering.net>
1447 Merge from coreutils CVS.
1449 * stat-macros.h: New file, with contents from file-type.h
1450 and coreutils' system.h.
1451 * file-type.c: Include "stat-macros.h".
1452 * file-type.h (file_type): Move all macro definitions to new file,
1455 * chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
1456 Wrap old code with this conditional.
1457 [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
1458 function that does not dereference symlinks.
1459 * lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
1461 * xreadlink.c: Include xreadlink.h first, to catch .h file
1462 dependency problems.
1463 (xreadlink): Accept new arg SIZE, for efficiency.
1464 All decls and uses changed.
1465 * xreadlink.h: Include <stddef.h>, for size_t.
1467 * .cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
1468 gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
1470 * .cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h, sysexits.h.
1472 2004-05-30 Paul Eggert <eggert@cs.ucla.edu>
1474 * xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
1475 macros to be defined.
1476 (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
1477 the allocator returns NULL because the requested size is zero.
1479 2004-05-20 Paul Eggert <eggert@cs.ucla.edu>
1481 * malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
1482 var. Add comment explaining why libc still defines it. This
1483 merges the following patch from glibc:
1484 http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
1486 2004-05-19 Paul Eggert <eggert@cs.ucla.edu>
1488 * obstack.c (_obstack): Remove unused variable. It hasn't been
1489 present in glibc since revision 1.1 of this file.
1490 * obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
1491 obstack_alignment_mask, obstack_alloc, obstack_base,
1492 obstack_blank, obstack_blank_fast, obstack_chunk_size,
1493 obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
1494 obstack_grow0, obstack_init, obstack_int_grow,
1495 obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
1496 obstack_next_free, obstack_object_size, obstack_ptr_grow,
1497 obstack_ptr_grow_fast, obstack_room): Remove declarations of
1498 nonexistent functions.
1500 2004-05-17 Derek R. Price <derek@ximbiot.com>
1501 Paul Eggert <eggert@cs.ucla.edu>
1503 * argp-help.c, argp-parse.c: Assume <alloca.h> rather than freecoding.
1505 2004-05-14 Bruno Haible <bruno@clisp.org>
1507 * vasnprintf.c (VASNPRINTF): Correctly handle the case of a precision
1508 that consists of a '.' followed by an empty digit string.
1509 Patch by Tor Lillqvist <tml@iki.fi>.
1511 2004-05-17 Paul Eggert <eggert@cs.ucla.edu>
1513 Port obstack to the AS/400, where pointers are 16 bytes wide and
1514 you cannot cast an integer to a valid pointer. This patch is
1515 currently waiting to be integrated into glibc; see
1516 <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
1518 * obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
1519 All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
1520 (__BPTR_ALIGN, __PTR_ALIGN): New macros.
1521 (struct obstack): temp member is now a union of a pointer and
1522 an integer, instead of an integer. All integer uses changed.
1523 This does not affect the physical layout of struct obstack,
1524 except on hosts (like the AS/400) where the size or alignment of
1525 void * is greater than that of ptrdiff_t.
1526 (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
1527 __STDC__)]: Store temporary in pointer member of union, not
1529 * obstack.c: Include <stddef.h>, for offsetof.
1530 (struct fooalign): Remove; it doesn't need a name.
1531 (union fooround): Change double to long double, and add void *.
1532 (DEFAULT_ALIGNMENT): Use offsetof to compute.
1533 (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
1534 not a macro. Hence the values are always int; so remove all
1535 casts-to-int in uses.
1537 2004-05-16 Paul Eggert <eggert@cs.ucla.edu>
1538 Derek Price <derek@ximbiot.com>
1540 * alloca.c: Include <alloca.h>, to get our interface.
1541 * alloca_.h: Use __alloca on AIX, so that we don't have to
1542 include <alloca.h> first. Use C89 prototype for alloca; this
1543 requires including <stddef.h> for size_t. Use extern "C" if C++.
1544 Use #elif for simplicity, since we can assume C89 now.
1545 Don't try to source the system alloca.h since it will not be found
1546 and to prevent recursively including its replacement.
1547 * fnmatch.c: Include <alloca.h> instead of opencoding.
1548 * regex.c: Likewise.
1550 2004-05-16 Derek Price <derek@ximbiot.com>
1551 Paul Eggert <eggert@cs.ucla.edu>
1553 getline cleanup. This changes the getndelim2 API: both order of
1554 arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
1557 * getline.c: Don't include stddef.h or stdio.h, since our
1558 interface does that.
1559 (getline): Always use getdelim, so that we don't have two
1560 copies of this code.
1561 * getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
1563 (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
1564 (GETNDELIM2_MAXIMUM): New macro.
1565 (getndelim2): Reorder arguments. delim==EOF now means no delimiter,
1566 instead of the old practice of delim2==0. All callers changed.
1567 Return -1 on overflow, instead of returning junk.
1568 Do not set *linesize unless allocation succeeds.
1569 * getndelim2.h: Do not include stddef.h; no longer needed, now
1570 that we include sys/types.h.
1571 * getnline.h: Likewise.
1572 * getndelim2.h (GETNLINE_NO_LIMIT): New macro.
1573 (getndelim2): Reorder arguments.
1574 * getnline.c (getnline, getndelim):
1575 Don't discard the NMAX argument.
1576 (getnline): Invoke getndelim, to avoid code duplication.
1577 * getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
1578 of (size_t) -1 by callers of the getnline family.
1580 2004-05-13 Paul Eggert <eggert@cs.ucla.edu>
1582 * nanosleep.c (suspended): Change its type from int to
1583 sig_atomic_t volatile.
1584 (first_call): Make it private to rpl_nanosleep, and have it
1585 be zero initially as that's a bit faster.
1586 (my_usleep): Round up fractional times instead of truncating them,
1587 as this is the usual meaning for 'sleep'.
1589 * gettime.c (gettime): Fall back on `time' if `gettimeofday'
1591 * settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
1592 (ENOSYS): Define if not defined.
1593 (settime): Fall back on stime if it exists and settimeofday fails.
1594 But don't bother with fallbacks if a method fails with errno == EPERM.
1596 2004-05-11 Jim Meyering <jim@meyering.net>
1598 Prior to this change, the save_cwd caller required read access to the
1599 current directory on most systems (ones with the fchdir function).
1601 * save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
1602 fails, try write-only, and finally, resort to using xgetcwd.
1604 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
1606 * obstack.c, obstack.h: Import changes from libc.
1608 2004-04-28 Bruno Haible <bruno@clisp.org>
1610 * findprog.c (find_in_path): Treat Cygwin like Windows, since it also
1611 implicitly appends .exe to executables.
1612 * localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
1613 accepts Windows pathnames.
1614 * pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
1615 Cygwin like Windows, since it now accepts Windows pathnames.
1616 * progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
1617 Cygwin like Windows, since it now accepts Windows pathnames.
1618 Reported by Derek Robert Price <derek@ximbiot.com>.
1620 2004-04-20 Jim Meyering <jim@meyering.net>
1622 * getndelim2.c (getndelim2): Upon realloc failure, don't leak memory.
1624 2004-04-20 Jim Meyering <jim@meyering.net>
1625 Bruno Haible <bruno@clisp.org>
1627 * localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
1628 memory when realloc fails.
1630 2004-04-18 Jim Meyering <jim@meyering.net>
1632 * readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc failure,
1633 don't leak memory and do call END_UTMP_ENT.
1635 2004-04-11 Paul Eggert <eggert@twinsun.com>
1637 * inttostr.h: Include <limits.h> unconditionally, since we assume C89.
1638 (CHAR_BIT): Remove, since we assume C89.
1639 Include <stdint.h> if available, as per current Autoconf CVS advice.
1641 2004-03-30 Paul Eggert <eggert@twinsun.com>
1643 * cloexec.h, cloexec.c (set_cloexec_flag): Return int
1644 not bool, to be more consistent with Unix conventions.
1645 Suggested by Bruno Haible.
1647 Merge from coreutils.
1649 * imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
1652 * getdate.h: Include stdbool.h, and timespec.h instead of
1653 the usual <time.h> dance.
1654 (get_date): Change signature to support fractional time stamps.
1655 All callers changed.
1656 * getdate.y: Include "getdate.h" first, as we can now
1657 assume C89 and don't need to worry about 'const'.
1658 Similarly, include "unlocked-io.h" near start, not in middle.
1660 (textint.value): Use long int rather than int.
1661 (textint.digits): Use size_t rather than int.
1662 (BILLION, LOG10_BILLION): New constants.
1663 (parser_control): New member rel_ns. Members day_ordinal,
1664 time_zone, month, day, hour, minutes, rel_year, rel_month,
1665 rel_day, rel_hour, rel_minutes, rel_seconds
1666 are now long int, not int. Member seconds is now struct timespec,
1667 not int. New member timespec_seen. Members dates_seen, days_seen,
1668 local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
1670 (%union.intval): Now long int, not int.
1671 New member timespec.
1672 (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
1673 (seconds, signed_seconds, unsigned_seconds): New nonterminals.
1674 (spec): Now is a timespec or an item list.
1675 (timespec, items): New nonterminals.
1676 (time, rel, relunit, number, get_date):
1677 Add support for fractional seconds.
1678 (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
1679 (gmtime, localtime, mktime): Remove decls; not needed with C89.
1680 (to_hour): First arg is now long int, not int.
1681 (to_year): Returns long int, not int.
1682 Don't treat year -70 like 70.
1683 (tm_diff): Returns long int, not int.
1684 (lookup_word): Use bool instead of int when appropriate.
1685 (yylex): Use size_t for count, not int.
1686 Detect overflow when parsing large integer constants.
1687 Add support for fractions.
1688 (get_date): Make pointers 'const' if possible.
1689 Use more-portable code to detect integer overflow.
1690 (main) [TEST]: Adjust to above changes. Test for localtime failure.
1691 Don't use ctime; it's not reliable if the year has >4 digits.
1693 * human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
1694 This is for compatibility with BSD.
1696 * timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
1697 (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
1698 From coreutils' system.h.
1700 * userspec.c: Don't include "posixver.h".
1701 (parse_user_spec): Fall back on USER.GROUP parsing, regardless
1702 of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
1703 compatible extension. Simplify code by removing a boolean int
1704 that was always nonzero if a string was nonnull.
1706 2004-03-30 Jim Meyering <jim@meyering.net>
1708 Merge from coreutils.
1710 * mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
1712 * readtokens.c (readtoken): Don't leak 64 bytes when reading
1713 an empty input stream.
1715 * readtokens.c: Include <stdbool.h>.
1716 (readtoken): Use `size_t' rather than int/long.
1717 All callers adjusted.
1718 Use `bool' rather than `int' where appropriate.
1719 Use memset rather than an explicit loop.
1720 Use x2nrealloc rather than xrealloc.
1721 Allow the use of `\0' as a delimiter.
1722 (readtokens): Likewise.
1723 * readtokens.h (readtoken, readtokens): Update prototypes.
1725 2004-03-30 Bruno Haible <bruno@clisp.org>
1727 * getloadavg.c (getloadavg): Don't assume setlocale returns
1730 2004-03-29 Paul Eggert <eggert@twinsun.com>
1732 Merge changes to getloadavg.c from coreutils and Emacs.
1734 * getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
1735 Define to an expression, not to the empty string.
1736 Include cloexec.h and xalloc.h.
1737 (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
1738 Use set_cloexec_flag rather than rolling our own.
1739 * cloexec.c, cloexec.h: New files.
1741 2004-03-18 Paul Eggert <eggert@twinsun.com>
1743 * getopt.h: Sync with libc CVS.
1745 2004-03-18 Paul Eggert <eggert@twinsun.com>
1746 Bruno Haible <bruno@clisp.org>
1748 * mbswidth.h: Include <wchar.h> only if HAVE_DECL_MBSWIDTH_IN_WCHAR_H,
1749 not on all platforms that have <wchar.h>.
1750 * mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
1752 2004-03-09 Paul Eggert <eggert@twinsun.com>
1754 * argp-parse.c, getopt.c, getopt.h, getopt1.c:
1756 * getopt_int.h: New file, also synced from libc.
1758 2004-03-07 Paul Eggert <eggert@twinsun.com>
1760 * c-stack.c (SIGACTION_WORKS): New macro. Use it instead of long
1761 '#if' expressions. Unlike the code it replaces, it does not
1762 depend on (defined _SC_PAGESIZE). However, it does depend on
1763 HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
1764 first reported by Jason Andrade in
1765 <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
1767 2004-01-18 Simon Josefsson <jas@extundo.com>
1769 * strdup.h: New file.
1770 * strdup.c: Include it.
1771 * path-concat.c: Include strdup.h. Drop strdup declaration.
1772 * userspec.c: Include strdup.h. Drop strdup declaration.
1774 2004-02-06 Karl Berry <karl@gnu.org>
1776 * config.charset: update from gettext 0.14.1.
1778 2004-02-05 Paul Eggert <eggert@twinsun.com>
1780 Add comments and code, prompted by suggestions from Bruno Haible
1782 * quotearg.h (quotearg_alloc): New decl. Improve the comments
1783 describing the enum quoting_style values.
1784 * quotearg.c (quotearg_alloc): New function.
1785 (quotearg_buffer_restyled): Treat lone { and } as special.
1786 Treat = as special. Work around bug with older shells
1787 that "see" a '\' that is really the 2nd byte of a multibyte char.
1788 Quote empty string with shell_quoting_style.
1790 2004-02-03 Bruno Haible <bruno@clisp.org>
1792 * pipe.h: New file, from GNU gettext.
1793 * pipe.c: New file, from GNU gettext.
1795 2004-01-27 Bruno Haible <bruno@clisp.org>
1797 * execute.h: New file, from GNU gettext.
1798 * execute.c: New file, from GNU gettext.
1799 * w32spawn.h: New file, from GNU gettext.
1801 2004-01-23 Paul Eggert <eggert@twinsun.com>
1803 Exit-status fix from coreutils.
1805 Use exit_failure consistently in place of EXIT_FAILURE,
1806 so that program exit statuses are consistent on failure.
1808 * argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
1809 Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
1810 * argmatch.h: Comment fix to match the above.
1811 * obstack.c (obstack_exit_failure) [!defined _LIBC]:
1812 Now a macro referring to exit_failure, instead of a separate
1813 variable. Include "exitfail.h" to get it.
1814 * xstrtol.h: Include "exitfail.h".
1815 (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
1817 * long-options.c (parse_long_options): Use prototype
1818 for usage function arg. Pass it EXIT_SUCCESS rather than 0,
1821 2004-01-21 Jim Meyering <jim@meyering.net>
1823 * mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
1824 so as not to conflict with a different-sized __mktime_internal
1825 function in GNU libc.
1826 * timegm.c (__mktime_internal) [!_LIBC]: Likewise.
1827 Problem building statically-linked `ls' reported by Michael Brunnbauer.
1829 2004-01-18 Paul Eggert <eggert@twinsun.com>
1831 Merge from diffutils.
1833 * file-type.c (file_type): Add typed memory objects.
1834 * file-type.h (S_TYPEISTMO): New macro.
1836 * c-stack.h (c_stack_action): Remove argv argument.
1837 * c-stack.c (c_stack_action): Likewise. All uses changed.
1838 (die): Don't calculate message unless segv_action returns.
1839 (get_stack_location, min_address_from_argv, max_address_from_argv,
1840 volatile stack_base, volatile_stack_size): Remove.
1841 (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
1842 that every segmentation violation is a stack overflow. (Ouch!)
1843 See Debian bug 136249 (still outstanding) for more info about why
1844 HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
1846 2003-11-30 Bruno Haible <bruno@clisp.org>
1848 Safer stack allocation.
1849 * setenv.c: Include allocsa.h.
1850 (alloca): Remove fallback definition.
1851 (freea): Remove macro.
1852 (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
1855 2003-10-17 Bruno Haible <bruno@clisp.org>
1857 * binary-io.h: Avoid warnings on Cygwin.
1859 2003-12-28 Bruno Haible <bruno@clisp.org>
1861 * wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
1862 * wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE specially.
1864 2003-11-28 Bruno Haible <bruno@clisp.org>
1866 * wait-process.c (cleanup_slaves): Use ANSI C declaration.
1868 2003-11-27 Bruno Haible <bruno@clisp.org>
1870 * wait-process.c: On Windows, include windows.h. Needed on mingw.
1872 2003-11-17 Bruno Haible <bruno@clisp.org>
1874 * wait-process.c (wait_process): Disable the 2003-10-31 waitid() patch.
1876 2003-11-24 Bruno Haible <bruno@clisp.org>
1878 * xallocsa.h: New file, from GNU gettext.
1879 * xallocsa.c: New file, from GNU gettext.
1881 2003-11-24 Bruno Haible <bruno@clisp.org>
1883 * allocsa.h: New file, from GNU gettext.
1884 * allocsa.c: New file, from GNU gettext.
1886 2003-11-24 Bruno Haible <bruno@clisp.org>
1888 * eealloc.h: New file.
1890 2004-01-15 Jim Meyering <jim@meyering.net>
1892 Merge from coreutils.
1894 * md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code. These
1895 days, gcc-3.x does better all by itself. Patch from Dean Gaudet:
1896 http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
1898 * posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
1899 optional configure-time default.
1901 * version-etc.c (version_etc_copyright): Update copyright date.
1903 * xreadlink.c (xreadlink): Correct outdated comment.
1905 2004-01-15 Paul Eggert <eggert@twinsun.com>
1907 Merge from coreutils.
1909 * posixver.c: Include posixver.h.
1911 * same.c: Include <stdbool.h>, <limits.h>.
1912 (_POSIX_NAME_MAX): Define if not defined.
1914 (same_name): If file names are silently truncated, report
1915 that the file names are the same if they are the same after
1916 the silent truncation.
1918 * xstrtod.h (xstrtod): Accept an extra arg, specifying the
1919 conversion function.
1920 * xstrtod.c (xstrtod): Likewise. All callers changed to
1921 include c-strtod.h and use c_strtod. Don't include stdlib.h; no
1924 2004-01-14 Paul Eggert <eggert@twinsun.com>
1926 * fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
1927 with like-named macro in fnmatch.c.
1928 (EXT): Use an internal constant instead.
1930 Merge fnmatch patches from glibc.
1931 * fnmatch.c (mbsinit): Remove define.
1932 Add libc_hidden_ver (__fnmatch, fnmatch).
1933 * fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
1934 Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
1936 2003-12-14 Karl Berry <karl@gnu.org>
1938 * config.charset: update from gettext-runtime.
1940 2003-12-03 Paul Eggert <eggert@twinsun.com>
1942 * getgroups.c (getgroups): xmalloc takes one argument, not two.
1943 Bug reported by Alfred M. Szmidt.
1945 2003-11-29 Karl Berry <karl@gnu.org>
1947 * argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
1949 2003-11-23 Paul Eggert <eggert@twinsun.com>
1950 Bruno Haible <bruno@clisp.org>
1952 * printf-parse.h: Don't include sys/types.h.
1953 (ARG_NONE): New macro.
1954 (char_directive): Change type of *arg_index fields to size_t.
1955 * printf-parse.c: Don't include sys/types.h.
1956 (SSIZE_MAX): Remove macro.
1957 (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
1958 Remove unnecessary overflow check.
1959 * vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
1962 2003-11-24 Paul Eggert <eggert@twinsun.com>
1964 * alloca.c: Remove dependency on xalloc module.
1965 (xalloc_die): Remove.
1966 (memory_full) [!defined emacs]: New macro.
1967 [!defined emacs]: Don't include xalloc.h.
1968 (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
1969 address arithmetic overflows. Change datatypes a bit to avoid
1972 2003-11-22 Jim Meyering <jim@meyering.net>
1974 * xmalloc.c (x2nrealloc_inline): Fix typos in comments: s/size/size_t/.
1976 2003-11-17 Bruno Haible <bruno@clisp.org>
1978 * vasnprintf.c (alloca): Remove fallback definition.
1979 (freea): Remove definition.
1980 (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
1981 Reported by Paul Eggert.
1983 2003-11-17 Jim Meyering <jim@meyering.net>
1985 On systems without utime and without a utimes function capable of
1986 dealing with a NULL struct utimbuf* argument, this utime replacement
1987 could -- in unusual circumstances -- leak a file descriptor.
1988 * utime.c: Include <unistd.h> and <errno.h>.
1989 (utime_null): Be sure to close `fd' and to preserve errno.
1990 Reported by Geoff Collyer via Arnold Robbins.
1992 2003-11-16 Paul Eggert <eggert@twinsun.com>
1993 Bruno Haible <bruno@clisp.org>
1995 Protect against address arithmetic overflow.
1996 * printf-args.h: Include stddef.h.
1997 (arguments): Change type of field 'count' to size_t.
1998 * printf-args.c (printf_fetchargs): Use size_t instead of
1999 'unsigned int' where appropriate.
2000 * printf-parse.h: Include sys/types.h.
2001 (char_directive): Change type of *arg_index fields to ssize_t.
2002 (char_directives): Change type of fields 'count', max_*_length to
2004 * printf-parse.c: Include sys/types.h and xsize.h.
2005 (SSIZE_MAX): Define fallback value.
2006 (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
2007 instead of 'int' where appropriate. Check a_allocated, d_allocated
2008 against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
2009 * vasnprintf.c: Include xsize.h.
2010 (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
2011 Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
2012 overflow. Avoid wraparound when converting a width or precision from
2015 2003-11-16 Bruno Haible <bruno@clisp.org>
2017 Update from GNU gettext.
2018 * printf-parse.c: Generalize to it can be compiled for wide strings.
2019 (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
2020 * vasnprintf.c: Generalize to it can be compiled for wide strings.
2021 (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
2022 SNPRINTF): New macros.
2023 Don't include <alloca.h> if the file is used inside libintl.
2024 (local_wcslen): New function, for Solaris 2.5.1.
2025 (VASNPRINTF): Use it instead of wcslen.
2027 2003-11-16 Bruno Haible <bruno@clisp.org>
2029 * xsize.h (xmax): New function.
2030 (xsum, xsum3, xsum4): Declare as "pure" functions.
2032 2003-11-12 Paul Eggert <eggert@twinsun.com>
2034 * xalloc.h: Do not include <limits.h> or <stdint.h>.
2035 (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
2036 the heuristic, rather than PTRDIFF_MAX and SIZE_MAX. This
2037 heuristic is just as accurate as far as we know, and it removes a
2038 dependency on size_max.m4 and ptrdiff_max.m4.
2040 2003-11-12 Paul Eggert <eggert@twinsun.com>
2042 * xstrtol.c (__xstrtol): Remove "break" immediately after
2043 "return", to pacify some unknown compiler. Problem reported
2046 2003-11-11 Bruno Haible <bruno@clisp.org>
2048 * xsize.h (SIZE_MAX): Remove fallback definition.
2049 * xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
2052 2003-11-10 Paul Eggert <eggert@twinsun.com>
2054 * xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
2055 PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
2056 rejected some allocations of exactly SIZE_MAX - 2 bytes.
2058 [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
2059 not (size_t) -1, since it's defined here.
2061 2003-11-06 Paul Eggert <eggert@twinsun.com>
2063 * xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
2064 (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
2065 Reject sizes of exactly SIZE_MAX bytes.
2066 * xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
2067 is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
2069 2003-11-05 Bruno Haible <bruno@clisp.org>
2071 * xsize.h: Include limits.h, to avoid a possible collision with
2072 SIZE_MAX defined in <limits.h> on Solaris.
2074 2003-11-04 Bruno Haible <bruno@clisp.org>
2076 * xsize.h: New file.
2077 * linebreak.c: Include xsize.h.
2078 (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
2079 argument for overflow.
2080 Suggested by Paul Eggert.
2082 2003-10-31 Bruno Haible <bruno@clisp.org>
2084 * wait-process.c (wait_process): Use waitid with WNOWAIT if available,
2085 to avoid (extremely rare) race condition.
2086 Suggested by Paul Eggert.
2088 2003-11-03 Jim Meyering <jim@meyering.net>
2090 * userspec.c: Include "userspec.h".
2091 * userspec.h: New file.
2093 2003-10-31 Paul Eggert <eggert@twinsun.com>
2095 * mountlist.h (struct mount_entry.me_type_malloced): New member.
2096 * mountlist.c (SIZE_MAX): Define if not defined already.
2097 (read_filesystem_list): Set and use me_type_malloced.
2098 Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
2099 whatever the type happens to be), for brevity and consistency.
2100 Check for size calculation overflow on Alphas running OSF/1.
2102 2003-10-31 Jim Meyering <jim@meyering.net>
2104 * hash.c: Include "xalloc.h" for use of xalloc_oversized.
2106 * linebuffer.c: Include <string.h> for declaration of memset.
2108 2003-10-30 Paul Eggert <eggert@twinsun.com>
2109 Bruno Haible <bruno@clisp.org>
2111 * vasprintf.c: Include <limits.h>, <stdlib.h>.
2112 (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
2114 2003-10-29 Paul Eggert <eggert@twinsun.com>
2116 * xalloc.h (xalloc_oversized): Now a macro, not a function,
2117 so that it works even if SIZE_MAX < N. Do not include <stdbool.h>;
2119 * quotearg.c (quotearg_n_options): Use it.
2120 * group-member.c: Include <stdbool.h>.
2121 (free_group_info): Arg is now const *; don't free arg.
2122 (get_group_info): Now returns bool and accepts struct group_info *,
2123 rather than returning a malloc'ed struct group_info *.
2124 All uses changed. Check for overflow in internal size calculation.
2126 * getusershell.c (readname): Simplify the code by using x2nrealloc
2127 rather than xmalloc/xrealloc.
2128 * linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
2129 using x2realloc rather than xmalloc/xrealloc. Also, fix a C
2130 conformance bug: the old code used a pointer after freeing the
2131 storage that it addressed.
2132 * hash.c (hash_initialize): Simplify the code by using xalloc_oversized
2133 rather than doing it by hand.
2134 * getgroups.c (getgroups): Don't use xrealloc, since we don't need
2135 the buffer preserved. Use free and xmalloc instead.
2136 * quotearg.c (quotearg_n_options): Likewise.
2137 Use a simpler test for size overflow. Don't use xalloc_oversized
2138 because unsigned int might be wider than size_t (!); this suggests
2139 that we should switch from unsigned int to size_t for slot numbers.
2141 2003-10-27 Bruno Haible <bruno@clisp.org>
2143 * stdbool_.h: Better support for BeOS.
2145 2003-10-27 Paul Eggert <eggert@twinsun.com>
2147 * exclude.c (new_exclude): Use xzalloc rather than xmalloc
2148 to allocate the returned structure. Do not allocate a subarray,
2149 as x2nrealloc will do that.
2150 (add_exclude): Use x2nrealloc to reallocate ex->exclude,
2151 instead of xnrealloc.
2152 (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
2154 2003-10-26 Paul Eggert <eggert@twinsun.com>
2156 * xalloc.h (xalloc_oversized): New static inline function, for
2157 callers that want to do their own size-overflow checking. Include
2158 <stdbool.h>, since xalloc_oversized returns bool.
2159 * xalloc.c (array_size_overflow): Remove. All callers changed
2160 to use xalloc_oversized.
2162 Add two functions x2realloc, x2nrealloc, for programs that grow
2163 arrays dynamically by doubling their sizes.
2164 * xalloc.h (x2realloc, x2nrealloc): New decls.
2165 * xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
2168 Port to C99 semantics for 'inline' of external functions.
2169 Bug reported by Bruno Haible.
2170 * xmalloc.c (xnmalloc_inline): New static inline function,
2171 with the old contents of xnmalloc.
2172 (xnmalloc, xmalloc): Use it.
2173 (xnrealloc_inline): New static inline function,
2174 with the old contents of xnrealloc.
2175 (xnrealloc, xrealloc): Use it.
2177 * alloc.c (alloca): xmalloc cannot return NULL, so don't test for that.
2179 2003-10-25 Paul Eggert <eggert@twinsun.com>
2181 Fix several address-calculation bugs in the hash modules,
2182 plus some minor code cleanup.
2184 * hash.h: Include <stdbool.h>, for bool.
2185 * hash.c: Don't include <stdbool.h>, since hash.h does it now.
2186 * hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
2187 hash_get_n_entries, hash_get_max_bucket_length,
2188 hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
2189 hash_rehash): Use size_t rather than unsigned.
2190 * hash.c (struct hash_table, hash_get_n_buckets,
2191 hash_get_n_buckets_used, hash_get_n_entries,
2192 hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
2193 hash_get_entries, hash_do_for_each, hash_string, is_prime,
2194 next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
2196 (SIZE_MAX): Define if not defined.
2197 (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
2198 hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
2200 Use const * when possible.
2201 (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
2202 (check_tuning): Fix bug: if tuning parameters were very close to
2203 0 or 1, rounding errors could have caused subscript violations.
2204 (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
2205 (hash_initialize): Add 'fail:' label
2206 to free table and return NULL, and use it to simplify code.
2207 Use calloc rather than clearing the storage ourself.
2208 (hash_initialize, hash_rehash): Check for arithmetic overflow in
2209 buffer size calculations.
2210 * hash-pjw.h (hash_pjw): Use size_t, not unsigned.
2211 Include <stddef.h>, for size_t.
2212 * hash-pjw.c (hash_pjw): Likewise.
2213 Switch to method described by Bruno Haible.
2214 Include <limits.h>, for CHAR_BIT.
2215 (SIZE_BITS): New macro.
2217 2003-10-21 Paul Eggert <eggert@twinsun.com>
2219 * getndelim2.c (getndelim2): When size calculation overflows,
2220 ceiling the allocation at NMAX bytes rather than silently
2221 discarding input bytes before NMAX is reached. This makes
2222 a difference only if NMAX exceeds SIZE_MAX / 2.
2224 * obstack.c: Merge from glibc.
2225 [defined _LIBC]: Include <obstack.h>, not "obstack.h".
2226 Add libc_hidden_def (_obstack_newchunk).
2227 (_obstack_free) [! defined _LIBC]: Remove.
2228 [defined _LIBC]: Make a strong alias from obstack_free, rather than
2229 a clone of the function body.
2230 (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
2231 [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
2233 * obstack.h: Indenting cleanup, to make it easier to merge with glibc.
2234 (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
2237 * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
2238 (obstack_ptr_grow_fast, obstack_int_grow_fast):
2239 Don't use lvalue casts, as GCC plans to remove support for them
2240 in GCC 3.5. Reported by Joseph S. Myers. This bug
2241 was also present in the non-GCC version, indicating that this
2242 code had always been buggy and had never been widely used.
2243 (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
2244 Use the fast variant of each macro, rather than copying the
2245 definiens of the fast variant; that way, we'll be more likely to
2246 catch future bugs in the fast variants.
2248 2003-10-20 Bruno Haible <bruno@clisp.org>
2250 * wait-process.h: New file, from GNU gettext.
2251 * wait-process.c: New file, from GNU gettext.
2253 2003-10-19 Jim Meyering <jim@meyering.net>
2255 * vasnprintf.c (vasnprintf): Work around losing snprintf on HPUX 10.20.
2257 2003-10-16 Paul Eggert <eggert@twinsun.com>
2259 * getgroups.c: Include <errno.h>, <stdlib.h>.
2260 (getgroups): First arg is int, not size_t.
2261 Don't let 'free' mangle errno.
2263 2003-10-16 Jim Meyering <jim@meyering.net>
2265 * xmalloc.c: Include <string.h>, for declarations of memset and memcpy.
2267 2003-10-15 Paul Eggert <eggert@twinsun.com>
2269 * exclude.c: Do not include <inttypes.h> or <stdint.h>.
2271 (new_exclude, add_exclude_file): Initial size no longer needs to
2273 (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
2274 our own address arithmetic overflow checking.
2276 * fnmatch.c (SIZE_MAX): Define if standard headers don't.
2277 (fnmatch): Do not alloca more than 2000 wide characters;
2278 instead, use malloc for large buffers.
2279 Check for address arithmetic overflow, and return -1
2280 with errno set to ENOMEM in that case.
2281 * fnmatch_loop.c (ALLOCA_LIMIT): New macro.
2282 (NEW_PATTERN): Do not alloca more than 8000 bytes;
2283 instead, return -1. Check for address arithmetic overflow.
2285 2003-10-14 Paul Eggert <eggert@twinsun.com>
2287 Handle invalid suffixes and overflow independently, so that
2288 callers can treat them independently as needed. Fix some bugs in
2289 suffix handling, e.g., "100k@" was not diagnosed as an invalid
2290 suffix for a human-readable blocksize. The major caller-visible
2291 change is the addition of a new
2292 LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
2293 that both overflow and suffix chars were found.
2295 * human.c (humblock): Don't check separately for invalid suffix
2296 char; that is xstrtoumax's job (now that its bug is fixed).
2297 * xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
2298 INTMAX_MAX]: New macros.
2299 * xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
2300 TYPE_MAXIMUM): New macros.
2301 (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
2302 (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
2303 if overflow occurs, as it's what __strtol does and it's more useful
2305 (__xstrtol): If __strtol reports some error other than ERANGE,
2306 reflect it to the caller as LONGINT_INVALID. If it reports
2307 ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
2308 | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
2309 * xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
2311 (_STRTOL_ERROR): Handle it. Abort when given unknown error codes.
2312 * xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
2313 * xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
2314 [defined UINTMAX_MAX]: New macros.
2316 2003-10-14 Bruno Haible <bruno@clisp.org>
2318 * fatal-signal.h: Improved comments. Suggested by Paul Eggert.
2319 * fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
2320 Also use volatile where needed.
2322 2003-10-12 Paul Eggert <eggert@twinsun.com>
2324 * xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
2325 (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
2326 and define in terms of the other primitives.
2327 * xmalloc.c: Include stdbool.h; do not include exit.h.
2328 (SIZE_MAX): Define if not already defined.
2329 (array_size_overflow): New function.
2330 (xalloc_die): Abort instead of exiting if 'error' returns.
2331 (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
2332 (xmalloc, xrealloc): Use them.
2333 (xcalloc): Check for address arithmetic overflow.
2334 * xstrdup.c (xstrdup): Use xclone, since memcpy should be
2335 a bit faster than strcpy.
2337 2003-10-08 Paul Eggert <eggert@twinsun.com>
2339 Merge getpass from libc, plus a few fixes.
2341 * getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
2342 Include <stdbool.h>.
2343 Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
2344 __fsetlocking to empty.
2345 [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
2346 do include <bits/libc-lock.h>.
2347 Do not include <fcntl.h>; not needed.
2348 [_LIBC]: Include <wchar.h>.
2349 (NOTCANCEL_MODE): New macro.
2350 (flockfile, funlockfile) [_LIBC]: New macros.
2351 (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
2352 [!_LIBC]: New macros.
2353 (call_fclose): New function.
2354 (getpass): Use it. Save tty stream separately; this simplifies the
2355 code and makes it more reliable if stdin happens to equal stdout.
2356 Invoke __fsetlocking on tty.
2357 Handle thread cancellation if needed.
2358 Namespace cleanup (use __tcgetattr, __getline).
2359 Use bool for Booleans.
2360 [USE_IN_LIBIO]: Handle wide streams.
2361 [!_LIBC]: Unconditionally do the fseek, since we don't know what
2362 stream might go where.
2364 * unlocked-io.h: Include <stdio.h>, so that the caller
2365 doesn't have to include <stdio.h> before us.
2366 (clearerr_unlocked, feof_unlocked, ferror_unlocked,
2367 fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
2368 fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
2369 putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
2370 if not declared, so that we can use getpass.c code from libc without
2372 (flockfile, ftrylockfile, funlockfile): New macros.
2374 2003-10-06 Bruno Haible <bruno@clisp.org>
2376 * version-etc-2.h: Remove file.
2377 * version-etc-2.c: Remove file.
2379 2003-09-25 Jim Meyering <jim@meyering.net>
2380 Bruno Haible <bruno@clisp.org>
2382 This lets translators provide better translations for the
2383 "Written by ..." part of --version output.
2384 * version-etc.h: Include stdarg.h.
2385 (version_etc_copyright): Declare as readonly.
2386 (version_etc): Make this function variadic with a NULL-terminated list
2387 of author name strings.
2388 (version_etc_va): New declaration.
2389 * version-etc.c: Include stdarg.h, stdlib.h.
2390 (version_etc_copyright): Declare as readonly.
2391 (version_etc_va): New function. Provide a different translatable string
2392 for each possible number of authors < 10. Abbreviate when there are 10
2394 (version_etc): Make this function variadic. Call version_etc_va.
2395 Suggestion from Gary V. Vaughan.
2397 * long-options.h (parse_long_options): Change prototype: the authors
2398 string is moved to the end and becomes variadic.
2399 * long-options.c: Include stdarg.h.
2400 (parse_long_options): Make this function variadic, too.
2401 Call version_etc_va, not version_etc.
2403 2003-10-06 Bruno Haible <bruno@clisp.org>
2405 * fatal-signal.h: New file, from GNU gettext.
2406 * fatal-signal.c: New file, from GNU gettext.
2408 2003-10-04 Karl Berry <karl@gnu.org>
2410 * argp*: update from libc.
2412 2003-10-01 Larry Jones <lawrence.jones@eds.com>
2414 * getpass.c (getpass): Use a no-op fseek when switching from input to
2415 output mode on the same stream.
2417 2003-09-29 Paul Eggert <eggert@twinsun.com>
2419 * strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
2420 Fix arg typo in previous patch.
2422 2003-09-28 Jim Meyering <jim@meyering.net>
2424 * error.c: Correct cpp indentation.
2426 2003-09-27 Paul Eggert <eggert@twinsun.com>
2428 * minmax.h (MIN, MAX) [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
2429 Omit the special code that used __typeof__, since we worry that
2430 it could be more trouble than it's worth. See:
2431 http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
2432 http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
2436 2003-09-26 Jim Meyering <jim@meyering.net>
2438 * error.c (error_tail): Move some declarations
2439 into inner scope where the local variables are used.
2441 2003-09-26 Bruno Haible <bruno@clisp.org>
2443 * stpncpy.h (gnu_stpncpy): New declaration.
2444 (stpncpy): Define as alias for gnu_stpncpy.
2445 * stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
2447 2003-09-26 Paul Eggert <eggert@twinsun.com>
2449 * error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
2450 (error_tail): Do not loop, reallocating temporary buffer, since
2451 the output cannot contain more wide characters than the input
2452 contains bytes, the size must be big enough already. This avoids
2453 one potential size overflow calculation. Check for size overflow
2454 when calculating temporary buffer size. Free temporary buffer
2455 when done, if it was allocated with malloc; this plugs a memory
2456 leak. Remove casts from void * to pointers, that are no longer
2457 needed now that we're assuming C89 or better.
2459 Merge error changes from glibc.
2461 * error.c, error.h: Update copyright notice header to match glibc.
2462 * error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
2463 (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
2464 Disable cancellation while printing error.
2465 * error.h: Prepend __ to parameter names.
2467 2003-09-25 Karl Berry <karl@gnu.org>
2469 * argp-fmtstream.c, argp-help.c: update from libc.
2471 2003-09-25 Bruno Haible <bruno@clisp.org>
2473 * version-etc-2.h: New file, from version-etc.h with modifications.
2474 * version-etc-2.c: New file, from version-etc.c with modifications.
2476 2003-09-25 Simon Josefsson <jas@extundo.com>
2478 * xgetdomainname.h: New file.
2479 * xgetdomainname.c: New file.
2481 2003-09-25 Simon Josefsson <jas@extundo.com>
2482 Bruno Haible <bruno@clisp.org>
2484 * getdomainname.h: New file.
2485 * getdomainname.c: New file.
2487 2003-09-24 Paul Eggert <eggert@twinsun.com>
2489 * linebuffer.c (freebuffer): Don't free the argument, just
2490 the buffer associated with the argument. Bug reported by
2493 2003-09-19 Karl Berry <karl@gnu.org>
2495 * argp.h: update from libc.
2497 2003-09-16 Paul Eggert <eggert@twinsun.com>
2499 * linebuffer.c (readlinebuffer): Return NULL immediately upon
2500 input error, instead of returning NULL the next time we are called
2501 (and therefore losing track of errno).
2503 2003-09-15 Paul Eggert <eggert@twinsun.com>
2505 * getndelim2.c (getndelim2): Don't trash errno when a read
2506 fails, so that the caller gets the proper errno.
2508 * readutmp.c (read_utmp): Likewise.
2509 Check for fstat error. Close stream and free storage
2512 2003-09-14 Bruno Haible <bruno@clisp.org>
2514 * fwriteerror.h: New file.
2515 * fwriteerror.c: New file.
2517 2003-09-14 Jim Meyering <jim@meyering.net>
2519 * getloadavg.c: Correct cpp indentation.
2520 * strdup.c: Likewise.
2521 * vasnprintf.c: Likewise.
2523 2003-09-12 Paul Eggert <eggert@twinsun.com>
2525 * argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
2526 * obstack.c [!defined _LIBC]: Likewise.
2527 * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
2528 * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
2529 * exitfail.c: Don't include stdlib.h; no longer needed.
2531 More changes to assume C89 or better.
2533 * error.c (error_tail): Assume vprintf.
2535 * argmatch.c (getenv): Remove decl.
2536 * progreloc.c (get_full_program_name): Define via prototype.
2537 * setenv.c (clearenv): Likewise.
2538 * stpncpy.c: Do not include <string.h> or <sys/types.h>; not
2540 * strdup.c: Include <stdlib.h>, <string.h> unconditionally.
2541 (malloc, memcpy): Remove decls.
2542 * strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
2543 (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
2544 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
2545 (memcpy): Remove macro.
2546 (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
2547 (__P): Remove. All uses removed.
2548 (PTR): Remove. All uses changed to void *.
2549 (CHAR_BIT, NULL): Remove.
2550 (spaces, zeros, memset_space, memset_zero)
2551 [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
2553 (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
2554 (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
2555 Define with prototype.
2556 Remove now-unnecessary prototype decl.
2557 (extra_args_spec): Assume ANSI C. All uses changed.
2558 (extra_args_spec_iso): Remove.
2559 (my_strftime, emacs_strftimeu): Define via prototype.
2560 * strtod.c: Include <float.h>, <stdlib.h>, <string.h>
2562 (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
2563 * strtoimax.c: Include <stdlib.h> unconditionally.
2564 (strtoul, strtol): Remove decls.
2565 * strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
2567 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
2568 (LOCALE_PARAM_DECL): Remove. All uses changed to LOCALE_PARAM_PROTO.
2569 (LOCALE_PARAM_PROTO): New macro.
2570 (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
2571 (INTERNAL (strtol), strtol): Define with a prototype.
2572 (PARAMS): Remove. All uses removed.
2573 * tempname.c: Include <string.h> unconditionally.
2574 * userspec.c: Include <stdlib.h>, <string.h> unconditionally.
2575 * xgethostname.c (main): Define with a prototype.
2576 * xmalloc.c: Include "xalloc.h" first, to check interface.
2577 Include <stdlib.h> unconditionally.
2578 (calloc, malloc, realloc, free): Remove decls.
2579 * xstrtod.c: Include "xstrtod.h" first, to check interface.
2580 Include <stdlib.h> unconditionally. Sort include file names.
2582 (xstrtod): Define with a prototype.
2583 * xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
2584 (strtol, strtoul): Remove decls.
2586 2003-09-11 Paul Eggert <eggert@twinsun.com>
2588 * strndup.c: Don't include <stdio.h>, <sys/types.h>.
2589 Include <stdlib.h>, <string.h> unconditionally.
2590 Remove now-unnecessary cast to char *.
2591 * strnlen.c: Include <string.h> unconditionally.
2592 * yesno.c (yesno): Define with a prototype.
2594 2003-09-10 Bruno Haible <bruno@clisp.org>
2596 * strcspn.c: Include <string.h> unconditionally.
2597 * strpbrk.c: Include <string.h> unconditionally.
2598 * strstr.c: Include <string.h> unconditionally.
2599 * unicodeio.c: Include <string.h> unconditionally.
2600 * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
2601 * unsetenv.c: Likewise.
2602 * xreadlink.c: Include <stdlib.h> unconditionally.
2603 * yesno.c: Include <stdlib.h> unconditionally.
2604 (rpmatch): Add prototype.
2606 2003-09-10 Jim Meyering <jim@meyering.net>
2608 * error.c: Correct indentation of cpp directives.
2610 2003-09-09 Paul Eggert <eggert@twinsun.com>
2614 * acosl.c (main): Use a prototype.
2615 * asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
2618 * getloadavg.c (getloadavg, main): Define via prototypes.
2620 * getopt.h (struct option.name): Assume C89, and use 'const'.
2621 (getopt, etopt_long, getopt_long_only, _getopt_internal)
2622 [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
2624 * getopt.c (const): Remove macro.
2625 Include <string.h> unconditionally.
2626 (my_index): Remove; all uses changed to strchr.
2627 (strlen): Remove decl.
2628 (exchange): Remove forward decl; no longer needed.
2629 (exchange, _getopt_initialize, _getopt_internal, getopt, main):
2630 Define with prototype.
2631 * getopt1.c (const): Remove macro.
2632 (getopt_long, getopt_long_only, main): Define with prototype.
2634 * getugroups.c: Include <string.h> unconditionally.
2636 * getusershell.c: Include <stdlib.h> unconditionally.
2637 (getusershell, setusershell, endusershell, readname, main):
2638 Define with prototypes.
2640 * group-member.c: Include group-member.h first.
2641 Include <stdlib.h> unconditionally.
2643 * hard-locale.c: Include hard-locale.h first.
2644 Include <stdlib.h>, <string.h> unconditionally.
2646 * hash.c (free, malloc): Remove decls.
2647 Include <stdlib.h> unconditionally.
2649 * human.c: Include <stdlib.h>, <string.h> unconditionally.
2650 (getenv): Do not declare.
2652 * idcache.c: Include <string.h> unconditionally.
2654 * long-options.c: Include long-options.h first, to test interface.
2655 Include <stdlib.h> unconditionally.
2657 * makepath.c: Include makepath.h first, to test interface.
2658 Include <stdlib.h> and <string.h> unconditionally.
2660 * linebuffer.c: Include <stdlib.h>.
2661 (free): Remove decl.
2663 * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h.
2664 rpl_malloc returns void *, not char *.
2665 * realloc.c (rpl_realloc): Likewise. Also, define with a prototype.
2667 * md5.h: Include <limits.h> unconditionally.
2668 (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
2669 (__P): Remove; all uses removed.
2670 * md5.c: Include "md5.h" first.
2671 (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
2672 md5_buffer, md5_process_bytes, md5_process_block):
2673 Define with prototypes.
2674 * sha.h (__P): Remove all uses. (It wasn't defined??)
2675 * sha.c: Include "sha.h" first.
2676 Include <stdlib.h>, <string.h> unconditionally.
2678 * memchr.c (__ptr_t): Remove; all uses changed to void *.
2679 * memcmp.c (__ptr_t): Likewise.
2680 * memrchr.c (__ptr_t): Likewise.
2681 * memchr.c, memcmp.c, memcoll.c, memrchr.c:
2682 Include <string.h> unconditionally.
2683 * memchr.c, memrchr.c: Include <limits.h> unconditionally.
2684 * memchr.c: Include <stdlib.h> unconditionally.
2685 * memchr.c (LONG_MAX): Remove.
2686 * memrchr.c (LONG_MAX): Likewise.
2687 * memchr.c (__memchr): Define via a prototype.
2688 * memrchr.c (__memrchr): Likewise.
2689 * memcmp.c (__P): Remove, and remove all uses.
2690 (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
2691 Remove forward decls; no longer needed.
2692 * memcpy.c, memmove.c, memset.c: Include <stddef.h>.
2693 Use types required by C89 in prototype.
2695 * mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
2696 * savedir.c: Likewise.
2697 * mkdir.c (free): Remove decl.
2698 * rmdir.c (rmdir): Define with a prototype.
2699 * savedir.c: Include savedir.h first, to test interface.
2701 * mktime.c (STDC_HEADERS): Remove.
2702 Include <stdlib.h>, <string.h> unconditionally.
2704 * modechange.c: Include <stdlib.h> unconditionally.
2705 (malloc): Remove decl.
2707 * mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
2708 (free): Remove decl.
2710 * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
2711 Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
2712 (This type really should be intptr_t, but that's a C99ism.)
2713 (_obstack_memcpy): Remove: all uses changed to memcpy.
2714 Include <string.h> unconditionally.
2715 (struct obstack): Assume __STDC__ for types of members
2716 chunkfun, freefun, extra_arg.
2717 (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
2718 _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
2719 obstack_begin, obstack_specify_allocation,
2720 obstack_specify_allocation_with_arg, obstack_chunkfun,
2721 obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
2722 Remove unprototyped decls and the macros that use them.
2723 * obstack.c (POINTER): Remove. All uses changed to void *.
2724 (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
2725 _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
2726 (defined __STDC__ && __STDC__)]:
2727 Remove nonprototyped code.
2728 Include <stdlib.h> unconditionally.
2729 (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
2730 _obstack_allocated_p, _obstack_free, obstack_free,
2731 _obstack_memory_used, print_and_abort):
2732 Define using prototypes.
2733 (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
2734 obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
2735 obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
2736 obstack_next_free, obstack_object_size, obstack_room) [0]:
2737 Remove unused, unprototyped code.
2739 * path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
2741 * physmem.c (physmem_total, physmem_available, main): Define
2744 * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
2745 (main): Define with a prototype.
2747 * posixver.c (getenv): Remove decl.
2749 * putenv.c (malloc): Returns void *, not char *.
2750 Include <string.h> unconditionally.
2751 (strchr, memcpy, NULL): Do not define.
2753 * readtokens.c: Include readtokens.h first, to test interface.
2754 Include <stdlib.h>, <string.h> unconditionally.
2755 (init_tokenbuffer): Define with a prototype.
2757 * regex.c (PARAMS): Remove. All uses removed.
2758 All uses of _RE_ARGS removed, too.
2759 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
2761 (bzero): Assume memset exists.
2762 (memcmp, memcpy, NULL): Remove.
2763 (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
2764 char, or assignments to local vars of type signed char.
2765 (init_syntax_once, PREFIX(extract_number_and_incr),
2766 PREFIX(print_partial_compiled_pattern),
2767 PREFIX(print_compiled_pattern), PREFIX(print_double_string),
2768 convert_mbs_to_wcs, print_fastmap, re_set_syntax,
2769 PREFIX(regex_grow_registers), PREFIX(regex_compile),
2770 PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
2771 PREFIX(insert_op2), PREFIX(at_begline_loc_p),
2772 PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
2773 wcs_compile_range, byte_compile_range, truncate_wchar,
2774 PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
2775 re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
2776 count_mbs_length, wcs_re_match_2_internal,
2777 byte_re_match_2_internal, PREFIX(group_match_null_string_p),
2778 PREFIX(alt_match_null_string_p),
2779 PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
2780 re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
2781 regfree, PREFIX(extract_number)): Define with prototype. Remove
2782 now-unnecessary declaration, if any.
2783 (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
2785 Remove now-unnecessary casts among pointer types.
2786 * regex.h (_RE_ARGS): Remove. All uses removed.
2788 * rename.c: Include <stdlib.h>, <string.h> unconditionally.
2789 (free): Remove decl.
2791 * rpmatch.c: Include <stdlib.h> unconditionally.
2793 * same.c: Include <stdlib.h>, <string.h> unconditionally.
2794 (free): Remove decl.
2796 * save-cwd.c: Include <stdlib.h> unconditionally.
2797 * xgetcwd.c: Likewise.
2799 * stat.c: Include <stdlib.h>, <string.h> unconditionally.
2800 (free): Remove decl.
2802 * strchrnul.c (strchrnul): Define with a prototype.
2803 Fix bug: c_in was not converted to char before searching.
2805 The following changes are not K&R related:
2807 * group-member.h: Include <sys/types.h>, so that this file is
2809 * makepath.h: Likewise.
2811 * getusershell.c (readname, default_index, line_size, readname):
2812 Use size_t, not int, for sizes.
2813 (readname): If the size overflows, report an error instead of
2816 2003-09-09 Derek Robert Price <derek@ximbiot.com>
2818 * getndelim2.c: Assume stdlib.h per the C89 spec.
2820 2003-09-08 Paul Eggert <eggert@twinsun.com>
2822 Assume C89 or better; remove K&R cruft.
2823 A few of these changes were first proposed by Derek Robert Price
2824 in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
2826 * addext.c: Include <string.h> unconditionally.
2827 * backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
2828 Don't declare getenv or malloc.
2830 * alloca.c: Include <string.h>, <stdlib.h> unconditionally.
2831 (POINTER_TYPE, pointer): Remove; all uses changed to void *.
2833 (find_stack_direction, alloca): Use prototypes.
2835 * atexit.c (atexit): Define using a prototype.
2837 * basename.c, dirname.c, stripslash.c:
2838 Include <string.h> unconditionally.
2840 * bcopy.c: Include <stddef.h>.
2841 (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
2843 * canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
2845 * error.h (error, error_at_line, error_print_progname)
2846 [! (defined (__STDC__) && __STDC__)]: Remove decls.
2847 * error.c: Include error.h first, to check interface.
2848 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
2849 (VA_START): Remove; all uses changeed to va_start.
2850 (exit, strerror): Remove decls.
2851 (error_print_progname): Prototype uncondionally.
2852 Don't include <errno.h>; no longer needed.
2853 (private_strerror): Remove.
2854 (error_tail): Always define.
2855 (error, error_at_line): Assume C89 or better; always use prototypes.
2856 * fatal.c: Include "fatal.h" first, to test interface.
2857 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
2858 (VA_START): Remove; all uses changed to va_start.
2859 [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
2861 (exit): Remove decl.
2862 (fatal): Prototype unconditionally. Assume va_start works.
2863 Abort at end, to pacify gcc.
2865 * euidaccess.c (main): Define with a prototype.
2867 * exclude.c: Include <stdlib.h>, <string.h> unconditionally.
2869 * exitfail.c: Include <stdlib.h> unconditionally.
2871 * fnmatch_.h (__P): Remove. All uses changed to assume
2873 * fnmatch.c: Include fnmatch.h first, to test interface.
2874 Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
2875 (getenv): Remove decl.
2876 (fnmatch): Define using a prototype.
2877 * fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
2878 (FCT): Define using a prototype.
2880 * getdate.y: Include <stdlib.h>, <string.h> unconditionally.
2882 * gethostname.c: Include <stddef.h>.
2883 (gethostname): Define with prototype. Length is size_t, not int.
2885 2003-09-08 Paul Eggert <eggert@twinsun.com>
2887 * getversion.c: Remove; was migrated to backupfile.c in 1997.
2888 getversion.c should have been removed then, but was accidentally
2891 * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
2892 (utime_null): Fix typo: 'st' was sometimes called 'sb'.
2894 2003-09-07 Paul Eggert <eggert@twinsun.com>
2896 * time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
2897 copy_tm_result. Bug reported by Simon Josefsson in
2898 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
2900 2003-09-06 Paul Eggert <eggert@twinsun.com>
2902 * time_r.c, time_r.h: New files.
2904 * mktime.c (my_mktime_localtime_r): Remove; all uses changed to
2906 (__localtime_r) [!defined _LIBC]: New macro. Include <time_r.h>.
2907 (__mktime_internal) [!defined _LIBC]: Now extern, not static.
2909 * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
2911 (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
2912 (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
2915 * timegm.c: Switch to glibc implementation, with the following changes:
2916 [defined HAVE_CONFIG_H]: Include <config.h>.
2917 [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
2918 (__mktime_internal) [!defined _LIBC]: New decl.
2919 (__gmtime_r) [!defined _LIBC]: New macro and function.
2920 (timegm): Use a prototype, since gnulib assumes C89.
2921 Do not bother declaring tmp to be const, as it's not really usefu.
2922 * timegm.h: Hoist "#include <time.h>" out of #ifdef.
2923 (timegm): Declare only if HAVE_DECL_TIMEGM.
2925 2003-09-03 Paul Eggert <eggert@twinsun.com>
2927 * human.c (human_readable): Fix bug that rounded 10501 to 10k.
2928 Bug reported by Lute Kamstra in
2929 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
2931 * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
2932 "yesterday", "today", and "now" rather than tMINUTE_UNIT. Of
2933 course with correspondingly smaller numbers for tomorrow and
2934 yesterday. From Tadayoshi Funaba. Originally installed into
2935 sh-utils on 1999-08-07, but the patch got lost (I guess during the
2938 2003-08-31 Simon Josefsson <jas@extundo.com>
2940 * timegm.h: New file.
2941 * timegm.c: New file. Based on wget-1.8.2/src/http.c:mktime_from_utc.
2943 2003-08-31 Karl Berry <karl@gnu.org>
2945 * argp.h: update from libc.
2947 2003-08-28 Bruno Haible <bruno@clisp.org>
2949 * binary-io.h: Undefine O_BINARY before defining it. This avoids a
2950 warning on QNX, which defines O_BINARY to 000000.
2952 2003-08-24 Bruno Haible <bruno@clisp.org>
2954 * binary-io.h: Include <stdio.h>, to avoid a compilation error when
2955 MSVC7 <stdio.h> is included later.
2957 2003-08-20 Bruno Haible <bruno@clisp.org>
2959 * progname.h: New file, from GNU gettext.
2960 * progname.c: New file, from GNU gettext.
2961 * progreloc.c: New file, from GNU gettext.
2963 2003-08-19 Bruno Haible <bruno@clisp.org>
2965 * xstrdup.c: Assume <string.h> exists.
2967 2003-08-18 Jim Meyering <jim@meyering.net>
2969 * setenv.h: Indent nested cpp directive.
2970 * vasnprintf.c: Remove trailing blanks.
2972 2003-08-17 Simon Josefsson <jas@extundo.com>
2973 Bruno Haible <bruno@clisp.org>
2975 * xstrndup.h: New file.
2976 * xstrndup.c: New file.
2978 2003-08-17 Bruno Haible <bruno@clisp.org>
2980 * strndup.h: New file.
2982 2003-08-16 Paul Eggert <eggert@twinsun.com>
2984 * regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
2985 space, undoing this 2003-08-12 change:
2986 <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
2988 2003-08-16 Jim Meyering <jim@meyering.net>
2990 Merge from coreutils.
2991 * xstrtoimax.c: #else #if -> #elif.
2992 * xstrtoumax.c: Likewise.
2994 2003-08-15 Paul Eggert <eggert@twinsun.com>
2996 * config.charset, ref-add.sin, ref-del.sin: Use three spaces,
2997 rather than tab, after '#' in shell-script copyright notices.
2998 Suggested by Bruno Haible.
3000 2003-08-15 Jim Meyering <jim@meyering.net>
3001 and Paul Eggert <eggert@twinsun.com>
3003 Merge from coreutils.
3004 * readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
3005 member but strut utmpx does not. Needed for AIX 4.3.3.
3006 (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
3008 2003-08-15 Jim Meyering <jim@meyering.net>
3010 Merge from coreutils.
3011 * xgethostname.c: Include <stdlib.h>.
3012 (xghostname): Don't exit for anything other than memory-related
3013 failure; just return NULL.
3014 * userspec.c: Include "posixver.h".
3015 (parse_user_spec): Accept `.' as a separator only
3016 in pre-POSIX-200112 mode.
3017 * strtoimax.c: Use #elif rather than #else #if.
3018 * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
3019 Remove function, now that we can rely on a working tzset function.
3020 [!_LIBC]: Ensure that the required autoconf test has been run.
3021 [!defined _NL_CURRENT && HAVE_STRFTIME]:
3022 Use underlying_strftime for %r.
3023 * sha.c: Merge in some clean-up and optimization changes from glibc.
3024 * sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
3025 Ensure that it is a multiple of 64.
3026 Rearrange loop exit tests so as to avoid performing an
3027 additional fread after encountering an error or EOF.
3028 * realloc.c: Update copyright date.
3030 2003-08-14 Jim Meyering <jim@meyering.net>
3032 Merge from coreutils.
3033 * obstack.h: Whitespace changes.
3034 * mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
3035 and xcalloc return values.
3036 (read_filesystem_list) [MOUNTED_GETFSSTAT]:
3037 Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could
3038 hang on OSF/1 5.1 for DIR on both local and remote file systems.
3039 Reported by (and fix confirmed by) Nelson H. F. Beebe.
3040 (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
3042 Use mntctl's return value to drive the entry-processing loop, since
3043 we can't rely on the value of the vmt_length member in the last
3044 entry. On some systems doing so could result in exhausting
3045 virtual memory. Based in part on a patch from Mike Jetzer.
3047 2003-08-14 Jim Meyering <jim@meyering.net>
3048 and Paul Eggert <eggert@twinsun.com>
3050 Merges from coreutils, plus other fixes.
3051 * physmem.c: Merge in portability changes from gcc/libiberty
3052 to support AIX, IRIX, Tru64, and Windows. See the ChangeLog there
3053 for credits and details. Thanks to Kaveh Ghazi for helping
3054 to keep these files in sync.
3055 (ARRAY_SIZE): Define it.
3056 (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
3057 * memcasecmp.c: Remove unnecessary parentheses after 'defined'.
3058 (memcasecmp): Don't assume size_t fits in unsigned int.
3059 Remove casts and duplicate code.
3060 * md5.c: Include <string.h> and <stdlib.h> unconditionally.
3061 (memcpy): Remove definition.
3062 Merge in some clean-up and optimization changes from glibc.
3063 [BLOCKSIZE]: Move definition to top of file.
3064 Ensure that it is a multiple of 64.
3065 Rearrange loop exit tests so as to avoid performing an
3066 additional fread after encountering an error or EOF.
3067 * md5.h (md5_uintptr): Define.
3068 * makepath.c (CLEANUP_CWD): Report an error if we failed to
3069 return to the initial working directory. Preserve errno
3071 * idcache.c: Include "xalloc.h".
3072 (xmalloc, xrealloc): Remove decls.
3073 (getuser): Remove casts no longer required in C89.
3074 * human.c: Include stdio.h, for sprintf.
3075 * group-member.c: Include "xalloc.h".
3076 (xmalloc, xrealloc): Remove decls.
3077 (get_group_info): Remove casts no longer required in C89.
3078 * getusershell.c (readname): Remove casts no longer required in C89.
3079 * gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
3080 * getline.c: Whitespace fix, from coreutils.
3082 2003-08-13 Paul Eggert <eggert@twinsun.com>
3084 * exclude.c: Include <ctype.h>
3085 (IN_CTYPE_DOMAIN): New macro.
3087 (add_exclude_file): If LINE_END is a space, ignore trailing spaces
3090 * argp-help.c, argp-parse.c, config.charset, getopt.h:
3091 Undo previous (whitespace-only) change.
3093 2003-08-12 Paul Eggert <eggert@twinsun.com>
3095 * argp-help.c, argp-parse.c, config.charset, getopt.h:
3096 Normalize leading white space and remove trailing white space.
3097 * ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
3098 notice, as per ../config/srclist-update.
3100 Merge from coreutils.
3101 * euidaccess.h: New file.
3102 * euidaccess.c: Include it.
3103 * .cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
3104 vasnprintf.h, vasprintf.h. Remove strdup.c, gettext.h.
3105 * regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
3107 2003-08-11 Bruno Haible <bruno@clisp.org>
3109 * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
3110 (vasnprintf): Use it instead of wcslen.
3112 2003-08-11 Bruno Haible <bruno@clisp.org>
3114 * stdbool_.h (_Bool): Undo last change; instead use a negative enum
3115 value to ensure that _Bool promotes to int. Use #define for _Bool when
3116 using the Solaris C compiler. Adds comments suggested by Paul Eggert.
3118 2003-08-10 Karl Berry <karl@gnu.org>
3120 * regex.h: update from libc (whitespace fix).
3122 2003-08-09 Paul Eggert <eggert@twinsun.com>
3124 Merge some files from coreutils. These changes were
3125 originally made by Jim Meyering.
3126 * acl.c: Include <sys/types.h> before <sys/stat.h>;
3127 many older Unixes require this.
3128 * alloca.c (alloca): Remove cast to argument of free;
3129 no longer needed in C89.
3130 * alloca_.h, regex.h: Fix white space to match
3131 what GNU indent does.
3133 2003-08-05 Paul Eggert <eggert@twinsun.com>
3135 * bumpalloc.h: Remove.
3137 2003-08-04 Paul Eggert <eggert@twinsun.com>
3139 * getloadavg.c: Change copyright notice and spacing to conform to
3142 Merge from coreutils.
3143 * error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
3145 * getdate.y (date): Also accept dates like May-23-2003; suggestion
3146 from Karl Berry, implemented by Jim Meyering.
3147 * getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
3148 from Dmitry V. Levin.
3149 Remove anachronistic cast of xrealloc.
3150 * fnmatch_.h (__const): Remove. Use 'const'.
3151 * fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
3152 type. Otherwise, it wouldn't compile with at least /bin/cc on
3153 ymp-cray-unicos9.0.2.X.
3154 Combine two mostly-identical uses of alloca into one.
3155 Thanks to the Cray-Cyber project for access to a Cray Y-MP.
3157 2003-08-04 Dave Love <d.love@dl.ac.uk>
3161 * getloadavg.c: Check `__unix' as well as `unix'. Use #ifdef, not
3162 #if. Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE. Check
3163 F_SETFD, not FD_SETFD. Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
3164 obsolete NLIST_NAME_UNION.
3165 [__GNU__]: Undef BSD and FSCALE.
3166 [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
3168 2003-08-03 Paul Eggert <eggert@twinsun.com>
3170 * stdbool_.h (_Bool): Make it signed char, instead of
3171 an enum type, so that it's guaranteed to promote to int. See:
3172 <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
3174 2003-07-31 Paul Eggert <eggert@twinsun.com>
3176 * strerror.c: Include config.h, limits.h. Declare sprintf.
3177 (strerror): Don't assume that a printable int fits in 14 bytes.
3179 2003-07-24 Derek Robert Price <derek@ximbiot.com>
3180 Bruno Haible <bruno@clisp.org>
3182 * getline.h (getline, getdelim): Change return type to ssize_t.
3183 * getline.c (getline, getdelim): Likewise.
3184 Remove _GNU_SOURCE define; now it's defined in config.h through
3187 2003-07-22 Paul Eggert <eggert@twinsun.com>
3189 * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
3190 over-parenthesization in macros.
3192 Sync with coreutils.
3194 * xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
3197 Use `exit_failure' for xalloc and xmemcoll instead of their own
3198 private exit-failure variables.
3199 * xalloc.h (xalloc_exit_failure): Remove.
3200 * xmalloc.c: Likewise. Include exitfail.h.
3201 (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
3202 * xmemcoll.h (xmemcoll_exit_failure): Remove.
3203 * xmemcoll.c: Likewise. Include exitfail.h.
3204 (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
3206 2003-07-18 Paul Eggert <eggert@twinsun.com>
3208 * closeout.h (close_stdout_set_status, close_stdout_status): Remove.
3209 * closeout.c: Likewise. Include "closeout.h" right after config.h,
3210 to test that it can stand by itself. Include "exitfail.h".
3211 Clients should set exit_failure instead.
3212 (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
3214 2003-07-18 Andreas Schwab <schwab@suse.de>
3216 * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
3218 2003-07-18 Bruno Haible <bruno@clisp.org>
3220 * getndelim2.h: New file.
3221 * getndelim2.c: Make into a module of its own. Include config.h,
3223 (getndelim2): Make non-static. Change return type to ssize_t.
3224 * getline.h: Change argument names.
3225 * getline.c: Include getndelim2.h instead of getndelim2.c.
3226 * getnline.c: Include getndelim2.h.
3228 2003-07-17 Bruno Haible <bruno@clisp.org>
3230 * Makefile.am: Remove file.
3231 * Makefile.in: Remove file.
3233 2003-07-17 Bruno Haible <bruno@clisp.org>
3235 * getnline.h: New file.
3236 * getnline.c: New file.
3237 * getndelim2.c: New file, extracted from getline.c.
3238 (getndelim2): Renamed from getdelim2, with added nmax argument.
3239 * getline.c: Include getndelim2.c.
3240 (getdelim2): Moved out to getndelim2.c.
3241 (getline, getdelim): Update.
3243 2003-07-15 <karl@gnu.org>
3245 * vasnprintf.c: update from gettext.
3247 2003-07-15 Jim Meyering <jim@meyering.net>
3249 * makepath.c (make_path): Enclose diagnostic in _(...).
3251 2003-07-14 Paul Eggert <eggert@twinsun.com>
3253 * asnprintf.c, asprintf.c, config.charset, gettext.h,
3254 localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
3255 printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
3256 ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
3257 vasprintf.c, vasprintf.h: Regenerate. These files are now being
3258 updated automatically by ../config/srclist-update. This changes
3259 their license from LPGL to GPL.
3261 2003-07-14 Jim Meyering <jim@meyering.net>
3263 Don't emit diagnostics. Let callers do that.
3264 * save-cwd.c: Don't include "error.h".
3265 (save_cwd): Don't call error. Ensure that errno is valid
3266 when returning nonzero.
3268 * save-cwd.h (restore_cwd): Update prototype.
3269 * save-cwd.c (restore_cwd): Remove two parameters.
3270 Simplify. Don't call error upon failure. Let callers do that.
3271 (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
3272 when auditing is enabled. But don't bother updating the #if.
3274 2003-07-14 Simon Josefsson <jas@extundo.com>
3276 * mempcpy.h: New file.
3277 * mempcpy.c: New file.
3279 2003-07-14 Paul Eggert <eggert@twinsun.com>
3281 * ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
3282 sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
3283 unicodeio.c, unicodeio.h, unlocked-io.h:
3284 Switch from LGPL to GPL.
3286 2003-07-11 Alexandre Duret-Lutz <adl@gnu.org>
3288 * obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
3289 it breaks C++ compilation.
3290 [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
3292 2003-07-10 Jim Meyering <jim@meyering.net>
3294 * vasnprintf.c: Remove trailing blanks.
3295 Make cpp indentation consistent.
3297 2003-07-09 Paul Eggert <eggert@twinsun.com>
3299 * alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
3300 posixver.c, strftime.c, strnlen.c, strverscmp.c:
3301 Switch from LGPL to GPL.
3303 2003-07-07 Paul Eggert <eggert@twinsun.com>
3305 * mktime.c: Fix some boundary cases and remove need for floating point.
3307 Issue a compile-time diagnostic if time_t is floating point, or if
3308 two's complement arithmetic is not in effect, or if arithmetic
3309 right shift does not propagate the sign. These assumptions were
3310 all in the original code but they weren't checked.
3312 (TIME_T_MIDPOINT, verify): New macros.
3313 (__isleap): Remove; it has integer overflow problems.
3314 (leapyear): New function, without those problems.
3315 (ydhms_tm_diff): Remove; splitting into two parts.
3316 (ydhms_diff): New function, containing the arithmetic part of
3317 the old ydhms_tm_diff function. Issue a compile-time
3318 diagnostic if we are not using C99 integer division.
3319 Avoid casts when possible.
3320 (guess_time_tm): New function, containing the checking part of
3321 the old ydhms_tm_diff function. Return the new value, rather than
3322 the difference between it and the old. Accept a new argument T
3323 so that *T specifies the old value. Check for overflow in the result.
3325 (__mktime_internal): Use a time_t offset, not a long int offset.
3326 This undoes the 2003-06-04 change, which is no longer needed now
3327 that we have better overflow checking.
3328 (localtime_offset): Likewise.
3330 (__mktime_internal): Avoid harmful overflow on hosts where time_t
3331 and long are 64-bit but int is only 32-bit.
3332 (ydhms_diff): Use long int to store year1 and yday1.
3333 Issue a compile-time diagnostic if long int is not wide enough.
3335 (__mktime_internal): Use long int to store adjusted year and yday.
3336 Use plain C rather than preprocessor commands, if that doesn't
3338 Check for overflow (and try to repair) after each probe
3339 rather than checking only at the very end. This avoids some bugs
3340 (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
3341 does not equal GMT offset at maximum time).
3342 Use integer to check for overflow rather than floating point; this
3343 is more portable to non-IEEE hosts, and is a tad faster.
3344 When we detect that we are oscillating between two values,
3345 don't check whether tm_isdst has the requested value, since
3346 we already know the answer. When tm_isdst has the wrong value,
3347 use a different heuristic to find the right one, based on the
3348 extreme values actually observed in practice in tz2003a,
3349 rather than the (overly optimistic) "previous 3 calendar quarters".
3351 (not_equal_tm, print_tm, check_result): Use "const T" rather than
3352 "T const" to accommodate glibc style.
3353 (check_result): Use less-confusing report format. "long" -> "long int.
3355 Don't loop if the iteration overflows time_t.
3356 Allow a negative step in the iteration.
3358 2003-07-01 Paul Eggert <eggert@twinsun.com>
3360 * xreadlink.c: Include <sys/types.h> unconditionally, instead of
3361 having it depend on HAVE_SYS_TYPES_H.
3363 2003-06-25 Bruno Haible <bruno@clisp.org>
3365 * readlink.c: New file.
3367 2003-06-20 Bruno Haible <bruno@clisp.org>
3369 Assume C89, so PARAMS isn't needed.
3370 * unicodeio.h (PARAMS): Remove.
3371 * unicodeio.c: Don't use PARAMS.
3373 2003-06-18 Jim Meyering <jim@meyering.net>
3375 Merge changes from coreutils.
3376 * readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
3377 Remove explicit declarations of xmalloc and realloc.
3379 (read_utmp): Remove anachronistic cast of xmalloc.
3381 2003-06-17 Paul Eggert <eggert@twinsun.com>
3383 Assume C89, so PARAMS isn't needed.
3384 * backupfile.h (PARAMS): Remove. All uses removed.
3385 * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
3386 group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
3387 makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
3388 path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
3389 save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
3390 unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
3391 xstrtol.h: Likewise.
3392 * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h,
3393 same.h, strverscmp.h: Do not include config.h; no longer needed.
3394 Anyway, config.h should always be included before any other file.
3396 2003-06-11 Simon Josefsson <jas@extundo.com>
3398 * sysexit_.h: New file.
3400 2003-05-20 Derek Price <derek@ximbiot.com>
3402 * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
3404 2003-06-10 Simon Josefsson <jas@extundo.com>
3406 * strchrnul.h: New file.
3407 * strchrnul.c: New file.
3409 2003-06-10 Simon Josefsson <jas@extundo.com>
3411 * argp.h: New file, from glibc.
3412 * argp-ba.c: New file, from glibc.
3413 * argp-eexst.c: New file, from glibc.
3414 * argp-fmtstream.c: New file, from glibc.
3415 * argp-fmtstream.h: New file, from glibc.
3416 * argp-fs-xinl.c: New file, from glibc.
3417 * argp-help.c: New file, from glibc.
3418 * argp-namefrob.h: New file, from glibc.
3419 * argp-parse.c: New file, from glibc.
3420 * argp-pv.c: New file, from glibc.
3421 * argp-pvh.c: New file, from glibc.
3422 * argp-xinl.c: New file, from glibc.
3424 2003-06-07 Jim Meyering <jim@meyering.net>
3426 * readtokens.h: Put `Free Software Foundation, Inc.'
3427 in place of my name in the copyright comment.
3428 Remove definition and uses of __P.
3431 * stat.c: Don't declare xmalloc explicitly.
3432 Instead, include "xalloc.h".
3433 * readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
3434 xrealloc, and xcalloc return values.
3435 * xgetcwd.c (xgetcwd): Include "xgetcwd.h".
3437 * xgetcwd.h: Remove definition/uses of PARAMS.
3439 2003-06-06 Jim Meyering <jim@meyering.net>
3441 * stdbool_.h: Renamed from stdbool.h.in.
3443 2003-06-06 Jim Meyering <jim@meyering.net>
3445 Merge from coreutils.
3446 * same.c: (same_name): Declare *_basename locals to be `const'.
3447 Consolidate declarations and initializations of *_base* locals.
3449 Merge from coreutils.
3450 This avoids a core dump on systems without GNU putenv,
3451 when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
3452 * putenv.c (__set_errno, LOCK, UNLOCK): Define.
3453 (unsetenv): New static function, from GNU libc.
3454 (rpl_putenv): Use it.
3456 * modechange.c: Remove trailing blanks.
3458 Merge from coreutils.
3459 * fsusage.c: Remove declaration of statfs.
3460 It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
3462 * posixtm.c: Include <stdbool.h> unconditionally.
3464 2003-06-05 Paul Eggert <eggert@twinsun.com>
3466 * mktime.c (__mktime_internal): When resolving a tm_isdst
3467 mismatch, look in future quarters as well as past. This fixes a
3468 bug when processing fall-backwards gaps immediately after a long
3469 period of daylight-saving time.
3471 * mktime.c: Assume freestanding C89 or better.
3472 (HAVE_LIMITS_H): Remove. Assume it's 1.
3473 (__P): Remove; not used.
3474 (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
3475 (mktime, not_equal_tm, print_tm, check_result,
3476 main): Use prototypes. Use const * where appropriate.
3477 (main): Fix typo in testing code that uncovered by above changes.
3478 (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
3480 2003-06-04 Paul Eggert <eggert@twinsun.com>
3482 * mktime.c: Fix Debian bug 177940
3483 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
3484 (localtime_offset): Now long int, not time_t, because we want it
3485 to be guaranteed to be signed. All uses changed.
3486 (__mktime_internal): If overflow would occur when adding offset,
3489 Merge 'human' changes from coreutils. Rewrite to support
3490 locale-specific notations like thousands separators.
3491 * human.c: Simplify authorship notice.
3492 Include human.h immediately after config.h.
3493 <sys/types.h>, <stdio.h>: Do not include; no longer needed.
3494 <limits.h>: Do not include, since human.h does.
3495 (SIZE_MAX, UINTMAX_MAX): New macros.
3496 <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
3497 <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
3498 (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
3499 (power_letter): Renamed from suffixes.
3500 (generate_suffix_backwards): Remove.
3501 (adjust_value): Now takes int style (because of human.h changes)
3502 and long double value (for greater precision on some platforms).
3503 (group_number): New function.
3504 (human_readable): Use it. Use integer options, not enum.
3505 Put the options before the sizes in the arg list.
3506 Support all the new options.
3507 The old human_readable function has been removed;
3508 use inttostr.h instead.
3509 (human_readable, default_block_size, humblock):
3510 Use uintmax_t, not int, for block sizes.
3511 (human_readable_inexact, block_size_types): Remove.
3512 (block_size_opts): New constant.
3513 (human_options): Renamed from human_block_size, with new signature
3514 that allows block sizes up to UINTMAX_MAX. All callers changed.
3515 * human.h: Add copyright and authorship notice.
3516 Include <limits.h> and <stdbool.h> unconditionally.
3517 (PARAMS): Remove. All uses removed.
3518 (LONGEST_HUMAN_READABLE): Add support for thousands separator.
3519 (enum human_inexact_style): Remove tag; now a nameless enum.
3520 (human_floor, human_ceiling, human_round_to_even): Now have
3521 values 2, 0, 1 rather than -1, 1, 0.
3522 (human_group_digits, human_suppress_point_zero, human_autoscale,
3523 human_base_1024, human_SI, human_B): New constants.
3524 (human_readable_inexact, human_block_size): Remove.
3525 (human_readable): Size args are now uintmax_t, not int.
3526 (human_options): New decl.
3528 * exclude.c: (new_exclude, add_exclude): Remove casts that are
3529 unnecessary now that we assume C89 or better. This change
3530 imported from coreutils.
3532 * mktime.c (__mktime_internal): Do not reject negative timestamps
3533 arbitrarily. This is the same patch as 2003-05-28, but it got lost
3534 in the 2003-05-30 sync from glibc.
3536 .h files should stand alone, but we shouldn't include <sys/types.h>
3537 if we can get away with just <stddef.h>.
3539 * __fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
3540 malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
3541 rather than <sys/types.h>, as we merely need size_t.
3542 * dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
3544 * hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
3545 Include <stdio.h>, to get FILE.
3546 * memcasecmp.c: Don't include <sys/types.h>, as we can assume
3547 memcasecmp.h has included <stddef.h> and all we need is size_t.
3548 * memcoll.c: Include "memcoll.h", which gets us size_t and checks
3549 our interface, instead of including <sys/types.h>
3551 2003-06-02 Paul Eggert <eggert@twinsun.com>
3554 Fix some minor time-related bugs with POSIX time arguments.
3555 Some valid time stamps were being rejected (notably -1, and
3556 time stamps before 1900 on 64-bit hosts). And some invalid
3557 time stamps were being accepted, e.g. September 31.
3559 * posixtm.h (posixtime): Return bool instead of time_t, so
3560 that we can return (time_t) -1 successfully.
3561 * posixtm.c: Likewise.
3562 [HAVE_STDBOOL_H]: Include <stdbool.h>.
3563 (bool, false, true) [!HAVE_STDBOOL_H]: New type.
3564 (t): Remove static var.
3565 (year, posix_time_parse): Now takes struct tm * arg to modify, instead
3566 of static var. All uses changed.
3567 (year): Do not reject years before 1900; they can occur with
3569 (posix_time_parse): Do not check for out-of-range components;
3570 that is now the caller's responsibility, since our checks were
3571 only approximations.
3572 (posixtime): Use mktime to check for out-of-range components,
3573 since it knows them exactly.
3574 If mktime returns (time_t) -1, check whether an error actually occurred
3575 by invoking localtime on -1.
3576 (main) [TEST_POSIXTIME]: Check for input data errors, and report
3577 posixtime failures better.
3578 Improve the test data (in comments only).
3580 2003-05-30 <karl@gnu.org>
3582 * mktime.c: update from libc.
3584 2003-05-30 Bruno Haible <bruno@clisp.org>
3586 * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
3587 * localcharset.h: Likewise.
3588 * localcharset.c: Likewise.
3590 2003-05-28 Paul Eggert <eggert@twinsun.com>
3592 Assume the headers required for C89 freestanding compilers.
3593 * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
3594 rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
3595 without checking for HAVE_LIMITS_H.
3596 * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
3597 xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
3599 * fatal.c: Include <stdarg.h> without checking for __STDC__.
3600 * exclude.c: Include <stdbool.h> unconditionally.
3601 * tempname.c: Include <stddef.h> unconditionally.
3602 * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
3603 * modechange.c, rpmatch.c (NULL): Don't define, since
3604 <stddef.h> does that.
3605 * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
3606 * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
3607 * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
3608 * xstrtol.c: Likewise.
3609 * safe-read.c: Remove TYPE_SIGNED; no longer needed.
3610 * savedir.c: Include <stddef.h> instead of defining NULL.
3612 * addext.c (addext): Use assignment rather than cast, to avoid
3613 warnings on some platforms.
3615 * mktime.c (__mktime_internal): Do not reject negative timestamps
3618 2003-05-10 Bruno Haible <bruno@clisp.org>
3620 * linebreak.c (iconv_string_length): Don't return -1 just because the
3621 string is longer than 4 KB.
3623 2003-05-12 Jim Meyering <jim@meyering.net>
3625 * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
3626 the space-padded-by-default conversion specifiers, %e, %k, %l.
3628 2003-05-03 Bruno Haible <bruno@clisp.org>
3630 Upgrade to Unicode-4.0.
3631 * linebreak.c (nonspacing_table_data): Change width of U+00AD,
3632 U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
3633 U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
3634 U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
3635 from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
3636 (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
3637 of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
3638 Change width of U+E0100..U+E01EF from 1 to 0.
3640 2003-04-25 Bruno Haible <bruno@clisp.org>
3642 * copy-file.c: Include <stddef.h>, for size_t.
3644 2003-04-25 Jim Meyering <jim@meyering.net>
3646 * copy-file.c (copy_file_preserving): Declare buf_size to be
3647 of type size_t, not int.
3649 2003-04-11 Jim Meyering <jim@meyering.net>
3651 Merge changes from Coreutils.
3653 2003-03-22 Jim Meyering <jim@meyering.net>
3655 * strftime.c (widen): Cast alloca return value to proper type.
3657 2003-01-19 Ulrich Drepper <drepper@redhat.com>
3660 * strftime.c (my_strftime): Handle very large width
3661 specifications for numeric values correctly. Improve checks for
3664 2003-01-19 Jim Meyering <jim@meyering.net>
3666 * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
3667 (nl_get_alt_digit) [! defined my_strftime]: Define.
3668 (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
3669 _nl_get_alt_digit and _nl_get_walt_digit.
3671 * strftime.c (my_strftime): Merge in locale-related changes from libc.
3672 These changes have no effect outside of _LIBC.
3674 2003-04-10 Bruno Haible <bruno@clisp.org>
3676 * findprog.h: New file, from GNU gettext.
3677 * findprog.c: New file, from GNU gettext.
3679 2003-04-05 Jim Meyering <jim@meyering.net>
3681 Merge changes from Coreutils.
3683 * exclude.h (PARAMS): Remove definition and uses.
3684 * exclude.c: Remove uses of `PARAMS'.
3686 * dirname.c [TEST_DIRNAME]: Update build instructions for test.
3687 Add test-cases for DOS filenames. Declare program_name.
3688 (main): Set up program_name. Patch by Rich Dawe.
3690 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
3692 Use mntctl's return value to drive the entry-processing loop, since
3693 we can't rely on the value of the vmt_length member in the last
3694 entry. On some systems doing so could result in exhausting
3695 virtual memory. Based in part on a patch from Mike Jetzer.
3697 2003-04-04 Bruno Haible <bruno@clisp.org>
3699 * linebreak.h: New file, from GNU gettext.
3700 * linebreak.c: New file, from GNU gettext with slight modifications.
3701 * lbrkprop.h: New file, from GNU gettext.
3703 2003-04-03 Bruno Haible <bruno@clisp.org>
3705 * utf8-ucs4.h: New file, from GNU gettext.
3706 * utf16-ucs4.h: New file, from GNU gettext.
3707 * ucs4-utf8.h: New file, from GNU gettext.
3708 * ucs4-utf16.h: New file, from GNU gettext.
3710 2003-04-02 Bruno Haible <bruno@clisp.org>
3712 * binary-io.h: New file, from GNU gettext.
3714 2003-04-01 Bruno Haible <bruno@clisp.org>
3716 * pathname.h: New file, from GNU gettext.
3717 * concatpath.c: New file, from GNU gettext.
3719 2003-03-30 Bruno Haible <bruno@clisp.org>
3721 * copy-file.c (copy_file_preserving): Don't set owner if the function
3722 chown() doesn't exist.
3724 2003-03-28 Bruno Haible <bruno@clisp.org>
3726 * copy-file.h: New file, from GNU gettext.
3727 * copy-file.c: New file, from GNU gettext.
3729 2003-03-18 Jim Meyering <jim@meyering.net>
3731 * quote.c (quote_n): Fix typo in comment.
3733 2003-03-14 Jim Meyering <jim@meyering.net>
3735 Merge changes from Coreutils.
3736 * obstack.h (obstack_object_size): Declare temporary, __o,
3737 to be const, in order to avoid warnings.
3738 (obstack_room): Likewise.
3739 (obstack_empty_p): Likewise.
3741 2003-03-13 Paul Eggert <eggert@twinsun.com>
3743 Merge changes from Bison.
3744 * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
3745 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3746 when compiling Bison 1.875's `bitset bset = obstack_alloc
3747 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3748 * hash.c: Include <stdbool.h> unconditionally.
3750 2003-03-09 Paul Eggert <eggert@twinsun.com>
3752 * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
3753 Reported by Bruce Becker; see:
3754 http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
3756 2003-03-03 Paul Eggert <eggert@twinsun.com>
3757 Bruno Haible <bruno@clisp.org>
3759 * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
3760 Reported by John Hughes, see
3761 http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
3763 2003-02-19 Paolo Bonzino <bonzini@gnu.org>
3765 * poll_.h: New file.
3768 2003-02-18 Paolo Bonzino <bonzini@gnu.org>
3770 * mathl.h: New file.
3771 * acosl.c: New file.
3772 * asinl.c: New file.
3773 * atanl.c: New file.
3774 * ceill.c: New file.
3777 * floorl.c: New file.
3778 * frexpl.c: New file.
3779 * ldexpl.c: New file.
3781 * sincosl.c: New file.
3783 * sqrtl.c: New file.
3785 * trigl.c: New file.
3786 * trigl.h: New file.
3788 2003-02-17 Bruno Haible <bruno@clisp.org>
3790 * mkdtemp.h: New file, from GNU gettext.
3791 * mkdtemp.c: New file, from GNU gettext.
3793 2003-01-31 Bruno Haible <bruno@clisp.org>
3795 * rename.c: #undef rename before defining rpl_rename.
3796 * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
3798 2003-01-30 Bruno Haible <bruno@clisp.org>
3800 * printf-args.h: New file, from GNU gettext.
3801 * printf-args.c: New file, from GNU gettext.
3802 * printf-parse.h: New file, from GNU gettext.
3803 * printf-parse.c: New file, from GNU gettext.
3804 * vasnprintf.h: New file, from GNU gettext.
3805 * vasnprintf.c: New file, from GNU gettext.
3806 * asnprintf.c: New file, from GNU gettext.
3807 * vasprintf.h: New file, from GNU gettext with modifications.
3808 * vasprintf.c: New file, from GNU gettext.
3809 * asprintf.c: New file, from GNU gettext.
3811 2003-01-29 Bruno Haible <bruno@clisp.org>
3813 * stpncpy.h: New file, from GNU gettext with modifications.
3814 * stpncpy.c: New file, from GNU gettext with modifications.
3816 2003-01-28 Bruno Haible <bruno@clisp.org>
3818 * c-ctype.h: New file, from GNU gettext, with changes suggested by
3820 * c-ctype.c: New file, from GNU gettext, with changes suggested by
3823 2003-01-27 Bruno Haible <bruno@clisp.org>
3825 * xsetenv.h: New file, from GNU gettext.
3826 * xsetenv.c: New file, from GNU gettext.
3828 2003-01-23 Bruno Haible <bruno@clisp.org>
3830 * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
3832 2003-01-22 Bruno Haible <bruno@clisp.org>
3834 * exit.h: New file, from GNU gettext.
3836 2003-01-11 Bruno Haible <bruno@clisp.org>
3838 * stpcpy.h (stpcpy): Use ANSI C function declarations.
3839 * strcase.h (strcasecmp, strncasecmp): Likewise.
3841 2003-01-14 Jim Meyering <jim@meyering.net>
3843 * same.c (same_name): Tweak a comment.
3845 2003-01-11 Bruno Haible <bruno@clisp.org>
3847 * same.c (same_name): Reorder tests so as to avoid calling stat()
3848 when a string comparison is sufficient.
3850 2003-01-11 Bruno Haible <bruno@clisp.org>
3852 * readtokens.c (readtoken): Cast character to 'unsigned char', not
3855 2003-01-11 Bruno Haible <bruno@clisp.org>
3857 * hash-pjw.c: Add comment about low quality of this function.
3859 2003-01-12 Paul Eggert <eggert@twinsun.com>
3861 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
3862 to avoid collisions with libcurses and libreadline.
3864 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
3865 * getstr.h, getstr.c: Remove.
3866 * getline.c: Include "getline.h", to check interface.
3867 Move body of old getstr.c here: this defines MIN_CHUNK and
3868 declares getdelim2, which is renamed from getstr.
3869 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
3871 * linebuffer.c (readlinebuffer): Renamed from readline.
3873 * linebuffer.h: Likewise.
3874 (readline): Remove backward-compatibility macro.
3876 2003-01-12 Jim Meyering <jim@meyering.net>
3878 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
3880 2003-01-10 Bruno Haible <bruno@clisp.org>
3882 * alloca_.h: New file.
3883 * getdate.y: Unconditionally include alloca.h.
3884 * makepath.c: Likewise.
3885 * setenv.c: Likewise.
3886 * userspec.c: Likewise.
3888 2003-01-09 Bruno Haible <bruno@clisp.org>
3890 * stdbool.h.in: New file.
3892 2003-01-08 Bruno Haible <bruno@clisp.org>
3894 * safe-read.c: Include specification header first, to ensure its
3896 * full-write.c: Likewise.
3898 2003-01-08 Jim Meyering <jim@meyering.net>
3900 * full-write.c: Undefine and define-away `const' after inclusion
3901 of errno.h, not before. Suggestion from Bruno Haible.
3903 2003-01-07 Jim Meyering <jim@meyering.net>
3905 * full-write.c: Rework so that it may serve to define full_read, too.
3906 * full-read.c: Simply #define FULL_READ and include full-write.c.
3908 2003-01-06 Jim Meyering <jim@meyering.net>
3910 * version-etc.c: Update year in translatable copyright string.
3912 2002-12-25 Bruno Haible <bruno@clisp.org>
3914 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
3915 * xstrtol.h: Likewise.
3916 * xstrtoimax.c: Likewise.
3917 * xstrtoumax.c: Likewise.
3918 * human.h: Likewise.
3920 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
3921 on systems that have <inttypes.h> but not <stdint.h>.
3923 2002-12-31 Paul Eggert <eggert@twinsun.com>
3925 * memcoll.c (memcoll): Fall back on a simple algorithm using
3926 memcmp if strcoll doesn't work.
3928 2002-12-23 Bruno Haible <bruno@clisp.org>
3930 * localcharset.h: New file.
3931 * localcharset.c: Include it.
3932 * unicodeio.c: Likewise.
3934 2002-12-22 Bruno Haible <bruno@clisp.org>
3936 * utime.c (utime_null): No need to call ftruncate if the file was
3939 2002-12-23 Bruno Haible <bruno@clisp.org>
3941 * memcoll.c (STRCOLL): New macro.
3944 2002-12-22 Bruno Haible <bruno@clisp.org>
3946 * getstr.h (getstr): Define, to avoid clash with libcurses.
3947 * linebuffer.h (readline): Define, to avoid clash with libreadline.
3949 2002-12-22 Bruno Haible <bruno@clisp.org>
3951 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
3953 2002-12-23 Bruno Haible <bruno@clisp.org>
3955 * getline.h: Include <stddef.h>, for size_t.
3957 * unicodeio.h: Include <stddef.h>, for size_t.
3958 * unicodeio.c: Don't include <stddef.h>.
3960 2002-12-17 Bruno Haible <bruno@clisp.org>
3962 * canon-host.c (strdup): Remove unused declaration.
3964 * fsusage.c: Include full_read.h.
3965 (get_fs_usage): Use full_read instead of safe_read.
3967 * utime.c (utime_null): Use SAFE_READ_ERROR.
3969 2002-12-11 Bruno Haible <bruno@clisp.org>
3971 * setenv.h: Rewritten to cope with systems that have setenv() but not
3973 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
3976 2002-12-11 Bruno Haible <bruno@clisp.org>
3978 * setenv.c (alloca): Fall back to malloc.
3980 (setenv): Use freea() to free memory allocated with alloca().
3982 2002-11-13 Bruno Haible <bruno@clisp.org>
3984 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
3985 function declarations.
3986 * unsetenv.c (unsetenv): Likewise.
3988 2002-03-04 Bruno Haible <bruno@clisp.org>
3990 Portability to AIX 4.3.3.
3991 * unsetenv.c: New file, extracted from setenv.c.
3992 * setenv.c: Move the unsetenv() function to unsetenv.c.
3994 2001-12-20 Bruno Haible <bruno@clisp.org>
3996 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
3997 use malloc instead. For SunOS 4.
3999 2001-12-11 Bruno Haible <bruno@clisp.org>
4001 * setenv.c: Declare alloca.
4002 (compar_fn_t): New typedef.
4003 (KNOWN_VALUE, STORE_VALUE): Use it.
4005 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
4008 2002-12-10 Paul Eggert <eggert@twinsun.com>
4010 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
4011 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
4012 Choose values that are less likely to collide with system fnmatch
4014 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
4015 defined (e.g., a pure POSIX system).
4016 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
4017 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
4019 2002-12-06 Jim Meyering <jim@meyering.net>
4021 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
4023 Merge in changes from libc's misc/error.c, in preparation
4024 for the merge of gnulib's changes back into libc.
4026 * error.c (_): Define only if not already defined.
4027 Move definition to follow all #include directives.
4028 Include unlocked-io.h only if !_LIBC.
4029 [_LIBC]: Include <libio/libioP.h>.
4030 [USE_IN_LIBIO]: Include <libio/iolibio.h>
4031 (fflush): Tweak definition to use INTUSE.
4034 2002-12-05 Paul Eggert <eggert@twinsun.com>
4036 * alloca.c [defined emacs]: Include "lisp.h".
4037 (xalloc_die) [defined emacs]: New macro.
4038 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
4039 [! defined emacs]: Include <xalloc.h>.
4040 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
4041 (pointer): Typedef to POINTER_TYPE *.
4042 (malloc): Remove decl; we now always use xmalloc.
4043 (alloca): Use old-style definition, since Emacs needs this.
4044 Check for arithmetic overflow when computing combined size.
4046 2002-12-04 Paul Eggert <eggert@twinsun.com>
4048 Do not generate unlocked-io.h automatically, since it's easier to
4049 maintain it by hand.
4051 * unlocked-io.h: New file, from GNU diffutils,
4052 but with proper copyright notice and attribution.
4054 * Makefile.am: Add copyright notice.
4055 (libfetish_a_SOURCES): Add unlocked-io.h.
4056 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
4057 (DISTCLEANFILES, io_functions): Remove macros.
4058 (EXTRA_DIST): Remove gen_uio.
4059 (unlocked-io.h): Remove rule.
4061 2002-12-04 Jim Meyering <jim@meyering.net>
4063 Reflect the fact that stat.c and lstat.c are no longer generated.
4064 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
4065 (DISTCLEANFILES): Likewise.
4066 (EXTRA_DIST): Likewise.
4067 (all_local): Don't depend on stat.c or lstat.c.
4068 (stat.c, lstat.c): Remove rules.
4069 (EXTRA_DIST): Remove xstat.in.
4071 * xstat.in: Remove file. Contents moved into stat.c.
4072 * stat.c: New file. Contents mostly from xstat.in.
4073 * stat.c: Rework so that it may serve to define rpl_lstat, too.
4074 * lstat.c: New file. Simply #define LSTAT and include stat.c.
4076 * safe-read.c: Rework so that it may serve to define safe_write, too.
4077 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
4079 2002-12-03 Jim Meyering <jim@meyering.net>
4081 * safe-read.c, safe-write.c: Change variable names and comments, but
4082 not semantics, to minimize the differences between these two files.
4083 (safe_read): Change comment to mention SAFE_READ_ERROR.
4085 * safe-read.c (IS_EINTR): Define.
4086 (safe_read): Use IS_EINTR in place of in-function cpp directives.
4088 2002-12-02 Bruno Haible <bruno@clisp.org>
4090 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
4091 Define, taken from safe-read.c.
4092 (INT_MAX): Provide fallback.
4093 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
4094 * safe-write.h (SAFE_WRITE_ERROR): Define.
4096 * safe-read.c (EINTR): Remove definition.
4097 (safe_read): Don't use EINTR if it is absent.
4099 2002-12-02 Jim Meyering <jim@meyering.net>
4101 * safe-read.c (EINTR): Define.
4102 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
4103 (INT_MAX): Provide fallback.
4104 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
4106 * safe-read.h (SAFE_READ_ERROR): Define.
4108 2002-12-01 Jim Meyering <jim@meyering.net>
4110 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
4111 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
4113 2002-11-27 Paul Eggert <eggert@twinsun.com>
4115 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
4116 hash_rehash): Replace `if (limit <= value) abort ();' with
4117 `if (! (value < limit)) abort ();', for readability.
4119 2002-11-26 <karl@gnu.org>
4121 * strdup.c: copy from libc again, with jim's ok.
4122 * .cppi-disable: re-add strdup.c
4124 2002-11-25 <karl@gnu.org>
4126 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
4127 instead of "strtol.c".
4129 2002-11-25 Jim Meyering <jim@meyering.net>
4131 * mktime.c: Sync from libc, now that it has the latest fix.
4133 2002-11-24 <karl@gnu.org>
4135 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
4136 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
4138 2002-11-24 Jim Meyering <jim@meyering.net>
4140 Update from coreutils:
4142 * mktime.c: Merge in changes from libc.
4144 Avoid a link-time failure on some Linux systems.
4145 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
4146 (__mon_yday): Declare with the STATIC attribute.
4147 (__mktime_internal): Likewise.
4148 Based on a report from Greg Schafer.
4150 2002-11-23 Jim Meyering <jim@meyering.net>
4152 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
4153 Use `unsigned', not `int', as type of index.
4155 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
4157 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
4159 2002-11-22 Paul Eggert <eggert@twinsun.com>
4161 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
4162 hint that one should use `if (! x) abort ();' rather than `assert
4163 (x);', and anyway it's one less thing to worry about configuring.
4164 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
4165 hash_rehash, hash_insert): Use abort rather than assert.
4167 2002-11-22 Paul Eggert <eggert@twinsun.com>
4169 * quotearg.h: Allow multiple inclusion by surrounding with
4170 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
4171 so that we can be included first.
4172 (PARAMS): Remove; we now assume C89 or later. All uses removed.
4173 * quotearg.c: Include quotearg.h immediately after config.h.
4174 No need to include stddef.h or sys/types.h any more.
4175 Surround local include files with "", not "<>".
4176 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
4177 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
4178 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
4179 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
4180 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
4181 (ISPRINT): Remove; no longer needed now that we assume C89.
4183 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
4186 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
4187 quotearg_char): Use SIZE_MAX rather than
4188 (size_t) -1 when we are talking about "infinity".
4190 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
4192 2002-11-22 Bruno Haible <bruno@clisp.org>
4194 * safe-read.h: Assume C89. Add comments.
4195 (safe_read): Change return type to size_t.
4196 * safe-read.c (safe_read): Change return type to size_t. Handle byte
4197 counts > SSIZE_MAX correctly.
4198 * safe-write.h: New file.
4199 * safe-write.c: New file.
4200 * full-read.h: New file.
4201 * full-read.c: New file.
4202 * full-write.h: Assume C89. Add comments.
4203 * full-write.c: Include safe-write.h.
4204 (full_write): Rewritten to use safe_write.
4205 Suggested by Jim Meyering and Paul Eggert.
4207 2002-11-21 Bruno Haible <bruno@clisp.org>
4209 Remove case insensitive option matching.
4210 * argmatch.h (argcasematch): Remove declaration.
4211 (ARGCASEMATCH): Remove macro.
4212 (__xargmatch_internal): Remove case_sensitive argument.
4213 (XARGMATCH): Update.
4214 (XARGCASEMATCH): Remove macro.
4215 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
4216 case_sensitive argument.
4217 (argcasematch): Remove function.
4218 (__xargmatch_internal): Remove case_sensitive argument.
4219 (main): Use XARGMATCH instead of XARGCASEMATCH.
4221 * xmalloc.c: Change compile-time error message. Add comment about
4222 required autoconf version.
4224 2002-11-21 Jim Meyering <jim@meyering.net>
4226 * strdup.c (strdup): Tweak comment and initial #if/#include.
4228 Merge in changes from the coreutils.
4230 2002-09-25 Paul Eggert <eggert@twinsun.com>
4231 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
4232 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
4233 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
4234 int. Work more efficiently if X is the same width as uintmax_t.
4235 Do not compare X to -1, to avoid bogus compiler warning.
4236 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
4237 Don't assume that f_frsize and f_bsize are the same type.
4239 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
4242 * makepath.c (make_path): Restore umask *before* creating the final
4244 (make_path): Minor reformatting.
4246 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
4247 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
4249 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
4250 ones. At least on GNU/Linux systems, `auto' means something else.
4253 2002-11-20 Paul Eggert <eggert@twinsun.com>
4255 Merge argmatch cleanups from Bison. Assume C89.
4257 * argmatch.c: Include config.h here, not in argmatch.h.
4258 Include stdlib.h, for EXIT_FAILURE.
4259 Always include <string.h>, since we assume C89.
4260 (EXIT_FAILURE): Remove pre-C89 bug workaround.
4261 * argmatch.h: Do not include <config.h> or <sys/types.h>.
4262 Include <stddef.h> instead, since it's all we need for size_t.
4263 (PARAMS): Remove. All uses removed.
4264 (ARRAY_CARDINALITY): Do not bother to #undef.
4265 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
4266 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
4267 Remove unnecessary parentheses.
4268 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
4269 Insert necessary parentheses.
4270 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
4271 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
4273 2002-11-19 Bruno Haible <bruno@clisp.org>
4275 * mbswidth.c: Include mbswidth.h right at the beginning.
4276 * mbswidth.h: Include <stddef.h>, for size_t.
4278 * mbswidth.h (PARAMS): Remove macro.
4279 (mbswidth, mbsnwidth): Use ANSI C function declarations.
4280 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
4282 * gcd.h (PARAMS): Remove macro.
4283 (gcd): Use ANSI C function declarations.
4284 * gcd.c (gcd): Likewise.
4286 2002-11-15 Bruno Haible <bruno@clisp.org>
4288 * strcspn.c: Include <stddef.h>.
4289 (strcspn): Use ANSI C function declaration. Change return type to
4291 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
4292 (strpbrk): Use NULL.
4293 * strpbrk.h (PARAMS): Remove macro.
4294 (strpbrk): Use ANSI C function declaration.
4295 * strstr.c: Don't include <sys/types.h>.
4296 * strstr.h (PARAMS): Remove macro.
4297 (strstr): Use ANSI C function declarations.
4299 2002-11-06 Bruno Haible <bruno@clisp.org>
4301 * gcd.h (gcd): Change argument type to 'unsigned long'.
4302 * gcd.c (gcd): Likewise.
4304 2002-11-05 Bruno Haible <bruno@clisp.org>
4306 * gcd.h: New file, from gettext-0.11.5.
4307 * gcd.c: New file, from gettext-0.11.5.
4309 2002-11-05 Bruno Haible <bruno@clisp.org>
4311 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
4312 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
4313 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
4314 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
4316 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
4317 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
4319 * closeout.c: Include gettext.h instead of <libintl.h>.
4320 * human.c: Include gettext.h instead of <libintl.h>.
4321 * quotearg.c: Include gettext.h instead of <libintl.h>.
4322 * rpmatch.c: Include gettext.h instead of <libintl.h>.
4323 * unicodeio.c: Include gettext.h instead of <libintl.h>.
4324 * userspec.c: Include gettext.h instead of <libintl.h>.
4325 * version-etc.c: Include gettext.h instead of <libintl.h>.
4326 * xmalloc.c: Include gettext.h instead of <libintl.h>.
4327 (textdomain): Remove definition.
4328 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
4330 * long-options.c: Remove include of <libintl.h> and definition of _.
4331 * same.c: Remove include of <libintl.h> and definition of _.
4333 2002-11-04 Bruno Haible <bruno@clisp.org>
4335 * stpcpy.h: New file, from GNU gettext-0.11.5.
4336 * strcase.h: New file, from GNU gettext-0.11.5.
4337 * strpbrk.h: New file, from GNU gettext-0.11.5.
4338 * strstr.h: New file, from GNU gettext-0.11.5.
4339 * xgetcwd.h: New file, from GNU gettext-0.11.5.
4341 2002-05-09 Bruno Haible <bruno@clisp.org>
4343 * config.charset: Update for newest glibc. Add canonical names
4344 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
4346 2002-05-09 Bruno Haible <bruno@clisp.org>
4348 * localcharset.c (get_charset_aliases): Add more Windows specific
4351 2002-05-08 Owen Taylor <otaylor@redhat.com>
4353 * config.charset: A few additions for Solaris.
4355 2001-12-05 Bruno Haible <bruno@clisp.org>
4357 * localcharset.c (locale_charset): Don't return an empty string.
4359 2001-10-23 Bruno Haible <haible@clisp.cons.org>
4361 * config.charset: msdos in uk_UA uses CP1125.
4363 2001-08-05 Bruno Haible <haible@clisp.cons.org>
4365 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
4366 * localcharset.c (locale_charset): Declare as extern "C".
4368 2002-02-15 Bruno Haible <bruno@clisp.org>
4370 * config.charset [msdosdjgpp]: For Russian, use CP866.
4372 2002-02-11 Bruno Haible <bruno@clisp.org>
4374 * config.charset: Add support for NetBSD.
4376 2002-09-25 <karl@gnu.org>
4378 * strdup.c: copy from libc/string (via ../config/srclist*).
4379 * getopt*: copy from libc/posix.
4380 * gettext.h: copy from gettext.
4381 * .cppi-disable: add strdup.c, gettext.h.
4383 2002-07-01 Jim Meyering <meyering@lucent.com>
4385 * c-stack.c: Include sys/time.h.
4386 From Volker Borchert.
4388 2002-06-11 Paul Eggert <eggert@twinsun.com>
4390 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
4391 New macro. Use it uniformly instead of
4392 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
4393 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
4394 reported by Vin Shelton.
4396 2002-06-22 Jim Meyering <meyering@lucent.com>
4398 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
4399 redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
4401 2002-06-22 Paul Eggert <eggert@twinsun.com>
4403 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
4404 Do not assume SA_SIGINFO behavior.
4405 Bug reported by Jim Meyering on NetBSD 1.5.2.
4407 2002-06-22 Jim Meyering <meyering@lucent.com>
4409 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
4411 * exitfail.c, exitfail.h: Likewise.
4412 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
4414 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
4416 (EXTRA_DIST): Add fnmatch_loop.c.
4417 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
4419 * fnmatch_loop.c: New file, from diffutils-2.8.2.
4420 * fnmatch.c: Update from diffutils-2.8.2.
4421 * fnmatch_.h: New file. From diffutils-2.8.2.
4422 * fnmatch.h: Remove file.
4424 2002-06-18 Paul Eggert <eggert@twinsun.com>
4426 * file-type.h: Report an error if neither S_ISREG nor
4427 S_IFREG is defined, instead of using a test specific to glibc
4428 2.2. This should be safe, since POSIX requires S_ISREG and
4429 Unix Version 7 had S_IFREG. We don't need to check for
4430 <sys/types.h> since we don't use any symbols that it defines.
4432 2002-06-15 Jim Meyering <meyering@lucent.com>
4434 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
4435 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
4436 have been included before this file.
4438 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
4440 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
4441 so that each temporary file name is unique and valid in the first
4442 8 characters, for operation under DOS.
4444 2002-06-15 Jim Meyering <meyering@lucent.com>
4446 Work even with DJGPP 2.03, which lacks support for symlinks.
4448 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
4450 * lchown.c (S_ISLNK): Likewise.
4452 2002-06-14 Jim Meyering <meyering@lucent.com>
4454 * file-type.h: Use the version from diffutils-2.8.2.
4455 * file-type.c: Likewise.
4457 2002-05-27 Jim Meyering <meyering@lucent.com>
4459 Fix a problem seen only on nonconforming systems whereby ls.c's
4460 use of localtime, and then of gettimeofday would cause trouble:
4461 the localtime call used to initialize rpl_gettimeofday's save
4462 mechanism would clobber ls's current local time information so
4463 that in any long listing the first file would always be listed
4464 with date 1970-01-01. Analysis by Volker Borchert.
4466 * gettimeofday.c (localtime): Undefine.
4467 (rpl_localtime): New function.
4469 2002-05-22 Jim Meyering <meyering@lucent.com>
4471 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
4472 * file-type.h: New file.
4473 * file-type.c (file_type): New file/function. Extracted from diffutils.
4475 2002-04-29 Paul Eggert <eggert@twinsun.com>
4477 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
4479 2002-04-28 Paul Eggert <eggert@twinsun.com>
4481 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
4482 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
4483 of 127, since 64 is the largest conceivable number for ancient
4485 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
4487 2002-04-28 Jim Meyering <meyering@lucent.com>
4489 * sig2str.c (WTERMSIG): Remove definition (unused).
4491 2002-04-28 Paul Eggert <eggert@twinsun.com>
4493 * sig2str.h, sig2str.c: New files.
4494 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
4496 2002-04-24 Jim Meyering <meyering@lucent.com>
4498 * gettext.h: New file, from Gettext.
4499 * Makefile.am (INCLUDES): Remove -I../intl.
4500 (libfetish_a_SOURCES): Add gettext.h.
4502 2002-04-16 Jim Meyering <meyering@lucent.com>
4504 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
4505 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
4506 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
4508 2002-04-12 Jim Meyering <meyering@lucent.com>
4510 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
4512 2002-03-10 Jim Meyering <meyering@lucent.com>
4514 * makepath.c (make_path): Remove a comma from a diagnostic.
4515 Suggestion from Santiago Vila.
4517 2002-03-08 Jim Meyering <meyering@lucent.com>
4519 * rename.c: Mention that this wrapper is needed also on
4520 mips-dec-ultrix4.4 systems.
4522 2002-03-02 Jim Meyering <meyering@lucent.com>
4524 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
4525 not HAVE_CLOCK_SETTIME.
4527 2002-02-27 Paul Eggert <eggert@twinsun.com>
4529 * nanosleep.h: Rename to....
4530 * timespec.h: New name for nanosleep.h. All uses changed.
4532 * gettime.c: New file.
4533 * settime.c: New file.
4536 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
4537 timespec.h. Remove nanosleep.h.
4539 2002-02-25 Paul Eggert <eggert@twinsun.com>
4541 * acl.c, acl.h: New files.
4542 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
4544 2002-02-24 Jim Meyering <meyering@lucent.com>
4546 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
4547 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
4548 cause trouble. Reported by Nelson Beebe.
4550 2002-02-23 Paul Eggert <eggert@twinsun.com>
4552 * path-concat.c (xpath_concat): Reorder code to pacify
4553 compilers that don't know that xalloc_die never returns.
4555 2002-02-20 Jim Meyering <meyering@lucent.com>
4557 * getdate.c: Regenerate using bison-1.33.
4559 2002-02-15 Paul Eggert <eggert@twinsun.com>
4561 * posixver.c, posixver.h: New files.
4562 * Makefile.am (libfetish_a_SOURCES): Add them.
4564 2002-02-02 Paul Eggert <eggert@twinsun.com>
4565 Bruno Haible <bruno@clisp.org>
4567 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
4568 (fwrite_success_callback): New declaration.
4569 * unicodeio.c (unicode_to_mb): New function, extracted from
4570 print_unicode_char. Call failure callback instead of error.
4571 (fwrite_success_callback): New function.
4572 (exit_failure_callback): New function.
4573 (fallback_failure_callback): New function.
4574 (print_unicode_char): Call unicode_to_mb.
4576 2002-01-26 Jim Meyering <meyering@lucent.com>
4578 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
4580 2002-01-22 Jim Meyering <meyering@lucent.com>
4582 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
4583 Otherwise, some versions of automake would omit the rule that makes
4584 Makefile from Makefile.in.
4586 2001-01-21 Paul Eggert <eggert@twinsun.com>
4588 * xmemcoll.h, xmemcoll.c: New files.
4589 * Makefile.am (libfetish_a_SOURCES): Add them.
4590 * memcoll.c: Include errno.h, and declare errno if not defined.
4591 (memcoll): Set errno to zero if there is no error.
4593 * quotearg.c (quotearg_buffer_restyled):
4594 Fix bug with quoting buffers containing NUL when backslashing escapes.
4595 This bug was exposed by the other changes in this patch.
4596 (quotearg_n_options): New arg ARGSIZE.
4597 All callers changed.
4598 (quoting_options_from_style): New function.
4599 (quotearg_n_style): Use it.
4600 (quotearg_n_style_mem): New function.
4602 * quotearg.h (quotearg_n_style_mem): New function.
4604 2002-01-16 Jim Meyering <meyering@lucent.com>
4606 * getdate.y: Add three semicolons, each just before a closing brace.
4607 Bison (as of version 1.31) no longer papers over that mistake.
4609 2002-02-14 Paul Eggert <eggert@twinsun.com>
4611 * backupfile.c (ISDIGIT): Comment fix.
4612 * getdate.y (ISDIGIT): Likewise.
4613 * posixtm.c (ISDIGIT, year): Likewise.
4614 * strverscmp.c (ISDIGIT): Likewise.
4615 * userspec.c (ISDIGIT): Likewise.
4617 2002-01-05 Jim Meyering <meyering@lucent.com>
4619 * version-etc.c (version_etc_copyright): Update copyright year.
4621 2001-01-19 Paul Eggert <eggert@twinsun.com>
4623 * closeout.c (close_stdout_status): If ferror (stdout), do
4624 not silently exit merely because the output buffer happens to
4625 have nothing pending.
4627 2001-12-18 Paul Eggert <eggert@twinsun.com>
4629 See the big note in ../ChangeLog.
4630 * human.c (suffixes): Prefer K to k for 1024.
4631 (generate_suffix_backwards): New function.
4632 (human_readable_inexact): Use it.
4633 * xstrtol.c (__xstrtol): If there is no number but there
4634 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
4635 Accept 'K' as well as 'k'.
4637 2001-12-15 Jim Meyering <meyering@lucent.com>
4639 * regex.h (__restrict_arr): Update from libc.
4641 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
4642 as `remote' if the name starts with `//'. Suggested by Michael Stone.
4645 2001-12-10 Jim Meyering <meyering@lucent.com>
4647 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
4648 Instead, include "xalloc.h".
4649 (initbuffer): Don't cast xmalloc return value to char*.
4650 (readline): Reword comment.
4651 Don't cast xrealloc return value to char*
4654 2001-12-09 Jim Meyering <meyering@lucent.com>
4656 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
4657 `signed and unsigned type in conditional expression'.
4658 * posixtm.c (posix_time_parse): Likewise.
4660 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
4662 * readtokens.c (readtoken): Declare an index to be of type unsigned
4663 to avoid a pedantic warning.
4665 * getstr.c: Don't include assert.h.
4666 (getstr): Remove warning-evoking assertions.
4667 Return -1 if offset parameter is out of bounds.
4668 Change the type of a local from int to size_t.
4670 * strftime.c (my_strftime_localtime_r): Include this function
4671 definition in the `#if ! HAVE_TM_GMTOFF' block.
4673 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
4674 Include xalloc.h instead.
4676 2001-12-02 Jim Meyering <meyering@lucent.com>
4678 * tempname.c: Don't declare getenv, thus reverting the change of
4679 2001-11-18. It's no longer necessary, now that stdlib.h is always
4682 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
4683 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
4685 2001-11-30 Akim Demaille <akim@epita.fr>
4687 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
4688 before being defined.
4690 2001-11-27 Paul Eggert <eggert@twinsun.com>
4692 * quotearg.h (quotearg_n, quotearg_n_style):
4693 First arg is int, not unsigned.
4694 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
4695 (SIZE_MAX, UINT_MAX): New macros.
4696 (quotearg_n_options): Abort if N is negative.
4697 Avoid overflow check on hosts where size_t is 64 bits and int
4698 is 32 bits, as overflow is impossible there.
4699 Fix off-by-one typo that caused unnecessary reallocation.
4701 2001-11-27 Jim Meyering <meyering@lucent.com>
4703 * tempname.c: Merge with version from libc.
4704 * regex.c: Likewise.
4706 * tempname.c: Include stdlib.h unconditionally. On some old systems
4707 for which STDC_HEADERS is 0, it was not included, resulting in a
4708 warning about an integer-to-pointer conversion problem with getenv.
4709 Reported by Volker Borchert.
4711 2001-11-26 Jim Meyering <meyering@lucent.com>
4713 * gtod.h: Remove file.
4714 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
4715 * gettimeofday.c: Don't include gtod.h.
4716 (GTOD_init): Remove function.
4717 (rpl_gettimeofday): Do its job here instead, rather than aborting.
4718 Suggestion from Volker Borchert.
4720 2001-11-23 Jim Meyering <meyering@lucent.com>
4722 * hash.h (struct hash_table): Don't define here. Merely declare it.
4723 * hash.c (struct hash_table): Define it here instead.
4725 2001-11-22 Jim Meyering <meyering@lucent.com>
4727 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
4729 2001-11-18 Paul Eggert <eggert@twinsun.com>
4731 * tempname.c (TMP_MAX): Remove; no longer needed.
4732 (TEMPORARIES): New macro.
4733 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
4734 removes an artificial limitation (e.g. HP-UX 10.20, where
4737 2001-11-18 Jim Meyering <meyering@lucent.com>
4739 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
4742 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
4743 files will be created before anything else.
4745 2001-11-17 Jim Meyering <meyering@lucent.com>
4747 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
4748 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
4749 rather than group writable. Patch by Juan F. Codagnone.
4751 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
4752 Instead, include "xalloc.h".
4754 * mountlist.c: Include unlocked-io.h after all system headers.
4755 Remove explicit declarations of xmalloc, xrealloc,
4756 and xstrdup. Instead, include "xalloc.h".
4758 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
4759 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
4760 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
4762 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
4763 Reported by Padraig Brady.
4765 * mkstemp.c: #undef mkstemp.
4767 (rpl_mkstemp): Rename from mkstemp.
4770 2001-11-16 Jim Meyering <meyering@lucent.com>
4772 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
4773 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
4774 determine the amount of total physical memory, use pstat_getstatic.
4775 HPUX-11 doesn't define _SC_PHYS_PAGES.
4776 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
4777 If sysconf couldn't be used to determine the amount of available
4778 physical memory, use both pstat_getstatic and pstat_getdynamic.
4779 Based on a patch from Bob Proulx.
4781 2001-11-05 Jim Meyering <meyering@lucent.com>
4783 * xstat.in (slash_aware_lstat): Correct a misleading comment.
4785 2001-11-03 Jim Meyering <meyering@lucent.com>
4787 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
4788 in argmatch_to_argument call.
4790 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
4793 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
4794 e.g., a fault due to an attempt to free a NULL pointer.
4796 2001-11-01 Jim Meyering <meyering@lucent.com>
4798 * dirfd.c, dirfd.h: New files.
4799 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
4801 * hash.c (hash_print) [TESTING]: Clean up.
4803 2001-10-22 Paul Eggert <eggert@twinsun.com>
4805 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
4806 to avoid a warning if -Wall.
4808 2001-10-21 Paul Eggert <eggert@twinsun.com>
4810 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
4812 2001-10-21 Jim Meyering <meyering@lucent.com>
4814 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
4815 this code would end up calling gettext even in packages built
4817 * getopt.c (_): Likewise.
4818 * regex.c (_): Likewise.
4820 2001-10-20 Paul Eggert <eggert@twinsun.com>
4822 * error.c (strerror_r): Do not declare unless !_LIBC.
4823 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
4824 Use strerror_r that is only a macro, even if it is not a function.
4825 (strerror): Check for HAVE_DECL_STRERROR before declaring.
4826 (private_strerror): Use prototypes, not old-style function definition.
4827 (print_errno_message): New function.
4828 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
4830 (error_tail, error, error_at_line): Use it.
4832 2001-10-11 Jim Meyering <meyering@lucent.com>
4834 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
4835 and quote_n (1, ... to avoid clobbering a buffer.
4837 2001-10-05 Jim Meyering <meyering@lucent.com>
4839 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
4840 * hash-pjw.c: New file (factored out of fileutils' remove.c).
4841 * hash-pjw.h: New file.
4843 2001-09-30 Jim Meyering <meyering@lucent.com>
4845 * mountlist.c [MOUNTED_GETFSSTAT]:
4846 Include <sys/ucred.h>, for Apple Darwin.
4847 Include sys/mount.h and sys/fs_types.h only if available.
4849 (read_filesystem_list): Use FS_TYPE.
4851 2001-09-29 Paul Eggert <eggert@twinsun.com>
4853 * exclude.c (excluded_filename): 0 -> false, since it's
4856 2001-09-28 Paul Eggert <eggert@twinsun.com>
4858 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
4859 #defines strtoimax. Also treat the other strto* functions
4862 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
4863 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
4864 (strtoimax, strtoumax): Do not declare if already defined as a macro.
4866 2001-09-26 Jim Meyering <meyering@lucent.com>
4868 Most macros in unlocked-io.h had the wrong number of arguments.
4869 * gen-uio: New script.
4870 (USE_UNLOCKED_IO): Define to 1 if not already defined.
4871 * unlocked-io.hin: Remove file.
4872 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
4873 rather than trying to embed it here.
4874 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
4875 Reported by Padraig Brady.
4877 2001-09-25 Volker Borchert <bt@teknon.de>
4879 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
4881 2001-09-23 Jim Meyering <meyering@lucent.com>
4883 * mountlist.c: Remove useless parentheses in #if directives.
4884 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
4885 the deprecated MOUNTED symbol is no longer defined in mntent.h.
4887 2001-09-22 Jim Meyering <meyering@lucent.com>
4889 * localcharset.c: Update from latest gettext.
4890 * config.charset: Likewise.
4892 2001-09-20 Jim Meyering <meyering@lucent.com>
4894 * xstrtol.c (strtoimax): Guard declaration with
4895 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
4896 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
4897 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
4898 (strtoumax): Likewise, for completeness (it wasn't necessary).
4900 2001-09-06 Paul Eggert <eggert@twinsun.com>
4902 * strtoimax.c (HAVE_LONG_LONG):
4903 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
4904 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
4905 to work around bug in IBM C compiler.
4907 2001-09-16 Jim Meyering <meyering@lucent.com>
4909 * mkdir.c: New file.
4911 2001-09-04 Paul Eggert <eggert@twinsun.com>
4913 * xgetcwd.c: Revert some of the previous change; intead,
4914 fix the HAVE_GETCWD_NULL code to behave more like the
4915 !HAVE_GETCWD_NULL code used to.
4918 (xgetcwd): Do not return NULL when memory is exhausted; instead,
4921 2001-09-04 Paul Eggert <eggert@twinsun.com>
4923 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
4924 Use ssize_t, not int, to store result of readlink.
4925 Check for ssize_t overflow as well as size_t overflow,
4926 as POSIX says the result of readlink is implementation-defined
4927 when ssize_t overflows.
4928 Remove unnecessary cast to char*.
4929 Use free+malloc instead of realloc, as the storage doesn't need
4930 to be preserved and it's clearer and can be more efficient that way.
4931 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
4932 * xreadlink.h (xreadlink): Update prototype.
4934 2001-09-03 Paul Eggert <eggert@twinsun.com>
4936 * exclude.c (fnmatch_no_wildcards): Fix confusion between
4937 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
4938 spotted by Jim Meyering.
4940 2001-09-03 Jim Meyering <meyering@lucent.com>
4942 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
4944 2001-09-03 Paul Eggert <eggert@twinsun.com>
4946 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
4947 like the HAVE_GETCWD_NULL code.
4948 Include pathmax.h if not HAVE_GETCWD.
4949 Do not include xalloc.h.
4950 (INITIAL_BUFFER_SIZE): New symbol.
4951 Do not use xmalloc / xrealloc, since the caller is responsible for
4952 handling errors. Preserve errno around `free' during failure.
4953 Do not overrun buffer when using getwd.
4955 2001-09-03 Paul Eggert <eggert@twinsun.com>
4957 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
4958 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
4960 2001-09-02 Jim Meyering <meyering@lucent.com>
4962 * error.c: Update from GNU libc.
4964 2001-09-01 Jim Meyering <meyering@lucent.com>
4966 * xreadlink.c: New file.
4967 * xreadlink.h: New file.
4968 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
4970 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
4971 doesn't conflict with sparc Solaris 7's definition in
4972 /usr/include/sys/int_types.h.
4974 * exclude.c: Use `""', not `<>' to #include non-system header files.
4975 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
4976 and strncasecmp as r-values. Unixware didn't have declarations.
4978 2001-08-31 Jim Meyering <meyering@lucent.com>
4980 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
4981 Use an initial, malloc'd, buffer of length 128 rather than
4982 a statically allocated one of length 1024.
4984 2001-08-30 Paul Eggert <eggert@twinsun.com>
4986 * xgetcwd.c: Don't include pathmax.h.
4987 Include stdlib.h and unistd.h if available.
4989 (xmalloc, xstrdup, free): Remove decls.
4990 (xgetcwd): Don't assume sizes fit in unsigned.
4991 Check for overflow when computing sizes.
4992 Simplify reallocation code.
4994 2001-08-28 Paul Eggert <eggert@twinsun.com>
4996 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
4998 * strtoimax.c: Renamed from strtoxmax.c, removing the
5001 Also, make the following further changes to make this file's
5002 configuration more similar to that of strtol.c:
5003 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
5004 (strtoumax, uintmax_t, strtoull, strtol): Remove.
5005 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
5006 (strtoimax): Renamed from strtoumax. All uses of unsigned values
5007 changed to signed values.
5009 And make the following changes as well:
5010 Fix copyright notice, as 1999 was missing.
5011 (verify): New macro.
5012 (strtoimax): Check sizes at compile-time, not run-time.
5013 Prefer strtol to strtoll if both work.
5014 (main): Remove; it was not that useful and was a pain to maintain.
5016 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
5018 2001-08-30 Paul Eggert <eggert@twinsun.com>
5020 * savedir.c (savedir): Remove size parameter, as POSIX says that
5021 a directory's st_size can have an arbitrary value, so the old
5022 usage could waste an arbitrary amount of memory. All uses
5024 * savedir.h: Update prototype.
5026 2001-08-30 Paul Eggert <eggert@twinsun.com>
5028 * xstrtol.c (strtoimax): New decl.
5030 2001-08-28 Paul Eggert <eggert@twinsun.com>
5032 * xstrtol.h: Add copyright notice.
5033 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
5034 LONGINT_INVALID_SUFFIX_CHAR.
5036 2001-08-30 Paul Eggert <eggert@twinsun.com>
5038 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
5041 2001-08-30 Paul Eggert <eggert@twinsun.com>
5043 * hash.c: Remove '2001' from copyright notice.
5045 2001-08-30 Paul Eggert <eggert@twinsun.com>
5047 * full-write.h: New file.
5048 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
5049 * full-write.c: Correct credits, as cccp.c no longer
5050 exists and anyway it was so heavily changed from the old cccp
5051 code as to be unrecognizable. Include full-write.h.
5052 (full_write) Return size_t, with short writes meaning failure.
5053 All callers changed. This fixes a bug with large buffers
5055 * utime.c: Include full-write.h.
5057 2001-08-30 Paul Eggert <eggert@twinsun.com>
5059 Merge 'exclude' changes from tar 1.13.22.
5060 This fixes one or two unlikely storage allocation overflow bugs,
5061 but doesn't change user-visible behavior otherwise.
5063 2001-08-30 Paul Eggert <eggert@twinsun.com>
5065 * exclude.c (bool): Declare, perhaps by including stdbool.h.
5066 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
5067 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
5068 Include if available.
5069 (<xalloc.h>): Include
5070 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
5071 (verify): New macro. Use it to verify that EXCLUDE macros do not
5072 collide with FNM macros.
5073 (struct patopts): New struct.
5074 (struct exclude): Use it, as exclude patterns now come with options.
5075 (new_exclude): Support above changes.
5076 (new_exclude, add_exclude_file):
5077 Initial size must now be a power of two to simplify overflow checking.
5078 (free_exclude, fnmatch_no_wildcards): New function.
5079 (excluded_filename): No longer requires options arg, as the options
5080 are determined by add_exclude. Now returns bool, not int.
5081 (excluded_filename, add_exclude):
5082 Add support for the fancy new exclusion options.
5083 (add_exclude, add_exclude_file): Now takes int options arg.
5084 Check for arithmetic overflow when computing sizes.
5085 (add_exclude_file): xrealloc might modify errno, so don't
5086 realloc until after errno might be used.
5088 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
5090 (free_exclude): New decl.
5091 (add_exclude, add_exclude_file): Now takes int options arg.
5092 (excluded_filename): No longer requires options arg, as the options
5093 are determined by add_exclude. Now returns bool, not int.
5095 2001-08-30 Paul Eggert <eggert@twinsun.com>
5097 * alloca.c (alloca): Arg is of type size_t, not unsigned.
5099 2001-08-27 Jim Meyering <meyering@lucent.com>
5101 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
5103 * version-etc.c (N_): Remove definition.
5104 Revert most of last change.
5105 Instead, simply don't mark the `Copyright...' string for translation.
5106 Based on advice from Paul Eggert.
5108 * strtoxmax.c: Tweak comment.
5110 2001-08-26 Jim Meyering <meyering@lucent.com>
5112 * version-etc.c (version_etc_copyright_fmt): Replace literal year
5113 of copyright with `%s' so translators don't get an untranslated
5115 (COPYRIGHT_YEAR): Define.
5116 (version_etc): Use fprintf rather than fputs.
5117 Suggestion from Ulrich Drepper.
5119 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
5121 * strtoll.c: New file, from GNU libc.
5122 * xstrtoimax.c: New file.
5124 * xstrtol.h: Add xstrtoimax.
5125 * strtoumax.c: New file. Simply include "strtoumax.c".
5126 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
5128 * strtoumax.c: Factor to work both for unsigned and signed types, ...
5129 * strtoxmax.c: ... then renamed to this.
5131 2001-08-13 Paul Eggert <eggert@twinsun.com>
5133 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
5134 Port to Solaris 8, where 'sed' requires a space after the 'r'
5135 command, and where sh dislikes "$/". Clean up the spacing a bit.
5136 Redirect output to $tmp just once.
5138 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
5140 * addext.c (<errno.h>): Include.
5141 (errno): Declare if not defined.
5142 (addext): Work correctly when pathconf returns -1 and leaves
5143 errno alone because there is no limit. Also, work even if
5144 pathconf returns a value greater than SIZE_MAX.
5146 2001-08-12 Jim Meyering <meyering@lucent.com>
5148 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
5149 Simply `return getcwd (NULL, 0);'.
5150 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
5151 Use 1300 as initial value for length, not PATH_MAX.
5153 * pathmax.h: Clean up cpp syntax.
5155 2001-08-12 Jim Meyering <meyering@lucent.com>
5157 * gettimeofday.c: New file.
5159 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
5161 2001-08-04 Jim Meyering <meyering@lucent.com>
5163 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
5164 to get in sync with glibc.
5166 2001-08-03 Paul Eggert <eggert@twinsun.com>
5168 The following changes are from gettext 0.10.39 as maintained by
5171 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
5172 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
5173 with inverted sense. All uses changed.
5175 * mbswidth.c: Don't include <limits.h>.
5176 Include <stdlib.h> and <string.h> unconditionally.
5177 (iswcntrl, mbsinit, ISCNTRL): New macros.
5178 (mbsnwidth): Use K&R style function declarations.
5179 Don't bother checking for MB_LEN_MAX == 1, since the compiler
5180 can optimize it when MB_CUR_MAX == 1.
5181 The width of control characters is zero, not 1.
5183 2001-07-15 Jim Meyering <meyering@lucent.com>
5185 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
5186 (BUILT_SOURCES): Add unlocked-io.h.
5187 (io_functions): Define.
5188 (unlocked-io.h): New rule.
5189 (DISTCLEANFILES): Add unlocked-io.h.
5190 (all-local): Depend on unlocked-io.h, to ensure it is created.
5192 * unlocked-io.hin: New file
5194 * regex.c: Update from glibc.
5196 2001-07-05 Jim Meyering <meyering@lucent.com>
5198 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
5200 (libfetish_a_SOURCES): Put all .h files here instead.
5201 Remove a thus-exposed (better checks in automake) duplicate and
5202 two unnecessary .h files.
5204 2001-06-11 Jim Meyering <meyering@lucent.com>
5206 * regex.c: Update from GNU libc.
5208 2001-05-27 Jim Meyering <meyering@lucent.com>
5210 * readutmp.h (UT_TYPE): Define.
5212 2001-05-24 Jim Meyering <meyering@lucent.com>
5214 * argmatch.c: Include "quote.h".
5215 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
5216 quote function. Reported by Göran Uddeborg.
5218 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
5220 * dirname.c (dir_name): Compute append_dot using path, not newpath
5221 which is not yet declared.
5223 2001-05-11 Paul Eggert <eggert@twinsun.com>
5225 * Makefile.am (libfetish_a_SOURCES):
5226 Add strftime.c, since we now compile it on all hosts.
5228 * strftime.c (my_strftime):
5229 Define to nstrftime if emacs, but only if my_strftime is not defined.
5230 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
5231 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
5232 Add one more extra argument: a nanoseconds value.
5235 (my_strftime function): Add %N format.
5236 (emacs_strftimeu): Renamed from emacs_strftime,
5237 with extra ut argument.
5239 2001-05-11 Paul Eggert <eggert@twinsun.com>
5241 dirname code cleanup. base_name now behaves more compatibly
5242 with POSIX basename when given file names that have trailing
5243 slashes, and similarly for dir_name. Add new primitives
5244 base_len and dir_len. Put the directory-name-related decls
5247 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
5248 * backupfile.c (base_name): Likewise.
5249 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
5250 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
5251 * makepath.c (strip_trailing_slashes): Likewise.
5252 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
5254 * rename.c (strip_trailing_slashes): Likewise.
5255 * same.c (base_name): Likewise.
5256 * stripslash.c (ISSLASH): Likewise.
5258 * addext.c: Include <dirname.h> after size_t is defined.
5259 * backupfile.c: Likewise.
5261 * addext.c (addext): Use base_len to trim redundant
5262 trailing slashes instead of doing it ourselves.
5263 But do not trim the last slash if it is not redundant.
5265 * backupfile.c (find_backup_file_name,
5266 max_backup_version): Use base_len instead of rolling it ourselves.
5267 Handle the case of "" and (on DOS) "C:" correctly.
5269 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
5270 Include <string.h>, <dirname.h>.
5271 (base_name): Allow file names ending in slashes, other than names
5272 that are all slashes. In this case, return the basename followed
5273 by the slashes. This is more general, and can be used in places
5274 where the original base_name purposely had an assertion failure.
5275 (base_len): New function.
5277 * dirname.c: Include <string.h> instead of <stdlib.h>.
5278 Do not include <assert.h>; no longer needed.
5280 (memrchr): Remove decl.
5281 (dir_name_r): Remove.
5282 (dir_len): Renamed from dirlen. All callers changed.
5283 Rewrite in terms of base_name, for simplicity and consistency.
5284 (dir_name): Never return NULL. All callers changed.
5285 Do not include <stdlib.h> in test program; no longer needed.
5286 return 0; is fine for test program.
5288 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
5290 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
5292 * path-concat.c (path_concat): Use base_len to compute
5293 base length, not strlen; this means we cannot rely on memcpy
5296 * same.c (STREQ): Remove.
5297 (same_name): Handle the case where the basename ends in trailing '/'.
5299 * stripslash.c (strip_trailing_slashes): Return nonzero if
5300 a slash was stripped. Do not strip the last slash after a
5303 2001-04-08 Jim Meyering <meyering@lucent.com>
5305 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
5306 recomputed; that's necessary when the offset spans a DST transition.
5307 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
5309 2001-04-02 Jim Meyering <meyering@lucent.com>
5311 * regex.h, regex.c: Update from GNU libc.
5313 2001-03-19 Paul Eggert <eggert@twinsun.com>
5315 * version-etc.c (version_etc_copyright): Update to 2001.
5317 2001-03-16 Paul Eggert <eggert@twinsun.com>
5319 * tempname.c (uint64_t): Define to uintmax_t if
5320 not defined, and if UINT64_MAX is not defined.
5321 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
5322 Reported by John David Anglin.
5324 2001-03-10 Bruno Haible <haible@clisp.cons.org>
5326 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
5327 alias if codeset is empty.
5328 * config.charset (BeOS): Use wildcard syntax.
5330 2001-03-13 Jim Meyering <meyering@lucent.com>
5332 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
5333 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
5336 2001-03-06 Bruno Haible <haible@clisp.cons.org>
5338 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
5340 * unicodeio.c (print_unicode_char): Simplify accordingly.
5342 2001-03-06 Bruno Haible <haible@clisp.cons.org>
5344 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
5345 support for DOS/DJGPP.
5347 2001-02-28 Paul Eggert <eggert@twinsun.com>
5349 * Makefile.am (libfetish_a_SOURCES):
5350 Add dup-safer.c, fopen-safer.c.
5351 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
5353 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
5355 2001-02-25 Paul Eggert <eggert@twinsun.com>
5357 The mkstemp replacement is taken from glibc 2.2.2, with some
5358 portability fixes for use outside glibc, as follows:
5360 * tempname.c (struct_stat64): New macro.
5361 (direxists, __gen_tempname): Use it.
5362 This avoids a portability problem with Solaris 8.
5364 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
5365 (<stddef.h>, <stdint.h>, <string.h>):
5366 Include only if STDC_HEADERS || _LIBC.
5367 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
5368 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
5369 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
5370 (__set_errno): Define this macro if <errno.h> doesn't.
5371 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
5372 Define these macros if <stdio.h> doesn't.
5373 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
5374 Define these macros if <sys/stat.h>
5375 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
5376 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
5377 __xstat64): Define if not _LIBC.
5378 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
5379 (__gen_tempname): Invoke gettimeofday only if
5380 HAVE_GETTIMEOFDAY || _LIBC;
5381 otherwise, fall back on plain "time".
5382 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
5384 * mkstemp.c (__GT_FILE): Define to zero if not defined.
5386 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
5388 2001-02-17 Jim Meyering <meyering@lucent.com>
5390 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
5391 around included file name.
5393 * strnlen.c (__strnlen): Merge in a change from GNU libc.
5395 * strftime.c: Update from GNU libc (the only changes were to comments).
5397 2001-02-13 Bruno Haible <haible@clisp.cons.org>
5399 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
5401 2001-02-17 Paul Eggert <eggert@twinsun.com>
5403 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
5404 Remove workaround macros for hosts that have mbrtowc but not
5405 mbstate_t, as we now insist on proper declarations for both
5406 before using mbrtowc.
5408 2001-02-17 Jim Meyering <meyering@lucent.com>
5410 * regex.c: Update from libc.
5412 2001-02-16 Paul Eggert <eggert@twinsun.com>
5414 * alloca.c (malloc): Undef before defining, since stdlib.h
5415 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
5416 Reported by Mark Hounschell via Paul Eggert.
5418 2001-01-30 Bruno Haible <haible@clisp.cons.org>
5420 * config.charset: Update for FreeBSD 4.2.
5422 2001-01-26 Jim Meyering <meyering@lucent.com>
5424 * quotearg.c: Include stddef.h.
5425 * quote.c: Include stddef.h.
5426 Reported by Axel Kittenberger.
5428 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
5429 line in double quotes so that it evokes a better diagnostic.
5430 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
5431 Reported by Axel Kittenberger.
5433 2001-01-15 Bruno Haible <haible@clisp.cons.org>
5435 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
5436 to avoid a warning. Add back 'const' to inptr.
5438 2001-01-16 Jim Meyering <meyering@lucent.com>
5440 * basename.c: Include <stdio.h>, needed by assert on SunOS 4.
5443 2001-01-14 Jim Meyering <meyering@lucent.com>
5445 * rename.c: New file. From Volker Borchert.
5446 Include stdlib.h, string.h or strings.h, and xalloc.h.
5447 Use strip_trailing_slashes rather than open-coding it.
5449 2001-01-03 Paul Eggert <eggert@twinsun.com>
5451 * strftime.c: Sync with glibc time/strftime.c 1.81.
5453 2001-01-03 Jim Meyering <meyering@lucent.com>
5455 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
5456 local `inptr' to avoid warning with some system declarations of iconv.
5458 2000-12-29 Paul Eggert <eggert@twinsun.com>
5460 * modechange.c: Do not assume that mode_t uses the
5461 traditional octal encoding. E.g. "chmod 1 FOO" should set
5462 the other-execute bit of FOO even if S_IXOTH != 1.
5464 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
5465 WOTH, XOTH, ALLM): New macros.
5466 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
5467 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
5469 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
5470 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
5472 No need to use uintmax_t; unsigned long is long enough.
5473 Don't bother to get suffix since we don't use it.
5475 2000-12-24 Jim Meyering <meyering@lucent.com>
5477 * hash.c (is_prime): Return explicit boolean values.
5478 (hash_get_first): Return NULL to appease Irix5.6's 89.
5479 Reported by Nelson Beebe.
5481 2000-10-31 Bruno Haible <haible@clisp.cons.org>
5483 * localcharset.c (locale_charset): Add support for Win32.
5485 2000-12-18 Paul Eggert <eggert@twinsun.com>
5487 * physmem.h, physmem.c: New files.
5489 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
5490 (noinst_HEADERS): Add physmem.h.
5492 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
5493 't' for compatibility with Solaris 8 sort.
5495 2000-12-18 Bruno Haible <haible@clisp.cons.org>
5497 * config.charset: Add support for BeOS.
5499 2000-12-16 Jim Meyering <meyering@lucent.com>
5501 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
5502 SHELLS_FILE to a file name that's useful on djgpp systems.
5504 (ADDITIONAL_DEFAULT_SHELLS): Define.
5505 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
5506 Based mostly on a patch from Prashant TR.
5508 2000-12-16 Jim Meyering <meyering@lucent.com>
5510 This bug had a serious impact on chown: `chown N:M FILE' (for integer
5511 N and M) would have treated it like `chown N:N FILE'.
5513 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
5515 2000-10-31 Bruno Haible <haible@clisp.cons.org>
5517 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
5518 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
5519 to the list of canonical encodings. Rename EUC-CN to GB2312.
5521 2000-12-08 Andreas Schwab <schwab@suse.de>
5523 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
5524 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
5526 2000-12-07 Jim Meyering <meyering@lucent.com>
5528 * stripslash.c (ISSLASH): Define.
5529 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
5532 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
5533 (dir_name_r): Declare this function as static.
5534 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
5535 manifest itself on a name containing a mix of slashes and
5537 Make this function work with names starting with a DOS-style
5538 drive letter and colon prefix.
5539 (dir_name): Append `.' if necessary.
5540 Based mostly on patches from Prashant TR and Eli Zaretskii.
5542 * dirname.h (dir_name_r): Remove prototype.
5544 2000-12-05 Jim Meyering <meyering@lucent.com>
5546 * dirname.c (dir_name_r): Add `const' in a few local declarations.
5548 2000-12-04 Jim Meyering <meyering@lucent.com>
5550 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
5551 Also include memory.h, stdlib.h, unistd.h if appropriate.
5552 Reported by Andreas Jaeger (conflicting declaration of malloc).
5554 2000-12-02 Jim Meyering <meyering@lucent.com>
5556 * closeout.h: Make idempotent, to avoid some obscure warnings.
5558 2000-12-01 Paul Eggert <eggert@twinsun.com>
5560 * memrchr.c: Include <config.h> before any system include file.
5562 2000-11-29 Paul Eggert <eggert@twinsun.com>
5564 * dirname.c (dir_name_r): Fix typo: int -> size_t.
5566 2000-11-26 Jim Meyering <meyering@lucent.com>
5568 * memcoll.c: Include sys/types.h. From Werner Almesberger.
5570 2000-11-22 Paul Eggert <eggert@twinsun.com>
5572 * strftime.c (my_strftime): Do not invoke mbrlen with a
5573 size of (size_t) -1; it's not portable.
5575 2000-11-17 Akim Demaille <akim@epita.fr>
5577 * obstack.h: Formatting changes.
5578 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
5579 prevent type checking.
5580 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
5581 cast the value to (void *): assigning a `foo *' to a `void *'
5583 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
5585 2000-11-17 Jim Meyering <meyering@lucent.com>
5587 * strstr.c: Update from GNU libc.
5589 2000-11-16 Jim Meyering <meyering@lucent.com>
5591 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
5593 2000-11-11 Jim Meyering <meyering@lucent.com>
5595 * error.c: Add a couple #includes, merging from GNU libc version.
5597 2000-11-10 Jim Meyering <meyering@lucent.com>
5599 * obstack.h: Update from GNU libc.
5600 * obstack.c: Likewise.
5602 2000-11-06 Paul Eggert <eggert@twinsun.com>
5604 * getusershell.c (setusershell): Use rewind rather than
5605 fseek/fseeko, to avoid configuration hassles with fseeko.
5606 Don't bother opening SHELLS_FILE if shellstream is NULL;
5609 2000-11-05 Jim Meyering <meyering@lucent.com>
5611 * makepath.h (make_dir): Declare.
5612 * makepath.c (make_dir): Remove `static' attribute.
5615 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
5617 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
5618 last one in a bucket, advance to the next bucket.
5620 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
5622 * fnmatch.c: Do not comment out all the code if we are using
5623 the GNU C library, because in some cases we are replacing buggy
5624 code in the GNU C library itself.
5626 2000-10-30 Paul Eggert <eggert@twinsun.com>
5628 * error.h, getline.h, modechange.h:
5629 Remove "2000" from Copyright line, as the file hasn't been
5630 changed this year other than in the copyright notice.
5632 * xalloc.h: Add "2000" to Copyright line, as this file
5633 was changed this year.
5635 2000-10-30 Paul Eggert <eggert@twinsun.com>
5637 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
5638 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
5639 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
5641 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
5643 * regex.h (__restrict_arr): Move definition out of #ifndef block.
5644 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
5645 doesn't define __restrict_arr.
5647 2000-10-29 Jim Meyering <meyering@lucent.com>
5649 * xstat.in: Fix grammar in comment.
5651 2000-10-28 Jim Meyering <meyering@lucent.com>
5653 * memchr.c: Update from libc.
5654 Adjust for portability:
5655 [HAVE_STDLIB_H]: Include stdlib.h.
5656 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
5657 Undef __memchr, too.
5658 [!weak_alias]: Define __memchr to memchr.
5660 * regex.c: Update from libc.
5661 * regex.h: Likewise.
5662 * getopt1.c: Likewise.
5663 * memcmp.c: Likewise.
5665 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
5666 Avoid using fseek, when possible -- it's broken by design.
5667 Patch by Ulrich Drepper.
5669 2000-10-26 Jim Meyering <meyering@lucent.com>
5671 * strftime.c: Update from libc.
5673 2000-10-25 Jim Meyering <meyering@lucent.com>
5675 * obstack.c: Update from libc.
5677 2000-10-23 Jim Meyering <meyering@lucent.com>
5679 * hard-locale.c (hard_locale): Revert last change -- it was simply
5680 wrong. That set_locale call must not have any side effects.
5683 2000-10-22 Jim Meyering <meyering@lucent.com>
5685 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
5686 [CYCLIC]: Remove now-unused definition.
5688 * save-cwd.c (O_DIRECTORY): Define, if needed.
5689 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
5690 Suggestion from Ulrich Drepper.
5692 2000-10-21 Jim Meyering <meyering@lucent.com>
5694 * dirname.c (dir_name_r): New function, factored out of dir_name.
5695 (dir_name): Use dir_name_r.
5696 * dirname.h (dir_name_r): Declare it.
5698 2000-10-21 Jim Meyering <meyering@lucent.com>
5700 * dirname.c (memrchr): Declare if necessary.
5701 (dir_name): Remove the restriction that there be no
5702 trailing slashes. Now, this code skips past them, effectively
5704 [TEST_DIRNAME] (main): New unit tests.
5706 * memrchr.c: New file from GNU libc.
5707 Undef __memrchr, too.
5708 [!weak_alias]: Define __memrchr to memrchr.
5709 Guard weak_alias use with `#ifdef weak_alias'.
5711 2000-10-17 Jim Meyering <meyering@lucent.com>
5713 * quote.h (PARAMS): Define and use.
5714 Reported by Akim Demaille.
5716 * getopt.c: Update from libc.
5718 2000-10-16 Jim Meyering <meyering@lucent.com>
5720 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
5723 2000-09-25 Jim Meyering <meyering@lucent.com>
5725 * md5.h (rol): Define (from GnuPG).
5727 * sha.c: Give credit (GnuPG) where due.
5728 (M): Use rol rather than open-coding it.
5729 Add a FIXME comment.
5731 2000-09-21 Jim Meyering <meyering@lucent.com>
5733 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
5734 Reported by Michael Stone.
5736 2000-09-20 Jim Meyering <meyering@lucent.com>
5738 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
5739 (noinst_HEADERS): Add sha.h.
5740 Based on code from Scott G. Miller and from GnuPG.
5742 2000-09-15 Jim Meyering <meyering@lucent.com>
5744 * regex.c: Update from libc.
5746 2000-09-10 Jim Meyering <meyering@lucent.com>
5748 * getopt.c (_getopt_internal): Update from glibc.
5750 2000-09-09 Jim Meyering <meyering@lucent.com>
5752 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
5753 think it should be used as a general replacement for isascii.
5754 * fnmatch.c: Likewise.
5755 * mbswidth.c: Likewise
5756 * regex.c: Likewise.
5759 * userspec.c: Include sys/param.h and limits.h.
5761 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
5762 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
5763 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
5764 UID, GID. Check range.
5766 2000-09-06 Jim Meyering <meyering@lucent.com>
5768 * getopt.c (_getopt_internal): Update from glibc.
5770 2000-08-30 Jim Meyering <meyering@lucent.com>
5772 * strftime.c: Merge in changes from GNU libc.
5774 2000-08-26 Jim Meyering <meyering@lucent.com>
5776 * closeout.c: Include "__fpending.h".
5777 (close_stdout_status): Return right away if there's nothing to flush.
5779 * Makefile.am (noinst_HEADERS): Add __fpending.h.
5780 * __fpending.c: New file.
5781 * __fpending.h: New file.
5783 2000-08-07 Paul Eggert <eggert@twinsun.com>
5785 Standardize on "memory exhausted" instead of "Memory exhausted"
5786 or "virtual memory exhausted".
5787 * obstack.c (print_and_abort): Use "memory exhausted", not
5788 "virtual memory exhausted".
5789 * same.c (same_name): Invoke xalloc_die instead of printing
5791 * userspec.c (parse_user_spec): Likewise.
5792 * bumpalloc.h: comment fix
5793 * same.c, userspec.c: Include xalloc.h.
5795 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
5796 not char *const and pointing to a constant array.
5797 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
5798 (xrealloc): Comment fix.
5800 * userspec.c (parse_user_spec):
5801 Don't translate a message until just before returning,
5802 to avoid unnecessary translation.
5804 2000-08-07 Jim Meyering <meyering@lucent.com>
5806 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
5807 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
5808 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
5809 getgroups.c, gethostname.c, getopt.h, group-member.c,
5810 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
5811 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
5812 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
5813 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
5814 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
5815 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
5816 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
5817 yesno.c: Back out Copyright date changes for each file with no change
5818 this year. This eases coordination with other programs using the same
5819 source code modules. From Paul Eggert.
5821 2000-08-03 Greg McGary <greg@mcgary.org>
5823 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
5824 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
5825 (EXTEND_BUFFER): Use them.
5827 2000-08-01 Jim Meyering <meyering@lucent.com>
5829 * dirname.c (ISSLASH): Define.
5830 (BACKSLASH_IS_PATH_SEPARATOR): Define.
5831 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
5832 both `\' and `/' may be use as path separators.
5833 Based on a patch from Prashant TR.
5835 2000-07-31 Paul Eggert <eggert@twinsun.com>
5837 * quotearg.c (quotearg_n_options): Don't make the initial
5838 slot vector a constant, since it might get modified.
5840 2000-07-31 Jim Meyering <meyering@lucent.com>
5842 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
5843 * obstack.c (print_and_abort): Likewise.
5845 2000-07-30 Paul Eggert <eggert@twinsun.com>
5847 * quotearg.c (quotearg_n_options): Preallocate a slot 0
5848 buffer, so that the caller can always quote one small
5849 component of a "memory exhausted" message in slot 0.
5850 From a suggestion by Jim Meyering.
5852 2000-07-30 Jim Meyering <meyering@lucent.com>
5854 * makepath.c (make_path): Quote the other instance, too.
5856 * quotearg.c (N_STATIC_SLOTVECS): Define.
5857 (STATIC_BUF_SIZE): Define.
5858 (quotearg_n_options): Use only statically allocated storage when
5859 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
5860 than STATIC_BUF_SIZE.
5862 2000-07-29 Jim Meyering <meyering@lucent.com>
5864 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
5865 * dirname.c (dir_name): Likewise.
5867 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
5869 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
5870 (dir_name): Assert that there are no trailing slashes.
5872 2000-07-18 Bruno Haible <haible@clisp.cons.org>
5874 * mbswidth.h (mbswidth): Add a flags argument.
5875 (mbswidth): New declaration.
5876 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
5877 * mbswidth.c (mbswidth): Add a flags argument.
5878 (mbsnwidth): New function.
5880 2000-07-24 Jim Meyering <meyering@lucent.com>
5882 * mbswidth.c: Remove useless #else. From Bruno Haible.
5884 2000-07-23 Paul Eggert <eggert@twinsun.com>
5886 * mbswidth.c (_XOPEN_SOURCE):
5887 Don't define; this causes problems on Solaris 7.
5888 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
5890 2000-07-23 Paul Eggert <eggert@twinsun.com>
5893 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
5894 so that mbstate_t is always defined.
5896 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
5897 be 1 in at least one GCC installation, and this configuration
5898 error is likely to be common. Ignoring MB_LEN_MAX hurts
5899 performance on hosts that have mbrtowc but have only unibyte
5900 locales, but I assume these hosts are rare.
5902 2000-07-23 Paul Eggert <eggert@twinsun.com>
5904 * quotearg.c: Streamline by invoking multibyte code only if needed.
5905 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
5906 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
5907 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
5908 invoke multibyte primitives.
5910 2000-07-23 Jim Meyering <meyering@lucent.com>
5912 * basename.c (base_name): Add an assertion.
5914 2000-07-15 Bruno Haible <clisp.cons.org>
5916 * quotearg.c: When the system forces us to redefine mbstate_t,
5917 shadow its mbsinit function.
5919 2000-07-16 Bruno Haible <haible@clisp.cons.org>
5921 * mbswidth.h: New file.
5922 * mbswidth.c: New file.
5923 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
5924 (noinst_HEADERS): Add mbswidth.h.
5926 2000-07-17 Bruno Haible <haible@clisp.cons.org>
5928 * config.charset: Add support for FreeBSD. Improve support for HP-UX
5931 2000-07-15 Jim Meyering <meyering@lucent.com>
5933 * makepath.c: Include quote.h.
5934 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
5935 corresponding argument in a `quote (...)' call.
5936 Give better diagnostics.
5938 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
5939 (noinst_HEADERS): Add quote.h.
5941 * quote.c (quote, quote_n): New file. Two functions taken verbatim
5942 from tar's src/misc.c.
5943 * quote.h: New file. Prototypes for same.
5945 2000-07-10 Paul Eggert <eggert@twinsun.com>
5947 From a suggestion by Bruno Haible.
5948 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
5949 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
5950 to decide whether to define the BeOS workaround macro;
5951 this adjusts to the change to AC_MBSTATE_T.
5953 2000-07-13 Paul Eggert <eggert@twinsun.com>
5955 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
5957 * quotearg.c (quoting_style_args, quoting_style_vals,
5958 quotearg_buffer_restyled): Add support for
5959 clocale_quoting_style. Undo previous change to
5960 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
5961 and "{RIGHT QUOTATION MARK}" msgids.
5963 2000-07-05 Paul Eggert <eggert@twinsun.com>
5965 The old behavior of quoting `like this' doesn't look good with
5966 newer, ISO-style fonts. See:
5967 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
5969 Instead, quote "like this" by default. Let the translator
5970 tailor the locale-specific quoting behavior by providing
5971 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
5973 * quotearg.c (N_): New macro.
5974 (gettext_default): New function.
5975 (quotearg_buffer_restyled): Use
5976 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
5977 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
5979 2000-07-09 Jim Meyering <meyering@lucent.com>
5981 * Most files: Update copyright dates to include 2000.
5983 2000-07-08 Jim Meyering <meyering@lucent.com>
5985 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
5987 (xgethostname): Remove now-unnecessary #ifdef.
5988 Move declaration of `err' into loop where it's used.
5990 2000-07-05 Bruno Haible <haible@clisp.cons.org>
5992 * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
5993 by allocating a larger buffer. Test the gethostname return value for
5994 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
5995 returns an error and ENAMETOOLONG isn't defined.
5997 2000-07-05 Paul Eggert <eggert@twinsun.com>
5998 and Bruno Haible <haible@clisp.cons.org>
6000 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
6002 2000-07-05 Bruno Haible <haible@clisp.cons.org>
6004 * quotearg.c (struct quoting_options): Simplify quote_these_too
6007 2000-07-03 Jim Meyering <meyering@lucent.com>
6009 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
6010 Reported by Bruno Haible.
6012 2000-07-04 Jim Meyering <meyering@lucent.com>
6014 * quotearg.c: Make inclusion of <wchar.h> independent of whether
6015 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
6018 2000-07-03 Paul Eggert <eggert@twinsun.com>
6019 and Bruno Haible <haible@clisp.cons.org>
6021 * quotearg.c (mbrtowc):
6022 Assign to *pwc, and return 1 only if result is nonzero.
6023 (iswprint): Use ISPRINT when substituting our own mbrtowc.
6025 2000-07-03 Jim Meyering <meyering@lucent.com>
6027 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
6028 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
6031 2000-07-02 Jim Meyering <meyering@lucent.com>
6033 * quotearg.c (mbstate_t): Don't define here.
6035 2000-07-02 Jim Meyering <meyering@lucent.com>
6037 * nanosleep.c (SIGCONT): Define if not already defined.
6039 2000-06-17 Bruno Haible <haible@clisp.cons.org>
6041 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
6042 per change in ../m4/ls-mntd-fs.m4.
6043 (read_filesystem_list): Ignore symbolic links.
6045 2000-06-29 Jim Meyering <meyering@lucent.com>
6047 * same.c: Include <string.h> or <strings.h>, as appropriate,
6048 for declaration of strcmp.
6050 * long-options.c: Include <stdlib.h>, for declaration of exit.
6052 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
6053 Avoid warning by casting result to `char *' to remove `const'.
6055 2000-06-17 Bruno Haible <haible@clisp.cons.org>
6057 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
6059 2000-06-26 Paul Eggert <eggert@twinsun.com>
6061 savedir now sets errno on failure and invokes xmalloc to get memory.
6062 Fix a couple of other minor bugs while we're at it.
6064 * savedir.c (<unistd.h>): Do not include; there's no need.
6065 (NAMLEN): Remove macro.
6066 (malloc, realloc): Remove decls.
6068 ("xalloc.h"): Include.
6069 (NAME_SIZE_DEFAULT): New macro.
6070 (savedir): Use xmalloc / xrealloc to allocate memory.
6071 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
6072 Skip "" directory entries.
6073 Use strlen to calculate directory entry length, since the old method
6074 is rarely used these days and isn't worth supporting.
6075 Don't use a pointer after freeing it.
6076 Check for integer overflow when calculating allocation size.
6077 Use memcpy to copy entries, instead of stpcpy.
6078 Set errno properly when returning NULL.
6079 Check for readdir error.
6081 2000-06-26 Jim Meyering <meyering@lucent.com>
6083 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
6085 2000-06-17 Bruno Haible <haible@clisp.cons.org>
6087 * getusershell.c (xmalloc, xrealloc): Remove functions.
6089 Don't include <stdlib.h>. Don't declare malloc, realloc.
6091 2000-06-23 Bruno Haible <haible@clisp.cons.org>
6093 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
6095 2000-06-24 Jim Meyering <meyering@lucent.com>
6097 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
6099 2000-06-21 Jim Meyering <meyering@lucent.com>
6101 * getpass.c: New file, from Bruno Haible. Required for BeOS.
6103 2000-06-19 Paul Eggert <eggert@twinsun.com>
6105 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
6106 (mbrtowc, mbstate_t): Define substitutes if
6107 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
6108 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
6109 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
6111 2000-06-17 Bruno Haible <haible@clisp.cons.org>
6113 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
6114 than 1024, return a memory chunk of least possible size, instead
6115 of size PATH_MAX + 2. In the loop, increment the size proportionally.
6116 Use free/xmalloc instead of xrealloc to avoid copying for very long
6119 2000-06-17 Bruno Haible <haible@clisp.cons.org>
6121 * canon-host.c (canon_host): Use malloc and memcpy to copy an
6122 address, not strdup. Include <stdlib.h> and don't declare free().
6124 2000-06-17 Bruno Haible <haible@clisp.cons.org>
6126 * path-concat.c (path_concat): Don't access dir[-1] if dir is
6129 2000-06-21 Jim Meyering <meyering@lucent.com>
6131 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
6132 (noinst_HEADERS): Add getstr.h.
6134 * getline.c (getstr): Move into a separate file.
6135 * getstr.c (getstr): New file, extracted from getline.c, with
6136 the following changes: new parameter, delim2; both delim[12]
6137 parameters have type `int', not `char'. The latter would lose
6138 with 8-bit delimiters.
6139 * getstr.h: New file.
6141 2000-06-19 Jim Meyering <meyering@lucent.com>
6143 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
6145 2000-06-18 Jim Meyering <meyering@lucent.com>
6147 * mkdir.c: Remove file, due mainly to copyright incompatibility.
6148 Besides, these days every porting target provides a mkdir function.
6150 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
6151 (this snippet comes from src/system.h).
6153 2000-06-15 Paul Eggert <eggert@twinsun.com>
6155 * human.c (adjust_value): New function.
6156 (human_readable_inexact): Apply rounding style even when
6157 printing approximate values.
6159 2000-06-14 Paul Eggert <eggert@twinsun.com>
6161 * human.c (human_readable_inexact): Allow an input block
6162 size that is not a multiple of the output block size, and vice versa.
6163 Reported by Piergiorgio Sartor.
6165 2000-06-14 Paul Eggert <eggert@twinsun.com>
6167 * getdate.y (get_date): Apply relative times after time
6168 zone indicator, not before. Reported by Todd A. Jacobs.
6170 2000-06-13 Jim Meyering <meyering@lucent.com>
6172 * Makefile.am (all-local): Depend on lstat.c and stat.c.
6174 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
6176 2000-06-12 Paul Eggert <eggert@twinsun.com>
6178 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
6180 2000-06-04 Paul Eggert <eggert@twinsun.com>
6182 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
6184 2000-06-04 Jim Meyering <meyering@lucent.com>
6186 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
6187 SunOS 4.1.4 for which gid_t is an unsigned type.
6189 2000-06-03 Jim Meyering <meyering@lucent.com>
6191 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
6193 2000-05-26 Bruno Haible <haible@clisp.cons.org>
6195 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
6196 newer, don't install charset.alias.
6197 * config.charset: Change the Linux/glibc rules so they become empty
6198 on glibc-2.1 or newer.
6200 2000-06-02 Jim Meyering <meyering@lucent.com>
6202 * mountlist.c: Back out last change. Instead, do this...
6203 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
6204 member using the same `ignore'-testing code.
6205 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
6209 2000-05-29 Jim Meyering <meyering@lucent.com>
6211 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
6212 with the `ignore' attribute. Based on a patch from Mark D. Roth.
6214 2000-05-22 Jim Meyering <meyering@lucent.com>
6216 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
6218 2000-05-18 Jim Meyering <meyering@lucent.com>
6220 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
6221 back, too, since it may have been modified by allocate_entry.
6222 (hash_delete): Rewrite to use neither the assignment operator
6223 nor the comma operator in an if-expression.
6225 2000-05-15 Paul Eggert <eggert@twinsun.com>
6228 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
6229 Remove; no longer needed.
6230 "quotearg.h": Add include.
6231 (file_name): Do not bother to explicitly initialize to NULL; it's less
6232 efficient on some hosts.
6233 (close_stdout_status): Remove test as to whether stdout was already
6234 closed; it breaks for the case "echo x | sort >&-".
6235 Quote file name colons.
6236 Do not assume that _("write error") lacks format strings.
6238 2000-05-15 Jim Meyering <meyering@lucent.com>
6240 * version-etc.c (version_etc_copyright): Update the copyright string
6241 used in all --version output.
6243 2000-05-14 Jim Meyering <meyering@lucent.com>
6245 * closeout.c (close_stdout_set_file_name): New function.
6246 (close_stdout_status): Use new file-scoped global.
6247 Return right away if fstat says the stdout file descriptor is invalid.
6248 * closeout.h (close_stdout_set_file_name): Declare.
6250 2000-05-10 Jim Meyering <meyering@lucent.com>
6252 * closeout.c [default_exit_status]: New file-scoped variable.
6253 (close_stdout_set_status): New function.
6254 * closeout.h (close_stdout_set_status): Declare.
6256 2000-05-08 Jim Meyering <meyering@lucent.com>
6258 * long-options.c: Don't include closeout.h.
6259 (parse_long_options): Don't call close_stdout for --version.
6261 2000-05-06 Jim Meyering <meyering@lucent.com>
6263 * strnlen.c: Undefine __strnlen and strnlen.
6264 [!weak_alias]: Define __strnlen to strnlen.
6266 * atexit.c: New file, from libiberty.
6268 2000-05-06 Jim Meyering <meyering@lucent.com>
6270 * closeout.c (close_stdout_status): Also check for errors on the
6273 2000-05-05 Bruno Haible <haible@clisp.cons.org>
6275 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
6276 instead of xmalloc, xrealloc, path_concat.
6277 (locale_charset): Treat empty environment variables as absent.
6278 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
6280 2000-05-04 Jim Meyering <meyering@lucent.com>
6282 * getopt.c: Update from glibc.
6283 * obstack.c: Likewise.
6284 * obstack.h: Likewise.
6285 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
6287 * regex.h: Likewise.
6288 * strndup.c: Likewise.
6289 * strnlen.c: New file, from glibc.
6291 2000-05-01 Jim Meyering <meyering@lucent.com>
6293 * full-write.c (full_write): Remove `FIXME' part of comment.
6295 2000-04-29 Jim Meyering <meyering@lucent.com>
6297 * path-concat.c: Declare strdup only if it's not defined.
6298 * canon-host.c: Likewise.
6300 2000-04-28 Jim Meyering <meyering@lucent.com>
6302 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
6303 redefinition warning on some systems (HPUX). Otherwise, regex.h is
6304 included first, then limits.h is included by locale.h by libintl.h.
6305 From John David Anglin.
6307 2000-04-25 Jim Meyering <meyering@lucent.com>
6309 * makepath.c (S_IRWXUGO): Define.
6310 (make_path): Always perform explicit chmod if MODE specifies any
6311 of the `special' permission bits. Prompted by a bug report against
6312 install from Mate Wierdl and Joost van Baal.
6314 2000-04-18 Jim Meyering <meyering@lucent.com>
6318 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
6319 getpagesize. For BeOS. Based on a patch from Bruno Haible.
6321 2000-04-17 Jim Meyering <meyering@lucent.com>
6323 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
6324 the definition of it to rpl_strftime also defined-away the system's
6327 2000-04-15 Jim Meyering <meyering@lucent.com>
6329 Use `C' to denote so-called `contiguous' files, the same way
6331 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
6332 (ftypelet): Use S_ISCTG.
6333 From Michael Deutschmann.
6335 2000-04-14 Jim Meyering <meyering@lucent.com>
6337 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
6339 2000-04-08 Jim Meyering <meyering@lucent.com>
6341 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
6342 names don't conflict. Reported by Eli Zaretskii.
6344 2000-03-28 Bruno Haible <haible@clisp.cons.org>
6346 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
6347 bug. Deal with the different error behavior of Irix iconv.
6349 2000-04-07 Jim Meyering <meyering@lucent.com>
6351 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
6352 to work around system header problems on AIX 3.2.5. From Bruno Haible.
6354 2000-04-05 Jim Meyering <meyering@lucent.com>
6356 Portability tweaks required for ultrix4.3.
6357 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
6358 * readutmp.c: Include sys/types.h before sys/stat.h.
6359 * canon-host.c: Declare strdup.
6360 * path-concat.c: Likewise.
6361 From John David Anglin.
6363 2000-04-04 Jim Meyering <meyering@lucent.com>
6365 Be more DOS 8.3-friendly.
6366 * ref-add.sin: Renamed from ref-add.sed.in.
6367 * ref-del.sin: Renamed from ref-del.sed.in.
6368 * Makefile.am: Reflect renaming.
6369 Reported by Eli Zaretskii.
6371 Use a temporary file name that won't clash with `charset.alias'
6372 in the DOS 8.3 name space.
6373 * Makefile.am (charset_tmp): Define.
6374 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
6375 (uninstall-local): Likewise.
6376 Reported by Eli Zaretskii.
6378 2000-03-29 Paul Eggert <eggert@twinsun.com>
6380 * time/strftime.c (my_strftime): Make sure we call the system
6381 strftime, not ourselves, when invoking the underlying strftime.
6383 2000-03-24 Jim Meyering <meyering@lucent.com>
6385 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
6386 (charset_alias): Define.
6387 (install-exec-local): Factor out common code.
6388 (uninstall-local): Split lines longer than 80.
6389 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
6391 (.sed.in.sed): New rule. Don't redirect directly to $@.
6392 (CLEANFILES): Add ref-add.sed and ref-del.sed.
6394 2000-03-19 Bruno Haible <haible@clisp.cons.org>
6396 * config.charset: Output a line containing "Packages using this file".
6397 * ref-add.sed.in, ref-del.sed.in: New files.
6398 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
6399 ref-del.sed): New rules.
6401 2000-03-17 Jim Meyering <meyering@lucent.com>
6403 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
6404 Otherwise, include <strings.h>
6406 2000-03-17 Bruno Haible <haible@clisp.cons.org>
6408 * unicodeio.c (utf8_wctomb): New function.
6409 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
6410 format instead of in UCS-4 with platform dependent endianness.
6412 2000-03-07 Paul Eggert <eggert@twinsun.com>
6414 * savedir.c (savedir): Work even if directory size is
6415 negative; this can happen with some screwy NFS configurations.
6417 2000-03-06 Jim Meyering <meyering@lucent.com>
6419 * localcharset.c (get_charset_aliases): Don't try to free file_name
6420 if it's NULL (because we ran out of memory). From Bruno Haible.
6422 2000-03-05 Jim Meyering <meyering@lucent.com>
6424 * localcharset.c ("path-concat.h"): Include.
6425 (get_charset_aliases): Use path_concat instead of ANSI string
6428 * unicodeio.h (PARAMS): Define.
6429 Use it to guard prototype.
6431 2000-03-04 Jim Meyering <meyering@lucent.com>
6433 * Makefile.am (install-exec-local): Create $(libdir) before installing
6435 (uninstall-local): Uncomment this rule so `make distcheck' works
6438 * unicodeio.c (<errno.h>): Include it.
6439 (errno): Declare if not defined.
6441 * localcharset.c: Add Bruno's comment justifying use of volatile.
6443 * config.charset: New version, incorporating remarks from a linux
6444 i18n mailing list. From Bruno Haible.
6446 2000-03-02 Jim Meyering <meyering@lucent.com>
6448 * Makefile.am (EXTRA_DIST): Add config.charset.
6450 2000-03-01 Jim Meyering <meyering@lucent.com>
6452 * localcharset.c: Guard some #includes with `#if HAVE_...'.
6453 * unicodeio.c: Likewise.
6455 2000-02-02 Bruno Haible <haible@clisp.cons.org>
6457 * config.charset: New file.
6458 * localcharset.c: New file.
6459 * unicodeio.h, unicodeio.c: New files.
6460 * Makefile.am (DEFS): Add -DLIBDIR=...
6461 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
6462 (noinst_HEADERS): Add unicodeio.h.
6463 (all-local, install-exec-local, charset.alias): New targets.
6465 2000-02-28 Paul Eggert <eggert@twinsun.com>
6467 * quotearg.c (ALERT_CHAR): New macro.
6468 (quotearg_buffer_restyled): Use it.
6470 2000-02-27 Jim Meyering <meyering@lucent.com>
6472 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
6473 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
6475 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
6476 not `#if STDC_HEADERS'.
6477 Declare malloc if needed.
6479 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
6480 now that autoconf always defines the HAVE_DECL_ symbols.
6481 * human.c: Likewise.
6483 * strtoumax.c: Likewise.
6485 * backupfile.c: Arrange for cpp to fail if the configure-time
6486 declaration check was not run.
6488 * human.c: Likewise.
6490 * strtoumax.c: Likewise.
6492 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
6493 then first look up the entire `.'-containing string as a login name.
6495 2000-02-18 Paul Eggert <eggert@twinsun.com>
6497 * getdate.y: Handle two-digit years with leading zeros correctly.
6498 (textint): New typedef.
6499 (parser_control): Member year changed from int to textint.
6501 (YYSTYPE): Removed; replaced by %union with int and textint members.
6502 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
6503 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
6504 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
6505 (tSNUMBER, tUNUMBER): Now of type <textintval>.
6506 (date, number, to_year): Use width of number in digits, not its value,
6507 to determine whether it's a 2-digit year, or a 2-digit time.
6508 (yylex): Store number of digits of numeric tokens.
6509 Reported by John Kendall.
6511 (parser_control): Changed from struct parser_control to typedef (for
6512 consistency). All uses changed.
6514 (tID): Removed; not used.
6515 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
6517 2000-02-14 Paul Eggert <eggert@twinsun.com>
6519 * getpagesize.h (getpagesize): Port to VMS for Alpha;
6520 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
6522 2000-02-12 Jim Meyering <meyering@lucent.com>
6524 * userspec.c (ISDIGIT): Define it.
6525 (isdigit): Remove definition.
6526 (is_number): Use ISDIGIT, not isdigit.
6527 <libintl.h>: Include.
6529 (parse_user_spec): Mark translatable strings.
6531 2000-02-10 Jim Meyering <meyering@lucent.com>
6533 With these changes, nanosleep.[ch] are finally enough like the other
6534 lib/* replacement files to compile on a few more losing systems.
6536 * nanosleep.h: Don't include config.h.
6537 Remove prototype from declaration of nanosleep.
6538 (PARAMS): Remove now-unneeded definition.
6539 * nanosleep.c: #undef nanosleep.
6540 (rpl_nanosleep): Rename from nanosleep.
6542 2000-02-03 Jim Meyering <meyering@lucent.com>
6544 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
6545 rather than with `#if HAVE_UTMPNAME'.
6547 2000-02-01 Jim Meyering <meyering@lucent.com>
6549 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
6551 2000-01-31 Jim Meyering <meyering@lucent.com>
6553 * nanosleep.h (nanosleep): Guard declaration with
6554 `#if ! HAVE_DECL_NANOSLEEP'.
6555 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
6556 the declaration in that vendor's sys/timers.h.
6557 Reported by Christian Krackowizer.
6559 * quotearg.c (ISASCII): Add #undef and move definition to follow
6560 inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
6561 (ISPRINT): Likewise.
6562 Reported by Tom Tromey.
6564 2000-01-30 Jim Meyering <meyering@lucent.com>
6566 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
6567 uses of ->ut_name. The latter doesn't work with new Linux header files
6568 where only utmpx.ut_user is declared.
6570 * readutmp.h (UT_USER): Define.
6572 2000-01-23 Jim Meyering <meyering@lucent.com>
6574 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
6577 2000-01-22 Jim Meyering <meyering@lucent.com>
6579 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
6580 [! HAVE_DECL_STRTOULL]: Declare strtoull.
6581 Required for some AIX systems. Reported by Christian Krackowizer.
6582 [TESTING] (main): New function.
6584 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
6585 * dirname.c (dir_name): Support for DOS-style file names with drive
6588 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
6590 * strverscmp.c (ISDIGIT): Define.
6591 (strverscmp): Use ISDIGIT, not isdigit.
6593 2000-01-17 Paul Eggert <eggert@twinsun.com>
6595 * nanosleep.c (nanosleep):
6596 Don't use SA_INTERRUPT to decide whether to call sigaction, as
6597 POSIX.1 doesn't require SA_INTERRUPT and some systems
6598 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
6599 it's been part of POSIX.1 since day 1 (in 1988).
6601 2000-01-17 Jim Meyering <meyering@lucent.com>
6603 * interlock: Remove unused file. Reported by François Pinard.
6605 2000-01-16 Paul Eggert <eggert@twinsun.com>
6607 * quotearg.c (quotearg_buffer_restyled): Do not quote
6608 alert, backslash, formfeed, and vertical tab unnecessarily in
6609 shell quoting style.
6612 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6613 Free Software Foundation, Inc.
6614 Copying and distribution of this file, with or without modification,
6615 are permitted provided the copyright notice and this notice are preserved.