1 2006-07-28 Eric Blake <ebb9@byu.net>
3 * regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6 2006-07-28 Simon Josefsson <jas@extundo.com>
8 * inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
11 2006-07-28 Simon Josefsson <jas@extundo.com>
13 * inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
16 2006-07-28 Bruno Haible <bruno@clisp.org>
18 * inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
20 2006-07-28 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
22 * inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
25 2006-07-28 Bruno Haible <bruno@clisp.org>
27 * mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph,
28 iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit): Define
30 Avoids link error on FreeBSD 4.x.
31 Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
33 * wcwidth.h (iswprint): Assume an ASCII compatible wide character
35 * mbswidth.c (iswcntrl): Likewise.
37 2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
39 * modechange.c (mode_compile): Numeric modes now affect setuid and
40 setgid on directories only if they set these bits.
41 * modechange.h: Remove obsolete comment about masks.
43 2006-07-27 Bruno Haible <bruno@clisp.org>
45 * stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
46 __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
49 2006-07-26 Eric Blake <ebb9@byu.net>
51 * mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
52 like mingw that lack mkstemp.
53 * pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
54 avoid compilation warning on mingw.
56 2006-07-25 Bruno Haible <bruno@clisp.org>
58 * version-etc.c (version_etc_va): Use va_copy, assumed to be defined in
59 <stdarg.h> or config.h.
61 2006-07-24 Bruno Haible <bruno@clisp.org>
63 * clean-temp.h: New file, from GNU gettext.
64 * clean-temp.c: New file, from GNU gettext.
66 2006-07-24 Bruno Haible <bruno@clisp.org>
68 * tmpdir.h: New file, from GNU gettext.
69 * tmpdir.c: New file, from GNU gettext.
71 2006-07-23 Bruno Haible <bruno@clisp.org>
73 * gl_anylinked_list2.h (ASYNCSAFE): New macro.
74 (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
75 gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
76 gl_linked_remove_at): Use it.
78 2006-07-23 Eric Blake <ebb9@byu.net>
80 * tmpfile-safer.c: New file.
81 * stdio-safer.h (fopen_safer): Add prototype.
82 * stdio--.h (tmpfile): Make safer.
84 2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
86 * close-stream.c, close-stream.h: New files.
88 2006-07-22 Bruno Haible <bruno@clisp.org>
90 Merge from GNU gettext 0.15.
92 2005-07-05 Bruno Haible <bruno@clisp.org>
94 * printf-args.c (printf_fetchargs): Work around broken
95 definition of wint_t on mingw.
97 2005-02-12 Bruno Haible <bruno@clisp.org>
99 * xallocsa.h: Add extern "C" for C++.
101 2006-05-17 Bruno Haible <bruno@clisp.org>
104 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
106 2006-04-30 Bruno Haible <bruno@clisp.org>
108 * progreloc.c: Include <mach-o/dyld.h> if available.
109 (find_executable): Use _NSGetExecutablePath when possible.
111 2006-05-06 Charles Wilson <cygwin@cwilson.fastmail.fm>
113 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
116 2005-12-29 Bruno Haible <bruno@clisp.org>
118 * progreloc.c (set_program_name_and_installdir): Fix
121 2005-12-04 Bruno Haible <bruno@clisp.org>
124 * progreloc.c: Include <windows.h> also on Cygwin.
125 (find_executable): Add support for Cygwin.
126 (set_program_name_and_installdir): Handle also platforms with
129 2006-07-11 Bruno Haible <bruno@clisp.org>
131 * javacomp.c: Fix a comment.
132 Reported by Jim Meyering.
134 2006-04-30 Bruno Haible <bruno@clisp.org>
136 * javacomp.h (compile_java_class): Add source_version,
137 target_version arguments.
138 * javacomp.c: Rewritten to choose only a compiler that
139 respects the specified source_version and target_version.
141 2006-06-27 Bruno Haible <bruno@clisp.org>
143 Assume correct S_ISDIR macro.
144 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
146 2006-07-22 Bruno Haible <bruno@clisp.org>
148 * javaversion.h: New file, from GNU gettext.
149 * javaversion.c: New file, from GNU gettext.
150 * javaversion.java: New file, from GNU gettext.
151 * javaversion.class: New file, from GNU gettext.
153 2006-05-17 Bruno Haible <bruno@clisp.org>
156 * javaexec.c (execute_java_class): Test for jview program
159 2006-04-09 Bruno Haible <bruno@clisp.org>
161 * fatal-signal.c: Don't include string.h.
162 (at_fatal_signal): Use a copying loop instead of memcpy.
164 2005-12-04 Bruno Haible <bruno@clisp.org>
166 * csharpexec.c: Add support for 'clix' launcher (untested).
167 (execute_csharp_using_sscli): New function.
168 (execute_csharp_program): Call it.
170 2006-06-21 Bruno Haible <bruno@clisp.org>
172 Avoid warnings from recent versions of mcs.
173 * csharpcomp.c (compile_csharp_using_mono): Don't use options
174 -o, -L, -r any more. Use options documented since mcs-1.0
175 instead. Similarly for -g.
177 2005-07-09 Bruno Haible <bruno@clisp.org>
179 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
181 Reported by Mark Junker <mjscod@gmx.de>.
183 2006-06-17 Bruno Haible <bruno@clisp.org>
185 * config.charset: Update for NetBSD 3.0.
187 2006-05-17 Bruno Haible <bruno@clisp.org>
190 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
192 2006-05-16 Bruno Haible <bruno@clisp.org>
194 * localcharset.c [CYGWIN]: Include <windows.h>.
195 (get_charset_aliases): For Cygwin, return the same CPxxx
196 aliases list as under WIN32.
197 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
198 the environment variables. Fall back to GetACP().
200 2006-04-05 Bruno Haible <bruno@clisp.org>
202 * config.charset: Update Juan Manuel Guerrero's address.
204 2005-02-12 Bruno Haible <bruno@clisp.org>
206 * allocsa.h: Add extern "C" for C++.
208 2005-02-10 Bruno Haible <bruno@clisp.org>
210 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
211 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
213 2006-07-22 Bruno Haible <bruno@clisp.org>
215 * gettext.h: Update to GNU gettext-0.15.
217 2006-07-22 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
218 and Simon Josefsson <jas@extundo.com>
220 * getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
222 * getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
224 2006-07-21 Eric Blake <ebb9@byu.net>
226 * stdlib-safer.h: New file from coreutils, required by
229 2006-07-19 Derek R. Price <derek@ximbiot.com>
231 * getaddrinfo.h: Don't define unimplemented AI_* flags.
232 Reindent and repaginate.
234 2006-07-17 Bruno Haible <bruno@clisp.org>
236 * gl_list.h: New file.
237 * gl_list.c: New file.
238 * gl_array_list.h: New file.
239 * gl_array_list.c: New file.
240 * gl_carray_list.h: New file.
241 * gl_carray_list.c: New file.
242 * gl_linked_list.h: New file.
243 * gl_linked_list.c: New file.
244 * gl_anylinked_list1.h: New file.
245 * gl_anylinked_list2.h: New file.
246 * gl_avltree_list.h: New file.
247 * gl_avltree_list.c: New file.
248 * gl_anyavltree_list1.h: New file.
249 * gl_anyavltree_list2.h: New file.
250 * gl_rbtree_list.h: New file.
251 * gl_rbtree_list.c: New file.
252 * gl_anyrbtree_list1.h: New file.
253 * gl_anyrbtree_list2.h: New file.
254 * gl_anytree_list1.h: New file.
255 * gl_anytree_list2.h: New file.
256 * gl_linkedhash_list.h: New file.
257 * gl_linkedhash_list.c: New file.
258 * gl_anyhash_list1.h: New file.
259 * gl_anyhash_list2.h: New file.
260 * gl_avltreehash_list.h: New file.
261 * gl_avltreehash_list.c: New file.
262 * gl_rbtreehash_list.h: New file.
263 * gl_rbtreehash_list.c: New file.
264 * gl_anytreehash_list1.h: New file.
265 * gl_anytreehash_list2.h: New file.
267 * gl_oset.h: New file.
268 * gl_oset.c: New file.
269 * gl_array_oset.h: New file.
270 * gl_array_oset.c: New file.
271 * gl_avltree_oset.h: New file.
272 * gl_avltree_oset.c: New file.
273 * gl_rbtree_oset.h: New file.
274 * gl_rbtree_oset.c: New file.
275 * gl_anytree_oset.h: New file.
277 2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
279 * dirchownmod.c, dirchownmod.h, mkancesdirs.c, mkancesdirs.h:
281 * mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
282 unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
283 save-cwd.h. Instead, include dirchownmod.h and mkancesdirs.h.
284 (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
285 MODE_BITS. Remove options VERBOSE_FMT_STRING, CWD_ERRNO. All
286 callers changed. Revamp internals significantly, by not
287 attempting to create directories that are temporarily more
288 permissive than the final results. Do not attempt to use
289 save_cwd/restore_cwd; it isn't worth it for mkdir and install.
290 This removes some race conditions, fixes some bugs, and simplifies
291 things. Use new dirchownmod function to do owner and mode changes.
292 * mkdir-p.h: Likewise.
293 * modechange.c (octal_to_mode): New function.
294 (struct mode_change): New member mentioned.
295 (make_node_op_equals): New arg mentioned. All callers changed.
296 (mode_compile): Keep track of which mode bits the user has explicitly
298 (mode_adjust): New arg DIR, so that we implement the X op correctly.
299 New arg PMODE_BITS, to keep track of which mode bits the user
300 mentioned; it treats S_ISUID and S_ISGID speciall.
302 * modechange.h: Likewise.
304 2006-07-11 Derek R. Price <derek@ximbiot.com>
306 * glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
308 2006-07-10 Derek R. Price <derek@ximbiot.com>
310 * backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
311 Ignore the obsolescent !HAVE_DIRENT_H case. Consolidate NAMLEN
312 macros into the GNU _D_EXACT_NAMLEN.
313 * savedir.c: Likewise.
314 (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
316 2006-07-09 Jim Meyering <jim@meyering.net>
318 * argp-pv.c: Remove a doubled word in a comment.
319 * check-version.c (check_version): Likewise.
320 * javacomp.c (compile_java_class): Likewise.
322 2006-07-08 Jim Meyering <jim@meyering.net>
324 * getndelim2.h (getndelim2): Remove doubled "after" in comment.
326 2006-07-06 Jim Hyslop <jhyslop@dreampossible.ca> (tiny change)
328 * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
329 '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
330 brackets. Other minor changes to suppress some compiler
333 2006-07-06 Paul Eggert <eggert@cs.ucla.edu>
335 * getloadavg.c: Use __VMS, not VMS.
336 * getopt.c: Likewise.
337 * getpagesize.h: Likewise.
338 * glob.c: Remove most VMS cruft; it hasn't been tested for a while and
339 probably does not work.
341 2006-07-06 Derek R. Price <derek@ximbiot.com>
342 and Paul Eggert <eggert@cs.ucla.edu>
344 * backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
345 Don't worry about this obsolete case any more.
346 (HAVE_DIR): Remove. All uses removed; we now assume you can read
348 * dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
349 worry about this obsolete case any more.
351 * getcwd.c: Likewise.
353 * savedir.c: Likewise.
355 2006-07-06 Paul Eggert <eggert@cs.ucla.edu>
357 * .cppi-disable: Add wcwidth.
358 * fnmatch.c (ISBLANK): Remove. All uses changed to isblank.
359 (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
360 (ISGRAPH): Remove. All uses changed to isgraph.
361 (FOLD) [!defined _LIBC]: Remove special case.
362 * getdate.y (lookup_word): Remove no-longer-needed call to islower.
363 * regext_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
365 * strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special case.
367 2006-07-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
369 * strtod.c (strtod): cast the argument of tolower to unsigned char.
371 2006-07-05 Paul Eggert <eggert@cs.ucla.edu>
373 * memcasecmp.c: Include <limits.h>.
374 (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
375 * strtod.c (strtod): Don't assume isspace works on negative chars.
376 Don't assume isdigit succeeds only on '0' through '9'.
378 2006-07-05 Derek R. Price <derek@ximbiot.com>
380 * exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
381 All uses of is_space replaced by isspace.
382 * exit.h: Don't talk about STDC_HEADERS.
383 * fnmatch.c (ISASCII): Remove; no longer needed. All uses removed.
384 (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
385 (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed. All uses
386 replaced by isprint etc.
387 * getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
388 * getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
389 * memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
390 * strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
391 * strtol.c (IN_CTYPE_DOMAIN): Likewise.
392 * xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
394 2006-07-05 Eric Blake <ebb9@byu.net>
396 * getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
397 missing from netdb.h.
398 * getaddrinfo.c (includes): Include inet_ntop and snprintf.
400 2006-06-27 Bruno Haible <bruno@clisp.org>
402 Assume ANSI C header files and <ctype.h> functions.
403 * mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
404 (mbsnwidth): Use isprint, iscntrl instead.
406 2006-07-03 Jim Meyering <jim@meyering.net>
408 * cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
409 macro is used before the first cycle_check call.
411 2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
413 * stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
414 MacOS X 10.4.6. Don't mention <sys/int_types.h>. Problems
415 reported by Mark D. Baushke, one in
416 <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
418 Merge from coreutils.
420 * .cppi-disable: Add stdint_.h.
421 * .cvsignore: Add stdint.h.
423 2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
425 * xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
426 both double and long double versions.
427 (XSTRTOD): Renamed from xstrtod. Use DOUBLE internally.
428 * xstrtold.c: New file.
429 * xstrtod.h (xstrtold): New decl.
431 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
433 * filemode.c (setst): Remove.
434 (strmode): Rewrite to avoid setst. This makes the code shorter,
435 (arguably) clearer, and the generated code is a bit smaller on my
436 Debian GNU/Linux stable x86 host.
438 2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
440 * filemode.c: Include "filemode.h" first, to test the interface.
441 Assume that filemode.h includes sys/types.h and sys/stat.h.
442 (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
443 (ftypelet): Reorder to put common cases first, for efficiency.
444 Add 'P', 'w'. Remove 'M', since it's now the caller's responsibility
446 (strmode): Renamed from mode_string, and now stores 12 bytes instead
447 of 10, for compatibility with FreeBSD. All callers changed.
448 (filemodestring): Now stores 12 bytes instead of 10, and sets file types
449 that can't be deduced solely from st_mode. First arg is now a const
451 * filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
452 (strmode): Renamed from mode_string.
453 (filemodestring): New decl.
454 * stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
455 (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never needed.
456 (S_ISPORT, S_ISWHT): New macros, if not already defined.
458 2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
460 * fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
461 fsusage.h now does that. Include fsusage.h first, to test interface.
462 Prefer statvfs if it works, since it's blessed by POSIX. Attempt
463 at most one method (the old code could have generated decls that
464 didn't conform to C89, not that this was ever exercised).
465 * fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
467 2006-03-19 Jim Meyering <jim@meyering.net>
469 Work even in a chroot where d_ino values for entries in "/"
470 don't match the stat.st_ino values for the same names.
471 * getcwd.c (__getcwd): When no d_ino value matches the target inode
472 number, iterate through all entries again, using lstat instead.
473 Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
474 Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
476 * getcwd.c (__getcwd): Clarify a comment.
477 Use memcpy in place of a call to strcpy.
479 2006-03-12 Jim Meyering <jim@meyering.net>
481 * fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair matches
482 that of the current directory (which we're about to chdir ".." out of),
483 then save the dev-ino of the parent, instead.
485 * same-inode.h (SAME_INODE): New file/macro.
486 * chdir-safer.c (SAME_INODE): Remove definition.
487 Include "same-inode.h", instead.
489 * cycle-check.h: Include "same-inode.h".
490 (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
491 * cycle-check.c (SAME_INODE): Remove definition.
492 * root-dev-ino.h: Include "same-inode.h".
494 2006-03-11 Eric Blake <ebb9@byu.net>
496 * same.c (same_name): s/base_name/last_component/
497 * backupfile.c (check_extension, numbered_backup): Likewise.
498 * filenamecat.c (file_name_concat): Likewise.
500 2006-03-11 Eric Blake <ebb9@byu.net>,
501 Paul Eggert <eggert@cs.ucla.edu>
503 * dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
504 [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
506 (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
507 platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
508 (last_component): New method.
509 * dirname.c (dir_len): Determine when drive letters need a
510 subsequent slash. Preserve // when it is special.
511 (dir_name): Don't append dot when drive letter is absolute.
512 [TEST_DIRNAME]: Move into a full-blown gnulib test.
513 * basename.c (base_name): New semantics - malloc the result.
514 Preserve // when it is special. Preserve relative files that look
516 (base_len): Preserve // when it is special.
517 (last_component): New method, similar to old base_name semantics.
518 * stripslash.c (strip_trailing_slashes): Use last_component, not
519 base_name. Strip redundant slashes from ///.
521 2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
523 * stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
524 both are 64 bits, since this seems to be the tradition, and this
525 prevents gcc -Wformat from warning about usages with PRIuMAX. If
526 we ever run into a host that prefers long long to long in this
527 case, we'll need another configure-time test. Problem reported by
530 2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
532 * stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
533 possible collision with system files.
534 (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
535 __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
536 WCHAR_MIN and WCHAR_MAX in this case.
537 (<stddef.h>): Do not include; no longer needed.
538 (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
539 (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
540 (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
541 !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
542 && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
543 (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
544 __c99]: Define, to work around IRIX <stdint.h> incompatibility.
545 (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
546 !defined(__c99))]: Include in this case too, since it's harmless
548 (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
550 (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
551 @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
552 (_STDINT_MIN, _STDINT_MAX): New macros.
553 (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
554 (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
555 (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
556 (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
557 (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
558 (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
559 macros, not typedefs; this simplifies things quite a bit.
560 Use long int for all types narrower than int64_t.
561 (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
562 Define in terms of long long int or int64_t or long int,
563 not int64_t or int32_t. This saves some compile-time testing.
564 (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
565 (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
566 (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
567 (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
568 (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
569 (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
570 (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
571 (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
572 (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
573 (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
574 (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
575 (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
576 undef any previous version and define our own version, for
577 simplicity and consistency with the new macros for types.
578 (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
579 (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
580 Simplify definitions by using _STDINT_MIN and _STDINT_MAX
581 where appropriate. Rely on new symbols @PTRDIFF_T_SUFFIX@,
582 @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
583 @WINT_T_SUFFIX@ to keep things simple here.
584 (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
585 Simplify by assuming typical 8/16/32/64 host, since we're
586 already doing that elsewhere anyway.
587 Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
588 and assume long long int is 64 bits if available. This
589 speeds up 'configure'.
591 2006-06-30 Jim Hyslop <jhyslop@dreampossible.ca> (tiny change)
593 * getaddrinfo.c: fixed typo
595 2006-06-29 Eric Blake <ebb9@byu.net>
597 * stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
598 unused static function.
600 2006-06-29 Eric Blake <ebb9@byu.net>
604 2006-06-29 Derek R. Price <derek@ximbiot.com>
606 * strftime.c: Assume strftime() exists.
608 2006-06-28 Bruno Haible <bruno@clisp.org>
610 * getaddrinfo.h: Fix POSIX URL.
611 * getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of _WIN32.
612 (use_win32_p): Make static.
613 (getaddrinfo): Reject service name if it is empty or does not consist
614 solely of decimal digits, or if its value is > 65535.
615 (getnameinfo): Remove useless casts.
617 2006-06-28 Derek R. Price <derek@ximbiot.com>
619 * savedir.c (CLOSEDIR): Remove. All uses changed to closedir.
620 Autoconf 2.60 says this stuff was obsolete.
622 2006-05-12 Bruno Haible <bruno@clisp.org>
624 * mkdtemp.c [MINGW]: Include <io.h>.
625 (mkdir): Define using _mkdir.
627 2006-06-28 Bruno Haible <bruno@clisp.org>
629 * wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
630 declaration for wcwidth.
631 * mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
633 2006-06-28 Eric Blake <ebb9@byu.net>
635 * xvasprintf.h: Fix comments.
637 2006-06-28 Eric Blake <ebb9@byu.net>
639 * mbchar.h (wcwidth): Include wcwidth.h.
640 * mbswidth.c (wcwidth): Move from here...
641 * wcwidth.h: ...to this new file.
643 2006-06-28 Simon Josefsson <jas@extundo.com>
645 * getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
646 functions there. It will succeed on Windows XP, but on Windows
647 2000 and (presumably) earlier, it will fail, and use the internal
649 (use_win32_p): New function.
650 (getaddrinfo): Use strtoul on servname, to support numeric ports.
651 Support AI_NUMERICSERV to disable getservbyname.
652 (getnameinfo): New function, only supports
653 NI_NUMERICHOST|NI_NUMERICSERV for now.
655 * getaddrinfo.h: Test and check for AI_* flags separately, MinGW
656 only have some of them. Add AI_NUMERICSERV. Add prototype for
659 2006-06-27 Bruno Haible <bruno@clisp.org>
661 * stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
663 2006-06-26 Paul Eggert <eggert@cs.ucla.edu>
665 * base64.c (B64): Use _ as the formal parameter, not x, to avoid
666 bug in IBM C V6 for AIX. Problem reported by Larry Jones in
667 <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
669 2006-06-26 Bruno Haible <bruno@clisp.org>
671 * stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
673 Reported by Mark D. Baushke and Larry Jones.
675 2006-06-26 Bruno Haible <bruno@clisp.org>
677 * stdint_.h: Don't include <stdint.h> when using the SGI C compiler
679 Suggested by Mark D. Baushke and Larry Jones.
681 2006-06-23 Mark D. Baushke <mdb@gnu.org>
683 * stdint_.h: Treat BSD/OS like OpenBSD.
685 2006-06-23 Bruno Haible <bruno@clisp.org>
687 * stdint_.h: Treat IRIX like OpenBSD.
689 2006-06-23 Bruno Haible <bruno@clisp.org>
691 * stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
692 ISO C 99 Technical Corrigendum 1.
694 2006-06-22 Paul Eggert <eggert@cs.ucla.edu>
696 * glob.c (collated_compare): Remove 'const' uses that weren't needed.
697 Some compiler complained about some of them. Problem reported by
699 <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
701 2006-06-21 Simon Josefsson <jas@extundo.com>
703 * getaddrinfo.c (getaddrinfo): Set ai_family in the return
706 * socket_.h: Don't define WINVER.
708 * inet_pton.h, inet_pton.c: New file, taken from glibc but
709 slightly modified to work in gnulib.
711 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
713 * read-file.c (fread_file): Start with buffer allocation of
714 0 bytes rather than 1 byte; this simplifies the code.
715 Don't invoke feof; it's not needed. Refactor to avoid duplicate
716 code to free buffer and save/restore errno.
717 (internal_read_file): Remove unused local.
719 2006-06-20 Paul Eggert <eggert@cs.ucla.edu>
721 * openat.c (openat): Use ?:, not if, to work around GCC bug 4210
722 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
723 Problem reported by Denis Excoffier in
724 <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
726 2006-06-19 Simon Josefsson <jas@extundo.com>
728 * inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
730 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
732 * alloca_.h (alloca) [defined alloca]: Don't define or declare.
734 2006-06-17 Bruno Haible <bruno@clisp.org>
736 * stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
738 2006-06-17 Bruno Haible <bruno@clisp.org>
740 * stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
741 problem on Solaris 2.5.1.
743 2006-06-16 Eric Blake <ebb9@byu.net>
745 * unsetenv.c [!defined errno]: Assume errno.h declares errno.
746 * unicodeio.c [!defined errno]: Likewise.
747 * strtol.c [!defined errno]: Likewise.
748 * strtod.c [!defined errno]: Likewise.
750 2006-06-15 Bruno Haible <bruno@clisp.org>
752 * stdint_.h: Rewritten to be fully auto-configured.
753 Fixes bug on HP-UX/IA64.
755 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
757 * getdate.y (__attribute__): Don't define if already defined.
758 Problem reported by Larry Jones.
759 * utimens.c (__attribute__): Likewise.
761 2006-06-04 Paul Eggert <eggert@cs.ucla.edu>
763 * regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
764 reported by Andreas Schwab.
766 2006-05-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
767 Bruno Haible <bruno@clisp.org>
769 * strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
771 2006-05-26 Martin Lambers <marlam@marlam.de>
773 * getpass.c: Updates the test for the native W32 API, and adds
774 missing includes, thus fixing compilation warnings.
776 2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
778 * tempname.c (small_open, large_open): New macros.
779 (__open, __open64) [!_LIBC]: Remove.
780 (__gen_tempname): Use small_open and large_open instead of __open
781 and __open64. This fixes a portability bug on HP-UX 11.11i
782 reported by Simon Wing-Tang in
783 <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
785 2006-05-25 Sergey Poznyakoff <gray@gnu.org.ua>
787 * exclude.c (exclude_fnmatch): New function.
788 (excluded_file_name): Call exclude_fnmatch.
789 * exclude.h (excluded_file_name): New prototype
791 2006-05-24 Bruno Haible <bruno@clisp.org>
793 * printf-args.c (printf_fetchargs): Turn NULL pointers for
794 TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
795 Reported by Thorsten Maerz <torte@netztorte.de> via
796 Aaron Stone <aaron@serendipity.cx>.
798 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
800 * nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
801 Use the usual Autoconf way to include <time.h> and/or sys/time.h.
802 (my_usleep): Don't mishandle maximum value.
804 2006-05-19 Jim Meyering <jim@meyering.net>
806 * getugroups.c: Correct an outdated comment. From Bruno Haible.
808 2006-05-17 Bruno Haible <bruno@clisp.org>
811 * classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
813 2006-05-17 Bruno Haible <bruno@clisp.org>
815 * stdint_.h: Fix recognition of Cygwin.
817 2006-05-11 Jim Meyering <jim@meyering.net>
819 * sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/. From James Lemley.
821 2006-05-10 Paul Eggert <eggert@cs.ucla.edu>
823 * crc.c (crc32_update): Remove unnecessary L suffix.
824 * md4.c (rol): Cast right-shift arg to uint32_t to prevent
825 unwanted sign propagation, e.g., on hosts with 64-bit int.
826 There still are some problems with reeelly weird theoretical hosts
827 (e.g., 33-bit int) but it's not worth worrying about now.
828 * sha1.c (rol): Likewise.
829 (K1, K2, K3, K4): Remove unnecessary L suffix.
831 2006-05-10 Bruno Haible <bruno@clisp.org>
833 * des.c: Cast to avoid warnings.
835 2006-05-10 Simon Josefsson <jas@extundo.com>
837 * md4.c: Typo fix, update copyright years.
838 (K1, K2): Don't use L because it turn computations into 64-bit on
841 2006-05-09 Bruno Haible <bruno@clisp.org>
843 * xvasprintf.c: Include limits.h, string.h, xsize.h.
844 (EOVERFLOW): Define fallback value.
845 (xstrcat): New function.
846 (xvasprintf): Recognize the special case of a string concatenation.
848 2006-05-01 Bruno Haible <bruno@clisp.org>
850 * stdint_.h: Shorter URL.
851 * inttypes.h: Likewise.
853 2006-05-02 Paul Eggert <eggert@cs.ucla.edu>
855 * verify.h: Document the internals better. Most of this change
856 was written by Bruno Haible.
858 2006-04-29 Bruno Haible <bruno@clisp.org>
860 * gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
861 Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
863 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
865 * getdate.y (get_date): When adding relative date, start with the
866 initial time, not with the result of the first mktime call.
868 2006-04-23 Bruno Haible <bruno@clisp.org>
870 * copy-file.c: Include <unistd.h> unconditionally.
871 * execute.c: Likewise.
872 * fatal-signal.c: Likewise.
873 * findprog.c: Likewise.
874 * mkdtemp.c: Likewise.
877 * wait-process.h: Likewise.
879 2006-04-23 Bruno Haible <bruno@clisp.org>
881 * fwriteerror.c (fwriteerror): Call fclose also when an error
882 condition was already detected.
883 Reported by Ben Pfaff <blp@cs.stanford.edu>.
885 2006-04-19 Derek Price <derek@ximbiot.com>
886 Eric Blake <ebb9@byu.net>
888 * inttypes.h: Correct grammar in comment.
890 2006-04-18 Derek Price <derek@ximbiot.com>
891 Paul Eggert <eggert@cs.ucla.edu>
893 * inttypes.h: New file.
894 * strtoimax.c: Assume <inttypes.h>.
896 2006-04-15 Paul Eggert <eggert@cs.ucla.edu>
898 * utimens.c (futimens): glibc futimesat messes up if /proc
899 isn't mounted. Problem reported by Kir Kolyshkin.
901 2006-04-13 Paul Eggert <eggert@cs.ucla.edu>
903 * regcomp.c (init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N
904 is not defined. Problem reported by Mark D. Baushke via Derek R. Price.
905 * regex.h (RE_DUP_MAX): Update comment to match current implementation.
907 2006-04-09 Paul Eggert <eggert@cs.ucla.edu>
909 Merge regex changes from libc, removing some of our
910 POSIX-conformance changes that were rejected and redoing them in a
913 * regcomp.c (re_compile_internal, init_dfa):
914 Length arg is now size_t, not Idx. All uses changed.
915 (peek_token): Forward decl now says internal_function.
916 (__re_error_msgid, __re_error_msgid_idx):
917 Now static rather than extern with attribute_hidden.
918 (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
919 For some reason libc prefers K&R style defns for external functions.
920 (regerror) [!defined _LIBC]: Likewise.
921 (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
922 (seek_collating_symbol_entry, lookup_collation_sequence_value):
923 (build_range_exp, build_collating_symbol):
925 (re_compile_fastmap): Use '\0' to memset, not 0.
926 (utf8_sb_map): Make the calculations more obvious.
927 (init_dfa, parse_bracket_exp, build_charclass_op):
928 Call calloc and cast result, as glibc does.
929 (init_word_char, fetch_token, peek_token, peek_token_bracket):
930 (build_range_exp, build_collating_symbol):
931 Now internal functions.
933 * regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
935 * regex.h (__USE_GNU_REGEX): New macro. Don't depend on
936 _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
937 Don't depend on VMS; depend on __VMS instead, for POSIX
939 (regoff_t): Define to ssize_t, not long int.
941 Remove the REG_ macros named below. Instead, make the old names
942 (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
944 (REG_BACKSLASH_ESCAPE_IN_LISTS):
945 (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
946 (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
947 (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
948 (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
949 (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
950 (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
951 (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
952 (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
953 (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
954 (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
955 (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
956 (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
957 (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
958 (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
959 (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
960 (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
962 Remove. All uses replaced by the old RE_* names.
963 (RE_BACKSLASH_ESCAPE_IN_LISTS):
964 (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
965 (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
966 (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
967 (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
968 (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
969 (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
970 (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
971 (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
972 (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
973 (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
974 Don't bother having these macros be independent of each others'
975 values, since they no longer exist in the POSIX name space.
977 Rename the following member names back to their old names,
978 unless !__USE_GNU_REGEX. All uses changed back.
979 (buffer): Renamed from re_buffer.
980 (allocated): Renamed from re_allocated.
981 (used): Renamed from re_used.
982 (syntax): Renamed from re_syntax.
983 (fastmap): Renamed from re_fastmap.
984 (translate): Renamed from re_translate.
985 (can_be_null): Renamed from re_can_be_null.
986 (regs_allocated): Renamed from re_regs_allocated.
987 (fastmap_accurate): Renamed from re_fastmap_accurate.
988 (no_sub): Renamed from re_no_sub.
989 (not_bol): Renamed from re_not_bol.
990 (not_eol): Renamed from re_not_eol.
991 (newline_anchor): Renamed from re_newline_anchor.
992 (num_regs): Renamed from rm_num_regs.
993 (start): Renamed from rm_start.
994 (end): Renamed from rm_end.
996 (free_state): Move up a bit.
998 * regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
1000 (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
1001 when that is what is intended.
1002 (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
1003 (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
1005 (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
1006 All uses changed back to re_malloc, etc. It's now the caller's
1007 responsibility to check for overflow; all callers changed.
1008 (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
1009 (re_x2nrealloc): Remove.
1010 (free_state): Remove decl.
1012 * regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
1013 (re_set_registers, re_exec):
1016 2006-01-31 Roland McGrath <roland@redhat.com>
1018 * regcomp.c (calc_eclosure_iter): Remove dead variables.
1019 Reported by Mike Frysinger <vapier@gentoo.org>.
1021 2006-01-15 Andreas Jaeger <aj@suse.de>
1024 * regex_internal.c (re_string_reconstruct): Adjust for
1025 build_wcs_upper_buffer change.
1026 (build_wcs_upper_buffer): Change return type.
1028 2005-12-10 Ulrich Drepper <drepper@redhat.com>
1030 * regex_internal.h: Include <stdint.h> if available.
1032 2005-12-06 Paolo Bonzini <bonzini@gnu.org>
1034 * regex_internal.h (SIZE_MAX): Provide a default definition.
1036 2005-10-14 Ulrich Drepper <drepper@redhat.com>
1038 * regcomp.c: Adjust for changed secondary hash function.
1040 2005-09-30 Ulrich Drepper <drepper@redhat.com>
1042 * regex.h: Pretty printing.
1043 Clean up namespace a bit.
1045 2005-09-30 Jakub Jelinek <jakub@redhat.com>
1047 * regexec.c (update_cur_sifted_state, check_arrival,
1048 check_arrival_add_next_nodes): Avoid using uninitialized variable.
1050 2005-09-06 Paul Eggert <eggert@cs.ucla.edu>
1051 Ulrich Drepper <drepper@redhat.com>
1054 * regex_internal.h (bitset_t): Renamed from bitset. All uses changed.
1055 (bitset_word_t): Renamed from bitset_word. All uses changed.
1057 2005-09-22 Ulrich Drepper <drepper@redhat.com>
1060 * regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
1061 * regcomp.c: Remove unnecessary uses of
1062 unsigned RE_TRANSLATE_TYPE.
1063 * regex_internal.h: Likewise.
1064 * regex_internal.c: Likewise.
1065 * regexec.c: Likewise.
1066 Based on a patch by Stepan Kasal <kasal@ucw.cz>.
1068 2005-09-07 Ulrich Drepper <drepper@redhat.com>
1070 * regexec.c (find_recover_state): Remove unnecessary
1072 (transit_state_bkref): Make DFA a const pointer.
1073 (get_subexp): Likewise.
1074 (check_arrival): Likewise.
1075 (update_cur_sifted_state): Likewise.
1076 (re_search_internal): Likewise.
1077 (prune_impossible_nodes): Likewise.
1078 (acquire_init_state_context): Likewise.
1079 (proceed_next_node): Likewise.
1080 (set_regs): Likewise.
1081 (free_fail_stack_return): Likewise.
1082 (check_arrival_expand_ecl): Mark DFA parameter as const.
1083 (check_arrival_expand_ecl_sub): Likewise.
1084 (check_subexp_limits): Likewise.
1085 (sub_epsilon_src_nodes): Likewise.
1086 (add_epsilon_src_nodes): Likewise.
1087 (merge_state_array): Likewise.
1088 (update_regs): Likewise.
1089 (build_trtable): Likewise.
1090 (sift_states_backward): Mark MCTX parameter as const.
1091 (build_sifted_states): Likewise.
1092 (update_cur_sifted_state): Likewise.
1093 (sift_states_mkref): Likewise.
1094 (check_arrival_expand_ecl): Mark eclosure as const.
1095 (check_dst_limits_calc_pos_1): Likewise.
1096 * regex_internal.h (re_match_context_t): Make dfa a const
1099 2005-09-06 Ulrich Drepper <drepper@redhat.com>
1101 * regexec.c (merge_state_with_log): Define dfa as const pointer.
1102 (transit_state_sb): Likewise.
1103 (transit_state_mb): Likewise.
1104 (sift_states_iter_mb): Likewise.
1105 (check_arrival_add_next_nodes): Likewise.
1106 (check_node_accept_bytes): Change first parameter to pointer-to-const.
1107 [_LIBC] (re_search_2_stub): Use mempcpy.
1109 * regex_internal.c (re_string_reconstruct): Avoid calling
1110 mbrtowc for very simple UTF-8 case.
1112 * regex_internal.c (re_acquire_state): Make DFA pointer arg
1114 (re_acquire_state_context): Likewise.
1115 * regex_internal.h: Adjust prototypes.
1117 * regex.c: Prevent using C++ compilers.
1119 * regex_internal.c (re_acquire_state): Minor code rearrangement.
1120 (re_acquire_state_context): Likewise.
1122 2006-03-29 Mark D. Baushke <mdb@gnu.org>
1123 Bruno Haible <bruno@clisp.org>
1125 * stdint_.h: On OpenBSD, don't redefine types already included in
1126 <sys/types.h> and <inttypes.h>.
1128 2006-03-24 Eric Blake <ebb9@byu.net>
1130 * time_r.c (copy_string_result): Remove, as it is no longer used.
1132 2006-03-24 Simon Josefsson <jas@extundo.com>
1134 * base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
1135 including some doc fixes.
1136 (base64_encode_alloc): Fix +1 bug on allocation failures.
1138 2006-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1140 * base64.c (base64_encode): Do not read past end of array with
1141 unsanitized input on systems with CHAR_BIT > 8.
1143 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1145 * regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
1146 Typedef to long int, not to off_, as POSIX will likely change
1149 2006-03-13 Sergey Poznyakoff <gray@gnu.org.ua>
1151 * argp-help.c (validate_uparams): Fix typo
1152 * argp-parse.c (argp_default_options): Consistently begin help
1153 messages with a lowercase letter.
1155 2006-03-11 Paul Eggert <eggert@cs.ucla.edu>
1157 * time_r.h (asctime_r, ctime_r): Remove. These functions can
1158 overrun buffers and shouldn't be used (much as gets shouldn't be
1160 * time_r.c (asctime_r, ctime_r): Likewise.
1162 2006-03-08 Simon Josefsson <jas@extundo.com>
1164 * gc-gnulib.c (randomize): Don't open files called 'no', they
1165 signal that configure disabled the device.
1167 2006-03-07 Paul Eggert <eggert@cs.ucla.edu>
1169 * c-stack.c: Include unistd.h unconditionally, since we now assume
1171 * getlogin_r.c: Likewise.
1172 * getlogin_r.h: Likewise.
1174 * pagealign_alloc.c: Likewise.
1175 * unistd_.h: Remove; no longer needed.
1177 2006-03-07 Simon Josefsson <jas@extundo.com>
1179 * unistd_.h: New file.
1181 2006-03-07 Simon Josefsson <jas@extundo.com>
1183 * gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
1185 2006-03-01 Simon Josefsson <jas@extundo.com>
1187 * readline.c: Fix typo, tiny patch from Stepan Kasal
1190 2006-02-28 Simon Josefsson <jas@extundo.com>
1192 * getopt.c: Protect #include of unistd.h, for MSVS.
1194 2006-02-27 Simon Josefsson <jas@extundo.com>
1196 * base64.h: Indent #define's. From Jim Meyering
1199 2006-02-27 Jim Meyering <jim@meyering.net>
1201 Revert the change of 2006-02-24, so these files can continue
1202 to be sync'd from gettext.
1203 * mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
1206 2006-02-24 Paul Eggert <eggert@cs.ucla.edu>
1208 * glob.c: Say "invalid" rather than "illegal" in comments.
1210 2006-02-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1212 * mkdtemp.c, setenv.c, unsetenv.c: Normalize inclusion of `config.h'.
1214 2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
1216 * getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
1217 AT_FDCWD exceeds INT_MAX.
1218 * openat.h (AT_FDCWD): Likewise.
1220 2006-02-14 Jim Meyering <jim@meyering.net>
1222 Sync from coreutils.
1224 Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
1225 failure on deficient systems, and simplify gnulib lgpl dependencies.
1226 * lstat.c (rpl_lstat): Rewrite to use stat() in place of the
1227 xmalloc/lstat combination. Based on a patch from Bruno Haible.
1229 * xalloc-die.c: Remove unused definition of N_.
1231 2006-02-13 Sergey Poznyakoff <gray@gnu.org.ua>
1233 * argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
1235 2006-02-07 Paul Eggert <eggert@cs.ucla.edu>
1237 * closeout.c (close_stdout): Don't assume 'bool' converts nonzero
1238 ints to 0 or 1, as this isn't true for the stdbool.h substitute.
1240 2006-02-07 Sergey Poznyakoff <gray@gnu.org.ua>
1242 * argp-namefrob.h: Restore changes accidentally lost during the
1243 "autoupdate" on 2005-12-12.
1245 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1247 * fnmatch.c (L_): Renamed from L, to work around a bug in
1248 Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
1249 <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
1252 2006-01-26 Simon Josefsson <jas@extundo.com>
1254 * socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
1255 prototype is visible on mingw32.
1257 * getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
1260 * gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
1263 2006-01-26 Paul Eggert <eggert@cs.ucla.edu>
1265 * fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too. Don't
1266 attempt to open for write; this always fails, at least on POSIX
1267 hosts. This reinstates the 2006-01-09 change, which was
1268 inadvertently removed.
1270 2006-01-26 Bruno Haible <bruno@clisp.org>
1271 Paul Eggert <eggert@cs.ucla.edu>
1273 * stdbool_.h (_Bool)
1274 [(! (defined __cplusplus || defined __BEOS__)
1275 && !defined __GNUC__
1276 && !(defined __HP_cc || defined __xlc__
1277 || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
1278 || defined __sgi))]:
1279 #define to signed char in these cases too; this simplifies
1280 the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
1281 etc., separately) and makes it more conservative.
1283 2006-01-21 Jim Meyering <jim@meyering.net>
1285 Sync from the stable (b5) branch of coreutils:
1287 * fts.c (fts_children): Don't let close() clobber errno from
1290 * fts.c (fts_stat): When following a symlink-to-directory,
1291 don't necessarily interpret stat-fails+lstat-succeeds as indicating
1292 a dangling symlink. That can also happen at least for ELOOP.
1293 The fix: return FTS_SLNONE only when the stat errno is ENOENT.
1294 FYI, this bug predates the inclusion of fts.c in coreutils.
1296 * fts.c (fts_open): Put new maxarglen declaration and uses
1297 in their own block, so pre-c99 compilers don't object.
1299 Avoid the double-free (first in fts_read, second in fts_close) that
1300 would occur when an `active' directory is made inaccessible (e.g.,
1301 via chmod a-x) during a traversal.
1302 * fts.c (fts_read): After a failed fchdir, update sp->fts_cur
1303 before returning. Reproduce this failure by
1304 mkdir -p a/b; cd a; chmod a-x . b
1305 Reported by Stavros Passas.
1307 2006-01-25 Sergey Poznyakoff <gray@gnu.org.ua>
1309 * argp-namefrob.h: Bugfix. Remove stray #
1311 2006-01-25 Bruno Haible <bruno@clisp.org>
1313 * stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
1315 Reported by Paul Eggert.
1317 2006-01-25 Jim Meyering <jim@meyering.net>
1319 * fileblocks.c: Remove more useless parentheses.
1320 * readutmp.h: Likewise.
1322 2006-01-24 Bruno Haible <bruno@clisp.org>
1324 * stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler already
1326 Report and patch by Albert Chin-A-Young <china@thewrittenword.com> on
1329 * stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as 'signed char'
1330 to avoid problems with the built-in _Bool type.
1331 Reported by Paul Eggert on 2005-11-26.
1333 2006-01-24 Jim Meyering <jim@meyering.net>
1335 * socket_.h: Remove useless parentheses in uses of cpp `defined'.
1337 2006-01-24 Simon Josefsson <jas@extundo.com>
1339 * socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
1342 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1344 Work around porting bugs reported by Dieter in
1345 <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
1346 * getopt.c (_NOPROTO): Remove; no longer needed.
1347 Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
1348 Include "getopt.h" first, to check interface.
1349 (getenv): Declare only if defined HAVE_DECL_GETENV &&
1351 * strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
1352 (__strndup): Revert to K&R-style function dfns, the glibc style.
1353 * strnlen.c: Don't claim it's taken from glibc; it's not.
1354 (strnlen, __strnlen): Remove #defines and #undefs; not needed.
1355 Include strnlen.h first, to get prototype properly.
1356 (strnlen): Renamed from __strnlen.
1359 2006-01-23 Ulrich Drepper <drepper@redhat.com>
1361 These changes imported from libc.
1362 * getopt.c: Use __fxprintf instead of inline stream orientation
1363 test and two separate function calls.
1364 * strndup.c (__strndup): Add libc_hidden_def.
1366 2006-01-22 Bruno Haible <bruno@clisp.org>
1368 * vasnprintf.c (VASNPRINTF): In the computation of the size of the
1369 temporary buffer for sprintf, take into account the precision also
1370 for 'd', 'i', 'u', 'o', 'x', 'X'.
1372 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1374 * quotearg.c (quotearg_buffer_restyled): Add "default: break;"
1375 to pacify gcc -Wswitch-default.
1377 2006-01-21 Sergey Poznyakoff <gray@gnu.org.ua>
1379 * argp-help.c (usage_long_opt): Do not print DOC options.
1380 (__argp_base_name): Removed
1381 * argp-namefrob.h (__argp_basename): Removed definition. Was a
1383 (__argp_base_name): Provide macro definition or extern declaration
1384 depending on the configuration
1386 2006-01-20 Simon Josefsson <jas@extundo.com>
1388 * inet_ntop.h: Unconditionally include sys/socket.h.
1390 2006-01-19 Simon Josefsson <jas@extundo.com>
1392 * socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
1394 2006-01-12 Simon Josefsson <jas@extundo.com>
1396 * base64.c: Fix warning, reported by Bruno Haible
1397 <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
1399 2006-01-11 Paul Eggert <eggert@cs.ucla.edu>
1401 Sync from coreutils.
1402 * md5.c: Fix commentary typos.
1403 (alignof, UNALIGNED_P): No need for a GCC-specific version.
1404 * md5.h (__attribute__): Remove; unused.
1405 * sha1.c: Fix commentary to match md5 better.
1406 * sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
1407 so that we don't need to worry about alignment. All uses changed.
1408 This merges the 2005-10-28 md5 change into sha1.
1410 2006-01-11 Jim Meyering <jim@meyering.net>
1412 Sync from coreutils.
1413 * md5.c (OP): Fix spacing.
1415 2006-01-11 Simon Josefsson <jas@extundo.com>
1417 * stdint_.h (SIZE_MAX): Add missing (.
1419 2006-01-10 Bruno Haible <bruno@clisp.org>
1421 * argp.h (__const): Remove macro. Use const instead.
1422 * argp-fmtstream.h (__const): Likewise.
1423 * glob_.h (__const): Remove macro.
1424 * glob-libc.h: Use const instead of __const.
1426 2006-01-10 Jim Meyering <jim@meyering.net>
1428 Avoid the double-free (first in fts_read, second in fts_close) that
1429 would occur when an `active' directory is made inaccessible (e.g.,
1430 via chmod a-x) during a traversal.
1431 * fts.c (fts_read): After a failed fchdir, update sp->fts_cur
1432 before returning. Reproduce this failure by
1433 mkdir -p a/b; cd a; chmod a-x . b
1434 Reported by Stavros Passas.
1436 Sync from coreutils.
1437 * sha1.c: Tweak grammar in a comment.
1439 2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
1441 * regex_internal.h (BITSET_WORD_BITS):
1442 Work around a bug in 64-bit PGC (before version 6.1-2), where the
1443 preprocessor mishandles large unsigned values as if they were signed.
1444 Problem reported by Claudio Fontana in
1445 <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
1447 2006-01-10 Simon Josefsson <jas@extundo.com>
1449 * socket_.h: New file.
1451 2006-01-10 Bruno Haible <bruno@clisp.org>
1453 * localcharset.c: Update from GNU gettext.
1455 2006-01-09 Paul Eggert <eggert@cs.ucla.edu>
1457 Sync from coreutils.
1458 * chdir-long.c (cdb_free): Don't bother trying to open directory
1459 for write access: POSIX says that must fail.
1460 * fts.c (diropen): Likewise.
1461 * save-cwd.c (save_cwd): Likewise.
1462 * chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
1463 well, for minor improvements on hosts that lack O_DIRECTORY.
1464 * chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
1465 Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
1466 Fall back on chown if open failed with EACCES.
1468 * gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
1469 Report an error at compile-time if only a 1-second nominal clock
1470 resolution is found.
1472 * lchmod.h: New file.
1473 * mkdir-p.c: Include lchmod.h, lchown.h.
1474 (make_dir_parents): Use lchown rather than chown, and
1475 lchmod rather than chmod.
1477 * mountlist.c (ME_DUMMY): "none" and "proc" file systems are dummies
1478 too. Problem with "none" reported by Bob Proulx. Problem with
1479 "proc" reported by n0dalus.
1481 * mountlist.c: Include <limits.h>.
1482 (dev_from_mount_options)
1483 [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
1484 New function. It no longer assumes "dev=" has the System V meaning
1485 on Linux (since it doesn't). It also parses "dev=" more carefully.
1486 (read_file_system_list)
1487 [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
1488 MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
1491 * posixtm.h (PDS_PRE_2000): New macro.
1492 * posixtm.c (year): Arg is now syntax_bits rather than allow_century.
1493 All usages changed. Reject dates outside the range 1969-1999 if
1494 PDS_PRE_2000 is used.
1496 2006-01-09 Jim Meyering <jim@meyering.net>
1498 Sync from coreutils.
1500 * version-etc.c (COPYRIGHT_YEAR): Update to 2006.
1502 * chdir-safer.h, chdir-safer.c: New files.
1504 * modechange.c (mode_compile): Reject an invalid mode string
1505 that starts with an octal digit. From Andreas Gruenbacher.
1507 * openat.c: Include "fcntl--.h" and "unistd--.h", to map open
1508 and dup to open_safer and dup_safer, respectively.
1509 (openat_permissive): Fix typo in comment.
1511 * openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
1512 "gettext.h"; either no longer needed or are guaranteed by openat.h.
1513 (_): Remove; no longer needed.
1514 (openat): Renamed from rpl_openat; no need for rpl_openat
1515 since openat.h renames openat for us.
1516 Replace most of the body with a call to openat_permissive,
1517 to avoid duplicate code.
1518 Port to (probably hypothetical) environments were mode_t is
1520 (openat_permissive): Require mode arg, so that we can check
1521 types better. Put it just after flags. Change cwd failure
1522 indicator from pointer-to-bool to pointer-to-errno-value.
1523 All callers changed.
1524 Invoke openat_save_fail and/or openat_restore_fail if
1525 cwd_errno is null, so that openat can call us.
1526 (openat_permissive, fdopendir, fstatat, unlinkat):
1527 Simplify errno handling to avoid some duplicate code,
1528 as it's OK to set errno on success.
1529 * openat.h: Revamp code so that function macros depend on
1530 __OPENAT_PREFIX only, not also on AT_FDCWD.
1531 (openat_ro): Remove. Caller changed to use openat_permissive.
1532 (openat_permissive): Now a macro, if not a function.
1533 (openat_restore_fail, openat_save_fail): Now always functions,
1534 since mkdirat needs them even if __OPENAT_PREFIX is defined.
1536 * openat-priv.h: New file, defining macros used by mkdirat.c
1538 * mkdirat.c: Include openat-priv.h.
1539 Remove definitions of macros defined therein.
1540 * openat.c: Likewise.
1542 * mkdirat.c (mkdirat): New file and function.
1543 * openat.h (mkdirat): Declare.
1545 * openat.c (fdopendir): Don't change errno when returning non-NULL.
1547 * openat.h (openat_permissive): Declare.
1548 (openat_ro): Define.
1550 * openat.c (EXPECTED_ERRNO): New macro.
1551 (openat_permissive): New function -- used in remove.c rewrite.
1552 (all functions): Set errno just before returning, only if there
1553 was an actual failure.
1554 Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
1556 Emulate openat-family functions using Linux's procfs, if possible.
1557 Idea and some code based on Ulrich Drepper's glibc changes.
1559 * openat.c: (BUILD_PROC_NAME): New macro.
1560 Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
1561 (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
1562 before falling back on save_cwd and restore_cwd.
1563 (fdopendir, fstatat, unlinkat): Likewise.
1565 * openat.c (fstatat, unlinkat): Perform the syscall directly,
1566 skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
1568 * openat.c (rpl_openat): Use the promoted type (int), not mode_t,
1569 as second argument to va_arg. Otherwise, some versions of gcc
1570 warn that `if this code is reached, the program will abort'.
1572 2006-01-09 Andreas Gruenbacher <agruen@suse.de>
1574 Sync from coreutils.
1576 Add POSIX ACL support
1577 * acl.h (copy_acl, set_acl): Add declarations.
1578 * acl.c (acl_entries): Add fallback implementation for POSIX ACL
1579 systems other than Linux.
1580 (chmod_or_fchmod): New function: use fchmod when possible,
1581 and chmod otherwise.
1582 (file_has_acl): Add a POSIX ACL implementation, with a
1583 Linux-specific subcase.
1584 (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
1585 S_ISVTX from one file to another. Fall back to fchmod/chmod when
1586 acls are unsupported.
1587 (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
1588 S_ISVTX to a defined value. Fall back to fchmod/chmod when acls
1591 2006-01-09 Bruno Haible <bruno@clisp.org>
1593 * sysexit_.h (EX_OK): New macro.
1594 Suggested by Martin Lambers <marlam@marlam.de>.
1596 2006-01-09 Bruno Haible <bruno@clisp.org>
1598 * javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
1599 * javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
1600 * csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
1601 * csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
1603 2006-01-09 Bruno Haible <bruno@clisp.org>
1605 * stdint_.h (SIZE_MAX): Write the value without involving negative
1608 2005-10-16 Bruno Haible <bruno@clisp.org>
1610 * stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
1611 don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
1613 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1615 * strftime.c (tzname): Don't declare if it is already #defined.
1616 Problem reported for Mingw by Mark Junker.
1618 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1620 * xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
1621 long int, not int, for nanosecond counts, so that people who are
1622 used to POSIX struct timespec won't be surprised. Reported by Jim
1625 2005-12-16 Jim Meyering <jim@meyering.net>
1627 * fprintftime.c, fprintftime.h: New files.
1629 2005-12-10 Sergey Poznyakoff <gray@gnu.org.ua>
1631 * argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
1632 * argp-help.c (fill_in_uparams): Check if the constructed
1633 struct uparams is valid. Fall back to the default values if it is
1636 2005-12-09 Sergey Poznyakoff <gray@gnu.org.ua>
1638 * argp-help.c (__argp_base_name): New function
1639 (__argp_short_program_name): Rewrite using __argp_base_name
1640 * argp-namefrob.h: Define program_invocation_name and
1641 program_invocation_short_name if requested
1642 (__argp_base_name): Add prototype
1643 * argp-parse.c (argp_def): Use gettext wrappers
1644 (argp_default_parser): Use __argp_base_name
1645 * argp-pin.c: New file. Defines program_invocation_name and
1646 program_invocation_short_name on systems that lack them.
1648 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
1650 * stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
1651 TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
1652 porting problem reported by Georg Schwarz in
1653 <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
1655 2005-07-09 Bruno Haible <bruno@clisp.org>
1657 * csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
1658 * csharpcomp.c (compile_csharp_using_sscli): Likewise.
1659 Reported by Mark Junker <mjscod@gmx.de>.
1661 2005-11-29 Paul Eggert <eggert@cs.ucla.edu>
1663 * stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
1664 (uintmax_t) [defined uintmax_t]: Do not declare.
1665 (SIZE_MAX) [defined SIZE_MAX]: Do not define.
1666 This works around a problem if intmax_t.m4 and/or uintmax_t.m4
1667 and/or size_max.m4 are also used. Problem reported by Mark D. Baushke.
1668 (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
1669 sake of portability to weird hosts that C allows (though we don't
1670 know of any practical examples).
1672 * savedir.h (fdsavedir): New decl.
1673 * savedir.c (fdsavedir, savedirstream): New functions; the latter
1674 contains most of the former guts of savedir.
1675 (savedir): Use savedirstream.
1678 2005-11-15 Paul Eggert <eggert@cs.ucla.edu>
1680 * xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
1681 coreutils no longer futzes with rounding modes.
1683 2005-11-14 Jim Meyering <jim@meyering.net>
1685 * mkstemp-safer.c: Include <config.h>, required for possible
1686 replacement of mkstemp.
1688 2005-11-10 Paul Eggert <eggert@cs.ucla.edu>
1690 * gethrxtime.c: Include "timespec.h" rather than the sys/time / time
1692 (gethrxtime) [! (HAVE_NANOUPTIME
1693 || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
1694 || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
1695 our own approximation.
1697 2005-11-10 Simon Josefsson <jas@extundo.com>
1699 * readline.c: Remove EOL.
1701 2005-11-08 Eric Blake <ebb9@byu.net>
1703 * inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
1705 2005-11-08 Eric Blake <ebb9@byu.net>
1707 * getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
1709 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
1711 Fix porting problem reported by Theodoros V. Kalamatianos.
1712 * utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
1713 Don't assume that futimes failing means we must fail.
1715 2005-10-29 Paul Eggert <eggert@cs.ucla.edu>
1717 * getcwd.c (__getcwd): Don't assume that system calls after readdir
1718 leave errno alone. Problem reported by Dmitry V. Levin.
1720 2005-10-28 Paul Eggert <eggert@cs.ucla.edu>
1722 * savedir.c (savedir): Don't assume that xrealloc etc. leave
1723 errno alone. Problem reported by Frederic Jolliton.
1725 2005-10-28 Simon Josefsson <jas@extundo.com>
1727 * inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
1728 "restrict" keywords, as per POSIX. Protect the function
1729 declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
1730 Don't use K&R prototypes. Check the sprintf return values.
1731 Re-define EAFNOSUPPORT if not present. Indent.
1733 * md5.h, md5.c: Simplify buffer handling visavi alignment,
1734 suggested by Bruno Haible <bruno@clisp.org>.
1736 * gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
1738 * gc.h: Add MD2 and RMD160 length defines. Add prototypes.
1740 * gc-libgcrypt.c: Add MD2 (which is not available through
1743 * gc-gnulib.c: Add MD2. Implement gc_hash_* API.
1745 * md2.h, md2.c: New files.
1747 2005-10-24 Simon Josefsson <jas@extundo.com>
1749 * md4.h: Shrink buffer size, now that we changed the type.
1751 2005-10-22 Simon Josefsson <jas@extundo.com>
1753 * arcfour.h, arcfour.c: Use fixed size indices in the
1754 arcfour_context struct (simplify test vector testing in GNU
1757 2005-10-22 Simon Josefsson <jas@extundo.com>
1759 * md4.h, md4.c: Simplify buffer handling visavi alignment,
1760 suggested by Bruno Haible <bruno@clisp.org>.
1762 2005-10-22 Simon Josefsson <jas@extundo.com>
1764 * crc.h: Include stddef.h, for size_t.
1766 2005-10-21 Simon Josefsson <jas@extundo.com>
1768 * arctwo.h (arctwo_setkey): Protect variable in CPP macro,
1769 suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1771 2005-10-21 Simon Josefsson <jas@extundo.com>
1773 * rijndael-api-fst.c: Fix bugs in CBC mode for more than one
1776 2005-10-21 Simon Josefsson <jas@extundo.com>
1778 * gc-gnulib.c: Support ARCTWO in CBC mode.
1780 2005-10-21 Simon Josefsson <jas@extundo.com>
1782 * hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
1785 * hmac-sha1.c (hmac_sha1): Likewise.
1787 * crc.c (crc32_update): Actually use crc parameter, suggested by
1788 Bruno Haible <bruno@clisp.org>.
1790 * crc.h: Include stdint.h directly, suggested by Bruno Haible
1793 2005-10-21 Simon Josefsson <jas@extundo.com>
1795 * des.h, des.c: New files.
1797 * gc-gnulib.c: Support DES.c
1799 2005-10-21 Simon Josefsson <jas@extundo.com>
1801 * arctwo.h, arctwo.c: New files.
1803 * gc-gnulib.c: Support ARCTWO.
1805 2005-10-21 Simon Josefsson <jas@extundo.com>
1807 * gc-libgcrypt.c (gc_cipher_open): Handle ECB.
1809 2005-10-19 Simon Josefsson <jas@extundo.com>
1811 * gc-gnulib.c: Support ARCFOUR.
1813 2005-10-19 Simon Josefsson <jas@extundo.com>
1815 * gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
1818 * gc.h: Add ECB enum type.
1820 * hmac-md5.c, hmac-sha1.c: Include memxor.h.
1822 2005-10-19 Simon Josefsson <jas@extundo.com>
1824 * gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
1826 2005-10-18 Simon Josefsson <jas@extundo.com>
1828 * md4.h, md4.c: New files, based on md5.?.
1830 2005-10-17 Simon Josefsson <jas@extundo.com>
1832 * gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
1834 * gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
1836 2005-10-17 Simon Josefsson <jas@extundo.com>
1838 * gc.h, gc-libgcrypt.c: Add more hash types/functions.
1840 2005-10-17 Simon Josefsson <jas@extundo.com>
1842 * gc.h, gc-libgcrypt.c: Add ciphers.
1844 2005-10-17 Simon Josefsson <jas@extundo.com>
1846 * sha1.c: Use uint32_t instead of md5_uint32.t
1848 * sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
1851 * md5.c: Use uin32_t. Fix non-gcc UNALIGNED_P macro.
1853 * md5.h: Use stdint.h and uint32_t. Doc fix.
1855 2005-10-15 Simon Josefsson <jas@extundo.com>
1857 * rijndael-api-fst.h, rijndael-api-fst.c: New files.
1859 * rijndael-alg-fst.h, rijndael-alg-fst.c: New files.
1861 2005-10-14 Simon Josefsson <jas@extundo.com>
1863 * arcfour.h, arcfour.c: New files.
1865 2005-10-14 Paul Eggert <eggert@cs.ucla.edu>
1867 * obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
1868 include <wchar.h>; no longer needed.
1870 2005-10-14 Jakub Jelinek <jakub@redhat.com>
1871 and Ulrich Drepper <drepper@redhat.com>
1874 * obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
1875 instead of inline stream orientation test and two separate
1876 function calls. Pay no attention to USE_IN_LIBIO.
1878 2005-10-14 Roland McGrath <roland@redhat.com>
1880 Import from libc. [BZ #1331]
1881 * obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
1883 Reported by Matej Vela <vela@debian.org>.
1885 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
1887 * mkdir-p.c (make_dir_parents): Don't report an error if an
1888 intermediate directory is in a read-only file system. Problem
1889 reported by Eric Blake.
1891 2005-10-13 Simon Josefsson <jas@extundo.com>
1893 * gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
1894 Move memory allocation outside of loop.
1896 2005-10-12 Simon Josefsson <jas@extundo.com>
1898 * gc-pbkdf2-sha1.c: New file.
1900 * gc.h: Add gc_pbkdf2_sha1 prototype.
1902 2005-10-12 Simon Josefsson <jas@extundo.com>
1904 * gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
1905 suggested by Bruno Haible <bruno@clisp.org>.
1907 2005-10-12 Simon Josefsson <jas@extundo.com>
1909 * gc-libgcrypt.c (gc_hmac_sha1): New function.
1911 * gc-gnulib.c (gc_hmac_sha1): New function.
1913 2005-10-12 Simon Josefsson <jas@extundo.com>
1915 * gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
1917 2005-10-12 Simon Josefsson <jas@extundo.com>
1919 * gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
1920 GC_USE_HMAC_MD5, respectively.
1922 * gc-libgcrypt.c (gc_md5): Fix assert call.
1925 * gc.h (gc_hash_buffer): Use gc_hash in prototype.
1927 * gc-libgcrypt.c (gc_hash_buffer): Ditto.
1929 * gc-gnulib.c (gc_hash_buffer): Ditto.
1931 2005-10-11 Bruno Haible <bruno@clisp.org>
1933 * c-strcasestr.h: New file, from GNU gettext.
1934 * c-strcasestr.c: New file, from GNU gettext.
1936 2005-10-11 Bruno Haible <bruno@clisp.org>
1938 * c-strcase.h: New file, from GNU gettext.
1939 * c-strcasecmp.c: New file, from GNU gettext.
1940 * c-strncasecmp.c: New file, from GNU gettext.
1942 2005-10-11 Simon Josefsson <jas@extundo.com>
1944 * crc.h, crc.c: New files.
1946 * gc.h (gc_hash_buffer): Add doc.
1948 2005-10-08 Simon Josefsson <jas@extundo.com>
1950 * gc.h: Add gc_hash and gc_hash_buffer.
1952 * gc-gnulib.c (gc_hash_buffer): Add. Reorder #include's.
1954 * gc-libgcrypt.c (gc_hash_buffer): Add.
1956 2005-10-11 Bruno Haible <bruno@clisp.org>
1958 * strcasecmp.c: Include limits.h.
1959 (strcasecmp): Avoid integer overflow on exotic platforms.
1960 * strncasecmp.c: Include limits.h.
1961 (strncasecmp): Avoid integer overflow on exotic platforms.
1962 Reported by Paul Eggert.
1964 2005-10-06 Simon Josefsson <jas@extundo.com>
1966 * hmac-md5.c: New file.
1970 2005-10-06 Simon Josefsson <jas@extundo.com>
1972 * memxor.c (memxor): Avoid casts and warnings.
1974 2005-10-05 Derek Price <derek@ximbiot.com>
1976 * getdelim.c (SIZE_MAX): New macro, if not already defined.
1978 2005-10-05 Simon Josefsson <jas@extundo.com>
1980 * memxor.c (memxor): Fix compiler error.
1982 * md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
1983 <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
1985 * memxor.h, memxor.c: New files.
1987 * getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
1988 we assume all systems have it, suggested by Jim Meyering
1989 <jim@meyering.net>. Remove HAVE_SYS_SOCKET_H test too, to see if
1990 any systems lack sys/socket.h; mingw32 is known to lack it, but we
1991 don't support it yet anyway. Also remove HAVE_NETDB_H test, for
1994 2005-10-04 Bruno Haible <bruno@clisp.org>
1996 * verify.h (verify_true): Provide alternative definition for C++.
1998 2005-10-04 Simon Josefsson <jas@extundo.com>
2000 * getaddrinfo.h: Move sys/types.h include first, reported by "Mark
2001 D. Baushke" <mdb@gnu.org>.
2003 2005-10-03 Paul Eggert <eggert@cs.ucla.edu>
2005 * getdelim.c: Include getdelim.h first. Include <limits.h>.
2006 (SSIZE_MAX): New macro, if not already defined.
2007 (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
2010 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2012 * exclude.c: Include verify.h.
2013 (verify): Remove. All callers changed to use verify.h's version.
2014 * strtoimax.c: Likewise.
2015 * utimecmp.c: Likewis.e
2017 Sync from coreutils.
2018 * .cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h, getpass.c
2019 mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
2020 * .cvsignore: Add fts.h, search.h, t-fpending.
2021 * settime.c (settime): Fix { typo in previous patch. Also, don't
2022 bother returning ENOSYS if settimeofday or stime fails; just let
2023 them return whatever errno they want to return.
2024 * utimens.c: Include unistd.h, for dup2.
2025 (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
2026 (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
2028 2005-10-02 Jim Meyering <jim@meyering.net>
2030 Sync from coreutils.
2031 * fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
2032 * openat-die.c: Use `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H'.
2033 * openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
2034 Remove AT_FDCWD test.
2035 Do not consume the fd unless successful.
2036 * openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
2037 * settime.c (settime): Move the HAVE_STIME block `up' into an #elif
2038 block, so that we don't even try to compile it if settimeofday is
2039 available. This works around a compilation failure on OSF1 V5.1,
2040 due to stime requiring a `long int*' while tv_sec is `int'.
2042 2005-09-30 Eric Blake <ebb9@byu.net> (tiny change)
2044 * getdelim.c (getdelim): Remove unused variables.
2046 2005-10-01 Simon Josefsson <jas@extundo.com>
2048 * getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
2049 Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO. Protect
2050 AI_* and EAI_* definitions. Protect function declarations.
2052 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2054 * xtime.h (XTIME_PRECISION): Now of type int, not long long int,
2055 so that the code works even with ancient cpp. Portability problem
2056 with GCC 2.7.2.1 reported by Thomas M.Ott.
2058 2005-09-27 Jim Meyering <jim@meyering.net>
2060 * getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef HAVE_CONFIG_H.
2062 * intprops.h (signed_type_or_expr__): Define.
2063 (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
2066 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2068 * verify.h (verify_expr): Remove, replacing with:
2069 (verify_true): New macro that returns true instead of void.
2070 (verify_type__): Remove.
2071 (verify): Use verify_true rather than verify_type__.
2073 2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
2075 * utimens.c (ENOSYS): Define if not already defined.
2076 (futimens): Support having a null PATH if the file descriptor
2079 * regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
2081 (__attribute): Define to empty unless GCC 3.1 or later.
2082 This works around a core dump on OpenBSD 3.4, which has GCC
2083 2.95.3, which dumps core when given __attribute__(()). It also
2084 simplifies other tests, since we really don't want to bother with
2085 worrying about which ancient version of GCC supported what.
2086 Original problem reported by Yoann Vandoorselaere, with part of
2087 the fix suggested by Derek Price.
2089 2005-09-24 Jim Meyering <jim@meyering.net>
2091 * verify.h (verify_type__): Use `unsigned int' as the bitfield type
2092 so we can once again use a positive bitfield width of 1 -- now we
2093 don't have to explain why we were using a bitfield width of 2.
2095 2005-09-23 Paul Eggert <eggert@cs.ucla.edu>
2097 * getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
2098 Problem reported by Eric Blake.
2099 (getaddrinfo): Initialize se so that it's not garbage.
2100 Redo internal storage allocation so that it doesn't make unportable
2101 assumptions about alignment.
2104 * utimens.c (futimens): Use futimesat if available.
2105 Prefer it to futimes since it doesn't have the futimes bug.
2107 * verify.h (GL_CONCAT0, GL_CONCAT): Remove.
2108 (verify): Don't use the __LINE__ trick, as it doesn't work in general.
2109 Instead, declare a function that returns a pointer to an array,
2110 and use verify_type__ to declare the size of the array.
2111 Problem and germ of a solution reported by Bruno Haible.
2112 (verify_type__): Use 2, not 1, for bitfield size, to avoid
2113 a warning with Irix 6.5 cc. Problem reported by Bruno Haible.
2115 2005-09-22 Paul Eggert <eggert@cs.ucla.edu>
2117 Sync from coreutils.
2119 * .cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
2121 * argmatch.h: Include verify.h
2122 (ARGMATCH_VERIFY): Use verify rather than rolling our own.
2123 (ARGMATCH_ASSERT): Remove; unused.
2124 * canonicalize.c: Assume STDC_HEADERS.
2125 * exclude.c: Include "strcase.h".
2126 * regex_internal.h [!defined _LIBC]: Likewise.
2127 * getusershell.c: Include stdio--.h rather than stdio.h
2129 (getusershell): Call fopen, not fopen_safer.
2130 * save-cwd.c: Include fcntl--.h rather than fcntl.h.
2131 Do not include unistd-safer.h.
2132 (save_cwd): Don't call fd_safer; no longer needed
2133 now that we include fcntl--.h.
2135 * getdate.y (relative_time): New type.
2136 (RELATIVE_TIME_0): New constant.
2137 (parser_control): Use relative_time instead of doing it ourselves.
2138 (%union): Add new relative_time rel member.
2139 (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
2141 (relunit, relunit_snumber): Now of type rel.
2142 (zone, rel, relunit, get_date): Adjust to above changes.
2144 * getloadavg.c: Include fcntl--.h rather than fcntl.h.
2145 Do not include unistd-safer.h.
2146 (getloadavg): Don't call fd_safer; no longer needed
2147 now that we include fcntl--.h.
2149 * mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
2150 (make_dir_parents): Treat ENOSYS like EEXIST.
2152 Improve quality of diagnostics on restore_cwd failure.
2153 * mkdir-p.h (make_dir): Remove. All uses replaced by mkdir.
2154 (make_dir_parents): Last arg is now int * (for errno), not bool *.
2155 * mkdir-p.c (make_dir, make_dir_parents): Likewise.
2156 Rewrite "mkdir -p" algorithm to avoid the need for "stat"
2157 each time through the loop. Do not diagnose restore_cwd failure;
2158 that is the caller's job (and perhaps the caller does not care).
2160 * mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
2161 (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
2162 If the file already exists but is not a directory, don't bother
2163 to try to make its parents.
2164 Close potential file descriptor leak if we can't chdir("/") (!).
2165 Don't always return true if chdir($PWD) fails; return true only
2166 if the requested action was done successfully (except for the
2168 Don't log final directory unless we actually made it.
2169 Refactor to avoid duplicate code to fix up permissions.
2170 Don't attempt to fix up parent permissions if chdir($PWD) fails.
2172 * strftime.c (my_strftime): Rewrite the previous change slightly,
2173 to make it a bit faster and (I hope) clearer.
2174 * strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
2175 Fix bug in formats like %2N.
2177 * verify.h: New file.
2179 2005-09-22 Jim Meyering <jim@meyering.net>
2181 Sync from coreutils.
2183 * backupfile.c: Use ARGMATCH_VERIFY, just in case.
2185 * posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
2186 the .tm_year member, since otherwise gcc-4.0 would now warn about
2187 tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
2189 * quotearg.c (quotearg_n_options): Change code to be suboptimal, in
2190 order to avoid an unsuppressible warning from gcc on 64-bit systems.
2192 * getdate.y (get_date): Undo part of the 2005-04-04 change, so that
2193 the command "date -d'2005-03-27 +1 day'" succeeds once again, even
2194 when run in a time zone for which daylight savings time is in effect
2195 for the starting date.
2197 * mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
2198 stop us from restricting permissions of just-created absolute-named
2200 * mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
2201 to restore initial working directory.
2202 * mkdir-p.c (make_dir_parents): New parameter: different_working_dir,
2203 to tell caller if/when we change the working directory and are
2204 unable to return to the initial one.
2205 * mkdir-p.h (make_dir_parents): Update prototype.
2206 * mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
2207 `return false'. This fixes a bug introduced on 2004-07-30.
2209 * openat.c (fdopendir): Be sure to close the supplied
2210 file descriptor before returning. This makes our replacement
2211 implementation a little closer to Solaris's, where fdopendir
2212 ties the file descriptor to the returned DIR* pointer.
2213 * openat.c (unlinkat): New function.
2214 * openat.h (unlinkat): Add prototype.
2215 * openat-die.c (openat_save_fail): Rename from openat_save_die.
2216 (openat_restore_fail): Rename from openat_restore_die.
2217 * openat.c, openat.h: Reflect s/_die/_fail/ renaming.
2219 Provide an alternative to exiting immediately upon save_cwd or
2220 restore_cwd failure. Now, an application can arrange e.g.,
2221 to perform a longjump in that case.
2222 * openat.c: Include dirname.h.
2223 Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
2224 (rpl_openat, fdopendir, fstatat): Call openat_save_die
2225 and openat_restore_die rather than calling error directly.
2226 Don't include "error.h" or "exitfail.h"; they're no longer needed.
2228 * openat-die.c (openat_save_die, openat_restore_die): New file.
2229 * openat.h (openat_save_die, openat_restore_die): Declare and define.
2231 * strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
2232 size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
2233 int utc, int nanoseconds);
2235 date should not have to allocate a megabyte of virtual memory to
2236 handle a format argument like +%1048575T. When implemented with
2237 strftime, it must allocate such a buffer, use strftime to fill it
2238 in, print it, then free it.
2239 With fprintftime, it simply prints everything and exits.
2240 With no need for memory allocation, that's one fewer way to fail.
2241 * strftime.c (my_strftime): Parse the colons of %:::z *after* the
2242 optional field width, not before, so we accept %9:z, not %:9z.
2243 (my_strftime): Be sure to use L_('x') for literals.
2245 * backupfile.c, canon-host.c, canonicalize.c, chown.c, cloexec.c:
2246 * dup-safer.c, dup2.c, euidaccess.c, fd-safer.c, fileblocks.c:
2247 * fopen-safer.c, fsusage.c, ftruncate.c, getcwd.c, getcwd.h:
2248 * getloadavg.c, getopt_.h, getpagesize.h, getugroups.c, group-member.c:
2249 * human.h, idcache.c, mkdir-p.c, mountlist.c, nanosleep.c, pathmax.h:
2250 * physmem.c, posixver.c, putenv.c, raise.c, safe-read.c, same.c:
2251 * save-cwd.c, setenv.c, settime.c, tempname.c, unlinkdir.c:
2252 * unsetenv.c, userspec.c, xgethostname.c, xreadlink.c:
2253 Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
2255 * chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
2256 * getloadavg.c, mountlist.c, openat.h, save-cwd.c, tempname.c:
2257 Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
2258 and don't include <sys/file.h>).
2260 2005-09-22 Eric Blake <ebb9@byu.net> (tiny change)
2262 Sync from coreutils.
2264 * getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
2265 [__linux__]: Allocate a big enough buffer for /proc/loadavg.
2266 [!LDAV_DONE]: Avoid unused variable warning.
2268 2005-09-21 Bruno Haible <bruno@clisp.org>
2270 * unicodeio.h (unicode_to_mb): New declaration.
2272 2005-09-20 Derek Price <derek@ximbiot.com>
2274 * getaddrinfo.c: Don't include <netdb.h> included from getaddrinfo.h.
2276 2005-09-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2278 Use a consistent style for including <config.h>.
2279 * __fpending.c, acl.c, argmatch.c,
2280 argp-help.c, argp-parse.c,
2281 argp-pvh.c, backupfile.c, basename.c, c-stack.c,
2282 calloc.c, check-version.c, cloexec.c, closeout.c, copy-file.c,
2283 creat-safer.c, cycle-check.c, dirfd.c, dirname.c, dup-safer.c,
2284 dup2.c, euidaccess.c, exclude.c, exitfail.c, fatal-signal.c,
2285 fd-safer.c, file-type.c, fileblocks.c, filemode.c,
2286 filenamecat.c, findprog.c, fnmatch.c, fopen-safer.c, free.c,
2287 fsusage.c, ftruncate.c, full-write.c, fwriteerror.c,
2288 getaddrinfo.c, getcwd.c, getdelim.c, getline.c, getlogin_r.c,
2289 getndelim2.c, getnline.c, getopt1.c, getpass.c, group-member.c,
2290 hard-locale.c, hash-pjw.c, hash.c, human.c, idcache.c,
2291 inet_ntop.c, isdir.c, long-options.c, malloc.c, memcasecmp.c,
2292 memcmp.c, memcoll.c, memcpy.c, memmove.c, mkdir-p.c,
2293 modechange.c, mountlist.c, open-safer.c, physmem.c,
2294 pipe-safer.c, pipe.c, poll.c, posixver.c, progname.c,
2295 progreloc.c, putenv.c, quote.c, quotearg.c, readline.c,
2296 readlink.c, realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c,
2297 safe-read.c, same.c, save-cwd.c, savedir.c, sig2str.c,
2298 strcspn.c, strerror.c, stripslash.c, strncasecmp.c, strndup.c,
2299 strnlen.c, strnlen1.c, strsep.c, strstr.c, strtod.c,
2300 strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c,
2301 userspec.c, utimecmp.c, version-etc-fsf.c,
2302 version-etc.c, wait-process.c, xalloc-die.c, xgetcwd.c,
2303 xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xsetenv.c,
2304 xstrndup.c, xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c:
2305 Standardize inclusion of config.h.
2306 * __fpending.h, dirfd.h, getdate.h, human.h,
2307 inttostr.h: Removed inclusion of config.h from header files.
2308 * inttostr.c: Adjusted in-tree users.
2309 * timespec.h: Remove superfluous warning to include config.h.
2310 * atexit.c, chdir-long.c chown.c, fchown-stub.c, getgroups.c,
2311 gettimeofday.c, lchown.c, lstat.c, mkdir.c, mkstemp.c,
2312 nanosleep.c, openat.c, raise.c, readtokens0.c, readutmp.c,
2313 unlinkdir.c: Guard inclusion of config.h with HAVE_CONFIG_H.
2315 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2317 * stat-time.h: New file.
2318 * timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
2319 (MTIME_CMP, TIMESPEC_NS): Remove. Now done by stat-time.h,
2321 (timespec_cmp): New function.
2322 * utimecmp.c: Include stat-time.h.
2323 (SYSCALL_RESOLUTION): Depend on whether various struct stat
2324 members exist, not on the obsolescent ST_MTIM_NSEC.
2325 (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
2327 2005-09-15 Derek Price <derek@ximbiot.com>
2328 Paul Eggert <eggert@cs.ucla.edu>
2330 * regcomp.c, regexec.c, regex_internal.c: Back out previous
2331 changes, consolidating in...
2332 * regex_internal.h: ...this file.
2334 2005-09-15 Derek Price <derek@ximbiot.com>
2336 * regex_internal.h: Blank `pure' for GNUC < 3.
2337 * regex_internal.c: Ditto, using this...
2338 (__GNUC_PREREQ): ...new macro.
2339 * regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1 using...
2340 (__GNUC_PREREQ): ...this new macro.
2342 * strstr.h: Include string.h. Define strstr as a macro here.
2344 2005-09-13 Derek Price <derek@ximbiot.com>
2346 * canon-host.c (canon_host_r): Set *cherror on memory allocation
2348 Reported by Jim Meyering <jim@meyering.net>.
2350 2005-09-13 Jim Meyering <jim@meyering.net>
2352 * canon-host.c: Filter through gnu indent and reword comments slightly.
2353 * canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
2355 2005-09-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
2357 * lib/base64.c: Typo.
2358 (base64_encode): Put b64str in initialized data section.
2360 2005-09-12 Derek Price <derek@ximbiot.com>
2362 Return usable errors from canon-host.
2363 * canon-host.h: New file.
2364 * canon-host.c (canon_host): Wrap...
2365 (canon_host_r): ...this new function, which now relies exclusively on
2367 (ch_strerror): New function.
2368 (last_cherror): New global.
2369 * getaddrinfo.c: Move include of getaddrinfo.h first to test interface.
2370 (getaddrinfo): Add AI_CANONNAME functionality. Don't do arithmetic on
2372 (freeaddrinfo): Free ai->ai_canonname when set.
2374 2005-09-12 Derek Price <derek@ximbiot.com>
2375 Paul Eggert <eggert@cs.ucla.edu>
2377 * glob-libc.h: Renamed from glob_.h. The new version is
2378 taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
2379 protecting things that should be done only in gnulib contexts.
2380 * glob_.h: New file, containing only the glob things needed for
2382 (GLOB_PREFIX): Remove. All uses changed to look for __GLOB_GNULIB.
2383 (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
2384 (glob, globfree, glob_pattern_p): Now defined simply in terms of
2385 rpl_glob, rpl_globfree, rpl_glob_pattern_p.
2386 (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
2387 and to respect the namespace rules better.
2389 2005-09-12 Paul Eggert <eggert@cs.ucla.edu>
2391 Merge glibc and coreutils changes into gnulib, plus a few
2393 * md5.c: Use #error rather than a string.
2394 (CYCLIC): New macro, from glibc source. Use it instead of rol.
2395 * md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
2396 (__attribute__): Define to empty for non recent-GCC.
2397 (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
2398 (__md5_process_bytes, __md5_read_ctx, __md5_stream):
2399 Renamed from their non-__ counterparts, with new macros replacing
2400 them if not _LIBC. Add __THROW attribute.
2402 (struct md5_ctx): Align buffer if using GCC.
2403 * sha1.h (struct sha1_ctx): Likewise.
2404 * sha1.c (SWAP): Renamed from the NOTSWAP. All uses changed.
2405 The old name was backwards.
2406 (NOTSWAP): Remove; not used.
2407 (rol): New macro, moved here from md5.h.
2408 (sha1_process_block): Remove a FIXME that doesn't make sense.
2410 2005-09-12 Derek Price <derek@ximbiot.com>
2412 * gai_strerror.c: Include config.h when available. Include
2413 getaddrinfo.h before other headers to test interface.
2414 Reported by Larry Jones <lawrence.jones@ugs.com>.
2416 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2418 * glob.c (glob, globfree, __glob_pattern_p): Use old-style function
2419 definitions, since that's the preferred style in glibc.
2420 Fix a minor spacing issue, and update copyright notice to match glibc's.
2422 2005-09-06 Paul Eggert <eggert@cs.ucla.edu>
2424 * regex_internal.h (bitset_not): Add parens to avoid gcc -Wall warning.
2426 2005-09-06 Simon Josefsson <jas@extundo.com>
2428 * getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
2429 TCSETATTR. Reported by Derek Price <derek@ximbiot.com>.
2431 2005-09-05 Paul Eggert <eggert@cs.ucla.edu>
2433 Change bitset word type from unsigned int to unsigned long int,
2434 as this has better performance on typical 64-bit hosts.
2435 Port bitset code to hosts with unusual word sizes.
2436 * regcomp.c (build_equiv_class, build_charclass, build_range_exp):
2437 (build_collating_symbol):
2438 Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
2439 argument is a bitset. This is merely a style issue, but it makes
2440 it clearer that an entire array is expected.
2441 (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
2442 * regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
2443 Port to the case where bitset_word is not the same as unsigned int.
2444 * regex_internal.h (bitset_set, bitset_clear, bitset_contain):
2445 (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
2447 * regexec.c (check_dst_limits_calc_pos_1, check_subexp_matching_top):
2448 (build_trtable, group_nodes_into_DFAstates):
2450 * regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
2451 Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
2452 * regex_internal.h (bitset_set_all, bitset_not): Likewise.
2453 * regexec.c (group_nodes_into_DFAstates): Likewise.
2454 * regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
2455 * regcomp.c (optimize_subexps, lower_subexp):
2456 Work even if bitset_word has holes in its bitwise representation.
2457 * regex_internal.h (BITSET_WORD_BITS): Likewise.
2458 * regexec.c (check_dst_limits_calc_pos_1, check_subexp_matching_top):
2460 * regex_internal.c (re_string_reconstruct):
2461 Don't assume UCHAR_MAX == 255.
2462 * regex_internal.h (bitset_set_all): Likewise.
2463 * regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
2465 (BITSET_WORDS): Renamed from BITSET_UINTS. All uses changed.
2466 (bitset_word): New type, replacing 'unsigned int' for bitset uses.
2468 (BITSET_WORD_MAX): New macro.
2469 (bitset_set, bitset_clear, bitset_contain, bitset_empty):
2470 (bitset_set_all, bitset_copy): Now inline functions, not macros.
2471 (bitset_empty, bitset_copy):
2472 Prefer sizeof (bitset) to multiplying it out ourselves.
2473 (bitset_not_merge): Remove; unused.
2474 (bitset_contain): Return bool, not unsigned int with one bit on.
2475 All callers changed.
2476 * regexec.c (build_trtable): Don't assume bitset has no stricter
2477 alignment than re_node_set; do this by defining a new internal
2478 type struct dests_alloc and using it to allocate memory.
2480 2005-09-02 Paul Eggert <eggert@cs.ucla.edu>
2482 Check for arithmetic overflow when calculating sizes, to prevent
2483 some buffer-overflow issues. These patches are conservative, in the
2484 sense that when I couldn't determine whether an overflow was possible,
2485 I inserted a run-time check.
2486 * regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New macros.
2487 (SIZE_MAX) [!defined SIZE_MAX]: New macro.
2488 (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
2489 (re_xnrealloc, re_x2nrealloc): New inline functions.
2490 * lib/regcomp.c (init_dfa, analyze, build_range_exp, parse_bracket_exp):
2491 (build_equiv_class, build_charclass): Check for arithmetic overflow
2492 in size expression calculations.
2493 * lib/regex_internal.c (re_string_realloc_buffers):
2494 (build_wcs_upper_buffer, re_node_set_add_intersect):
2495 (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
2496 (re_dfa_add_node, register_state): Likewise.
2497 * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
2498 (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
2499 (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
2500 (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
2502 2005-09-01 Paul Eggert <eggert@cs.ucla.edu>
2504 * glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
2505 to avoid a collision with bits/local_lim.h in glibc.
2506 All uses changed. Problem reported by Dmitry V. Levin in
2507 <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
2509 * regex_internal.c (build_wcs_upper_buffer): Fix portability
2510 bugs in int versus size_t comparisons.
2511 (re_string_context_at): Fix bug where the code assumed that
2514 Use bool where appropriate.
2515 * regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
2516 All callers changed.
2517 (calc_eclosure_iter): Likewise, for ROOT arg.
2518 (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
2519 (build_charclass_op): Likewise, for NON_MATCH arg.
2520 * regex_internal.c (re_string_allocate, re_string_construct):
2521 (re_string_construct_common): Likewise, for ICASE arg.
2522 * regexec.c (re_search_2_stub, re_search_stub):
2523 Likewise, for RET_LEN arg.
2524 (check_matching): Likewise, for FL_LONGEST_MATCH arg.
2525 (set_regs): Likewise, for FL_BACKTRACK arg.
2526 * regcomp.c (re_compile_fastmap_iter, optimize_utf8):
2527 (duplicate_node_closure, calc_inveclosure, calc_eclosure):
2528 (calc_eclosure_iter, parse_bracket_exp):
2529 Use bool for internal variables that are booleans.
2530 * regexec.c (re_search_internal, check_matching, proceed_next_node):
2531 (set_regs, build_sifted_states, sift_states_bkref):
2532 (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
2533 (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
2534 (find_collation_sequence_value):
2536 * regex_internal.c (re_node_set_insert, re_node_set_insert_last):
2537 (re_node_set_compare):
2538 Return bool, not int. All callers changed.
2539 * regexec.c (check_halt_node_context, check_dst_limits):
2540 (build_trtable, check_node_accept): Likewise.
2541 * regex_internal.h: Include stdbool.h.
2543 Fix bugs uncovered when converting to bool.
2544 * regcomp.c (calc_eclosure_iter): Check for storage allocation
2545 failure instead of charging ahead blindly.
2546 * regex_internal.c (register_state): Likewise.
2547 * regexec.c (re_search_2_stub): Use simpler method than boolean
2548 for freeing internal storage.
2549 (group_nodes_into_DFA_states): Use unsigned int, not int, for
2550 bitset pieces used as boolean, to avoid undefined behavior
2551 on hosts that do int overflow checking.
2553 2005-08-31 Derek Price <derek@ximbiot.com>
2555 * getdelim.c (getdelim): Return EOF on EOF.
2556 Reported by Larry Jones <lawrence.jones@ugs.com>.
2558 2005-08-31 Paul Eggert <eggert@cs.ucla.edu>
2560 * regex_internal.c (re_string_reconstruct): Don't assume buffer
2561 lengths fit in regoff_t; this isn't true if regoff_t is the same
2563 * regex.c (re_search_internal): 5th arg is LAST_START
2564 (= START + RANGE) instead of RANGE. This avoids overflow
2565 problems when regoff_t is the same width as size_t.
2566 All callers changed.
2567 (re_search_2_stub): Check for overflow when adding the
2568 sizes of the two strings.
2569 (re_search_stub): Check for overflow when adding START
2570 to RANGE; if it occurs, substitute the extreme value.
2572 2005-08-31 Jim Meyering <jim@meyering.net>
2574 * regcomp.c (search_duplicated_node): Make first pointer arg
2576 * regex_internal.c (create_ci_newstate, create_cd_newstate):
2577 (register_state): Likewise.
2578 * regexec.c (search_cur_bkref_entry, check_dst_limits):
2579 (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
2580 (group_nodes_into_DFAstates): Likewise.
2582 2005-08-31 Paul Eggert <eggert@cs.ucla.edu>
2584 On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
2585 old glibc regex code mishandles strings longer than 2**31 bytes.
2586 This patch fixes this when the regex code is used in gnulib
2587 (i.e., outside glibc).
2589 This patch should not affect the use of the regex code inside
2590 glibc. No doubt this problem also needs to be handled for glibc
2591 as well, but the result will be an incompatible change to the
2592 glibc ABI, and the old ABI will have to be supported too. That
2593 can be the the subject for another patch.
2595 * regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
2596 governing whether the rest of this patch is active. By default,
2597 the macro is disabled and the patch has no effect.
2598 (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
2599 (__re_idx_t, __re_size_t, __re_long_size_t): New types.
2600 (struct re_pattern_buffer, re_search, re_search_2, re_match):
2601 (re_match_2, re_set_registers): Use the new types.
2602 * regex_internal.h (Idx, re_hashval_t): New types.
2603 (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
2605 (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
2606 (re_string_context_at, bin_tree_t, re_dfastate_t):
2607 (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
2608 (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
2609 (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
2610 (re_string_char_size_at, re_string_wchar_at):
2611 (re_string_elem_size_at):
2612 Use the new types and macros to port to 64-bit hosts.
2613 Use unsigned types for internal values, so that the code
2614 mostly works even for arrays larger than SSIZE_MAX.
2615 * regcomp.c (re_compile_internal, init_dfa, duplicate_node):
2616 (search_duplicated_node, calc_eclosure_iter, fetch_number):
2617 (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
2618 (build_equiv_class, build_charclass, re_compile_fastmap_iter):
2619 (free_dfa_content, create_initial_state, optimize_utf8, analyze):
2620 (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
2621 (calc_inveclosure, parse_dup_op, build_range_exp):
2622 (build_collating_symbol, parse_bracket_exp, build_charclass_op):
2623 (fetch_number, create_token_tree, mark_opt_subexp):
2625 * regex_internal.c (re_string_construct_common, create_ci_newstate):
2626 (create_cd_newstate, re_string_allocate, re_string_construct):
2627 (re_string_realloc_buffers, build_wcs_upper_buffer):
2628 (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
2629 (re_string_reconstruct, re_string_peek_byte_case):
2630 (re_string_fetch_byte_case, re_string_context_at):
2631 (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
2632 (re_node_set_init_copy, re_node_set_add_intersect):
2633 (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
2634 (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
2635 (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
2636 (re_acquire_state, re_acquire_state_context, register_state):
2638 * regex.c (match_ctx_init, match_ctx_add_entry, search_cur_bkref_entry):
2639 (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
2640 (re_search_internal, re_search_2_stub, re_search_stub)
2641 (re_copy_regs, check_matching, check_halt_state_context, update_regs):
2642 (push_fail_stack, sift_states_iter_mb, build_sifted_states):
2643 (update_cur_sifted_state, check_dst_limits):
2644 (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
2645 (check_subexp_limits, sift_states_bkref, merge_state_array):
2646 (check_subexp_matching_top, get_subexp, get_subexp_sub):
2647 (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
2648 (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
2649 (expand_bkref_cache, check_node_accept_bytes):
2650 (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
2651 (re_search, re_match_2, re_search_2, prune_impossible_nodes):
2652 (acquire_init_state_context, check_halt_node_context):
2653 (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
2654 (sift_states_backward, clean_state_log_if_needed):
2655 (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
2656 (find_recover_state, transit_state_sb, transit_state_mb):
2657 (transit_state_bkref, build_trtable, match_ctx_clean):
2659 * regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
2660 to work around an assumption that REG_MISSING is negative.
2662 * regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
2663 (seek_collating_symbol_entry) [defined _LIBC]:
2664 (lookup_collation_sequence_value) [defined _LIBC]:
2665 (build_range_exp, build_collating_symbol) [defined _LIBC]:
2666 Use prototypes rather than old-style function definitions.
2667 * regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
2668 (transit_state_sb) [0]:
2669 (find_collation_sequence_value) [defined _LIBC]: Likewise.
2671 * regexec.c (re_search_internal): Simplify update of rm_so and
2674 * regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
2675 (optimize_subexps, lower_subexp):
2676 Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
2677 since the signed shift might overflow. Use 1u<<31 instead.
2678 * regex_internal.h (bitset_set, bitset_clear, bitset_contain): Likewise.
2679 * regexec.c (check_dst_limits_calc_pos_1, check_subexp_matching_top):
2682 * regcomp.c (optimize_subexps, lower_subexp):
2683 Use CHAR_BIT rather than 8, for clarity.
2684 * regexec.c (check_dst_limits_calc_pos_1):
2685 (check_subexp_matching_top): Likewise.
2686 * regcomp.c (init_dfa): Make table_size unsigned, so that we don't
2687 have to worry about portability issues when shifting it left.
2688 Remove no-longer-needed test for table_size > 0.
2689 * regcomp.c (parse_sub_exp): Do not shift more bits than there are
2690 in a word, as the resulting behavior is undefined.
2691 * regexec.c (check_dst_limits_calc_pos_1): Likewise;
2692 in one case, a <= should have been an <, and in another case the
2693 whole test was missing.
2694 * regex_internal.h (BYTE_BITS): Remove. All uses changed to
2695 the standard name CHAR_BIT.
2696 * regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
2697 this is not true on one's complement and signed-magnitude hosts.
2699 * regex_internal.h (re_sub_match_top_t): Remove unused member
2701 (struct re_dfa_t): Remove unused member states_alloc.
2702 * regcomp.c (init_dfa): Don't initialize unused members.
2704 2005-08-31 Bruno Haible <bruno@clisp.org>
2706 * strstr.c: Include <stddef.h>, for NULL.
2707 * strcasestr.c: Likewise.
2708 Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
2710 2005-08-30 "Oskar Liljeblad" <oskar@osk.mine.nu>
2712 * iconvme.h: Add prototype for iconv_alloc.
2714 2005-08-29 Simon Josefsson <jas@extundo.com>
2716 * iconvme.c: Fix errno.
2718 2005-08-29 "Oskar Liljeblad" <oskar@osk.mine.nu>
2720 * iconvme.c: Split iconv_string into iconv_alloc.
2722 2005-08-27 Jim Meyering <jim@meyering.net>
2724 * fopen-safer.c: Merge minor changes from coreutils.
2725 * dup-safer.c: Likewise.
2726 * fd-safer.c: Likewise.
2728 Merge from coreutils.
2729 * stdio--.h: New file.
2730 * stdlib--.h: New file.
2731 * mkstemp-safer.c: New file.
2733 GNU tar needs these.
2734 * pipe-safer.c: New file.
2735 * creat-safer.c: New file.
2736 * fcntl--.h (creat): Define to creat_safer.
2737 * fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
2738 * unistd--.h (pipe): Define to pipe_safer.
2739 * unistd-safer.h: Declare pipe_safer.
2741 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2743 * regex_internal.h: Remove all references to
2744 RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
2746 (bitset_not, bitset_merge, bitset_not_merge):
2747 (bitset_mask, re_string_allocate, re_string_construct):
2748 (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
2749 (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
2750 (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
2751 (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
2752 (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
2753 (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
2754 (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
2755 (re_acquire_state_context):
2756 Remove unnecessary forward decls.
2757 (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
2758 Put __attribute at function definition,
2759 now that the function decl has been removed.
2760 * lib/regex_internal.c (re_string_peek_byte_case):
2761 (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
2764 2005-08-26 Simon Josefsson <jas@extundo.com>
2766 * getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
2767 Haible <bruno@clisp.org>.
2769 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2771 * regexec.c (set_regs): Don't alloca with an unbounded size.
2773 alloca modernization/simplification for regex.
2774 * regex.c: Remove portability cruft for alloca. This no longer
2775 needs to be at the start of the file, and can be moved into
2776 regex_internal.h and simplified.
2777 * regex_internal.h: Include <alloca.h>.
2778 (__libc_use_alloca) [!defined _LIBC]: New macro.
2779 * regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
2780 now works outside glibc.
2782 2005-08-24 Simon Josefsson <jas@extundo.com>
2784 * getpass.c: Add WIN32 implementation. Conditionalize use of
2785 termios.h, tcgetattr, tcsetattr and __fsetlocking. Remove some
2786 GLIBC specific code.
2788 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2790 Make regex safe for g++. This fixes one real bug (an "err"
2791 that should have been "*err"). g++ problem reported by
2793 * regex_internal.h (re_calloc): New macro, consistent with
2794 re_malloc etc. All callers of calloc changed to use re_calloc.
2795 * regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
2796 not int. All callers changed.
2797 * regcomp.c (re_compile_fastmap_iter): Don't use alloca (mb_cur_max);
2798 just use an array of size MB_LEN_MAX.
2799 * regexec.c (push_fail_stack): Use re_realloc, not realloc.
2800 (find_recover_state): Change "err" to "*err"; this fixes what
2801 appears to be a real bug.
2802 (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
2805 2005-08-25 Jim Meyering <jim@meyering.net>
2807 * open-safer.c: Include <config.h>.
2808 Otherwise, we'd lose LARGEFILE support in any file using
2811 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2813 * regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
2814 * regex.h (regerror): Likewise.
2816 * regex.c: Do not include <sys/types.h>, as POSIX no longer
2817 requires this. (The code never needed it.)
2819 * regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
2820 All uses of recently-renamed identifiers changed to use the new,
2821 POSIX-compliant names. The code will build and run just fine
2822 without these changes, but it's better to eat our own dog food
2823 and use the standard-conforming names.
2825 * regex.h: Fix a multitude of POSIX name space violations.
2826 These changes have an effect only for programs that define
2827 _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
2828 do not change anything for programs compiled in the normal way.
2829 Also, there is no effect on the ABI.
2831 (_REGEX_SOURCE): New macro.
2832 Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
2833 defined and _GNU_SOURCE is not; this fixes a name space violation.
2835 Rename the following macros to obey POSIX requirements.
2836 The old names are still visible as macros if _REGEX_SOURCE is defined.
2837 (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
2838 RE_BACKSLASH_ESCAPE_IN_LISTS.
2839 (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
2840 (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
2841 (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
2842 (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
2843 (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
2844 (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
2845 (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
2846 (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
2847 (REG_INTERVALS): renamed from RE_INTERVALS.
2848 (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
2849 (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
2850 (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
2851 (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
2852 (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
2853 (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
2854 (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
2855 (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
2856 RE_UNMATCHED_RIGHT_PAREN_ORD.
2857 (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
2858 (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
2859 (REG_DEBUG): renamed from RE_DEBUG.
2860 (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
2861 (REG_IGNORE_CASE): renamed from RE_ICASE. This renaming is a bit
2862 unusual, since we can't clash with the POSIX REG_ICASE.
2863 (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
2864 (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
2865 (REG_NO_SUB): renamed from RE_NO_SUB.
2866 (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
2867 (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
2868 (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
2869 (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
2870 (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
2871 (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
2872 (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
2873 (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
2874 (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
2875 (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
2876 (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
2877 (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
2878 RE_SYNTAX_POSIX_MINIMAL_BASIC.
2879 (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
2880 (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
2881 RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
2882 (REG_DUP_MAX): renamed from RE_DUP_MAX. No need to undef it.
2883 (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
2884 (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
2885 (REG_FIXED): Renamed from REGS_FIXED.
2886 (REG_NREGS): Renamed from RE_NREGS.
2888 (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
2889 of other REG_* macros, since POSIX says the user is allowed to
2890 #undef these macros selectively.
2892 (reg_errcode_t): Update comment stating what other tables need
2895 Rename the following enum values to obey POSIX requirements.
2896 The old names are still visible as macros.
2897 (_REG_ENOSYS): Renamed from REG_ENOSYS. Define even if _XOPEN_SOURCE
2898 is not defined, since GNU is supposed to be a superset of POSIX as
2899 much as possible, and since we want reg_errcode_t to be a signed
2900 type for implementation consistency.
2901 (_REG_NOERROR): Renamed from REG_NOERROR.
2902 (_REG_NOMATCH): Renamed from REG_NOMATCH.
2903 (_REG_BADPAT): Renamed from REG_BADPAT.
2904 (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
2905 (_REG_ECTYPE): Renamed from REG_ECTYPE.
2906 (_REG_EESCAPE): Renamed from REG_EESCAPE.
2907 (_REG_ESUBREG): Renamed from REG_ESUBREG.
2908 (_REG_EBRACK): Renamed from REG_EBRACK.
2909 (_REG_EPAREN): Renamed from REG_EPAREN.
2910 (_REG_EBRACE): Renamed from REG_EBRACE.
2911 (_REG_BADBR): Renamed from REG_BADBR.
2912 (_REG_ERANGE): Renamed from REG_ERANGE.
2913 (_REG_ESPACE): Renamed from REG_ESPACE.
2914 (_REG_BADRPT): Renamed from REG_BADRPT.
2915 (_REG_EEND): Renamed from REG_EEND.
2916 (_REG_ESIZE): Renamed from REG_ESIZE.
2917 (_REG_ERPAREN): Renamed from REG_ERPAREN.
2918 (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
2919 (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
2920 (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
2921 (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
2923 (_REG_RE_NAME, _REG_RM_NAME): New macros.
2924 (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE. All uses
2925 changed. But support the old name if the new one is not defined
2926 and if _REGEX_SOURCE.
2928 Change the following member names in struct re_pattern_buffer.
2929 The old names are still supported if !_REGEX_SOURCE.
2930 The new names are always supported, regardless of _REGEX_SOURCE.
2931 (re_buffer): Renamed from buffer.
2932 (re_allocated): Renamed from allocated.
2933 (re_used): Renamed from used.
2934 (re_syntax): Renamed from syntax.
2935 (re_fastmap): Renamed from fastmap.
2936 (re_translate): Renamed from translate.
2937 (re_can_be_null): Renamed from can_be_null.
2938 (re_regs_allocated): Renamed from regs_allocated.
2939 (re_fastmap_accurate): Renamed from fastmap_accurate.
2940 (re_no_sub): Renamed from no_sub.
2941 (re_not_bol): Renamed from not_bol.
2942 (re_not_eol): Renamed from not_eol.
2943 (re_newline_anchor): Renamed from newline_anchor.
2945 Change the following member names in struct re_registers.
2946 The old names are still supported if !_REGEX_SOURCE.
2947 The new names are always supported, regardless of _REGEX_SOURCE.
2948 (rm_num_regs): Renamed from num_regs.
2949 (rm_start): Renamed from start.
2950 (rm_end): Renamed from end.
2952 (re_set_syntax, re_compile_pattern, re_compile_fastmap):
2953 (re_search, re_search_2, re_match, re_match_2, re_set_registers):
2954 Prepend __ to parameter names.
2956 Undo yesterday's changes.
2958 2005-08-24 Jim Meyering <jim@meyering.net>
2960 Sync from coreutils.
2961 * fcntl--.h, fcntl-safer.h, open-safer.c: New files.
2963 2005-08-21 Bruno Haible <bruno@clisp.org>
2965 * lock.h: Add multiple inclusion guard.
2966 * tls.h: Add multiple inclusion guard.
2968 2005-08-23 Paul Eggert <eggert@cs.ucla.edu>
2970 * regex.h (REG_NOSYS)
2971 [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
2972 Define, since POSIX requires it as of 2001.
2973 (_REG_ENOSYS) [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
2974 New private symbol, used to keep the enum signed in all cases.
2975 * regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James Youngman
2976 in <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
2978 * regex_internal.c (re_string_skip_chars, register_state):
2980 Remove forward decls; no longer needed now that we use prototypes.
2981 * regexec.c (acquire_init_state_context, check_halt_node_context):
2982 (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
2983 (clean_state_log_if_needed): Likewise.
2985 2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
2987 Fix problems reported by Sam Steingold in
2988 <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
2989 * regexec.c (sift_states_bkref): Fix portability bug: the code
2990 assumed that reg_errcode_t is a signed type, which is not
2991 necessarily true if _XOPEN_SOURCE is not defined.
2992 * regex_internal.c (calc_state_hash): Put 'inline' before type, since
2993 some compilers warn about it otherwise.
2995 2005-08-20 Jim Meyering <jim@meyering.net>
2997 * regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
2998 of unused local, dfa.
3000 2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
3002 * regcomp.c (create_initial_state): Remove duplicate decl.
3003 (init_word_char, create_initial_state, duplicate_node_closure):
3004 (fetch_token, peek_token_bracket, build_range_exp):
3005 (build_collating_symbol): Remove forward decls; no longer needed
3006 now that we use prototypes.
3009 (re_compile_pattern, re_set_syntax, re_compile_fastmap):
3010 (re_compile_fastmap_iter, regcomp, regerror, regfree):
3011 (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
3012 (create_initial_state, optimize_utf8, analyze, postorder, preorder):
3013 (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
3014 (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
3015 (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
3016 (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
3017 (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
3018 (build_range_exp, build_collating_symbol, parse_bracket_exp):
3019 (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
3020 (build_charclass, build_charclass_op, fetch_number, create_tree):
3021 (create_token_tree, mark_opt_subexp, duplicate_tree):
3022 Use prototypes rather than old-style definitions.
3025 (re_string_allocate, re_string_construct, re_string_realloc_buffers):
3026 (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
3027 (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
3028 (re_string_reconstruct, re_string_peek_byte_case):
3029 (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
3030 (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
3031 (re_node_set_init_copy, re_node_set_add_intersect):
3032 (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
3033 (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
3034 (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
3035 (re_acquire_state, re_acquire_state_context, register_state):
3036 (create_ci_newstate, create_cd_newstate, free_state):
3038 * regexec.c (regexec, re_match, re_search, re_match_2, re_search_2):
3039 (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
3040 (re_search_internal, prune_impossible_nodes):
3041 (acquire_init_state_context, check_matching, static):
3042 (check_halt_node_context, check_halt_state_context, proceed_next_node):
3043 (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
3044 (update_regs, sift_states_backward, build_sifted_states):
3045 (clean_state_log_if_needed, merge_state_array):
3046 (update_cur_sifted_state, add_epsilon_src_nodes):
3047 (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
3048 (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
3049 (sift_states_iter_mb, transit_state, merge_state_with_log, static):
3050 (find_recover_state, check_subexp_matching_top, transit_state_mb):
3051 (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
3052 (check_arrival, check_arrival_add_next_nodes):
3053 (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
3054 (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
3055 (check_node_accept_bytes, check_node_accept, extend_buffers):
3056 (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
3057 (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
3062 (re_string_allocate, re_string_construct, re_string_reconstruct):
3063 (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
3064 (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
3065 (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
3066 (re_string_context_at, re_string_peek_byte_case):
3067 (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
3068 is defined, since we now use prototypes always.
3070 * regex.h (_RE_ARGS): Remove. No longer needed, since we assume
3071 C89 or better. All uses removed.
3073 2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
3075 * regex_internal.c (re_acquire_state, re_acquire_state_context)
3076 [defined lint]: Suppress bogus uninitialized-variable warnings.
3078 * regcomp.c (duplicate_node): Return new index, not an error code,
3079 and let the caller return REG_ESPACE if out of space. This
3080 removes an uninitialied-variable warning with GCC 4.0.1, and also
3081 avoids taking the address of a local variable. All callers
3084 2005-08-19 Jim Meyering <jim@meyering.net>
3086 * regexec.c (proceed_next_node): Redo local variables to
3087 avoid GCC shadowing warnings.
3089 2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
3091 * regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
3092 (re_node_set_insert_last, re_dfa_add_node):
3093 Rename local variables to avoid GCC shadowing warnings.
3095 2005-08-18 Bruno Haible <bruno@clisp.org>
3097 * strstr.c (strstr): Fix return value in multibyte case.
3098 * strcasestr.c (strcasestr): Likewise.
3100 2005-08-17 Jim Meyering <jim@meyering.net>
3102 Make the %s format (seconds since the epoch) work for a negative
3103 number and when used with a zero-padded field width, e.g. %015s.
3105 * strftime.c (my_strftime): Move the `do_number_sign_and_padding'
3106 label so that it precedes the code to set `digits'. Otherwise,
3107 %0Ns wouldn't work. Before this change, `date -d @-22 +%05s' would
3108 print `00-22'. Now, it prints `-0022', as it should.
3110 2005-08-17 Paul Eggert <eggert@cs.ucla.edu>
3112 * regex.h: Remove useless space-before-tab. From coreutils.
3114 2005-08-17 Bruno Haible <bruno@clisp.org>
3116 * strcasestr.h: New file.
3117 * strcasestr.c: New file.
3119 2005-08-17 Bruno Haible <bruno@clisp.org>
3121 * strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
3122 * strstr.c: Completely rewritten, with multibyte locale support.
3124 2005-08-17 Bruno Haible <bruno@clisp.org>
3126 * strcasecmp.c: Use mbuiter.h.
3128 2005-08-17 Bruno Haible <bruno@clisp.org>
3130 * mbuiter.h: New file.
3132 2005-08-16 Bruno Haible <bruno@clisp.org>
3134 * strcasecmp.c (struct mbiter_multi): Remove at_end field.
3136 (mbi_avail, mbi_advance): Let the iteration end before the terminating
3137 NUL byte, not after it.
3139 2005-08-16 Bruno Haible <bruno@clisp.org>
3141 * mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
3142 the valid ones. Makes the comparison operations transitive:
3143 cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
3144 * strcasecmp.c (strcasecmp): Use mb_casecmp.
3146 2005-08-16 Bruno Haible <bruno@clisp.org>
3148 * strcase.h (strcasecmp): Add note in comments.
3149 * strncasecmp.c: Use code from strcasecmp.c.
3150 * strcasecmp.c: Use mbchar module. Define private mbiter variant.
3151 (strcasecmp): Work correctly in multibyte locales.
3153 2005-08-16 Bruno Haible <bruno@clisp.org>
3155 * strnlen1.h: New file.
3156 * strnlen1.c: New file.
3158 2005-08-16 Bruno Haible <bruno@clisp.org>
3160 * mbfile.h: New file.
3162 2005-08-16 Bruno Haible <bruno@clisp.org>
3164 * mbiter.h: New file.
3166 2005-08-16 Bruno Haible <bruno@clisp.org>
3168 * mbchar.h: New file.
3169 * mbchar.c: New file.
3171 2005-08-16 Bruno Haible <bruno@clisp.org>
3173 * tls.h: New file, from GNU gettext.
3174 * tls.c: New file, from GNU gettext.
3176 2005-08-15 Bruno Haible <bruno@clisp.org>
3178 * regex.h (__restrict_arr): Don't define to __restrict if __cplusplus
3181 2005-08-14 Jim Meyering <jim@meyering.net>
3183 Sync from coreutils.
3185 * fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
3186 Use the hash-table-based cycle-detection code not just when
3187 FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
3188 Reported by James Youngman in
3189 <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
3190 * fts_.h: Mention that with FTS_LOGICAL, we use FTS_TIGHT_CYCLE_CHECK.
3191 * fts.c (fts_cross_check) [FTS_DEBUG]: s/active_dir_ht/fts_cycle.ht/.
3192 This lets us compile with -DFTS_DEBUG, once again.
3193 * fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
3194 * fts.c (fd_safer): Remove decl.
3195 Include fcntl--.h rather than unistd-safer.h
3196 (fts_safe_changedir): Don't call fd_safer; no longer needed
3197 now that we include fcntl--.h.
3199 2005-08-11 Simon Josefsson <jas@extundo.com>
3201 * readline.h, readline.c: New file.
3203 2005-08-11 Bruno Haible <bruno@clisp.org>
3205 * strnlen.h (strnlen): Change parameter name to match comment.
3207 2005-08-10 Simon Josefsson <jas@extundo.com>
3209 * strndup.c: Use strnlen.h.
3211 * strnlen.h: New file.
3213 2005-08-02 Simon Josefsson <jas@extundo.com>
3215 * getline.h, getline.c: Rewrite.
3217 * getdelim.h, getdelim.c: New files, ported from glibc.
3219 2005-07-31 Bruno Haible <bruno@clisp.org>
3221 * lock.h (gl_lock_initializer): New macro.
3222 (gl_lock_define_initialized): Use it.
3223 (gl_rwlock_initializer): New macro.
3224 (gl_rwlock_define_initialized): Use it.
3225 (gl_recursive_lock_initializer): New macro.
3226 (gl_recursive_lock_define_initialized): Use it.
3228 2005-07-26 Bruno Haible <bruno@clisp.org>
3230 * lock.h: Update from GNU gettext.
3231 * lock.c: Update from GNU gettext.
3233 2005-07-18 Bruno Haible <bruno@clisp.org>
3235 * lock.h (gl_once_t): New type.
3236 (gl_once_define, gl_once): New macros.
3237 * lock.c (fresh_once): New variable.
3238 (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
3241 2005-07-18 Simon Josefsson <jas@extundo.com>
3243 * check-version.c (check_version): Accept identical versions too.
3245 2005-07-18 Bruno Haible <bruno@clisp.org>
3247 * lock.h: New file, from GNU gettext.
3248 * lock.c: New file, from GNU gettext.
3250 2005-07-15 Paul Eggert <eggert@cs.ucla.edu>
3252 * quotearg.c: Add translator comment suggested by Bruno Haible,
3253 with a minor change.
3255 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3257 * version-etc-fsf.c (version_etc_copyright): Parameterize the
3258 copyright symbol and the year.
3259 * version-etc.c (COPYRIGHT_YEAR): New constant.
3260 (version_etc_va): Use parameterized copyright notice.
3261 Reword to conform to the current GNU coding standards.
3263 2005-07-11 Simon Josefsson <jas@extundo.com>
3265 * size_max.h: New file.
3267 2005-07-09 Sergey Poznyakoff <gray@gnu.org.ua>
3269 * argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
3272 2005-07-08 Eric Blake <ebb9@byu.net> (tiny change)
3273 and Paul Eggert <eggert@cs.ucla.edu>
3275 * regcomp.c (init_dfa, build_range_exp): Store __btowc value
3276 in wint_t, not wchar_t. Remove now-unnecessary cast.
3278 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3280 * regex.c, regex.h: Sync from libc.
3281 * regcomp.c, regexec_internal.c, regex_internal.h, regexec.c:
3282 New files, synced from libc, except that regex_internal.h
3283 currently has a small porting fix.
3285 2005-07-03 Paul Eggert <eggert@cs.ucla.edu>
3287 Remove the dependency of the strftime module on the tzset module.
3288 * strftime.c (my_strftime) [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
3289 Copy the input structure, to work around some of the bug with
3290 Solaris 2.5.1 and Solaris 2.6. If you still care about these old
3291 Solaris releases, you should also use the tzset module, but we won't
3292 require it as a dependency any more since we don't want LGPLed code
3293 to depend on GPLed code.
3295 2005-07-02 Jim Meyering <jim@meyering.net>
3297 * backupfile.c (backup_args): Change a `0' to NULL.
3299 2005-07-01 Jim Meyering <jim@meyering.net>
3301 * chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
3302 * getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
3303 * save-cwd.c, tempname.c:
3304 Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
3305 and don't include <sys/file.h>).
3307 2005-07-01 Paul Eggert <eggert@cs.ucla.edu>
3309 * xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
3310 declares only 'struct timespec;' (!).
3312 2005-06-29 Jim Meyering <jim@meyering.net>
3314 * mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
3315 type name. Use the variable name instead.
3316 * idcache.c (getuser, getuidbyname, getgroup, getgidbyname): Likewise.
3318 2005-06-28 Simon Josefsson <jas@extundo.com>
3320 * check-version.h, check-version.c: New files.
3322 2005-06-28 Simon Josefsson <jas@extundo.com>
3324 * base64.c (base64_encode): Indent. Rename 'b64' to avoid
3325 collision with global variable. Better indentation. Don't
3326 increment buffer pointer beyond buffer end. Based on comments
3327 from Paul Eggert <eggert@cs.ucla.edu>.
3331 2005-06-24 Paul Eggert <eggert@cs.ucla.edu>
3333 * canon-host.c (canon-host): Append trailing "," to 0 in
3334 initializer of struct addrinfo, as an indication that we don't
3335 care how many members the structure has.
3337 2005-06-24 Derek Price <derek@ximbiot.com>
3338 and Bruno Haible <bruno@clisp.org>
3340 Remove stat module & update lstat.
3341 * stat.c: Remove this file...
3342 (slash_aware_lstat): ...moving this content and its support...
3343 * lstat.c (rpl_lstat): ...into here.
3344 * lstat.h: New file.
3346 2005-06-23 Paul Eggert <eggert@cs.ucla.edu>
3348 * mktime.c: Include <string.h> even if !DEBUG. (From glibc.)
3349 (ranged_convert): Don't save conversion in a temporary struct.
3350 This causes a warning with GCC 4.0.0, and anyway in the typical
3351 case it's not worth the extra 100 bytes or so of code.
3352 (ranged_convert, __mktime_internal): When calling a function via a
3353 pointer P, use P () rather than (*P) (), as we now assume C89 or
3356 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
3358 * readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
3359 "who -r" failed to give output. Problem reported by Tim Waugh.
3361 * xmalloc.c (HAVE_GNU_CALLOC): New constant.
3362 (xcalloc): Use it to avoid needless tests.
3363 Problem reported by Jim Meyering.
3365 2005-06-16 Jim Meyering <jim@meyering.net>
3367 * calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
3368 when either N or S is zero.
3370 2005-06-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
3372 * argp.h (__option_is_short): Check upper limit of
3373 __key. Isprint() requires its argument to have the value
3374 of an unsigned char or EOF.
3376 2005-06-10 Paul Eggert <eggert@cs.ucla.edu>
3378 * fnmatch.c (fnmatch): If there is an encoding error in a
3379 multibyte string or pattern, fall back on unibyte matching.
3380 Problem reported by James Youngman.
3382 2005-06-08 Bruno Haible <bruno@clisp.org>
3384 * binary-io.h (fileno): Undefine before defining it. Avoids a gcc
3387 2005-06-08 Bruno Haible <bruno@clisp.org>
3389 * csharpcomp.h: New file, from GNU gettext.
3390 * csharpcomp.c: New file, from GNU gettext.
3391 * csharpcomp.sh.in: New file, from GNU gettext.
3393 2005-06-07 Derek Price <derek@ximbiot.com>
3396 * glob_.h: Indent nested #ifdef.
3398 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
3400 Sync from coreutils.
3401 Use "file name" when talking about file names, instead of "filename"
3402 or "path", as per the GNU coding standards.
3403 * mkdir-p.c: Renamed from makepath.c.
3404 (make_dir_parents): Renamed from make_path. All callers changed.
3405 * mkdir-p.h: Likewise. All includers changed.
3406 * filenamecat.c: Renamed from path-concat.c.
3407 (file_name_concat): Renamed from path_concat. All callers changed.
3408 [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
3409 * filenamecat.h: Likewise. All includers changed.
3410 * acl.c: Don't use "path" or "filename" to mean "file name"
3411 in comments or local variable names.
3412 * basename.c: Likewise.
3413 * canonicalize.c, canonicalize.h: Likewise.
3414 * dirname.c, dirname.h: Likewise.
3415 * euidaccess.c: Likewise.
3416 * exclude.c: Likewise
3417 * fnmatch_.h, fnmatch_loop.c: Likewise.
3418 * fsusage.c, fsuage.h: Likewise.
3419 * fts.c, fts_.h: Likewise.
3420 * getcwd.c: Likewise.
3421 * getloadavg.c: Likewise.
3422 * mkstemp.c: Likewise.
3423 * mountlist.c, mountlist.h: Likewise.
3424 * openat.c, openat.h: Likewise.
3425 * readlink-stub.c: Likewise.
3426 * readutmp.c, readutmp.h: Likewise.
3427 * rename.c: Likewise.
3428 * rmdir.c: Likewise.
3430 * savedir.c: Likewise.
3431 * stripslash.c: Likewise.
3432 * tempname.c: Likewise.
3433 * xreadlink.c: Likewise.
3434 * exclude.c (excluded_file_name): Renamed from excluded_filename.
3436 * exclude.h: Likewise.
3438 * euidaccess.c (getuid, getgid, getuid, getegid)
3439 [!defined _POSIX_VERSION]: Remove decls; not needed these days.
3440 * idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
3441 [!defined _POSIX_VERSION]: Remove decls; not needed these days.
3442 * pathmax.h: Include <limits.h> unconditionally, since other
3443 files have been getting away with it for years (MORE/BSD 4.3
3445 * userspec.c (getpwnam, getgrnam, getgrgid)
3446 [!defined _POSIX_VERSION]: Remove decls; not needed these days.
3448 * pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
3449 Define to 256, not 255, as per modern POSIX.
3451 2005-06-01 Bruno Haible <bruno@clisp.org>
3453 * csharpexec.h: New file, from GNU gettext.
3454 * csharpexec.c: New file, from GNU gettext.
3455 * csharpexec.sh.in: New file, from GNU gettext.
3457 2005-05-31 Derek Price <derek@ximbiot.com>
3458 Paul Eggert <eggert@cs.ucla.edu>
3461 * glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
3463 2005-05-29 Derek Price <derek@ximbiot.com>
3464 Paul Eggert <eggert@cs.ucla.edu>
3466 * glob_.h, glob.c: New files.
3468 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3470 * getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
3472 * fts.c: Don't worry about debugging on pre-C99-compatible hosts;
3473 the configuration hassle isn't worth it.
3474 Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
3475 (LONGEST_MODIFIER, PRIuMAX): Remove.
3477 2005-05-27 Bruno Haible <bruno@clisp.org>
3479 * getlogin_r.h: Remove second include of <stddef.h>.
3481 2005-05-25 Bruno Haible <bruno@clisp.org>
3482 Derek Price <derek@ximbiot.com>
3484 * getlogin_r.h: Simplify API documentation.
3486 2005-05-25 Derek Price <derek@ximbiot.com>
3487 Paul Eggert <eggert@cs.ucla.edu>
3489 * getlogin_r.c, getlogin_r.h: New files.
3491 2005-05-22 Bruno Haible <bruno@clisp.org>
3493 * minmax.h: Include <limits.h> only when it defines MIN, MAX.
3494 Also include <sys/param.h> if it defines MIN, MAX.
3495 Based on a patch by Derek Price <derek@ximbiot.com>.
3497 2005-05-22 Bruno Haible <bruno@clisp.org>
3499 * stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
3500 (INT64_MIN): Fix definition.
3501 Suggested by Paul Eggert <eggert@cs.ucla.edu>.
3503 * stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
3504 NEED_SIGNED_INT_TYPES.
3506 * stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
3507 HAVE_SYSTEM_INTTYPES.
3509 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3511 * fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
3512 so that unistd-safer.h (GPL'ed code) need not be included.
3514 2005-05-20 Paul Eggert <eggert@cs.ucla.edu>
3517 * fts.c: Don't include "cycle-check.h" or "hash.h".
3518 (setup_dir, free_dir): New functions.
3519 (enter_dir, leave_dir): Define trivial
3520 alternatives of _LGPL_PACKAGE. Move to fts-cycle.c if !_LGPL_PACKAGE.
3521 (HT_INITIAL_SIZE, ENTER_DIR): Remove. All uses removed.
3522 (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
3523 (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
3524 Move to fts-cycle.c.
3525 (fts_open): Use setup_dir.
3526 (fts_close): Use free_dir.
3527 (fts_read): Have just one copy of the ENTER_DIR code rather than three.
3528 This adds a label and some gotos, but the alternatives were messier.
3529 Check for memory allocation failure when entering a dir.
3530 (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
3531 * fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
3532 (FTS): New member fts_cycle, that is a union that contains the
3533 old active_dir_ht and cycle_state. All uses changed to mention
3534 fts_cycle.ht and fts_cycle.state.
3535 * fts-cycle.c: New file, containing GPL'ed code migrated out of
3536 fts.c, with the following changes:
3537 (setup_dir, free_dir): New functions.
3538 (enter_dir): Now returns bool. Return true if successful, false
3539 if memory exhausted. All callers changed.
3540 Do not bother partly cleaning up on
3541 memory allocation failure; that is free_dir's job.
3542 However, free ad if hash_insert fails, to avoid memory leak.
3543 (enter_dir, leave_dir): Accommodate change to FTS by inspecting
3544 fts->fts_options to see which union member to use.
3546 2005-05-20 Jim Meyering <jim@meyering.net>
3548 * unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
3549 Now a macro, to pacify GCC.
3551 2005-05-20 Eric Blake <ebb9@byu.net> (tiny change)
3553 * chown.c (rpl_chown): Return -1 on failure.
3555 2005-05-18 Paul Eggert <eggert@cs.ucla.edu>
3557 * canonicalize.c: Include canonicalize.h first, to test interface.
3558 Include <stddef.h> unconditionally, since we assume C89 now.
3559 All uses of PTR_INT_TYPE replaced by ptrdiff_t.
3560 * fts.c: Include fts_.h first, to check interface.
3561 Do not include intprops.h; no longer needed.
3562 Include cycle-check.h and hash.h, since fts_.h no longer does.
3563 Remove unnecessary casts of closedir to void.
3564 (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
3565 decide whether to decrement nlinks.
3566 * fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
3567 (FTS): Use struct hash_table * instead of Hash_table, so that
3568 we no longer need to include hash.h here.
3570 2005-05-17 Jim Meyering <jim@meyering.net>
3572 * fts.c, fts_.h: New files, from coreutils.
3574 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
3576 Sync from coreutils.
3577 * unlinkdir.c, unlinkdir.h: New files.
3578 * gethrxtime.c, gethrxtime.h, getpass.h, mountlist.h, path-concat.c,
3579 regex.h, unlocked-io.h, xtime.h:
3580 White space changes only.
3581 * makepath.c (make_path): Port to hosts where leading "//" is special.
3582 * yesno.c: Include getline.h, not ctype.h.
3583 (yesno): Don't remove leading white space; POSIX doesn't allow it.
3584 Use getline to remove arbitrary restriction on response length.
3586 2005-05-13 Bruno Haible <bruno@clisp.org>
3588 * stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
3589 int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
3590 UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
3591 INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
3592 INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
3593 Add support for 64-bit integers in the MSVC compiler.
3595 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3597 * byteswap_.h, getsubopt.h, iconvme.h, strsep.c, strsep.h:
3598 Change the initial comment to refer to GPL, not LGPL.
3599 gnulib-tool will change it to LGPL as needed.
3601 * __fpending.c, acl.c, acl.h, alloca_.h, allocsa.c, allocsa.h,
3602 argmatch.c, argmatch.h, argp-ba.c, argp-eexst.c, argp-fmtstream.c,
3603 argp-fmtstream.h, argp-fs-xinl.c, argp-help.c, argp-namefrob.h,
3604 argp-parse.c, argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, argz.c,
3605 argz_.h, asnprintf.c, asprintf.c, atanl.c, backupfile.c,
3606 backupfile.h, base64.c, base64.h, basename.c, binary-io.h,
3607 byteswap_.h, c-ctype.c, c-ctype.h, c-stack.c, c-stack.h,
3608 c-strtod.c, calloc.c, canon-host.c, canonicalize.c,
3609 canonicalize.h, ceill.c, chdir-long.c, chdir-long.h, chown.c,
3610 classpath.c, classpath.h, cloexec.c, closeout.c, closeout.h,
3611 concatpath.c, config.charset, copy-file.c, copy-file.h,
3612 cycle-check.c, cycle-check.h, diacrit.c, diacrit.h, dirfd.c,
3613 dirfd.h, dirname.c, dirname.h, dummy.c, dup-safer.c, dup2.c,
3614 eealloc.h, error.c, error.h, euidaccess.c, exclude.c, exclude.h,
3615 execute.c, execute.h, exit.h, exitfail.c, exitfail.h, expl.c,
3616 fatal-signal.c, fatal-signal.h, fd-safer.c, file-type.c,
3617 file-type.h, fileblocks.c, filemode.c, filemode.h, findprog.c,
3618 findprog.h, floorl.c, fnmatch.c, fnmatch_.h, fnmatch_loop.c,
3619 fopen-safer.c, free.c, frexpl.c, fsusage.c, fsusage.h,
3620 full-read.c, full-read.h, full-write.c, full-write.h,
3621 fwriteerror.c, fwriteerror.h, gai_strerror.c, gcd.c, gcd.h,
3622 getaddrinfo.c, getaddrinfo.h, getcwd.c, getcwd.h, getdate.h,
3623 getdate.y, getdomainname.c, getdomainname.h, getgroups.c,
3624 gethostname.c, gethrxtime.c, gethrxtime.h, getline.c, getline.h,
3625 getloadavg.c, getndelim2.c, getndelim2.h, getnline.c, getnline.h,
3626 getopt.c, getopt1.c, getopt_.h, getopt_int.h, getpagesize.h,
3627 getpass.c, getpass.h, getsubopt.c, getsubopt.h, gettext.h,
3628 gettime.c, gettimeofday.c, getugroups.c, getusershell.c,
3629 group-member.c, group-member.h, hard-locale.c, hard-locale.h,
3630 hash-pjw.c, hash-pjw.h, hash.c, hash.h, human.c, human.h,
3631 iconvme.c, iconvme.h, idcache.c, inet_ntop.h, intprops.h,
3632 inttostr.c, inttostr.h, isdir.c, javacomp.c, javacomp.h,
3633 javacomp.sh.in, javaexec.c, javaexec.h, javaexec.sh.in,
3634 lbrkprop.h, lchown.c, ldexpl.c, linebreak.c, linebreak.h,
3635 linebuffer.c, linebuffer.h, localcharset.c, localcharset.h,
3636 logl.c, long-options.c, long-options.h, lstat.c, makepath.c,
3637 makepath.h, malloc.c, mathl.h, mbswidth.c, mbswidth.h, md5.c,
3638 md5.h, memcasecmp.c, memcasecmp.h, memchr.c, memcmp.c, memcoll.c,
3639 memcoll.h, memcpy.c, memmem.c, memmem.h, mempcpy.c, mempcpy.h,
3640 memrchr.c, memrchr.h, memset.c, minmax.h, mkdir.c, mkdtemp.c,
3641 mkdtemp.h, mkstemp.c, mktime.c, modechange.c, modechange.h,
3642 mountlist.c, mountlist.h, nanosleep.c, obstack.c, obstack.h,
3643 openat.c, openat.h, pagealign_alloc.c, pagealign_alloc.h,
3644 path-concat.c, path-concat.h, pathmax.h, pathname.h, physmem.c,
3645 physmem.h, pipe.c, pipe.h, poll.c, poll_.h, posixtm.c, posixtm.h,
3646 posixver.c, printf-args.c, printf-args.h, printf-parse.c,
3647 printf-parse.h, progname.c, progname.h, progreloc.c, putenv.c,
3648 quote.c, quote.h, quotearg.c, quotearg.h, raise.c, readlink.c,
3649 readtokens.c, readtokens.h, readtokens0.c, readtokens0.h,
3650 readutmp.c, readutmp.h, realloc.c, ref-add.sin, ref-del.sin,
3651 regex.c, regex.h, rename.c, rmdir.c, rpmatch.c, safe-read.c,
3652 safe-read.h, safe-write.c, safe-write.h, same.c, same.h,
3653 save-cwd.c, save-cwd.h, savedir.c, savedir.h, setenv.c, setenv.h,
3654 settime.c, sh-quote.c, sh-quote.h, sha1.c, sha1.h, sig2str.c,
3655 sig2str.h, sincosl.c, snprintf.c, snprintf.h, sqrtl.c,
3656 stat-macros.h, stat.c, stdbool_.h, stdint_.h, stdio-safer.h,
3657 stpcpy.c, stpcpy.h, stpncpy.c, stpncpy.h, strcase.h, strcasecmp.c,
3658 strchrnul.c, strchrnul.h, strcspn.c, strdup.c, strdup.h,
3659 strerror.c, strftime.c, strftime.h, stripslash.c, strndup.c,
3660 strndup.h, strnlen.c, strpbrk.c, strpbrk.h, strsep.c, strsep.h,
3661 strstr.c, strstr.h, strtod.c, strtoimax.c, strtok_r.c, strtok_r.h,
3662 strtol.c, strtoll.c, strtoul.c, strtoull.c, strverscmp.c,
3663 strverscmp.h, sysexit_.h, tempname.c, time_r.c, time_r.h,
3664 timegm.c, timegm.h, timespec.h, trigl.c, trigl.h, ucs4-utf16.h,
3665 ucs4-utf8.h, unicodeio.c, unicodeio.h, unistd-safer.h,
3666 unlocked-io.h, unsetenv.c, userspec.c, utf16-ucs4.h, utf8-ucs4.h,
3667 utime.c, utimecmp.c, utimecmp.h, utimens.c, vasnprintf.c,
3668 vasnprintf.h, vasprintf.c, vasprintf.h, version-etc-fsf.c,
3669 version-etc.c, version-etc.h, vsnprintf.c, vsnprintf.h,
3670 w32spawn.h, wait-process.c, wait-process.h, xalloc-die.c,
3671 xalloc.h, xallocsa.c, xallocsa.h, xasprintf.c, xgetcwd.c,
3672 xgetcwd.h, xgetdomainname.c, xgetdomainname.h, xgethostname.c,
3673 xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xreadlink.h,
3674 xsetenv.c, xsetenv.h, xsize.h, xstrndup.c, xstrndup.h, xstrtod.c,
3675 xstrtod.h, xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtoumax.c,
3676 xtime.h, xvasprintf.c, xvasprintf.h, yesno.c, yesno.h:
3677 Update FSF postal mail address.
3679 2005-05-10 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3681 * getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
3682 specified in ai_socktype. Fix invalid ai_protocol
3683 check. ai_protocol is usually set to 0 or depending on
3684 ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP. Checking for
3685 SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid. Set
3686 ai_socktype / ai_protocol in the returned addrinfo structure.
3688 2005-05-09 Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3689 Bruno Haible <bruno@clisp.org>
3691 * inet_ntop.h: New file.
3692 * inet_ntop.c: New file, from glibc with modifications.
3694 2005-05-08 Jim Meyering <jim@meyering.net>
3696 * classpath.c (PATH_SEPARATOR): Remove insignificant trailing blank.
3698 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3700 Merge from coreutils. Among other things,
3701 add bulletproofing for cases where stdin, stdout, or stderr are closed.
3702 * fd-safer.c: New file.
3703 * fcntl-safer.h, open-safer.c: Remove.
3704 * chdir-long.c: Fix comment "fetish" -> "coreutils".
3705 * dup-safer.c: Include unistd-safer.h first.
3706 Don't include errno.h.
3707 (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
3708 * file-type.h: Don't assume invoker included sys/stat.h first.
3709 * file-type.c: Rely on file-type.h change.
3710 * getloadavg.c: Include unistd-safer.h.
3711 (getloadavg): Use safer open.
3712 * getusershell.c: Include "stdio-safer.h".
3713 (getusershell): Use safer fopen.
3714 * long-options.c (long_options): Use NULL rather than 0.
3715 * modechange.h (mode_free): Remove; all callers changed to invoke
3717 * modechange.c: Likewise.
3718 xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
3719 (MODE_DONE): New constant.
3720 (struct mode_change): Remove 'next' member.
3721 (make_node_op_equals): New function; like the old one of the
3722 same name, except it allocates an array.
3723 (mode_compile, mode_create_from_ref): Use it.
3724 (mode_compile): Allocate result as an array, not a linked list.
3725 Parse octal string ourself, so that we catch mistakes like "+0".
3726 (mode_adjust): Arg is an array, not a linked list.
3727 * modechange.c: Include stat-macros.h, xalloc.h.
3728 (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
3729 (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
3730 (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
3731 Remove. This is now stat-macros.h's job.
3732 (talloc): Remove. All callers replaced by xalloc, so that
3733 our invokers don't have to worry about reporting memory failures.
3734 (make_node_op_equals): Remove.
3735 (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
3737 (struct mode_change): Moved here from modechange.h.
3738 (mode_append_entry): Remove.
3739 (mode_compile): Remove MASKED_OPS arg, since it encouraged
3740 apps to have incorrect behavior. Use simpler algorithm for head
3741 and tail. Don't futz with umask; that's now the job of mode_adjust.
3742 Detect more invalid usages rather than having somewhat-random behavior.
3743 Don't insert an "a=" action, as that leads to incorrect behavior.
3744 (mode_compile, mode_create_from_ref): Return NULL on error instead
3745 of an enum, since now there's only one way to have an error. All
3747 (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
3748 at the correct time. Simplify calculation of "+u" and its ilk.
3749 Don't mishandle "+X".
3750 (mode_free): Remove "register" and localize decls.
3751 * modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
3752 (struct mode_change): Move to modechange.c; callers don't
3753 need to see this stuff.
3754 (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
3755 (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
3756 (mode_change, mode_adjust): Reflect the new signatures noted above.
3757 * nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
3758 that might redefine system include files.
3759 (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
3760 (my_usleep): Use NULL rather than (void *) 0.
3761 (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
3762 Use siginterrupt to specify that system calls should be interrupted.
3763 (rpl_nanosleep): Move initialization of suspended closer to call of
3765 * readutmp.h (read_utmp): New arg OPTIONS. All uses changed.
3766 * readutmp.c: Likewise. Include signal.h, stdbool.h.
3767 (desirable_utmp_entry): New function.
3768 (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
3769 using x2nrealloc, to simplify logic.
3770 (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
3771 size calculation. Do not assume utmp file is a regular file.
3772 * readutmp.h (UT_PID): Moved here from ../src/who.c.
3773 (READ_UTMP_CHECK_PIDS): New constant.
3774 * save-cwd.c: Include unistd-safer.h.
3775 (save_cwd): Use fd_safer.
3776 * tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
3777 [!_LIBC] Include "stat-macros.h" instead.
3778 * unistd-safer.h (fd_safer): New decl.
3780 2005-05-01 Oskar Liljeblad <oskar@osk.mine.nu>
3782 * byteswap_.h: New file.
3784 2005-04-25 Albert Chin <china@thewrittenword.com>
3786 * regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
3789 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3791 * getdate.y (zone): Allow relunit_snumber after tZONE, so
3792 that "UTC +1 second" continues to work. Problem reported
3794 (relunit_snumber): New rule.
3797 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3799 * getdate.y (universal_time_zone_table): New constant.
3800 (time_zone_table): Remove GMT, UT, UTC entries; they're now in
3801 universal_time_zone_table.
3802 (lookup_zone): Prefer universal_time_zone_table to
3803 local_time_zone_table, so that "GMT" time stamps are allowed in
3804 London during the summer. Problem reported by Ian Abbott.
3806 2005-04-12 Jim Meyering <jim@meyering.net>
3808 * human.c (humblock): Set *options even when returning due to
3809 xstrtoumax conversion failure. Thanks to a used-uninitialized
3812 2005-04-09 Jim Meyering <jim@meyering.net>
3814 * posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
3815 -Wuninitialized: initialize tm0.tm_year.
3817 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
3819 * getdate.y (parser_control): rels_seen is now a boolean, not a
3820 count, since there's no maximum. All uses changed.
3821 Add member dsts_seen.
3822 (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
3824 (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
3825 Use pc_rels_seen to decide whther a date is absolute.
3827 * getdate.y (number): Don't overwrite year.
3828 (get_date): Initialize pc.year.digits to 0, not 4, to enable above
3831 2005-04-02 Simon Josefsson <jas@extundo.com>
3833 * getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
3834 patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
3836 2005-03-27 Jim Meyering <jim@meyering.net>
3838 * argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
3840 2005-03-26 Paul Eggert <eggert@cs.ucla.edu>
3842 * intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
3843 "one's complement" -> "ones' complement" in comment, as per Knuth.
3844 "value of type" -> "type or expression" in comment.
3845 * mktime.c, strftime.c: Propagate intprops.h comment nits.
3847 2005-03-26 Jim Meyering <jim@meyering.net>
3850 * intprops.h: Add the apostrophe in `(one|two)'s complement'.
3851 Correct typos: s/or/of/.
3853 2005-03-23 Jim Meyering <jim@meyering.net>
3855 * canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
3857 2005-03-21 Jim Meyering <jim@meyering.net>
3859 Changes imported from coreutils.
3861 * cycle-check.c: Don't include xalloc.h.
3863 * path-concat.c: Don't include assert.h.
3864 (path_concat): Remove assertion that would have triggered
3865 for ABASE starting with more than one slash.
3866 Reported by Andreas Schwab.
3868 * path-concat.c (path_concat): Set *BASE_IN_RESULT
3869 properly when ABASE is an absolute file name.
3870 Correct the description of this function.
3872 Add an assertion and a test driver.
3873 This fixes a bug introduced on 2004-07-02.
3874 Andreas Schwab reported the resulting failure of cp --parents:
3875 http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
3877 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3879 * strftime.c (my_strftime): If the underlying strftime returns 0
3880 (which shouldn't happen), generate nothing instead of returning 0
3881 immediately, so that nstrftime (NULL, ...) doesn't return 0.
3883 2005-03-16 Bruno Haible <bruno@clisp.org>
3885 * stdint_.h: Use HAVE_LONG_LONG_64BIT instead of HAVE_LONGLONG_64BIT.
3887 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3889 * strftime.c (my_strftime): Prepend space to format so that we can
3890 reliably distinguish strftime failure from empty output on POSIX
3893 2005-03-08 Paul Eggert <eggert@cs.ucla.edu>
3895 * iconvme.c (SIZE_MAX): New macro, if not already defined.
3896 (iconv_string): Don't guess a size-zero buffer, as that might cause
3897 buffer overrun. Instead, avoid multiplying by MB_LEN_MAX if the
3898 result would be 'too large', where 'too large' is (heuristically)
3899 the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
3900 overflow concerns. This will prevent some unwanted malloc failures
3901 when the inputs are very large.
3903 2005-03-15 Bruno Haible <bruno@clisp.org>
3905 * regex.c (byte_re_match_2_internal): Rename local variable 'not' to
3908 * regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
3911 * regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc results.
3913 2005-03-14 Paul Eggert <eggert@cs.ucla.edu>
3915 * mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
3916 TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
3918 * strtol.c: Likewise.
3920 2005-03-14 Simon Josefsson <jas@extundo.com>
3922 * timegm.h: Use proper prototype CPP guards, reported by Dave Love
3925 2005-03-14 Jim Meyering <jim@meyering.net>
3927 * strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
3928 && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
3929 to be nonzero so that we (and caller) can detect the difference
3930 between a valid zero-length expansion and an error return, even
3931 when the underlying strftime fails before writing anything into
3934 2005-03-10 Jim Meyering <jim@meyering.net>
3936 * save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
3937 so that this module works on systems without fchdir.
3939 2005-03-09 Paul Eggert <eggert@cs.ucla.edu>
3941 Factor int-properties macros into a single file, except for
3942 glibc-related files.
3943 * intprops.h: New file.
3944 * getloadavg.c: Include it instead of limits.h.
3945 (INT_STRLEN_BOUND): Remove.
3946 * human.c: Include intprops.h.
3947 (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
3948 * human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000.
3949 * inttostr.h: Include intprops.h instead of limits.h.
3950 (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
3951 * mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
3952 for consistency with intprops.h.
3953 (time_t_is_integer, twos_complement_arithmetic): Use them.
3954 * sig2str.h: Include <signal.h>, intprops.h.
3955 (INT_STRLEN_BOUND): Remove.
3956 * strftime.c (TYPE_SIGNED): Remove.
3957 (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
3958 * strtol.c: Adjust comments to match intprops.h.
3959 * userspec.c: Include intprops.h.
3960 (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
3961 * utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
3962 * utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
3963 instead of rolling our own expressions.
3964 * xstrtol.c: Include xstrtol.h first, to test interface.
3966 * strftime.c: Include <stdbool.h>. Use bool where appropriate,
3968 (my_strftime): Do not mishandle years close to INT_MAX, by doing
3969 the right thing even if adding 1900 would overflow. Similarly
3970 for tm_mon + 1 and tm_yday + 1.
3971 Make %Y always equivalent to %C%y, and similarly for %G and %g.
3972 (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
3973 (DO_SIGNED_NUMBER): New macro.
3974 (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
3976 2005-03-07 Bruno Haible <bruno@clisp.org>
3978 * pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
3980 2005-03-03 Derek R. Price <derek@ximbiot.com>
3981 Bruno Haible <bruno@clisp.org>
3983 * pagealign_alloc.h: New file.
3984 * pagealign_alloc.c: New file.
3986 2005-01-28 Bruno Haible <bruno@clisp.org>
3988 * stpncpy.h (stpncpy): Define as a macro without arguments, so that
3991 2005-03-01 Paul Eggert <eggert@cs.ucla.edu>
3993 Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
3994 The workaround isn't strictly needed for POSIX conformance, and
3995 it's too much of a pain to configure and maintain. We'll ask
3996 people to fix their kernels instead.
3997 * xnanosleep.c: Don't include gethrxtime.h or xtime.h.
3998 (NANOSLEEP_BUG_WORKAROUND): Remove.
3999 (xnanosleep): Remove the workaround.
4001 2005-02-12 Bruno Haible <bruno@clisp.org>
4003 * vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
4005 2005-02-25 Paul Eggert <eggert@cs.ucla.edu>
4007 * gethrxtime.h, gethrxtime.c, xtime.h: New files.
4008 * timespec.h (gettime): Return void, since it always
4009 succeeds now. All uses changed.
4010 * gettime.c (gettime) Likewise.
4011 [HAVE_NANOTIME]: Prefer nanotime.
4012 Assume gettimeofday succeeds, as POSIX requires.
4013 Assime time () succeeds, since other code already does.
4014 * xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
4015 (timespec_subtract): Remove.
4016 (NANOSLEEP_BUG_WORKAROUND): New constant.
4017 (xnanosleep): Use gethrxtime rather than gettime; this simplifies
4018 things considerably. Use it only on GNU/Linux hosts, since the
4019 workaround shouldn't be needed elsewhere.
4021 2005-02-24 Bruno Haible <bruno@clisp.org>
4023 * gettext.h: Update from GNU gettext 0.14.2.
4025 2005-02-24 Bruno Haible <bruno@clisp.org>
4027 * localcharset.c: Update from GNU gettext 0.14.2.
4028 * config.charset: Update from GNU gettext 0.14.2.
4030 2005-02-22 Simon Josefsson <jas@extundo.com>
4032 * iconvme.h, iconvme.c: New files, from libc.
4034 2005-02-20 Neil Conway <neilc@samurai.com>
4036 * xgethostname.c (xgethostname): Check for ENOMEM, which is
4037 returned by OSX/Darwin if the specified buffer is not large
4038 enough for the hostname.
4040 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
4042 * memrchr.h: New file.
4043 * chdir-long.c: Include it.
4044 * memrchr.c [!defined _LIBC]: Include it rather than <string.h>
4045 Don't bother including stddef.h.
4047 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4049 * argp-help.c (__argp_help): Create a fake struct argp_state and
4050 pass it to _help, otherwise the latter coredumps trying to
4051 dereference state.root_argp.
4053 2005-02-01 Paul Eggert <eggert@cs.ucla.edu>
4055 * mountlist.h (MOUNTLIST_H_): New macro, to protect against double
4057 Include <sys/types.h>, for dev_t.
4058 (ME_DUMMY, ME_REMOTE): Move from here....
4059 * mountlist.c (ME_DUMMY, ME_REMOTE): To here.
4060 (ME_DUMMY): Count "subfs" as a dummy. Problem reported by
4062 Include mountlist.h first, to test the interface.
4064 2005-01-29 Bruno Haible <bruno@clisp.org>
4066 * progname.c (program_name): Initialize.
4067 Needed when linking statically on MacOS X.
4069 2005-01-28 Bruno Haible <bruno@clisp.org>
4071 * javacomp.sh.in: New file, from GNU gettext.
4072 * javacomp.h: New file, from GNU gettext.
4073 * javacomp.c: New file, from GNU gettext.
4075 2005-01-26 Bruno Haible <bruno@clisp.org>
4077 * javaexec.sh.in: New file, from GNU gettext.
4078 * javaexec.h: New file, from GNU gettext.
4079 * javaexec.c: New file, from GNU gettext.
4081 2005-01-26 Simon Josefsson <jas@extundo.com>
4083 * gai_strerror.c: Use GPL in header.
4085 2005-01-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4087 * argp-help.c (hol_entry_help): Avoid using non-constant
4088 initializers for struct pentry_state.
4089 (__argp_error): Check return value of __asprintf
4090 (__argp_failure): Translate error message
4092 * argp-parse.c: Removed braces around the expansion of N_()
4094 2005-01-21 Jim Meyering <jim@meyering.net>
4096 * openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
4097 same value as for Solaris 9.
4099 * chdir-long.c (chdir_long): Rewrite to remove limitation on
4100 component length. This included changing the parameter to be
4101 of type `char *' rather than `char const *'.
4102 * chdir-long.h (chdir_long): Update prototype.
4104 * openat.c (fdopendir, fstatat): New functions.
4105 * openat.h: Include headers required for use of DIR and struct stat.
4106 [AT_SYMLINK_NOFOLLOW]: Define.
4107 (fdopendir, fstatat): Add prototypes.
4109 2005-01-21 Bruno Haible <bruno@clisp.org>
4111 * classpath.h: New file, from GNU gettext.
4112 * classpath.c: New file, from GNU gettext.
4114 2005-01-20 Simon Josefsson <jas@extundo.com>
4116 * version-etc-fsf.c: New file, with version_etc_copyright.
4117 * version-etc.c: Remove version_etc_copyright.
4118 * version-etc.h (version_etc_copyright): Use [] instead of * in
4119 prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
4121 2005-01-20 Paul Eggert <eggert@cs.ucla.edu>
4123 * save-cwd.c (save_cwd): Remove code to support the case
4124 where fchdir is missing or flaky.
4126 2005-01-20 Simon Josefsson <jas@extundo.com>
4128 * base64.h (isbase64): Add.
4130 * base64.c (isb64): Rename to isbase64, use to_uchar instead of
4131 using a unsigned prototype, don't inline.
4132 (base64_decode): Use it.
4134 2005-01-19 Bruno Haible <bruno@clisp.org>
4136 * sh-quote.h: New file, from GNU gettext.
4137 * sh-quote.c: New file, from GNU gettext.
4139 2005-01-18 Paul Eggert <eggert@cs.ucla.edu>
4141 Merge changes from coreutils, as described below in several
4142 changelogs dated today.
4144 * save-cwd.c: Include "save-cwd.h" before other include files.
4145 (O_DIRECTORY): Remove; not needed here, since "." must be
4146 a directory. All uses removed.
4147 (save_cwd): Use __sgi || __sun, not sun || __sun. __sun is
4148 universal on Suns, and we also need to test for IRIX.
4149 Revamp code to use 'if' rather than '#if'.
4150 Avoid unnecessary comparison of cwd->desc to 0.
4152 * utimens.c (futimens): Robustify the previous patch, by checking
4153 for known valid error numbers rather than observed invalid ones.
4155 2005-01-18 Jim Meyering <jim@meyering.net>
4157 * version-etc.c (version_etc_copyright): Update copyright date.
4159 * utimens.c (futimens): Account for the fact that futimes
4160 can also fail with errno == ENOSYS or errno == ENOENT.
4161 Patch from Dmitry V. Levin.
4163 Change the name of the robust chdir function from chdir to chdir_long.
4164 * save-cwd.c: Include chdir-long.h rather than chdir.h.
4165 (restore_cwd): Use chdir_long, not chdir.
4166 * chdir-long.c: Renamed from chdir.c.
4167 * chdir-long.h: Renamed from chdir.h.
4168 [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
4171 2005-01-18 Bob Proulx <bob@proulx.com>
4173 * obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to simplify
4174 offsetof() macro construct to avoid compile failure with native HP-UX
4175 11.0 ANSI C compiler.
4177 2005-01-06 Bruno Haible <bruno@clisp.org>
4179 * stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming, redundant
4180 because stpncpy.m4 takes care of it.
4182 2004-01-24 Bruno Haible <bruno@clisp.org>
4184 * progreloc.c (xstrdup): Define as strdup if no xmalloc should be used.
4186 2003-10-09 Bruno Haible <bruno@clisp.org>
4188 * progreloc.c: Include xalloc.h instead of xmalloc.h.
4190 2005-01-06 Bruno Haible <bruno@clisp.org>
4192 * fwriteerror.h (fwriteerror): Change specification to include fclose.
4193 * fwriteerror.c: Include <stdbool.h>.
4194 (fwriteerror): At the end, close the file stream. Record whether
4195 stdout was already closed.
4197 2004-05-27 Bruno Haible <bruno@clisp.org>
4199 * execute.c (environ): Declare if needed.
4200 * pipe.c (environ): Likewise.
4201 Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
4203 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
4205 * human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
4206 definitions to be after all include files, to avoid collisions.
4207 Problem reported by Bob Proulx.
4209 2004-12-28 Paul Eggert <eggert@cs.ucla.edu>
4211 * error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
4212 not needed. This removes a dependency on the gettext module.
4213 [defined _LIBC]: Do not include <libintl.h>; not needed.
4215 2004-12-24 Paul Eggert <eggert@cs.ucla.edu>
4217 * c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
4220 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
4222 * argp-parse.c: Include <stddef.h>.
4223 (alignof, alignto): New macros.
4224 (parser_init): Don't assume that void * is aligned sufficiently
4227 * getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
4228 need to extend the stack.
4229 (YYINITDEPTH): New macro, so that the initial stack isn't overly
4232 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4234 * argp-parse.c (parser_init): Avoid arithmetics on void pointers.
4236 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4238 * alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
4239 Remove now-obsolete comment about AIX.
4240 * getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
4241 (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
4242 (YYMAXDEPTH): New macro.
4244 2004-12-18 Bruno Haible <bruno@clisp.org>
4246 * fatal-signal.c (fatal_signals): Make non-const.
4247 (init_fatal_signals): New function.
4248 (uninstall_handlers, install_handlers): Ignore signals that were set to
4250 (at_fatal_signal): Call init_fatal_signals.
4251 (init_fatal_signal_set): Likewise. Ignore signals that were set to
4253 Reported by Paul Eggert.
4255 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4257 * getdate.y (textint): New member "negative".
4258 (time_zone_hhmm): New function.
4259 Expect 14 shift-reduce conflicts, not 13.
4260 (o_colon_minutes): New rule.
4261 (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
4262 (yylex): Set the "negative" member of signed numbers.
4264 2004-12-04 Paul Eggert <eggert@cs.ucla.edu>
4266 Changes imported from coreutils.
4267 * hard-locale.c: Assume <locale.h> exists.
4269 (GLIBC_VERSION): New macro.
4270 (hard_locale): Assume setlocale exists.
4271 Rewrite to avoid #ifdef.
4272 Use strdup rather than malloc + strcpy.
4273 * human.c: Assume <locale.h> exists.
4274 (human_readable): Assume localeconv exists.
4276 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4278 * mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
4279 convert T2, not T. (Imported from libc.)
4281 2004-11-30 Paul Eggert <eggert@cs.ucla.edu>
4283 * getcwd.c (is_ENAMETOOLONG): New macro.
4284 (__getcwd.c): Don't restore errno; glibc doesn't.
4285 [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
4286 first, falling back to our code only if its results look suspicious.
4287 Ensure that the resulting buffer is only as large as necessary.
4289 * readutmp.c: Include readutmp.h first.
4290 Include <errno.h>, since readutmp.h no longer does that.
4291 * readutmp.h: Don't include <errno.h>,
4292 <sys/param.h>, <time.h>; not needed to establish interface.
4293 (errno): Remove decl.
4294 (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
4295 (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
4296 UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
4298 2004-11-28 Simon Josefsson <jas@extundo.com>
4300 * base64.h, base64.c: New file.
4302 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
4304 * getcwd.h: New file, which I forgot to check in on 2004-11-25.
4306 2004-11-25 Paul Eggert <eggert@cs.ucla.edu>
4308 Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
4309 HP's ANSI C compiler.
4310 * fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
4311 Declaring int functions causes warnings on some modern systems and
4312 shouldn't be needed to compile on ancient ones.
4313 * same.c (MIN) [defined MIN]: Don't define, since it's already
4316 * getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
4317 with the following changes.
4318 (__set_errno): Parenthesize properly.
4319 Include <stdbool.h>.
4320 (MIN, MAX, MATCHING_INO): New macros.
4321 (__getcwd): Define with prototype, not K&R form.
4322 Use heuristics to allocate default buffer on stack if possible.
4323 If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
4324 behavior, and to avoid the PATH_MAX limit when computing
4326 Use MATCHING_INO to compare inode number to file.
4327 Check for arithmetic overflow in size calculations.
4328 Fix bug in reallocation of dot array that caused getcwd to fail
4329 on directories nested deeper than 75.
4330 Be more careful about saving errno on error.
4331 Do not use realloc; use only free+malloc, as this is a bit
4332 more flexible and avoids a needless copy operation.
4333 Do not inspect st_dev and st_ino for symbolic links; POSIX
4334 doesn't specify the latter.
4335 Check for closedir errors.
4336 Avoid needless casts.
4337 Use "#ifdef weak_alias" around weak_alias, to be like other
4339 The following changes to getcwd.c have effect only when used in
4340 gnulib; they have no effect inside glibc proper.
4341 (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
4342 as alloca isn't used.
4343 (alloca, __alloca): Likewise.
4344 [!_LIBC]: Include "getcwd.h", "mempcpy.h".
4345 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
4346 unconditionally, as gnulib assumes C89 or better.
4347 Do not include <sys/param.h>.
4348 (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
4349 no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
4351 (NULL) [!defined NULL]: Remove; we assume C89 or better.
4352 Include <dirent.h> in a way that is compatible with modern Autoconf.
4353 (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
4354 New macros, if not already defined.
4355 Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
4356 Use "_LIBC", not "defined _LIBC", for consistency.
4357 (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
4359 (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
4360 (GETCWD_RETURN_TYPE): Remove. All uses replaced by char *.
4361 * xgetcwd.c: David MacKenzie's old code was removed, so give
4362 credit only to Jim Meyering and adjust the copyright dates.
4363 Do not include <limits.h>, <stdio.h>, <sys/types.h>,
4364 <stdlib.h>, <unistd.h>, "pathmax.h".
4365 Instead, include "xgetcwd.h" (first) and "getcwd.h".
4366 (INITIAL_BUFFER_SIZE): Remove.
4367 (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
4369 2004-11-23 Jim Meyering <jim@meyering.net>
4371 * getopt_.h: Remove trailing blanks.
4373 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4375 * utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
4376 (futimens): New function, which uses futimes if available.
4377 (futimens, utimens): Support timespec==NULL, with same semantics
4378 as utime and utimens.
4379 * utimens.h (futimens): New decl.
4381 2004-11-23 Jim Meyering <jim@meyering.net>
4383 * __fpending.c: Add comment.
4385 2004-11-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4387 * getopt_.h: Re-addition of __getopt_argv_const caused
4388 redefinition warnings. To avoid them, include the defines
4389 in `#if !defined __need_getopt ... #endif'. The only place
4390 where __getopt_argv_const is used is in definitions
4391 of getopt_long and getopt_long_only below, which are as well
4392 protected by `#ifndef __need_getopt'.
4393 [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
4394 __need_getopt after including <stdio.h> and <unistd.h> These
4395 headers might have defined it.
4397 2004-11-20 Paul Eggert <eggert@cs.ucla.edu>
4399 * getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
4401 (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
4402 optopt): Use them instead of invoking ## directly; otherwise, the
4403 symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
4405 2004-11-19 Bruno Haible <bruno@clisp.org>
4407 * strtok_r.c: Move comments from here...
4408 * strtok_r.h: ... to here.
4410 2004-11-17 Paul Eggert <eggert@cs.ucla.edu>
4412 * realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
4413 might fail. Problem reported by Yoann Vandoorselaere.
4414 * calloc.c (rpl_calloc): Defend against buggy calloc implementations
4415 that mishandle size_t overflow.
4417 2004-11-16 Paul Eggert <eggert@cs.ucla.edu>
4419 * canon-host.c: Include "strdup.h".
4420 (canon_host): Use getaddrinfo if available, so that IPv6 works.
4421 Use strdup instead of malloc/strcpy to duplicate strings.
4423 * human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
4424 (human_space_before_unit): New constant.
4425 * human.c (human_readable): Support it.
4427 * xgetcwd.c: Include <limits.h>, for PATH_MAX.
4428 (xgetcwd): Set errno correctly when failing.
4429 Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
4430 the failure is actually due to a PATH_MAX problem.
4432 Further getopt changes to make it more likely that glibc will
4433 buy the changes back.
4434 * getopt.c (POSIXLY_CORRECT): New constant.
4435 (getopt): Use it, so to preserve glibc semantic
4436 * getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
4437 when compiling for libc.
4438 * getopt_.h (__getopt_argv_const): Bring it back.
4439 (getopt_long, getopt_long_only): Use it.
4441 * getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal):
4442 New arg POSIXLY_CORRECT. All callers changed.
4443 (getopt): Argv is now char * const *, as per standard.
4444 (_getopt_internal_r, _getopt_internal): Argv is now char **,
4445 not char *__getopt_argv_const *.
4446 * getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
4447 _getopt_long_only_r): Likewise.
4448 * getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
4449 * getopt_int.h (_getopt_internal, _getopt_internal_r,
4450 _getopt_long_r, _getopt_long_only_r): Likewise.
4451 * getopt_.h (__getopt_argv_const): Remove.
4452 (getopt): Argv is now char * const *, as per standard.
4454 * getdate.y (tORDINAL): New token.
4455 (day, relunit): Allow it for relative times.
4456 (relative_time_table): Use tORDINAL for ordinals.
4458 2004-11-15 Jim Meyering <jim@meyering.net>
4460 * closeout.c: Include "__fpending.h" once again.
4461 Include <stdbool.h>.
4462 (close_stdout): Don't fail just because stdout was closed initially,
4463 since some programs don't write to stdout in the normal course of
4464 operation (other than --version and --help), and we don't want this
4465 function to make e.g. `touch file >&-' fail.
4466 But do fail if it was closed and someone has tried to write to it.
4467 E.g., `printf foo >&-' must fail.
4469 2004-11-11 Simon Josefsson <jas@extundo.com>
4471 * strtok_r.h, strtok_r.c: New file.
4473 2004-11-11 Paul Eggert <eggert@cs.ucla.edu>
4475 * getopt_.h (__getopt_argv_const): New macro, to be used so that
4476 we can stop lying to compilers about the constness of argv when we
4477 are compiled outside glibc.
4478 (getopt, getopt_long, getopt_long_only): Use it.
4479 * getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal,
4481 * getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
4482 _getopt_long_only_r): Likewise.
4483 * getopt_int.h (_getopt_internal, _getopt_internal_r, _getopt_long_r,
4484 _getopt_long_only_r): Likewise.
4486 * getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
4487 Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
4488 Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
4489 the other external symbols.
4490 (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
4491 declaration, since the above renaming now works around collisions.
4493 2004-11-11 Jim Meyering <jim@meyering.net>
4495 * linebreak.c: Remove trailing blanks.
4496 * alloca_.h: Likewise.
4497 * acosl.c: Likewise.
4498 * euidaccess.c: Likewise.
4499 * allocsa.h: Likewise.
4501 2004-11-10 Paul Eggert <eggert@cs.ucla.edu>
4503 * mktime.c (SHR): New macro, which is a portable
4504 substitute for >> that should work even on Crays.
4505 (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
4506 Problem reported by Mark D. Baushke in
4507 <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
4508 * getdate.y (SHR): Likewise.
4510 * strftime.c (SHR): Likewise.
4512 * quotearg.c (struct quoting_options): Use unsigned int for
4513 quote_these_too, so that right shifts are well defined. All uses
4516 2004-11-10 Simon Josefsson <jas@extundo.com>
4518 * getaddrinfo.h, getaddrinfo.c: New files.
4520 2004-11-10 Jim Meyering <jim@meyering.net>
4522 Ensure that no close failure goes unreported.
4523 * closeout.c (close_stdout): Always close stdout. I.e., don't
4524 return early when it seems there's nothing to flush.
4525 Don't include __fpending.h.
4527 2004-11-09 Paul Eggert <eggert@cs.ucla.edu>
4529 * strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
4531 2004-11-05 Bruno Haible <bruno@clisp.org>
4533 * readlink.c: Include stddef.h, needed for size_t on Woe32.
4534 Reported by Mark D. Baushke <mdb@cvshome.org>.
4536 2004-11-04 Bruno Haible <bruno@clisp.org>
4538 2004-09-11 Bruno Haible <bruno@clisp.org>
4539 * allocsa.valgrind: New file.
4540 2004-02-06 Bruno Haible <bruno@clisp.org>
4541 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
4542 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
4543 Reported by Christopher Seip <chris.seip@hp.com>.
4545 2004-11-03 Paul Eggert <eggert@cs.ucla.edu>
4547 * xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
4548 with errno == ERANGE if the buffer is too small.
4549 Problem reported by Mark D. Baushke.
4551 2004-11-02 Paul Eggert <eggert@cs.ucla.edu>
4553 * xreadlink.c (MAXSIZE): New macro.
4554 (xreadlink): Use it instead of SSIZE_MAX. Ensure initial buffer
4555 size does not exceed MAXSIZE. Avoid cast.
4556 As suggested by Mark D. Baushke in
4557 <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
4558 if readlink fails with buffer size just under MAXSIZE, try again
4561 2004-11-02 Derek R. Price <derek@ximbiot.com>
4562 and Paul Eggert <eggert@cs.ucla.edu>
4564 * getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
4565 (get_date): Overparenthesize to avoid GCC warning.
4567 2004-11-02 Bruno Haible <bruno@clisp.org>
4569 * setenv.h (unsetenv): Define as a macro if the system's unsetenv()
4570 function returns void.
4572 2004-11-01 Paul Eggert <eggert@cs.ucla.edu>
4574 * getpass.c (fflush_unlocked, flockfile, funlockfile)
4575 (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
4578 2004-10-29 Paul Eggert <eggert@cs.ucla.edu>
4580 * getdate.y: Add support for TZ="foo" within a date string.
4581 Fix some bugs near time_t boundaries. Reject dates with
4582 out-of-range components, e.g., "Sept 31".
4583 Include <stdlib.h>, "setenv.h", "xalloc.h".
4584 (ISDIGIT_LOCALE): Remove; unused.
4585 Note that the TZ and time functions used here are not reentrant.
4586 (mktime_ok, get_tz): New functions.
4587 (TZBUFSIZE): New constant.
4588 (get_date): Parse leading TZ="foo". Reject out-of-range components;.
4589 This requires that we sometimes generate our own TZ="XXX..." setting.
4591 2004-10-27 Derek R. Price <derek@ximbiot.com>
4593 * mktime.c (not_equal_tm): Remove redundant check.
4595 2004-10-24 Paul Eggert <eggert@cs.ucla.edu>
4597 * getdate.y: Use Bison 1.875 features, and some minor
4598 code cleanups. This change does not affect semantics.
4599 Don't include <stdlib.h>; no longer needed.
4600 Don't include unlocked-io.h; only the "#if TEST" code uses
4601 stdio, and performance isn't crucial there.
4602 (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
4603 Bison 1.875 features as described below.
4604 All uses of "PC." replaced by "pc->".
4605 (YYSTYPE): Add a forward declaration.
4606 (yylex, yyerror): Use full prototypes in forward decls.
4607 Use "%pure-parser" rather than obsolescent "%pure_parser".
4608 Use %parse-param and %lex-param instead of obsolescent
4609 YYPARSE_PARAM and YYLEX_PARAM.
4610 (meridian_table, month_and_day_table, time_units_table,
4611 relative_time_table, time_zone_table, military_table,
4612 lookup_zone, lookup_word, get_date):
4613 Use NULL instead of 0 where appropriate.
4614 (to_hour): Avoid abort (), to avoid a dependency on
4616 (yyerror, yylex): Now accepts parser_control * arg.
4617 (main) [TEST]: Use '\0' rather than 0 for char.
4619 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4621 * getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
4622 It's now the caller's responsibility to handle the case where
4623 !HAVE_GETPAGESIZE && !defined getpagesize.
4625 * mktime.c (leapyear): Arg is long int, not int.
4627 2004-10-18 Paul Eggert <eggert@cs.ucla.edu>
4629 * argp-fs-xinl.c, argp-xinl.c: Update from glibc.
4631 2004-10-12 Simon Josefsson <jas@extundo.com>
4633 * getpass.c (fflush_unlocked, flockfile, funlockfile)
4634 (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
4637 2004-10-11 Yoann Vandoorselaere <yoann@prelude-ids.org>
4639 * vsnprintf.h: New file.
4640 * vsnprintf.c: New file.
4642 2004-10-07 Bruno Haible <bruno@clisp.org>
4644 * snprintf.c (snprintf): Avoid a memory allocation if the result fits
4645 into the provided buffer.
4647 2004-10-06 Paul Eggert <eggert@cs.ucla.edu>
4649 * diacrit.c, diacrit.h: Add GPL notice.
4651 * atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL notice.
4652 * atanl.c (atanl): Keep the code as similar to glibc as possible.
4653 * logl.c (logl): Keep the code as similar to glibc as possible.
4654 This avoids a potential constant-folding bug.
4656 2004-10-05 Bruno Haible <bruno@clisp.org>
4658 * strsep.h: Don't declare strsep() if HAVE_STRSEP.
4660 2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
4662 * xalloc.h (xmemdup): Renamed from xclone. All uses changed.
4663 * xmalloc.c (xmemdup): Likewise.
4664 * xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
4665 XFREE): Remove these long-obsolescent macros.
4666 * xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
4667 * xstrdup.c: Remove.
4669 * regex.c (re_comp): Cast gettext return value to char *,
4670 Problem reported by Martin Neitzel via Mark D. Baushke.
4672 2004-10-04 Simon Josefsson <jas@extundo.com>
4674 * error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
4675 '#ifdef USE_UNLOCKED_IO'.
4677 2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
4679 * argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
4680 getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
4681 md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
4682 regex.c, sha1.c, version-etc.c, yesno.c:
4683 Include "unlocked-io.h" only if USE_UNLOCKED_IO.
4684 * unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
4685 the includer's responsibility.
4687 Sync from coreutils.
4689 * modechange.c (mode_compile): Don't decrement a pointer that
4690 points to the start of a string, as the C Standard says the
4691 resulting behavior is undefined.
4693 * backupfile.h (enum backuptype): Rename none -> no_backups,
4694 simple -> simple_backups, numbered_existing ->
4695 numbered_existing_backups, numbered -> numbered_backups
4696 to avoid shadowing problems. All uses changed.
4697 * argmatch.c (enum backuptype) [defined TEST]: Likewise.
4698 * backupfile.c (check_extension, numbered_backup):
4699 Rename locals to avoid shadowing 'basename'.
4700 * backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
4703 * .cppi-disable: Add getopt_.h, getopt_int.h.
4704 * .cvsignore: Add getopt.h.
4706 2004-10-04 Simon Josefsson <jas@extundo.com>
4708 * memmem.h: New file.
4709 * memmem.c: New file, taken from glibc.
4711 2004-10-02 Jim Meyering <jim@meyering.net>
4713 * dirfd.h, getpagesize.h: Add copyright notice.
4715 2004-10-01 Paul Eggert <eggert@cs.ucla.edu>
4717 * snprintf.c: Remove comments as to why each header is needed.
4719 2004-10-01 Yoann Vandoorselaere <yoann@prelude-ids.org>
4721 * strsep.h: New file.
4722 * strsep.c: New file.
4724 2004-10-01 Simon Josefsson <jas@extundo.com>
4726 * snprintf.c (snprintf): Handle size==0.
4728 2004-10-01 Simon Josefsson <jas@extundo.com>
4729 Bruno Haible <bruno@clisp.org>
4731 * snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
4732 (snprintf): Declare 'args'.
4734 2004-09-30 Simon Josefsson <jas@extundo.com>
4736 * snprintf.h, snprintf.c: New files.
4738 2004-09-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
4740 * argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
4741 (hol_entry_help): Never translate an empty string.
4742 Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
4743 * argp.h (OPTION_NO_TRANS): New option.
4745 2004-09-29 Oskar Liljeblad <oskar@osk.mine.nu>
4747 * xvasprintf.c: Include xalloc.h.
4748 (xvasprintf): Use xalloc_die, not xmalloc_die.
4750 2004-09-28 Paul Eggert <eggert@cs.ucla.edu>
4752 * dummy.c: Change copyright notice to FSF, and license to GPL.
4754 2004-09-13 Paul Eggert <eggert@cs.ucla.edu>
4756 * argp-pvh.c (argp_program_version_hook): Provide initial value.
4757 Problem reported by Bruno Haible in:
4758 http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
4760 2004-09-11 Paul Eggert <eggert@cs.ucla.edu>
4762 * mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
4763 in case some system header has #define'd it. Problem reported by
4764 Soeren D. Schulze in
4765 <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
4767 2004-09-08 Bruno Haible <bruno@clisp.org>
4769 * stdint_.h: New file, taken from GNU clisp.
4771 2004-09-08 Oskar Liljeblad <oskar@osk.mine.nu>
4773 * xvasprintf.h: New file.
4774 * xvasprintf.c: New file.
4775 * xasprintf.c: New file.
4777 2004-09-08 Bruno Haible <bruno@clisp.org>
4779 * vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting length
4781 * vasprintf.c (vasprintf): Don't test for length > INT_MAX any more.
4783 2004-08-19 Paul Eggert <eggert@cs.ucla.edu>
4785 Import from coreutils.
4786 * userspec.c: Don't use <alloca.h>, so that we don't use alloca on
4787 strings on unbounded length. alloca's performance benefits aren't
4788 that important here.
4790 (parse_with_separator): New function, with most of the internals
4791 of the old parse_user_spec. Allow user to omit both user and group,
4792 for compatibility with FreeBSD.
4793 Clone only the user name, not the entire spec.
4794 Do not set *uid, *gid unless entirely successful.
4795 Avoid memory leak in some failing cases.
4796 Fix regression for USER.GROUP reported by Dmitry V. Levin in
4797 <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
4798 (parse_user_spec): Rewrite to use parse_with_separator.
4800 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
4802 * argp-help.c, argp-parse.c: Use "gettext.h" instead of
4803 its complicated substitute.
4804 * argp-help.c: Include <errno.h>, for program_invocation_short_name
4805 and program_invocation_name.
4806 (__argp_basename) [!_LIBC]: Remove; the only use was
4807 replaced by its body.
4808 (__argp_short_program_name): Change condition from
4809 !defined __argp_short_program_name to
4810 ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
4811 to match argp-namefrob.h.
4812 (__argp_failure): Don't assume strerror_r returns char *.
4813 * argp-parse.c (N_): Define unconditionally.
4814 (argp_default_options): Fill out initializers with 0 to avoid
4817 2004-08-12 Simon Josefsson <jas@extundo.com>
4819 * getopt.c, getopt1.c: Remove ELIDE_CODE hack.
4820 * getopt_.h: Renamed from getopt.h.
4822 2004-08-11 Paul Eggert <eggert@cs.ucla.edu>
4824 Merge from coreutils.
4826 * fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
4827 wmemchr or wmemcpy. Problem reported by Robert Dahlem
4828 for Reliant Unix 5.43.
4830 * obstack.c: Include <inttypes.h> and <stdint.h> if available.
4831 (union fooround): Use uintmax_t, not long int.
4832 The rest is a merge from libc:
4833 [defined _LIBC]: Include <shlib-compat.h>.
4834 (_obstack) [defined _LIBC]: Remove after 2.3.4.
4836 * settime.c (settime): Recode to avoid warning with Sun Forte C 6U2.
4838 * strverscmp.c: Convert to UTF-8.
4840 2004-08-09 Paul Eggert <eggert@cs.ucla.edu>
4842 * obstack.h (obstack_empty_p):
4843 Don't assume that chunk->contents is suitably aligned.
4844 * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
4845 Likewise. Problem reported by Benno in
4846 <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
4848 * chown.c (rpl_chown): Work even if the file is writeable but not
4849 readable. This could be improved further but it'd take some work.
4851 2004-08-08 Simon Josefsson <jas@extundo.com>
4853 * xgethostname.c: Don't include error.h (not used).
4856 * getpass.c: Include getpass.h first.
4858 2004-08-08 Paul Eggert <eggert@cs.ucla.edu>
4860 * xalloc-die.c: New files.
4861 * xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
4863 * xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted): Likewise.
4864 Move inclusions of gettext.h, error.h, exitfail.h to xalloc-die.c.
4865 (_, N_, xalloc_die): Move to xalloc-die.c.
4866 * userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
4867 so that we needn't mess with xalloc_msg_memory_exhausted.
4869 * sha1.h: Renamed from sha.h.
4870 (SHA1_H): Renamed from _SHA_H.
4871 (sha1_ctx): Renamed from sha_ctx.
4872 (sha1_init_ctx): Renamed from sha_init_ctx.
4873 (sha1_process_block): Renamed from sha_process_block.
4874 (sha1_process_bytes): Renamed from sha_process_bytes.
4875 (sha1_finish_ctx): Renamed from sha_finish_ctx.
4876 (sha1_read_ctx): Renamed from sha_read_ctx.
4877 (sha1_stream): Renamed from sha_stream.
4878 (sha1_buffer): Renamed from sha_buffer.
4879 * sha1.c: Likewise; renamed from sha.c.
4880 Do not include <sys/types.h>.
4881 Include <stddef.h> rather than <stdlib.h>.
4883 2004-08-08 Bruno Haible <bruno@clisp.org>
4885 * pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
4886 FILESYSTEM_PREFIX_LEN.
4887 * progreloc.c: Likewise.
4888 * concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
4890 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
4893 * argp-help.c (make_hol, hol_append): Don't assume that
4894 SIZE_MAX is a valid preprocessor constant.
4895 (__argp_basename): Change from "#ifndef _LIBC"
4896 to "#ifndef __argp_short_program_name", so that
4897 we don't compile these functions for tar.
4899 More merges from coreutils.
4900 * raise.c, readtokens0.h, readtokens0.c, strftime.h, utimens.h,
4901 utimens.c, utimecmp.h, utimecmp.c, xnanosleep.h, xnanosleep.c,
4903 * addext.c: Remove; no longer needed.
4904 * yesno.c, argmatch.h, argmatch.c, backupfile.h, backupfile.c,
4905 euidaccess.c, filemode.c, closeout.c, dup2.c, exclude.c,
4906 fileblocks.c, filemode.c, fnmatch.c, fnmtahc_loop.c,
4907 fopen-safer.c, fsusage.c, fsusage.h, ftruncate.c, full-write.c,
4908 getdate.y, getloadavg.c, getugroups.c, hard-locale.c, hard-locale.h,
4909 hash.c, human.c, human.h, lchown.c, lchown.h, makepath.c, makepath.h,
4910 md5.c, md5.h, memchr.c, memcoll.c, memrchr.c, modechange.c,
4911 modechange.h, mountlist.c, mountlist.h, nanosleep.c, posixtm.c,
4912 putenv.c, quotearg.c, quotearg.h, readtokens.c, readutmp.c,
4913 readutmp.h, rmdir.c, safe-read.c, save-cwd.c, savedir.c, setenv.c,
4914 sig2str.c, stat.c, strtoimax.c, strverscmp.c, userspec.c, utime.c,
4915 version-etc.c., xgethostname.c, xmemcoll.c, xreadlink.c, xstrtod.c,
4916 xstrtod.h, xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtoumax.c:
4917 Import changes from coreutils.
4919 2004-08-05 Paul Eggert <eggert@cs.ucla.edu>
4921 Merge from coreutils.
4923 * .gdb-history: Remove; this doesn't belong here.
4925 * c-strtod.c, c-strtod.h, c-strtold.c, cycle-check.c,
4926 cycle-check.h, dev-ino.h, canonicalize.h, canonicalize.c,
4927 fcntl-safer.h, fcntl-safer.c, getcwd.c: New files.
4929 * dirname.h: Include <stdbool.h>.
4930 (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
4931 for consistency with POSIX terminology. All uses changed.
4932 (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
4933 (strip_trailing_slashes): Use bool for booleans.
4934 * stripslash.c (strip_trailing_slashes): Likewise.
4936 * error.c: Work around bug in OpenBSD 3.4 sterror_r: it
4937 sometimes returns a positive errno value even when it succeeds.
4938 (print_errno_message) [!LIBC]: Fall back on strerror if
4941 * path-concat.c (mempcpy): Don't define if a system header defines it.
4942 Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
4943 (longest_relative_suffix): New function.
4944 (path_concat): Use it. Assume first argument is not NULL.
4945 Port to DOS. Omit redundant separators.
4946 Report an error instead of returning NULL.
4947 Use mempcpy instead of memcpy.
4948 (xpath_concat): Remove: not declared or used.
4950 * same.h: Include <stdbool.h>
4951 (same_name): Return bool, not int.
4952 * same.c (same_name): Likewise.
4953 (errno): Don't declare; we assume C89 or better now.
4955 * stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
4956 if not already defined.
4958 * xgetcwd.c (errno): Don't declare; we assume C89 or better now.
4959 * dup-safer.c (errno): Likewise.
4961 2004-08-03 Paul Eggert <eggert@cs.ucla.edu>
4963 * fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
4966 2004-08-03 Simon Josefsson <jas@extundo.com>
4968 * strdup.h: Only use HAVE_DECL_STRDUP if defined.
4969 * progname.h: Don't include stdbool.h.
4971 2004-08-02 Simon Josefsson <jas@extundo.com>
4973 * getsubopt.h: New file, with comments from Bruno Haible.
4974 * getsubopt.c: New file, from glibc, but slightly modified based on
4975 suggestions from Paul Eggert <eggert@cs.ucla.edu>.
4977 2004-08-01 Simon Josefsson <jas@extundo.com>
4979 * xgetdomainname.c: Include stdlib.h, for free().
4981 2004-07-16 Simon Josefsson <jas@extundo.com>
4983 * dummy.c: New file.
4985 2004-07-16 Bruno Haible <bruno@clisp.org>
4987 * backupfile.h: Add extern "C" for C++.
4988 * closeout.h: Likewise.
4989 * copy-file.h: Likewise.
4990 * findprog.h: Likewise.
4991 * full-write.h: Likewise.
4992 * pathname.h: Likewise.
4993 * progname.h: Likewise.
4994 * stpcpy.h: Likewise.
4995 * stpncpy.h: Likewise.
4996 * strcase.h: Likewise.
4997 * strstr.h: Likewise.
4998 * xalloc.h: Likewise.
5000 * mbswidth.h: Add extern "C" for C++.
5001 Reported by Albert Chin-A-Young <china@thewrittenword.com>.
5003 2004-07-09 Simon Josefsson <jas@extundo.com>
5005 * getndelim2.c: Include stddef.h, for ptrdiff_t. (FreeBSD 4.9
5006 failed without this.)
5008 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
5010 * fchown-stub.c: New file.
5012 2004-06-24 Jim Meyering <jim@meyering.net>
5014 * obstack.h (obstack_base): Cast to (void *), per documentation.
5016 2004-06-22 Paul Eggert <eggert@cs.ucla.edu>
5018 * argz.c, argz_.h: New files, which are autoupdated from libtool.
5020 2004-06-01 Jim Meyering <jim@meyering.net>
5022 * calloc.c: New file.
5024 2004-06-06 Paul Eggert <eggert@cs.ucla.edu>
5026 * getdate.y (yylex): Allow space between sign and number.
5027 Problem reported by Dan Jacobson.
5029 2004-06-01 Paul Eggert <eggert@cs.ucla.edu>
5030 and Jim Meyering <jim@meyering.net>
5032 Merge from coreutils CVS.
5034 * stat-macros.h: New file, with contents from file-type.h
5035 and coreutils' system.h.
5036 * file-type.c: Include "stat-macros.h".
5037 * file-type.h (file_type): Move all macro definitions to new file,
5040 * chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
5041 Wrap old code with this conditional.
5042 [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
5043 function that does not dereference symlinks.
5044 * lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
5046 * xreadlink.c: Include xreadlink.h first, to catch .h file
5047 dependency problems.
5048 (xreadlink): Accept new arg SIZE, for efficiency.
5049 All decls and uses changed.
5050 * xreadlink.h: Include <stddef.h>, for size_t.
5052 * .cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
5053 gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
5055 * .cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h, sysexits.h.
5057 2004-05-30 Paul Eggert <eggert@cs.ucla.edu>
5059 * xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
5060 macros to be defined.
5061 (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
5062 the allocator returns NULL because the requested size is zero.
5064 2004-05-20 Paul Eggert <eggert@cs.ucla.edu>
5066 * malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
5067 var. Add comment explaining why libc still defines it. This
5068 merges the following patch from glibc:
5069 http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
5071 2004-05-19 Paul Eggert <eggert@cs.ucla.edu>
5073 * obstack.c (_obstack): Remove unused variable. It hasn't been
5074 present in glibc since revision 1.1 of this file.
5075 * obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
5076 obstack_alignment_mask, obstack_alloc, obstack_base,
5077 obstack_blank, obstack_blank_fast, obstack_chunk_size,
5078 obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
5079 obstack_grow0, obstack_init, obstack_int_grow,
5080 obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
5081 obstack_next_free, obstack_object_size, obstack_ptr_grow,
5082 obstack_ptr_grow_fast, obstack_room): Remove declarations of
5083 nonexistent functions.
5085 2004-05-17 Derek R. Price <derek@ximbiot.com>
5086 Paul Eggert <eggert@cs.ucla.edu>
5088 * argp-help.c, argp-parse.c: Assume <alloca.h> rather than freecoding.
5090 2004-05-14 Bruno Haible <bruno@clisp.org>
5092 * vasnprintf.c (VASNPRINTF): Correctly handle the case of a precision
5093 that consists of a '.' followed by an empty digit string.
5094 Patch by Tor Lillqvist <tml@iki.fi>.
5096 2004-05-17 Paul Eggert <eggert@cs.ucla.edu>
5098 Port obstack to the AS/400, where pointers are 16 bytes wide and
5099 you cannot cast an integer to a valid pointer. This patch is
5100 currently waiting to be integrated into glibc; see
5101 <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
5103 * obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
5104 All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
5105 (__BPTR_ALIGN, __PTR_ALIGN): New macros.
5106 (struct obstack): temp member is now a union of a pointer and
5107 an integer, instead of an integer. All integer uses changed.
5108 This does not affect the physical layout of struct obstack,
5109 except on hosts (like the AS/400) where the size or alignment of
5110 void * is greater than that of ptrdiff_t.
5111 (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
5112 __STDC__)]: Store temporary in pointer member of union, not
5114 * obstack.c: Include <stddef.h>, for offsetof.
5115 (struct fooalign): Remove; it doesn't need a name.
5116 (union fooround): Change double to long double, and add void *.
5117 (DEFAULT_ALIGNMENT): Use offsetof to compute.
5118 (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
5119 not a macro. Hence the values are always int; so remove all
5120 casts-to-int in uses.
5122 2004-05-16 Paul Eggert <eggert@cs.ucla.edu>
5123 Derek Price <derek@ximbiot.com>
5125 * alloca.c: Include <alloca.h>, to get our interface.
5126 * alloca_.h: Use __alloca on AIX, so that we don't have to
5127 include <alloca.h> first. Use C89 prototype for alloca; this
5128 requires including <stddef.h> for size_t. Use extern "C" if C++.
5129 Use #elif for simplicity, since we can assume C89 now.
5130 Don't try to source the system alloca.h since it will not be found
5131 and to prevent recursively including its replacement.
5132 * fnmatch.c: Include <alloca.h> instead of opencoding.
5133 * regex.c: Likewise.
5135 2004-05-16 Derek Price <derek@ximbiot.com>
5136 Paul Eggert <eggert@cs.ucla.edu>
5138 getline cleanup. This changes the getndelim2 API: both order of
5139 arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
5142 * getline.c: Don't include stddef.h or stdio.h, since our
5143 interface does that.
5144 (getline): Always use getdelim, so that we don't have two
5145 copies of this code.
5146 * getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
5148 (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
5149 (GETNDELIM2_MAXIMUM): New macro.
5150 (getndelim2): Reorder arguments. delim==EOF now means no delimiter,
5151 instead of the old practice of delim2==0. All callers changed.
5152 Return -1 on overflow, instead of returning junk.
5153 Do not set *linesize unless allocation succeeds.
5154 * getndelim2.h: Do not include stddef.h; no longer needed, now
5155 that we include sys/types.h.
5156 * getnline.h: Likewise.
5157 * getndelim2.h (GETNLINE_NO_LIMIT): New macro.
5158 (getndelim2): Reorder arguments.
5159 * getnline.c (getnline, getndelim):
5160 Don't discard the NMAX argument.
5161 (getnline): Invoke getndelim, to avoid code duplication.
5162 * getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
5163 of (size_t) -1 by callers of the getnline family.
5165 2004-05-13 Paul Eggert <eggert@cs.ucla.edu>
5167 * nanosleep.c (suspended): Change its type from int to
5168 sig_atomic_t volatile.
5169 (first_call): Make it private to rpl_nanosleep, and have it
5170 be zero initially as that's a bit faster.
5171 (my_usleep): Round up fractional times instead of truncating them,
5172 as this is the usual meaning for 'sleep'.
5174 * gettime.c (gettime): Fall back on `time' if `gettimeofday'
5176 * settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
5177 (ENOSYS): Define if not defined.
5178 (settime): Fall back on stime if it exists and settimeofday fails.
5179 But don't bother with fallbacks if a method fails with errno == EPERM.
5181 2004-05-11 Jim Meyering <jim@meyering.net>
5183 Prior to this change, the save_cwd caller required read access to the
5184 current directory on most systems (ones with the fchdir function).
5186 * save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
5187 fails, try write-only, and finally, resort to using xgetcwd.
5189 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5191 * obstack.c, obstack.h: Import changes from libc.
5193 2004-04-28 Bruno Haible <bruno@clisp.org>
5195 * findprog.c (find_in_path): Treat Cygwin like Windows, since it also
5196 implicitly appends .exe to executables.
5197 * localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
5198 accepts Windows pathnames.
5199 * pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
5200 Cygwin like Windows, since it now accepts Windows pathnames.
5201 * progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
5202 Cygwin like Windows, since it now accepts Windows pathnames.
5203 Reported by Derek Robert Price <derek@ximbiot.com>.
5205 2004-04-20 Jim Meyering <jim@meyering.net>
5207 * getndelim2.c (getndelim2): Upon realloc failure, don't leak memory.
5209 2004-04-20 Jim Meyering <jim@meyering.net>
5210 Bruno Haible <bruno@clisp.org>
5212 * localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
5213 memory when realloc fails.
5215 2004-04-18 Jim Meyering <jim@meyering.net>
5217 * readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc failure,
5218 don't leak memory and do call END_UTMP_ENT.
5220 2004-04-11 Paul Eggert <eggert@twinsun.com>
5222 * inttostr.h: Include <limits.h> unconditionally, since we assume C89.
5223 (CHAR_BIT): Remove, since we assume C89.
5224 Include <stdint.h> if available, as per current Autoconf CVS advice.
5226 2004-03-30 Paul Eggert <eggert@twinsun.com>
5228 * cloexec.h, cloexec.c (set_cloexec_flag): Return int
5229 not bool, to be more consistent with Unix conventions.
5230 Suggested by Bruno Haible.
5232 Merge from coreutils.
5234 * imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
5237 * getdate.h: Include stdbool.h, and timespec.h instead of
5238 the usual <time.h> dance.
5239 (get_date): Change signature to support fractional time stamps.
5240 All callers changed.
5241 * getdate.y: Include "getdate.h" first, as we can now
5242 assume C89 and don't need to worry about 'const'.
5243 Similarly, include "unlocked-io.h" near start, not in middle.
5245 (textint.value): Use long int rather than int.
5246 (textint.digits): Use size_t rather than int.
5247 (BILLION, LOG10_BILLION): New constants.
5248 (parser_control): New member rel_ns. Members day_ordinal,
5249 time_zone, month, day, hour, minutes, rel_year, rel_month,
5250 rel_day, rel_hour, rel_minutes, rel_seconds
5251 are now long int, not int. Member seconds is now struct timespec,
5252 not int. New member timespec_seen. Members dates_seen, days_seen,
5253 local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
5255 (%union.intval): Now long int, not int.
5256 New member timespec.
5257 (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
5258 (seconds, signed_seconds, unsigned_seconds): New nonterminals.
5259 (spec): Now is a timespec or an item list.
5260 (timespec, items): New nonterminals.
5261 (time, rel, relunit, number, get_date):
5262 Add support for fractional seconds.
5263 (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
5264 (gmtime, localtime, mktime): Remove decls; not needed with C89.
5265 (to_hour): First arg is now long int, not int.
5266 (to_year): Returns long int, not int.
5267 Don't treat year -70 like 70.
5268 (tm_diff): Returns long int, not int.
5269 (lookup_word): Use bool instead of int when appropriate.
5270 (yylex): Use size_t for count, not int.
5271 Detect overflow when parsing large integer constants.
5272 Add support for fractions.
5273 (get_date): Make pointers 'const' if possible.
5274 Use more-portable code to detect integer overflow.
5275 (main) [TEST]: Adjust to above changes. Test for localtime failure.
5276 Don't use ctime; it's not reliable if the year has >4 digits.
5278 * human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
5279 This is for compatibility with BSD.
5281 * timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
5282 (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
5283 From coreutils' system.h.
5285 * userspec.c: Don't include "posixver.h".
5286 (parse_user_spec): Fall back on USER.GROUP parsing, regardless
5287 of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
5288 compatible extension. Simplify code by removing a boolean int
5289 that was always nonzero if a string was nonnull.
5291 2004-03-30 Jim Meyering <jim@meyering.net>
5293 Merge from coreutils.
5295 * mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
5297 * readtokens.c (readtoken): Don't leak 64 bytes when reading
5298 an empty input stream.
5300 * readtokens.c: Include <stdbool.h>.
5301 (readtoken): Use `size_t' rather than int/long.
5302 All callers adjusted.
5303 Use `bool' rather than `int' where appropriate.
5304 Use memset rather than an explicit loop.
5305 Use x2nrealloc rather than xrealloc.
5306 Allow the use of `\0' as a delimiter.
5307 (readtokens): Likewise.
5308 * readtokens.h (readtoken, readtokens): Update prototypes.
5310 2004-03-30 Bruno Haible <bruno@clisp.org>
5312 * getloadavg.c (getloadavg): Don't assume setlocale returns
5315 2004-03-29 Paul Eggert <eggert@twinsun.com>
5317 Merge changes to getloadavg.c from coreutils and Emacs.
5319 * getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
5320 Define to an expression, not to the empty string.
5321 Include cloexec.h and xalloc.h.
5322 (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
5323 Use set_cloexec_flag rather than rolling our own.
5324 * cloexec.c, cloexec.h: New files.
5326 2004-03-18 Paul Eggert <eggert@twinsun.com>
5328 * getopt.h: Sync with libc CVS.
5330 2004-03-18 Paul Eggert <eggert@twinsun.com>
5331 Bruno Haible <bruno@clisp.org>
5333 * mbswidth.h: Include <wchar.h> only if HAVE_DECL_MBSWIDTH_IN_WCHAR_H,
5334 not on all platforms that have <wchar.h>.
5335 * mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
5337 2004-03-09 Paul Eggert <eggert@twinsun.com>
5339 * argp-parse.c, getopt.c, getopt.h, getopt1.c:
5341 * getopt_int.h: New file, also synced from libc.
5343 2004-03-07 Paul Eggert <eggert@twinsun.com>
5345 * c-stack.c (SIGACTION_WORKS): New macro. Use it instead of long
5346 '#if' expressions. Unlike the code it replaces, it does not
5347 depend on (defined _SC_PAGESIZE). However, it does depend on
5348 HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
5349 first reported by Jason Andrade in
5350 <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
5352 2004-01-18 Simon Josefsson <jas@extundo.com>
5354 * strdup.h: New file.
5355 * strdup.c: Include it.
5356 * path-concat.c: Include strdup.h. Drop strdup declaration.
5357 * userspec.c: Include strdup.h. Drop strdup declaration.
5359 2004-02-06 Karl Berry <karl@gnu.org>
5361 * config.charset: update from gettext 0.14.1.
5363 2004-02-05 Paul Eggert <eggert@twinsun.com>
5365 Add comments and code, prompted by suggestions from Bruno Haible
5367 * quotearg.h (quotearg_alloc): New decl. Improve the comments
5368 describing the enum quoting_style values.
5369 * quotearg.c (quotearg_alloc): New function.
5370 (quotearg_buffer_restyled): Treat lone { and } as special.
5371 Treat = as special. Work around bug with older shells
5372 that "see" a '\' that is really the 2nd byte of a multibyte char.
5373 Quote empty string with shell_quoting_style.
5375 2004-02-03 Bruno Haible <bruno@clisp.org>
5377 * pipe.h: New file, from GNU gettext.
5378 * pipe.c: New file, from GNU gettext.
5380 2004-01-27 Bruno Haible <bruno@clisp.org>
5382 * execute.h: New file, from GNU gettext.
5383 * execute.c: New file, from GNU gettext.
5384 * w32spawn.h: New file, from GNU gettext.
5386 2004-01-23 Paul Eggert <eggert@twinsun.com>
5388 Exit-status fix from coreutils.
5390 Use exit_failure consistently in place of EXIT_FAILURE,
5391 so that program exit statuses are consistent on failure.
5393 * argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
5394 Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
5395 * argmatch.h: Comment fix to match the above.
5396 * obstack.c (obstack_exit_failure) [!defined _LIBC]:
5397 Now a macro referring to exit_failure, instead of a separate
5398 variable. Include "exitfail.h" to get it.
5399 * xstrtol.h: Include "exitfail.h".
5400 (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
5402 * long-options.c (parse_long_options): Use prototype
5403 for usage function arg. Pass it EXIT_SUCCESS rather than 0,
5406 2004-01-21 Jim Meyering <jim@meyering.net>
5408 * mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
5409 so as not to conflict with a different-sized __mktime_internal
5410 function in GNU libc.
5411 * timegm.c (__mktime_internal) [!_LIBC]: Likewise.
5412 Problem building statically-linked `ls' reported by Michael Brunnbauer.
5414 2004-01-18 Paul Eggert <eggert@twinsun.com>
5416 Merge from diffutils.
5418 * file-type.c (file_type): Add typed memory objects.
5419 * file-type.h (S_TYPEISTMO): New macro.
5421 * c-stack.h (c_stack_action): Remove argv argument.
5422 * c-stack.c (c_stack_action): Likewise. All uses changed.
5423 (die): Don't calculate message unless segv_action returns.
5424 (get_stack_location, min_address_from_argv, max_address_from_argv,
5425 volatile stack_base, volatile_stack_size): Remove.
5426 (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
5427 that every segmentation violation is a stack overflow. (Ouch!)
5428 See Debian bug 136249 (still outstanding) for more info about why
5429 HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
5431 2003-11-30 Bruno Haible <bruno@clisp.org>
5433 Safer stack allocation.
5434 * setenv.c: Include allocsa.h.
5435 (alloca): Remove fallback definition.
5436 (freea): Remove macro.
5437 (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
5440 2003-10-17 Bruno Haible <bruno@clisp.org>
5442 * binary-io.h: Avoid warnings on Cygwin.
5444 2003-12-28 Bruno Haible <bruno@clisp.org>
5446 * wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
5447 * wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE specially.
5449 2003-11-28 Bruno Haible <bruno@clisp.org>
5451 * wait-process.c (cleanup_slaves): Use ANSI C declaration.
5453 2003-11-27 Bruno Haible <bruno@clisp.org>
5455 * wait-process.c: On Windows, include windows.h. Needed on mingw.
5457 2003-11-17 Bruno Haible <bruno@clisp.org>
5459 * wait-process.c (wait_process): Disable the 2003-10-31 waitid() patch.
5461 2003-11-24 Bruno Haible <bruno@clisp.org>
5463 * xallocsa.h: New file, from GNU gettext.
5464 * xallocsa.c: New file, from GNU gettext.
5466 2003-11-24 Bruno Haible <bruno@clisp.org>
5468 * allocsa.h: New file, from GNU gettext.
5469 * allocsa.c: New file, from GNU gettext.
5471 2003-11-24 Bruno Haible <bruno@clisp.org>
5473 * eealloc.h: New file.
5475 2004-01-15 Jim Meyering <jim@meyering.net>
5477 Merge from coreutils.
5479 * md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code. These
5480 days, gcc-3.x does better all by itself. Patch from Dean Gaudet:
5481 http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
5483 * posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
5484 optional configure-time default.
5486 * version-etc.c (version_etc_copyright): Update copyright date.
5488 * xreadlink.c (xreadlink): Correct outdated comment.
5490 2004-01-15 Paul Eggert <eggert@twinsun.com>
5492 Merge from coreutils.
5494 * posixver.c: Include posixver.h.
5496 * same.c: Include <stdbool.h>, <limits.h>.
5497 (_POSIX_NAME_MAX): Define if not defined.
5499 (same_name): If file names are silently truncated, report
5500 that the file names are the same if they are the same after
5501 the silent truncation.
5503 * xstrtod.h (xstrtod): Accept an extra arg, specifying the
5504 conversion function.
5505 * xstrtod.c (xstrtod): Likewise. All callers changed to
5506 include c-strtod.h and use c_strtod. Don't include stdlib.h; no
5509 2004-01-14 Paul Eggert <eggert@twinsun.com>
5511 * fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
5512 with like-named macro in fnmatch.c.
5513 (EXT): Use an internal constant instead.
5515 Merge fnmatch patches from glibc.
5516 * fnmatch.c (mbsinit): Remove define.
5517 Add libc_hidden_ver (__fnmatch, fnmatch).
5518 * fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
5519 Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
5521 2003-12-14 Karl Berry <karl@gnu.org>
5523 * config.charset: update from gettext-runtime.
5525 2003-12-03 Paul Eggert <eggert@twinsun.com>
5527 * getgroups.c (getgroups): xmalloc takes one argument, not two.
5528 Bug reported by Alfred M. Szmidt.
5530 2003-11-29 Karl Berry <karl@gnu.org>
5532 * argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
5534 2003-11-23 Paul Eggert <eggert@twinsun.com>
5535 Bruno Haible <bruno@clisp.org>
5537 * printf-parse.h: Don't include sys/types.h.
5538 (ARG_NONE): New macro.
5539 (char_directive): Change type of *arg_index fields to size_t.
5540 * printf-parse.c: Don't include sys/types.h.
5541 (SSIZE_MAX): Remove macro.
5542 (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
5543 Remove unnecessary overflow check.
5544 * vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
5547 2003-11-24 Paul Eggert <eggert@twinsun.com>
5549 * alloca.c: Remove dependency on xalloc module.
5550 (xalloc_die): Remove.
5551 (memory_full) [!defined emacs]: New macro.
5552 [!defined emacs]: Don't include xalloc.h.
5553 (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
5554 address arithmetic overflows. Change datatypes a bit to avoid
5557 2003-11-22 Jim Meyering <jim@meyering.net>
5559 * xmalloc.c (x2nrealloc_inline): Fix typos in comments: s/size/size_t/.
5561 2003-11-17 Bruno Haible <bruno@clisp.org>
5563 * vasnprintf.c (alloca): Remove fallback definition.
5564 (freea): Remove definition.
5565 (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
5566 Reported by Paul Eggert.
5568 2003-11-17 Jim Meyering <jim@meyering.net>
5570 On systems without utime and without a utimes function capable of
5571 dealing with a NULL struct utimbuf* argument, this utime replacement
5572 could -- in unusual circumstances -- leak a file descriptor.
5573 * utime.c: Include <unistd.h> and <errno.h>.
5574 (utime_null): Be sure to close `fd' and to preserve errno.
5575 Reported by Geoff Collyer via Arnold Robbins.
5577 2003-11-16 Paul Eggert <eggert@twinsun.com>
5578 Bruno Haible <bruno@clisp.org>
5580 Protect against address arithmetic overflow.
5581 * printf-args.h: Include stddef.h.
5582 (arguments): Change type of field 'count' to size_t.
5583 * printf-args.c (printf_fetchargs): Use size_t instead of
5584 'unsigned int' where appropriate.
5585 * printf-parse.h: Include sys/types.h.
5586 (char_directive): Change type of *arg_index fields to ssize_t.
5587 (char_directives): Change type of fields 'count', max_*_length to
5589 * printf-parse.c: Include sys/types.h and xsize.h.
5590 (SSIZE_MAX): Define fallback value.
5591 (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
5592 instead of 'int' where appropriate. Check a_allocated, d_allocated
5593 against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
5594 * vasnprintf.c: Include xsize.h.
5595 (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
5596 Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
5597 overflow. Avoid wraparound when converting a width or precision from
5600 2003-11-16 Bruno Haible <bruno@clisp.org>
5602 Update from GNU gettext.
5603 * printf-parse.c: Generalize to it can be compiled for wide strings.
5604 (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
5605 * vasnprintf.c: Generalize to it can be compiled for wide strings.
5606 (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
5607 SNPRINTF): New macros.
5608 Don't include <alloca.h> if the file is used inside libintl.
5609 (local_wcslen): New function, for Solaris 2.5.1.
5610 (VASNPRINTF): Use it instead of wcslen.
5612 2003-11-16 Bruno Haible <bruno@clisp.org>
5614 * xsize.h (xmax): New function.
5615 (xsum, xsum3, xsum4): Declare as "pure" functions.
5617 2003-11-12 Paul Eggert <eggert@twinsun.com>
5619 * xalloc.h: Do not include <limits.h> or <stdint.h>.
5620 (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
5621 the heuristic, rather than PTRDIFF_MAX and SIZE_MAX. This
5622 heuristic is just as accurate as far as we know, and it removes a
5623 dependency on size_max.m4 and ptrdiff_max.m4.
5625 2003-11-12 Paul Eggert <eggert@twinsun.com>
5627 * xstrtol.c (__xstrtol): Remove "break" immediately after
5628 "return", to pacify some unknown compiler. Problem reported
5631 2003-11-11 Bruno Haible <bruno@clisp.org>
5633 * xsize.h (SIZE_MAX): Remove fallback definition.
5634 * xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
5637 2003-11-10 Paul Eggert <eggert@twinsun.com>
5639 * xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
5640 PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
5641 rejected some allocations of exactly SIZE_MAX - 2 bytes.
5643 [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
5644 not (size_t) -1, since it's defined here.
5646 2003-11-06 Paul Eggert <eggert@twinsun.com>
5648 * xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
5649 (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
5650 Reject sizes of exactly SIZE_MAX bytes.
5651 * xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
5652 is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
5654 2003-11-05 Bruno Haible <bruno@clisp.org>
5656 * xsize.h: Include limits.h, to avoid a possible collision with
5657 SIZE_MAX defined in <limits.h> on Solaris.
5659 2003-11-04 Bruno Haible <bruno@clisp.org>
5661 * xsize.h: New file.
5662 * linebreak.c: Include xsize.h.
5663 (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
5664 argument for overflow.
5665 Suggested by Paul Eggert.
5667 2003-10-31 Bruno Haible <bruno@clisp.org>
5669 * wait-process.c (wait_process): Use waitid with WNOWAIT if available,
5670 to avoid (extremely rare) race condition.
5671 Suggested by Paul Eggert.
5673 2003-11-03 Jim Meyering <jim@meyering.net>
5675 * userspec.c: Include "userspec.h".
5676 * userspec.h: New file.
5678 2003-10-31 Paul Eggert <eggert@twinsun.com>
5680 * mountlist.h (struct mount_entry.me_type_malloced): New member.
5681 * mountlist.c (SIZE_MAX): Define if not defined already.
5682 (read_filesystem_list): Set and use me_type_malloced.
5683 Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
5684 whatever the type happens to be), for brevity and consistency.
5685 Check for size calculation overflow on Alphas running OSF/1.
5687 2003-10-31 Jim Meyering <jim@meyering.net>
5689 * hash.c: Include "xalloc.h" for use of xalloc_oversized.
5691 * linebuffer.c: Include <string.h> for declaration of memset.
5693 2003-10-30 Paul Eggert <eggert@twinsun.com>
5694 Bruno Haible <bruno@clisp.org>
5696 * vasprintf.c: Include <limits.h>, <stdlib.h>.
5697 (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
5699 2003-10-29 Paul Eggert <eggert@twinsun.com>
5701 * xalloc.h (xalloc_oversized): Now a macro, not a function,
5702 so that it works even if SIZE_MAX < N. Do not include <stdbool.h>;
5704 * quotearg.c (quotearg_n_options): Use it.
5705 * group-member.c: Include <stdbool.h>.
5706 (free_group_info): Arg is now const *; don't free arg.
5707 (get_group_info): Now returns bool and accepts struct group_info *,
5708 rather than returning a malloc'ed struct group_info *.
5709 All uses changed. Check for overflow in internal size calculation.
5711 * getusershell.c (readname): Simplify the code by using x2nrealloc
5712 rather than xmalloc/xrealloc.
5713 * linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
5714 using x2realloc rather than xmalloc/xrealloc. Also, fix a C
5715 conformance bug: the old code used a pointer after freeing the
5716 storage that it addressed.
5717 * hash.c (hash_initialize): Simplify the code by using xalloc_oversized
5718 rather than doing it by hand.
5719 * getgroups.c (getgroups): Don't use xrealloc, since we don't need
5720 the buffer preserved. Use free and xmalloc instead.
5721 * quotearg.c (quotearg_n_options): Likewise.
5722 Use a simpler test for size overflow. Don't use xalloc_oversized
5723 because unsigned int might be wider than size_t (!); this suggests
5724 that we should switch from unsigned int to size_t for slot numbers.
5726 2003-10-27 Bruno Haible <bruno@clisp.org>
5728 * stdbool_.h: Better support for BeOS.
5730 2003-10-27 Paul Eggert <eggert@twinsun.com>
5732 * exclude.c (new_exclude): Use xzalloc rather than xmalloc
5733 to allocate the returned structure. Do not allocate a subarray,
5734 as x2nrealloc will do that.
5735 (add_exclude): Use x2nrealloc to reallocate ex->exclude,
5736 instead of xnrealloc.
5737 (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
5739 2003-10-26 Paul Eggert <eggert@twinsun.com>
5741 * xalloc.h (xalloc_oversized): New static inline function, for
5742 callers that want to do their own size-overflow checking. Include
5743 <stdbool.h>, since xalloc_oversized returns bool.
5744 * xalloc.c (array_size_overflow): Remove. All callers changed
5745 to use xalloc_oversized.
5747 Add two functions x2realloc, x2nrealloc, for programs that grow
5748 arrays dynamically by doubling their sizes.
5749 * xalloc.h (x2realloc, x2nrealloc): New decls.
5750 * xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
5753 Port to C99 semantics for 'inline' of external functions.
5754 Bug reported by Bruno Haible.
5755 * xmalloc.c (xnmalloc_inline): New static inline function,
5756 with the old contents of xnmalloc.
5757 (xnmalloc, xmalloc): Use it.
5758 (xnrealloc_inline): New static inline function,
5759 with the old contents of xnrealloc.
5760 (xnrealloc, xrealloc): Use it.
5762 * alloc.c (alloca): xmalloc cannot return NULL, so don't test for that.
5764 2003-10-25 Paul Eggert <eggert@twinsun.com>
5766 Fix several address-calculation bugs in the hash modules,
5767 plus some minor code cleanup.
5769 * hash.h: Include <stdbool.h>, for bool.
5770 * hash.c: Don't include <stdbool.h>, since hash.h does it now.
5771 * hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
5772 hash_get_n_entries, hash_get_max_bucket_length,
5773 hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
5774 hash_rehash): Use size_t rather than unsigned.
5775 * hash.c (struct hash_table, hash_get_n_buckets,
5776 hash_get_n_buckets_used, hash_get_n_entries,
5777 hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
5778 hash_get_entries, hash_do_for_each, hash_string, is_prime,
5779 next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
5781 (SIZE_MAX): Define if not defined.
5782 (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
5783 hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
5785 Use const * when possible.
5786 (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
5787 (check_tuning): Fix bug: if tuning parameters were very close to
5788 0 or 1, rounding errors could have caused subscript violations.
5789 (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
5790 (hash_initialize): Add 'fail:' label
5791 to free table and return NULL, and use it to simplify code.
5792 Use calloc rather than clearing the storage ourself.
5793 (hash_initialize, hash_rehash): Check for arithmetic overflow in
5794 buffer size calculations.
5795 * hash-pjw.h (hash_pjw): Use size_t, not unsigned.
5796 Include <stddef.h>, for size_t.
5797 * hash-pjw.c (hash_pjw): Likewise.
5798 Switch to method described by Bruno Haible.
5799 Include <limits.h>, for CHAR_BIT.
5800 (SIZE_BITS): New macro.
5802 2003-10-21 Paul Eggert <eggert@twinsun.com>
5804 * getndelim2.c (getndelim2): When size calculation overflows,
5805 ceiling the allocation at NMAX bytes rather than silently
5806 discarding input bytes before NMAX is reached. This makes
5807 a difference only if NMAX exceeds SIZE_MAX / 2.
5809 * obstack.c: Merge from glibc.
5810 [defined _LIBC]: Include <obstack.h>, not "obstack.h".
5811 Add libc_hidden_def (_obstack_newchunk).
5812 (_obstack_free) [! defined _LIBC]: Remove.
5813 [defined _LIBC]: Make a strong alias from obstack_free, rather than
5814 a clone of the function body.
5815 (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
5816 [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
5818 * obstack.h: Indenting cleanup, to make it easier to merge with glibc.
5819 (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
5822 * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
5823 (obstack_ptr_grow_fast, obstack_int_grow_fast):
5824 Don't use lvalue casts, as GCC plans to remove support for them
5825 in GCC 3.5. Reported by Joseph S. Myers. This bug
5826 was also present in the non-GCC version, indicating that this
5827 code had always been buggy and had never been widely used.
5828 (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
5829 Use the fast variant of each macro, rather than copying the
5830 definiens of the fast variant; that way, we'll be more likely to
5831 catch future bugs in the fast variants.
5833 2003-10-20 Bruno Haible <bruno@clisp.org>
5835 * wait-process.h: New file, from GNU gettext.
5836 * wait-process.c: New file, from GNU gettext.
5838 2003-10-19 Jim Meyering <jim@meyering.net>
5840 * vasnprintf.c (vasnprintf): Work around losing snprintf on HPUX 10.20.
5842 2003-10-16 Paul Eggert <eggert@twinsun.com>
5844 * getgroups.c: Include <errno.h>, <stdlib.h>.
5845 (getgroups): First arg is int, not size_t.
5846 Don't let 'free' mangle errno.
5848 2003-10-16 Jim Meyering <jim@meyering.net>
5850 * xmalloc.c: Include <string.h>, for declarations of memset and memcpy.
5852 2003-10-15 Paul Eggert <eggert@twinsun.com>
5854 * exclude.c: Do not include <inttypes.h> or <stdint.h>.
5856 (new_exclude, add_exclude_file): Initial size no longer needs to
5858 (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
5859 our own address arithmetic overflow checking.
5861 * fnmatch.c (SIZE_MAX): Define if standard headers don't.
5862 (fnmatch): Do not alloca more than 2000 wide characters;
5863 instead, use malloc for large buffers.
5864 Check for address arithmetic overflow, and return -1
5865 with errno set to ENOMEM in that case.
5866 * fnmatch_loop.c (ALLOCA_LIMIT): New macro.
5867 (NEW_PATTERN): Do not alloca more than 8000 bytes;
5868 instead, return -1. Check for address arithmetic overflow.
5870 2003-10-14 Paul Eggert <eggert@twinsun.com>
5872 Handle invalid suffixes and overflow independently, so that
5873 callers can treat them independently as needed. Fix some bugs in
5874 suffix handling, e.g., "100k@" was not diagnosed as an invalid
5875 suffix for a human-readable blocksize. The major caller-visible
5876 change is the addition of a new
5877 LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
5878 that both overflow and suffix chars were found.
5880 * human.c (humblock): Don't check separately for invalid suffix
5881 char; that is xstrtoumax's job (now that its bug is fixed).
5882 * xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
5883 INTMAX_MAX]: New macros.
5884 * xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
5885 TYPE_MAXIMUM): New macros.
5886 (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
5887 (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
5888 if overflow occurs, as it's what __strtol does and it's more useful
5890 (__xstrtol): If __strtol reports some error other than ERANGE,
5891 reflect it to the caller as LONGINT_INVALID. If it reports
5892 ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
5893 | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
5894 * xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
5896 (_STRTOL_ERROR): Handle it. Abort when given unknown error codes.
5897 * xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
5898 * xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
5899 [defined UINTMAX_MAX]: New macros.
5901 2003-10-14 Bruno Haible <bruno@clisp.org>
5903 * fatal-signal.h: Improved comments. Suggested by Paul Eggert.
5904 * fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
5905 Also use volatile where needed.
5907 2003-10-12 Paul Eggert <eggert@twinsun.com>
5909 * xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
5910 (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
5911 and define in terms of the other primitives.
5912 * xmalloc.c: Include stdbool.h; do not include exit.h.
5913 (SIZE_MAX): Define if not already defined.
5914 (array_size_overflow): New function.
5915 (xalloc_die): Abort instead of exiting if 'error' returns.
5916 (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
5917 (xmalloc, xrealloc): Use them.
5918 (xcalloc): Check for address arithmetic overflow.
5919 * xstrdup.c (xstrdup): Use xclone, since memcpy should be
5920 a bit faster than strcpy.
5922 2003-10-08 Paul Eggert <eggert@twinsun.com>
5924 Merge getpass from libc, plus a few fixes.
5926 * getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
5927 Include <stdbool.h>.
5928 Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
5929 __fsetlocking to empty.
5930 [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
5931 do include <bits/libc-lock.h>.
5932 Do not include <fcntl.h>; not needed.
5933 [_LIBC]: Include <wchar.h>.
5934 (NOTCANCEL_MODE): New macro.
5935 (flockfile, funlockfile) [_LIBC]: New macros.
5936 (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
5937 [!_LIBC]: New macros.
5938 (call_fclose): New function.
5939 (getpass): Use it. Save tty stream separately; this simplifies the
5940 code and makes it more reliable if stdin happens to equal stdout.
5941 Invoke __fsetlocking on tty.
5942 Handle thread cancellation if needed.
5943 Namespace cleanup (use __tcgetattr, __getline).
5944 Use bool for Booleans.
5945 [USE_IN_LIBIO]: Handle wide streams.
5946 [!_LIBC]: Unconditionally do the fseek, since we don't know what
5947 stream might go where.
5949 * unlocked-io.h: Include <stdio.h>, so that the caller
5950 doesn't have to include <stdio.h> before us.
5951 (clearerr_unlocked, feof_unlocked, ferror_unlocked,
5952 fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
5953 fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
5954 putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
5955 if not declared, so that we can use getpass.c code from libc without
5957 (flockfile, ftrylockfile, funlockfile): New macros.
5959 2003-10-06 Bruno Haible <bruno@clisp.org>
5961 * version-etc-2.h: Remove file.
5962 * version-etc-2.c: Remove file.
5964 2003-09-25 Jim Meyering <jim@meyering.net>
5965 Bruno Haible <bruno@clisp.org>
5967 This lets translators provide better translations for the
5968 "Written by ..." part of --version output.
5969 * version-etc.h: Include stdarg.h.
5970 (version_etc_copyright): Declare as readonly.
5971 (version_etc): Make this function variadic with a NULL-terminated list
5972 of author name strings.
5973 (version_etc_va): New declaration.
5974 * version-etc.c: Include stdarg.h, stdlib.h.
5975 (version_etc_copyright): Declare as readonly.
5976 (version_etc_va): New function. Provide a different translatable string
5977 for each possible number of authors < 10. Abbreviate when there are 10
5979 (version_etc): Make this function variadic. Call version_etc_va.
5980 Suggestion from Gary V. Vaughan.
5982 * long-options.h (parse_long_options): Change prototype: the authors
5983 string is moved to the end and becomes variadic.
5984 * long-options.c: Include stdarg.h.
5985 (parse_long_options): Make this function variadic, too.
5986 Call version_etc_va, not version_etc.
5988 2003-10-06 Bruno Haible <bruno@clisp.org>
5990 * fatal-signal.h: New file, from GNU gettext.
5991 * fatal-signal.c: New file, from GNU gettext.
5993 2003-10-04 Karl Berry <karl@gnu.org>
5995 * argp*: update from libc.
5997 2003-10-01 Larry Jones <lawrence.jones@eds.com>
5999 * getpass.c (getpass): Use a no-op fseek when switching from input to
6000 output mode on the same stream.
6002 2003-09-29 Paul Eggert <eggert@twinsun.com>
6004 * strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
6005 Fix arg typo in previous patch.
6007 2003-09-28 Jim Meyering <jim@meyering.net>
6009 * error.c: Correct cpp indentation.
6011 2003-09-27 Paul Eggert <eggert@twinsun.com>
6013 * minmax.h (MIN, MAX) [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
6014 Omit the special code that used __typeof__, since we worry that
6015 it could be more trouble than it's worth. See:
6016 http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
6017 http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
6021 2003-09-26 Jim Meyering <jim@meyering.net>
6023 * error.c (error_tail): Move some declarations
6024 into inner scope where the local variables are used.
6026 2003-09-26 Bruno Haible <bruno@clisp.org>
6028 * stpncpy.h (gnu_stpncpy): New declaration.
6029 (stpncpy): Define as alias for gnu_stpncpy.
6030 * stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
6032 2003-09-26 Paul Eggert <eggert@twinsun.com>
6034 * error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
6035 (error_tail): Do not loop, reallocating temporary buffer, since
6036 the output cannot contain more wide characters than the input
6037 contains bytes, the size must be big enough already. This avoids
6038 one potential size overflow calculation. Check for size overflow
6039 when calculating temporary buffer size. Free temporary buffer
6040 when done, if it was allocated with malloc; this plugs a memory
6041 leak. Remove casts from void * to pointers, that are no longer
6042 needed now that we're assuming C89 or better.
6044 Merge error changes from glibc.
6046 * error.c, error.h: Update copyright notice header to match glibc.
6047 * error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
6048 (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
6049 Disable cancellation while printing error.
6050 * error.h: Prepend __ to parameter names.
6052 2003-09-25 Karl Berry <karl@gnu.org>
6054 * argp-fmtstream.c, argp-help.c: update from libc.
6056 2003-09-25 Bruno Haible <bruno@clisp.org>
6058 * version-etc-2.h: New file, from version-etc.h with modifications.
6059 * version-etc-2.c: New file, from version-etc.c with modifications.
6061 2003-09-25 Simon Josefsson <jas@extundo.com>
6063 * xgetdomainname.h: New file.
6064 * xgetdomainname.c: New file.
6066 2003-09-25 Simon Josefsson <jas@extundo.com>
6067 Bruno Haible <bruno@clisp.org>
6069 * getdomainname.h: New file.
6070 * getdomainname.c: New file.
6072 2003-09-24 Paul Eggert <eggert@twinsun.com>
6074 * linebuffer.c (freebuffer): Don't free the argument, just
6075 the buffer associated with the argument. Bug reported by
6078 2003-09-19 Karl Berry <karl@gnu.org>
6080 * argp.h: update from libc.
6082 2003-09-16 Paul Eggert <eggert@twinsun.com>
6084 * linebuffer.c (readlinebuffer): Return NULL immediately upon
6085 input error, instead of returning NULL the next time we are called
6086 (and therefore losing track of errno).
6088 2003-09-15 Paul Eggert <eggert@twinsun.com>
6090 * getndelim2.c (getndelim2): Don't trash errno when a read
6091 fails, so that the caller gets the proper errno.
6093 * readutmp.c (read_utmp): Likewise.
6094 Check for fstat error. Close stream and free storage
6097 2003-09-14 Bruno Haible <bruno@clisp.org>
6099 * fwriteerror.h: New file.
6100 * fwriteerror.c: New file.
6102 2003-09-14 Jim Meyering <jim@meyering.net>
6104 * getloadavg.c: Correct cpp indentation.
6105 * strdup.c: Likewise.
6106 * vasnprintf.c: Likewise.
6108 2003-09-12 Paul Eggert <eggert@twinsun.com>
6110 * argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
6111 * obstack.c [!defined _LIBC]: Likewise.
6112 * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
6113 * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
6114 * exitfail.c: Don't include stdlib.h; no longer needed.
6116 More changes to assume C89 or better.
6118 * error.c (error_tail): Assume vprintf.
6120 * argmatch.c (getenv): Remove decl.
6121 * progreloc.c (get_full_program_name): Define via prototype.
6122 * setenv.c (clearenv): Likewise.
6123 * stpncpy.c: Do not include <string.h> or <sys/types.h>; not
6125 * strdup.c: Include <stdlib.h>, <string.h> unconditionally.
6126 (malloc, memcpy): Remove decls.
6127 * strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
6128 (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
6129 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
6130 (memcpy): Remove macro.
6131 (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
6132 (__P): Remove. All uses removed.
6133 (PTR): Remove. All uses changed to void *.
6134 (CHAR_BIT, NULL): Remove.
6135 (spaces, zeros, memset_space, memset_zero)
6136 [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
6138 (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
6139 (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
6140 Define with prototype.
6141 Remove now-unnecessary prototype decl.
6142 (extra_args_spec): Assume ANSI C. All uses changed.
6143 (extra_args_spec_iso): Remove.
6144 (my_strftime, emacs_strftimeu): Define via prototype.
6145 * strtod.c: Include <float.h>, <stdlib.h>, <string.h>
6147 (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
6148 * strtoimax.c: Include <stdlib.h> unconditionally.
6149 (strtoul, strtol): Remove decls.
6150 * strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
6152 Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
6153 (LOCALE_PARAM_DECL): Remove. All uses changed to LOCALE_PARAM_PROTO.
6154 (LOCALE_PARAM_PROTO): New macro.
6155 (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
6156 (INTERNAL (strtol), strtol): Define with a prototype.
6157 (PARAMS): Remove. All uses removed.
6158 * tempname.c: Include <string.h> unconditionally.
6159 * userspec.c: Include <stdlib.h>, <string.h> unconditionally.
6160 * xgethostname.c (main): Define with a prototype.
6161 * xmalloc.c: Include "xalloc.h" first, to check interface.
6162 Include <stdlib.h> unconditionally.
6163 (calloc, malloc, realloc, free): Remove decls.
6164 * xstrtod.c: Include "xstrtod.h" first, to check interface.
6165 Include <stdlib.h> unconditionally. Sort include file names.
6167 (xstrtod): Define with a prototype.
6168 * xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
6169 (strtol, strtoul): Remove decls.
6171 2003-09-11 Paul Eggert <eggert@twinsun.com>
6173 * strndup.c: Don't include <stdio.h>, <sys/types.h>.
6174 Include <stdlib.h>, <string.h> unconditionally.
6175 Remove now-unnecessary cast to char *.
6176 * strnlen.c: Include <string.h> unconditionally.
6177 * yesno.c (yesno): Define with a prototype.
6179 2003-09-10 Bruno Haible <bruno@clisp.org>
6181 * strcspn.c: Include <string.h> unconditionally.
6182 * strpbrk.c: Include <string.h> unconditionally.
6183 * strstr.c: Include <string.h> unconditionally.
6184 * unicodeio.c: Include <string.h> unconditionally.
6185 * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
6186 * unsetenv.c: Likewise.
6187 * xreadlink.c: Include <stdlib.h> unconditionally.
6188 * yesno.c: Include <stdlib.h> unconditionally.
6189 (rpmatch): Add prototype.
6191 2003-09-10 Jim Meyering <jim@meyering.net>
6193 * error.c: Correct indentation of cpp directives.
6195 2003-09-09 Paul Eggert <eggert@twinsun.com>
6199 * acosl.c (main): Use a prototype.
6200 * asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
6203 * getloadavg.c (getloadavg, main): Define via prototypes.
6205 * getopt.h (struct option.name): Assume C89, and use 'const'.
6206 (getopt, etopt_long, getopt_long_only, _getopt_internal)
6207 [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
6209 * getopt.c (const): Remove macro.
6210 Include <string.h> unconditionally.
6211 (my_index): Remove; all uses changed to strchr.
6212 (strlen): Remove decl.
6213 (exchange): Remove forward decl; no longer needed.
6214 (exchange, _getopt_initialize, _getopt_internal, getopt, main):
6215 Define with prototype.
6216 * getopt1.c (const): Remove macro.
6217 (getopt_long, getopt_long_only, main): Define with prototype.
6219 * getugroups.c: Include <string.h> unconditionally.
6221 * getusershell.c: Include <stdlib.h> unconditionally.
6222 (getusershell, setusershell, endusershell, readname, main):
6223 Define with prototypes.
6225 * group-member.c: Include group-member.h first.
6226 Include <stdlib.h> unconditionally.
6228 * hard-locale.c: Include hard-locale.h first.
6229 Include <stdlib.h>, <string.h> unconditionally.
6231 * hash.c (free, malloc): Remove decls.
6232 Include <stdlib.h> unconditionally.
6234 * human.c: Include <stdlib.h>, <string.h> unconditionally.
6235 (getenv): Do not declare.
6237 * idcache.c: Include <string.h> unconditionally.
6239 * long-options.c: Include long-options.h first, to test interface.
6240 Include <stdlib.h> unconditionally.
6242 * makepath.c: Include makepath.h first, to test interface.
6243 Include <stdlib.h> and <string.h> unconditionally.
6245 * linebuffer.c: Include <stdlib.h>.
6246 (free): Remove decl.
6248 * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h.
6249 rpl_malloc returns void *, not char *.
6250 * realloc.c (rpl_realloc): Likewise. Also, define with a prototype.
6252 * md5.h: Include <limits.h> unconditionally.
6253 (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
6254 (__P): Remove; all uses removed.
6255 * md5.c: Include "md5.h" first.
6256 (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
6257 md5_buffer, md5_process_bytes, md5_process_block):
6258 Define with prototypes.
6259 * sha.h (__P): Remove all uses. (It wasn't defined??)
6260 * sha.c: Include "sha.h" first.
6261 Include <stdlib.h>, <string.h> unconditionally.
6263 * memchr.c (__ptr_t): Remove; all uses changed to void *.
6264 * memcmp.c (__ptr_t): Likewise.
6265 * memrchr.c (__ptr_t): Likewise.
6266 * memchr.c, memcmp.c, memcoll.c, memrchr.c:
6267 Include <string.h> unconditionally.
6268 * memchr.c, memrchr.c: Include <limits.h> unconditionally.
6269 * memchr.c: Include <stdlib.h> unconditionally.
6270 * memchr.c (LONG_MAX): Remove.
6271 * memrchr.c (LONG_MAX): Likewise.
6272 * memchr.c (__memchr): Define via a prototype.
6273 * memrchr.c (__memrchr): Likewise.
6274 * memcmp.c (__P): Remove, and remove all uses.
6275 (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
6276 Remove forward decls; no longer needed.
6277 * memcpy.c, memmove.c, memset.c: Include <stddef.h>.
6278 Use types required by C89 in prototype.
6280 * mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
6281 * savedir.c: Likewise.
6282 * mkdir.c (free): Remove decl.
6283 * rmdir.c (rmdir): Define with a prototype.
6284 * savedir.c: Include savedir.h first, to test interface.
6286 * mktime.c (STDC_HEADERS): Remove.
6287 Include <stdlib.h>, <string.h> unconditionally.
6289 * modechange.c: Include <stdlib.h> unconditionally.
6290 (malloc): Remove decl.
6292 * mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
6293 (free): Remove decl.
6295 * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
6296 Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
6297 (This type really should be intptr_t, but that's a C99ism.)
6298 (_obstack_memcpy): Remove: all uses changed to memcpy.
6299 Include <string.h> unconditionally.
6300 (struct obstack): Assume __STDC__ for types of members
6301 chunkfun, freefun, extra_arg.
6302 (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
6303 _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
6304 obstack_begin, obstack_specify_allocation,
6305 obstack_specify_allocation_with_arg, obstack_chunkfun,
6306 obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
6307 Remove unprototyped decls and the macros that use them.
6308 * obstack.c (POINTER): Remove. All uses changed to void *.
6309 (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
6310 _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
6311 (defined __STDC__ && __STDC__)]:
6312 Remove nonprototyped code.
6313 Include <stdlib.h> unconditionally.
6314 (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
6315 _obstack_allocated_p, _obstack_free, obstack_free,
6316 _obstack_memory_used, print_and_abort):
6317 Define using prototypes.
6318 (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
6319 obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
6320 obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
6321 obstack_next_free, obstack_object_size, obstack_room) [0]:
6322 Remove unused, unprototyped code.
6324 * path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
6326 * physmem.c (physmem_total, physmem_available, main): Define
6329 * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
6330 (main): Define with a prototype.
6332 * posixver.c (getenv): Remove decl.
6334 * putenv.c (malloc): Returns void *, not char *.
6335 Include <string.h> unconditionally.
6336 (strchr, memcpy, NULL): Do not define.
6338 * readtokens.c: Include readtokens.h first, to test interface.
6339 Include <stdlib.h>, <string.h> unconditionally.
6340 (init_tokenbuffer): Define with a prototype.
6342 * regex.c (PARAMS): Remove. All uses removed.
6343 All uses of _RE_ARGS removed, too.
6344 Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
6346 (bzero): Assume memset exists.
6347 (memcmp, memcpy, NULL): Remove.
6348 (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
6349 char, or assignments to local vars of type signed char.
6350 (init_syntax_once, PREFIX(extract_number_and_incr),
6351 PREFIX(print_partial_compiled_pattern),
6352 PREFIX(print_compiled_pattern), PREFIX(print_double_string),
6353 convert_mbs_to_wcs, print_fastmap, re_set_syntax,
6354 PREFIX(regex_grow_registers), PREFIX(regex_compile),
6355 PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
6356 PREFIX(insert_op2), PREFIX(at_begline_loc_p),
6357 PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
6358 wcs_compile_range, byte_compile_range, truncate_wchar,
6359 PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
6360 re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
6361 count_mbs_length, wcs_re_match_2_internal,
6362 byte_re_match_2_internal, PREFIX(group_match_null_string_p),
6363 PREFIX(alt_match_null_string_p),
6364 PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
6365 re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
6366 regfree, PREFIX(extract_number)): Define with prototype. Remove
6367 now-unnecessary declaration, if any.
6368 (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
6370 Remove now-unnecessary casts among pointer types.
6371 * regex.h (_RE_ARGS): Remove. All uses removed.
6373 * rename.c: Include <stdlib.h>, <string.h> unconditionally.
6374 (free): Remove decl.
6376 * rpmatch.c: Include <stdlib.h> unconditionally.
6378 * same.c: Include <stdlib.h>, <string.h> unconditionally.
6379 (free): Remove decl.
6381 * save-cwd.c: Include <stdlib.h> unconditionally.
6382 * xgetcwd.c: Likewise.
6384 * stat.c: Include <stdlib.h>, <string.h> unconditionally.
6385 (free): Remove decl.
6387 * strchrnul.c (strchrnul): Define with a prototype.
6388 Fix bug: c_in was not converted to char before searching.
6390 The following changes are not K&R related:
6392 * group-member.h: Include <sys/types.h>, so that this file is
6394 * makepath.h: Likewise.
6396 * getusershell.c (readname, default_index, line_size, readname):
6397 Use size_t, not int, for sizes.
6398 (readname): If the size overflows, report an error instead of
6401 2003-09-09 Derek Robert Price <derek@ximbiot.com>
6403 * getndelim2.c: Assume stdlib.h per the C89 spec.
6405 2003-09-08 Paul Eggert <eggert@twinsun.com>
6407 Assume C89 or better; remove K&R cruft.
6408 A few of these changes were first proposed by Derek Robert Price
6409 in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
6411 * addext.c: Include <string.h> unconditionally.
6412 * backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
6413 Don't declare getenv or malloc.
6415 * alloca.c: Include <string.h>, <stdlib.h> unconditionally.
6416 (POINTER_TYPE, pointer): Remove; all uses changed to void *.
6418 (find_stack_direction, alloca): Use prototypes.
6420 * atexit.c (atexit): Define using a prototype.
6422 * basename.c, dirname.c, stripslash.c:
6423 Include <string.h> unconditionally.
6425 * bcopy.c: Include <stddef.h>.
6426 (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
6428 * canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
6430 * error.h (error, error_at_line, error_print_progname)
6431 [! (defined (__STDC__) && __STDC__)]: Remove decls.
6432 * error.c: Include error.h first, to check interface.
6433 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
6434 (VA_START): Remove; all uses changeed to va_start.
6435 (exit, strerror): Remove decls.
6436 (error_print_progname): Prototype uncondionally.
6437 Don't include <errno.h>; no longer needed.
6438 (private_strerror): Remove.
6439 (error_tail): Always define.
6440 (error, error_at_line): Assume C89 or better; always use prototypes.
6441 * fatal.c: Include "fatal.h" first, to test interface.
6442 Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
6443 (VA_START): Remove; all uses changed to va_start.
6444 [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
6446 (exit): Remove decl.
6447 (fatal): Prototype unconditionally. Assume va_start works.
6448 Abort at end, to pacify gcc.
6450 * euidaccess.c (main): Define with a prototype.
6452 * exclude.c: Include <stdlib.h>, <string.h> unconditionally.
6454 * exitfail.c: Include <stdlib.h> unconditionally.
6456 * fnmatch_.h (__P): Remove. All uses changed to assume
6458 * fnmatch.c: Include fnmatch.h first, to test interface.
6459 Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
6460 (getenv): Remove decl.
6461 (fnmatch): Define using a prototype.
6462 * fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
6463 (FCT): Define using a prototype.
6465 * getdate.y: Include <stdlib.h>, <string.h> unconditionally.
6467 * gethostname.c: Include <stddef.h>.
6468 (gethostname): Define with prototype. Length is size_t, not int.
6470 2003-09-08 Paul Eggert <eggert@twinsun.com>
6472 * getversion.c: Remove; was migrated to backupfile.c in 1997.
6473 getversion.c should have been removed then, but was accidentally
6476 * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
6477 (utime_null): Fix typo: 'st' was sometimes called 'sb'.
6479 2003-09-07 Paul Eggert <eggert@twinsun.com>
6481 * time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
6482 copy_tm_result. Bug reported by Simon Josefsson in
6483 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
6485 2003-09-06 Paul Eggert <eggert@twinsun.com>
6487 * time_r.c, time_r.h: New files.
6489 * mktime.c (my_mktime_localtime_r): Remove; all uses changed to
6491 (__localtime_r) [!defined _LIBC]: New macro. Include <time_r.h>.
6492 (__mktime_internal) [!defined _LIBC]: Now extern, not static.
6494 * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
6496 (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
6497 (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
6500 * timegm.c: Switch to glibc implementation, with the following changes:
6501 [defined HAVE_CONFIG_H]: Include <config.h>.
6502 [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
6503 (__mktime_internal) [!defined _LIBC]: New decl.
6504 (__gmtime_r) [!defined _LIBC]: New macro and function.
6505 (timegm): Use a prototype, since gnulib assumes C89.
6506 Do not bother declaring tmp to be const, as it's not really usefu.
6507 * timegm.h: Hoist "#include <time.h>" out of #ifdef.
6508 (timegm): Declare only if HAVE_DECL_TIMEGM.
6510 2003-09-03 Paul Eggert <eggert@twinsun.com>
6512 * human.c (human_readable): Fix bug that rounded 10501 to 10k.
6513 Bug reported by Lute Kamstra in
6514 <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
6516 * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
6517 "yesterday", "today", and "now" rather than tMINUTE_UNIT. Of
6518 course with correspondingly smaller numbers for tomorrow and
6519 yesterday. From Tadayoshi Funaba. Originally installed into
6520 sh-utils on 1999-08-07, but the patch got lost (I guess during the
6523 2003-08-31 Simon Josefsson <jas@extundo.com>
6525 * timegm.h: New file.
6526 * timegm.c: New file. Based on wget-1.8.2/src/http.c:mktime_from_utc.
6528 2003-08-31 Karl Berry <karl@gnu.org>
6530 * argp.h: update from libc.
6532 2003-08-28 Bruno Haible <bruno@clisp.org>
6534 * binary-io.h: Undefine O_BINARY before defining it. This avoids a
6535 warning on QNX, which defines O_BINARY to 000000.
6537 2003-08-24 Bruno Haible <bruno@clisp.org>
6539 * binary-io.h: Include <stdio.h>, to avoid a compilation error when
6540 MSVC7 <stdio.h> is included later.
6542 2003-08-20 Bruno Haible <bruno@clisp.org>
6544 * progname.h: New file, from GNU gettext.
6545 * progname.c: New file, from GNU gettext.
6546 * progreloc.c: New file, from GNU gettext.
6548 2003-08-19 Bruno Haible <bruno@clisp.org>
6550 * xstrdup.c: Assume <string.h> exists.
6552 2003-08-18 Jim Meyering <jim@meyering.net>
6554 * setenv.h: Indent nested cpp directive.
6555 * vasnprintf.c: Remove trailing blanks.
6557 2003-08-17 Simon Josefsson <jas@extundo.com>
6558 Bruno Haible <bruno@clisp.org>
6560 * xstrndup.h: New file.
6561 * xstrndup.c: New file.
6563 2003-08-17 Bruno Haible <bruno@clisp.org>
6565 * strndup.h: New file.
6567 2003-08-16 Paul Eggert <eggert@twinsun.com>
6569 * regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
6570 space, undoing this 2003-08-12 change:
6571 <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
6573 2003-08-16 Jim Meyering <jim@meyering.net>
6575 Merge from coreutils.
6576 * xstrtoimax.c: #else #if -> #elif.
6577 * xstrtoumax.c: Likewise.
6579 2003-08-15 Paul Eggert <eggert@twinsun.com>
6581 * config.charset, ref-add.sin, ref-del.sin: Use three spaces,
6582 rather than tab, after '#' in shell-script copyright notices.
6583 Suggested by Bruno Haible.
6585 2003-08-15 Jim Meyering <jim@meyering.net>
6586 and Paul Eggert <eggert@twinsun.com>
6588 Merge from coreutils.
6589 * readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
6590 member but strut utmpx does not. Needed for AIX 4.3.3.
6591 (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
6593 2003-08-15 Jim Meyering <jim@meyering.net>
6595 Merge from coreutils.
6596 * xgethostname.c: Include <stdlib.h>.
6597 (xghostname): Don't exit for anything other than memory-related
6598 failure; just return NULL.
6599 * userspec.c: Include "posixver.h".
6600 (parse_user_spec): Accept `.' as a separator only
6601 in pre-POSIX-200112 mode.
6602 * strtoimax.c: Use #elif rather than #else #if.
6603 * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
6604 Remove function, now that we can rely on a working tzset function.
6605 [!_LIBC]: Ensure that the required autoconf test has been run.
6606 [!defined _NL_CURRENT && HAVE_STRFTIME]:
6607 Use underlying_strftime for %r.
6608 * sha.c: Merge in some clean-up and optimization changes from glibc.
6609 * sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
6610 Ensure that it is a multiple of 64.
6611 Rearrange loop exit tests so as to avoid performing an
6612 additional fread after encountering an error or EOF.
6613 * realloc.c: Update copyright date.
6615 2003-08-14 Jim Meyering <jim@meyering.net>
6617 Merge from coreutils.
6618 * obstack.h: Whitespace changes.
6619 * mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
6620 and xcalloc return values.
6621 (read_filesystem_list) [MOUNTED_GETFSSTAT]:
6622 Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could
6623 hang on OSF/1 5.1 for DIR on both local and remote file systems.
6624 Reported by (and fix confirmed by) Nelson H. F. Beebe.
6625 (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
6627 Use mntctl's return value to drive the entry-processing loop, since
6628 we can't rely on the value of the vmt_length member in the last
6629 entry. On some systems doing so could result in exhausting
6630 virtual memory. Based in part on a patch from Mike Jetzer.
6632 2003-08-14 Jim Meyering <jim@meyering.net>
6633 and Paul Eggert <eggert@twinsun.com>
6635 Merges from coreutils, plus other fixes.
6636 * physmem.c: Merge in portability changes from gcc/libiberty
6637 to support AIX, IRIX, Tru64, and Windows. See the ChangeLog there
6638 for credits and details. Thanks to Kaveh Ghazi for helping
6639 to keep these files in sync.
6640 (ARRAY_SIZE): Define it.
6641 (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
6642 * memcasecmp.c: Remove unnecessary parentheses after 'defined'.
6643 (memcasecmp): Don't assume size_t fits in unsigned int.
6644 Remove casts and duplicate code.
6645 * md5.c: Include <string.h> and <stdlib.h> unconditionally.
6646 (memcpy): Remove definition.
6647 Merge in some clean-up and optimization changes from glibc.
6648 [BLOCKSIZE]: Move definition to top of file.
6649 Ensure that it is a multiple of 64.
6650 Rearrange loop exit tests so as to avoid performing an
6651 additional fread after encountering an error or EOF.
6652 * md5.h (md5_uintptr): Define.
6653 * makepath.c (CLEANUP_CWD): Report an error if we failed to
6654 return to the initial working directory. Preserve errno
6656 * idcache.c: Include "xalloc.h".
6657 (xmalloc, xrealloc): Remove decls.
6658 (getuser): Remove casts no longer required in C89.
6659 * human.c: Include stdio.h, for sprintf.
6660 * group-member.c: Include "xalloc.h".
6661 (xmalloc, xrealloc): Remove decls.
6662 (get_group_info): Remove casts no longer required in C89.
6663 * getusershell.c (readname): Remove casts no longer required in C89.
6664 * gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
6665 * getline.c: Whitespace fix, from coreutils.
6667 2003-08-13 Paul Eggert <eggert@twinsun.com>
6669 * exclude.c: Include <ctype.h>
6670 (IN_CTYPE_DOMAIN): New macro.
6672 (add_exclude_file): If LINE_END is a space, ignore trailing spaces
6675 * argp-help.c, argp-parse.c, config.charset, getopt.h:
6676 Undo previous (whitespace-only) change.
6678 2003-08-12 Paul Eggert <eggert@twinsun.com>
6680 * argp-help.c, argp-parse.c, config.charset, getopt.h:
6681 Normalize leading white space and remove trailing white space.
6682 * ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
6683 notice, as per ../config/srclist-update.
6685 Merge from coreutils.
6686 * euidaccess.h: New file.
6687 * euidaccess.c: Include it.
6688 * .cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
6689 vasnprintf.h, vasprintf.h. Remove strdup.c, gettext.h.
6690 * regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
6692 2003-08-11 Bruno Haible <bruno@clisp.org>
6694 * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
6695 (vasnprintf): Use it instead of wcslen.
6697 2003-08-11 Bruno Haible <bruno@clisp.org>
6699 * stdbool_.h (_Bool): Undo last change; instead use a negative enum
6700 value to ensure that _Bool promotes to int. Use #define for _Bool when
6701 using the Solaris C compiler. Adds comments suggested by Paul Eggert.
6703 2003-08-10 Karl Berry <karl@gnu.org>
6705 * regex.h: update from libc (whitespace fix).
6707 2003-08-09 Paul Eggert <eggert@twinsun.com>
6709 Merge some files from coreutils. These changes were
6710 originally made by Jim Meyering.
6711 * acl.c: Include <sys/types.h> before <sys/stat.h>;
6712 many older Unixes require this.
6713 * alloca.c (alloca): Remove cast to argument of free;
6714 no longer needed in C89.
6715 * alloca_.h, regex.h: Fix white space to match
6716 what GNU indent does.
6718 2003-08-05 Paul Eggert <eggert@twinsun.com>
6720 * bumpalloc.h: Remove.
6722 2003-08-04 Paul Eggert <eggert@twinsun.com>
6724 * getloadavg.c: Change copyright notice and spacing to conform to
6727 Merge from coreutils.
6728 * error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
6730 * getdate.y (date): Also accept dates like May-23-2003; suggestion
6731 from Karl Berry, implemented by Jim Meyering.
6732 * getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
6733 from Dmitry V. Levin.
6734 Remove anachronistic cast of xrealloc.
6735 * fnmatch_.h (__const): Remove. Use 'const'.
6736 * fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
6737 type. Otherwise, it wouldn't compile with at least /bin/cc on
6738 ymp-cray-unicos9.0.2.X.
6739 Combine two mostly-identical uses of alloca into one.
6740 Thanks to the Cray-Cyber project for access to a Cray Y-MP.
6742 2003-08-04 Dave Love <d.love@dl.ac.uk>
6746 * getloadavg.c: Check `__unix' as well as `unix'. Use #ifdef, not
6747 #if. Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE. Check
6748 F_SETFD, not FD_SETFD. Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
6749 obsolete NLIST_NAME_UNION.
6750 [__GNU__]: Undef BSD and FSCALE.
6751 [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
6753 2003-08-03 Paul Eggert <eggert@twinsun.com>
6755 * stdbool_.h (_Bool): Make it signed char, instead of
6756 an enum type, so that it's guaranteed to promote to int. See:
6757 <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
6759 2003-07-31 Paul Eggert <eggert@twinsun.com>
6761 * strerror.c: Include config.h, limits.h. Declare sprintf.
6762 (strerror): Don't assume that a printable int fits in 14 bytes.
6764 2003-07-24 Derek Robert Price <derek@ximbiot.com>
6765 Bruno Haible <bruno@clisp.org>
6767 * getline.h (getline, getdelim): Change return type to ssize_t.
6768 * getline.c (getline, getdelim): Likewise.
6769 Remove _GNU_SOURCE define; now it's defined in config.h through
6772 2003-07-22 Paul Eggert <eggert@twinsun.com>
6774 * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
6775 over-parenthesization in macros.
6777 Sync with coreutils.
6779 * xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
6782 Use `exit_failure' for xalloc and xmemcoll instead of their own
6783 private exit-failure variables.
6784 * xalloc.h (xalloc_exit_failure): Remove.
6785 * xmalloc.c: Likewise. Include exitfail.h.
6786 (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
6787 * xmemcoll.h (xmemcoll_exit_failure): Remove.
6788 * xmemcoll.c: Likewise. Include exitfail.h.
6789 (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
6791 2003-07-18 Paul Eggert <eggert@twinsun.com>
6793 * closeout.h (close_stdout_set_status, close_stdout_status): Remove.
6794 * closeout.c: Likewise. Include "closeout.h" right after config.h,
6795 to test that it can stand by itself. Include "exitfail.h".
6796 Clients should set exit_failure instead.
6797 (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>.
6799 2003-07-18 Andreas Schwab <schwab@suse.de>
6801 * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
6803 2003-07-18 Bruno Haible <bruno@clisp.org>
6805 * getndelim2.h: New file.
6806 * getndelim2.c: Make into a module of its own. Include config.h,
6808 (getndelim2): Make non-static. Change return type to ssize_t.
6809 * getline.h: Change argument names.
6810 * getline.c: Include getndelim2.h instead of getndelim2.c.
6811 * getnline.c: Include getndelim2.h.
6813 2003-07-17 Bruno Haible <bruno@clisp.org>
6815 * Makefile.am: Remove file.
6816 * Makefile.in: Remove file.
6818 2003-07-17 Bruno Haible <bruno@clisp.org>
6820 * getnline.h: New file.
6821 * getnline.c: New file.
6822 * getndelim2.c: New file, extracted from getline.c.
6823 (getndelim2): Renamed from getdelim2, with added nmax argument.
6824 * getline.c: Include getndelim2.c.
6825 (getdelim2): Moved out to getndelim2.c.
6826 (getline, getdelim): Update.
6828 2003-07-15 <karl@gnu.org>
6830 * vasnprintf.c: update from gettext.
6832 2003-07-15 Jim Meyering <jim@meyering.net>
6834 * makepath.c (make_path): Enclose diagnostic in _(...).
6836 2003-07-14 Paul Eggert <eggert@twinsun.com>
6838 * asnprintf.c, asprintf.c, config.charset, gettext.h,
6839 localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
6840 printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
6841 ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
6842 vasprintf.c, vasprintf.h: Regenerate. These files are now being
6843 updated automatically by ../config/srclist-update. This changes
6844 their license from LPGL to GPL.
6846 2003-07-14 Jim Meyering <jim@meyering.net>
6848 Don't emit diagnostics. Let callers do that.
6849 * save-cwd.c: Don't include "error.h".
6850 (save_cwd): Don't call error. Ensure that errno is valid
6851 when returning nonzero.
6853 * save-cwd.h (restore_cwd): Update prototype.
6854 * save-cwd.c (restore_cwd): Remove two parameters.
6855 Simplify. Don't call error upon failure. Let callers do that.
6856 (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
6857 when auditing is enabled. But don't bother updating the #if.
6859 2003-07-14 Simon Josefsson <jas@extundo.com>
6861 * mempcpy.h: New file.
6862 * mempcpy.c: New file.
6864 2003-07-14 Paul Eggert <eggert@twinsun.com>
6866 * ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
6867 sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
6868 unicodeio.c, unicodeio.h, unlocked-io.h:
6869 Switch from LGPL to GPL.
6871 2003-07-11 Alexandre Duret-Lutz <adl@gnu.org>
6873 * obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
6874 it breaks C++ compilation.
6875 [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
6877 2003-07-10 Jim Meyering <jim@meyering.net>
6879 * vasnprintf.c: Remove trailing blanks.
6880 Make cpp indentation consistent.
6882 2003-07-09 Paul Eggert <eggert@twinsun.com>
6884 * alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
6885 posixver.c, strftime.c, strnlen.c, strverscmp.c:
6886 Switch from LGPL to GPL.
6888 2003-07-07 Paul Eggert <eggert@twinsun.com>
6890 * mktime.c: Fix some boundary cases and remove need for floating point.
6892 Issue a compile-time diagnostic if time_t is floating point, or if
6893 two's complement arithmetic is not in effect, or if arithmetic
6894 right shift does not propagate the sign. These assumptions were
6895 all in the original code but they weren't checked.
6897 (TIME_T_MIDPOINT, verify): New macros.
6898 (__isleap): Remove; it has integer overflow problems.
6899 (leapyear): New function, without those problems.
6900 (ydhms_tm_diff): Remove; splitting into two parts.
6901 (ydhms_diff): New function, containing the arithmetic part of
6902 the old ydhms_tm_diff function. Issue a compile-time
6903 diagnostic if we are not using C99 integer division.
6904 Avoid casts when possible.
6905 (guess_time_tm): New function, containing the checking part of
6906 the old ydhms_tm_diff function. Return the new value, rather than
6907 the difference between it and the old. Accept a new argument T
6908 so that *T specifies the old value. Check for overflow in the result.
6910 (__mktime_internal): Use a time_t offset, not a long int offset.
6911 This undoes the 2003-06-04 change, which is no longer needed now
6912 that we have better overflow checking.
6913 (localtime_offset): Likewise.
6915 (__mktime_internal): Avoid harmful overflow on hosts where time_t
6916 and long are 64-bit but int is only 32-bit.
6917 (ydhms_diff): Use long int to store year1 and yday1.
6918 Issue a compile-time diagnostic if long int is not wide enough.
6920 (__mktime_internal): Use long int to store adjusted year and yday.
6921 Use plain C rather than preprocessor commands, if that doesn't
6923 Check for overflow (and try to repair) after each probe
6924 rather than checking only at the very end. This avoids some bugs
6925 (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
6926 does not equal GMT offset at maximum time).
6927 Use integer to check for overflow rather than floating point; this
6928 is more portable to non-IEEE hosts, and is a tad faster.
6929 When we detect that we are oscillating between two values,
6930 don't check whether tm_isdst has the requested value, since
6931 we already know the answer. When tm_isdst has the wrong value,
6932 use a different heuristic to find the right one, based on the
6933 extreme values actually observed in practice in tz2003a,
6934 rather than the (overly optimistic) "previous 3 calendar quarters".
6936 (not_equal_tm, print_tm, check_result): Use "const T" rather than
6937 "T const" to accommodate glibc style.
6938 (check_result): Use less-confusing report format. "long" -> "long int.
6940 Don't loop if the iteration overflows time_t.
6941 Allow a negative step in the iteration.
6943 2003-07-01 Paul Eggert <eggert@twinsun.com>
6945 * xreadlink.c: Include <sys/types.h> unconditionally, instead of
6946 having it depend on HAVE_SYS_TYPES_H.
6948 2003-06-25 Bruno Haible <bruno@clisp.org>
6950 * readlink.c: New file.
6952 2003-06-20 Bruno Haible <bruno@clisp.org>
6954 Assume C89, so PARAMS isn't needed.
6955 * unicodeio.h (PARAMS): Remove.
6956 * unicodeio.c: Don't use PARAMS.
6958 2003-06-18 Jim Meyering <jim@meyering.net>
6960 Merge changes from coreutils.
6961 * readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
6962 Remove explicit declarations of xmalloc and realloc.
6964 (read_utmp): Remove anachronistic cast of xmalloc.
6966 2003-06-17 Paul Eggert <eggert@twinsun.com>
6968 Assume C89, so PARAMS isn't needed.
6969 * backupfile.h (PARAMS): Remove. All uses removed.
6970 * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
6971 group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
6972 makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
6973 path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
6974 save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
6975 unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
6976 xstrtol.h: Likewise.
6977 * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h,
6978 same.h, strverscmp.h: Do not include config.h; no longer needed.
6979 Anyway, config.h should always be included before any other file.
6981 2003-06-11 Simon Josefsson <jas@extundo.com>
6983 * sysexit_.h: New file.
6985 2003-05-20 Derek Price <derek@ximbiot.com>
6987 * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
6989 2003-06-10 Simon Josefsson <jas@extundo.com>
6991 * strchrnul.h: New file.
6992 * strchrnul.c: New file.
6994 2003-06-10 Simon Josefsson <jas@extundo.com>
6996 * argp.h: New file, from glibc.
6997 * argp-ba.c: New file, from glibc.
6998 * argp-eexst.c: New file, from glibc.
6999 * argp-fmtstream.c: New file, from glibc.
7000 * argp-fmtstream.h: New file, from glibc.
7001 * argp-fs-xinl.c: New file, from glibc.
7002 * argp-help.c: New file, from glibc.
7003 * argp-namefrob.h: New file, from glibc.
7004 * argp-parse.c: New file, from glibc.
7005 * argp-pv.c: New file, from glibc.
7006 * argp-pvh.c: New file, from glibc.
7007 * argp-xinl.c: New file, from glibc.
7009 2003-06-07 Jim Meyering <jim@meyering.net>
7011 * readtokens.h: Put `Free Software Foundation, Inc.'
7012 in place of my name in the copyright comment.
7013 Remove definition and uses of __P.
7016 * stat.c: Don't declare xmalloc explicitly.
7017 Instead, include "xalloc.h".
7018 * readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
7019 xrealloc, and xcalloc return values.
7020 * xgetcwd.c (xgetcwd): Include "xgetcwd.h".
7022 * xgetcwd.h: Remove definition/uses of PARAMS.
7024 2003-06-06 Jim Meyering <jim@meyering.net>
7026 * stdbool_.h: Renamed from stdbool.h.in.
7028 2003-06-06 Jim Meyering <jim@meyering.net>
7030 Merge from coreutils.
7031 * same.c: (same_name): Declare *_basename locals to be `const'.
7032 Consolidate declarations and initializations of *_base* locals.
7034 Merge from coreutils.
7035 This avoids a core dump on systems without GNU putenv,
7036 when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
7037 * putenv.c (__set_errno, LOCK, UNLOCK): Define.
7038 (unsetenv): New static function, from GNU libc.
7039 (rpl_putenv): Use it.
7041 * modechange.c: Remove trailing blanks.
7043 Merge from coreutils.
7044 * fsusage.c: Remove declaration of statfs.
7045 It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
7047 * posixtm.c: Include <stdbool.h> unconditionally.
7049 2003-06-05 Paul Eggert <eggert@twinsun.com>
7051 * mktime.c (__mktime_internal): When resolving a tm_isdst
7052 mismatch, look in future quarters as well as past. This fixes a
7053 bug when processing fall-backwards gaps immediately after a long
7054 period of daylight-saving time.
7056 * mktime.c: Assume freestanding C89 or better.
7057 (HAVE_LIMITS_H): Remove. Assume it's 1.
7058 (__P): Remove; not used.
7059 (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
7060 (mktime, not_equal_tm, print_tm, check_result,
7061 main): Use prototypes. Use const * where appropriate.
7062 (main): Fix typo in testing code that uncovered by above changes.
7063 (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
7065 2003-06-04 Paul Eggert <eggert@twinsun.com>
7067 * mktime.c: Fix Debian bug 177940
7068 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
7069 (localtime_offset): Now long int, not time_t, because we want it
7070 to be guaranteed to be signed. All uses changed.
7071 (__mktime_internal): If overflow would occur when adding offset,
7074 Merge 'human' changes from coreutils. Rewrite to support
7075 locale-specific notations like thousands separators.
7076 * human.c: Simplify authorship notice.
7077 Include human.h immediately after config.h.
7078 <sys/types.h>, <stdio.h>: Do not include; no longer needed.
7079 <limits.h>: Do not include, since human.h does.
7080 (SIZE_MAX, UINTMAX_MAX): New macros.
7081 <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
7082 <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
7083 (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
7084 (power_letter): Renamed from suffixes.
7085 (generate_suffix_backwards): Remove.
7086 (adjust_value): Now takes int style (because of human.h changes)
7087 and long double value (for greater precision on some platforms).
7088 (group_number): New function.
7089 (human_readable): Use it. Use integer options, not enum.
7090 Put the options before the sizes in the arg list.
7091 Support all the new options.
7092 The old human_readable function has been removed;
7093 use inttostr.h instead.
7094 (human_readable, default_block_size, humblock):
7095 Use uintmax_t, not int, for block sizes.
7096 (human_readable_inexact, block_size_types): Remove.
7097 (block_size_opts): New constant.
7098 (human_options): Renamed from human_block_size, with new signature
7099 that allows block sizes up to UINTMAX_MAX. All callers changed.
7100 * human.h: Add copyright and authorship notice.
7101 Include <limits.h> and <stdbool.h> unconditionally.
7102 (PARAMS): Remove. All uses removed.
7103 (LONGEST_HUMAN_READABLE): Add support for thousands separator.
7104 (enum human_inexact_style): Remove tag; now a nameless enum.
7105 (human_floor, human_ceiling, human_round_to_even): Now have
7106 values 2, 0, 1 rather than -1, 1, 0.
7107 (human_group_digits, human_suppress_point_zero, human_autoscale,
7108 human_base_1024, human_SI, human_B): New constants.
7109 (human_readable_inexact, human_block_size): Remove.
7110 (human_readable): Size args are now uintmax_t, not int.
7111 (human_options): New decl.
7113 * exclude.c: (new_exclude, add_exclude): Remove casts that are
7114 unnecessary now that we assume C89 or better. This change
7115 imported from coreutils.
7117 * mktime.c (__mktime_internal): Do not reject negative timestamps
7118 arbitrarily. This is the same patch as 2003-05-28, but it got lost
7119 in the 2003-05-30 sync from glibc.
7121 .h files should stand alone, but we shouldn't include <sys/types.h>
7122 if we can get away with just <stddef.h>.
7124 * __fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
7125 malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
7126 rather than <sys/types.h>, as we merely need size_t.
7127 * dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
7129 * hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
7130 Include <stdio.h>, to get FILE.
7131 * memcasecmp.c: Don't include <sys/types.h>, as we can assume
7132 memcasecmp.h has included <stddef.h> and all we need is size_t.
7133 * memcoll.c: Include "memcoll.h", which gets us size_t and checks
7134 our interface, instead of including <sys/types.h>
7136 2003-06-02 Paul Eggert <eggert@twinsun.com>
7139 Fix some minor time-related bugs with POSIX time arguments.
7140 Some valid time stamps were being rejected (notably -1, and
7141 time stamps before 1900 on 64-bit hosts). And some invalid
7142 time stamps were being accepted, e.g. September 31.
7144 * posixtm.h (posixtime): Return bool instead of time_t, so
7145 that we can return (time_t) -1 successfully.
7146 * posixtm.c: Likewise.
7147 [HAVE_STDBOOL_H]: Include <stdbool.h>.
7148 (bool, false, true) [!HAVE_STDBOOL_H]: New type.
7149 (t): Remove static var.
7150 (year, posix_time_parse): Now takes struct tm * arg to modify, instead
7151 of static var. All uses changed.
7152 (year): Do not reject years before 1900; they can occur with
7154 (posix_time_parse): Do not check for out-of-range components;
7155 that is now the caller's responsibility, since our checks were
7156 only approximations.
7157 (posixtime): Use mktime to check for out-of-range components,
7158 since it knows them exactly.
7159 If mktime returns (time_t) -1, check whether an error actually occurred
7160 by invoking localtime on -1.
7161 (main) [TEST_POSIXTIME]: Check for input data errors, and report
7162 posixtime failures better.
7163 Improve the test data (in comments only).
7165 2003-05-30 <karl@gnu.org>
7167 * mktime.c: update from libc.
7169 2003-05-30 Bruno Haible <bruno@clisp.org>
7171 * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
7172 * localcharset.h: Likewise.
7173 * localcharset.c: Likewise.
7175 2003-05-28 Paul Eggert <eggert@twinsun.com>
7177 Assume the headers required for C89 freestanding compilers.
7178 * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
7179 rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
7180 without checking for HAVE_LIMITS_H.
7181 * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
7182 xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
7184 * fatal.c: Include <stdarg.h> without checking for __STDC__.
7185 * exclude.c: Include <stdbool.h> unconditionally.
7186 * tempname.c: Include <stddef.h> unconditionally.
7187 * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
7188 * modechange.c, rpmatch.c (NULL): Don't define, since
7189 <stddef.h> does that.
7190 * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
7191 * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
7192 * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
7193 * xstrtol.c: Likewise.
7194 * safe-read.c: Remove TYPE_SIGNED; no longer needed.
7195 * savedir.c: Include <stddef.h> instead of defining NULL.
7197 * addext.c (addext): Use assignment rather than cast, to avoid
7198 warnings on some platforms.
7200 * mktime.c (__mktime_internal): Do not reject negative timestamps
7203 2003-05-10 Bruno Haible <bruno@clisp.org>
7205 * linebreak.c (iconv_string_length): Don't return -1 just because the
7206 string is longer than 4 KB.
7208 2003-05-12 Jim Meyering <jim@meyering.net>
7210 * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
7211 the space-padded-by-default conversion specifiers, %e, %k, %l.
7213 2003-05-03 Bruno Haible <bruno@clisp.org>
7215 Upgrade to Unicode-4.0.
7216 * linebreak.c (nonspacing_table_data): Change width of U+00AD,
7217 U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
7218 U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
7219 U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
7220 from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
7221 (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
7222 of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
7223 Change width of U+E0100..U+E01EF from 1 to 0.
7225 2003-04-25 Bruno Haible <bruno@clisp.org>
7227 * copy-file.c: Include <stddef.h>, for size_t.
7229 2003-04-25 Jim Meyering <jim@meyering.net>
7231 * copy-file.c (copy_file_preserving): Declare buf_size to be
7232 of type size_t, not int.
7234 2003-04-11 Jim Meyering <jim@meyering.net>
7236 Merge changes from Coreutils.
7238 2003-03-22 Jim Meyering <jim@meyering.net>
7240 * strftime.c (widen): Cast alloca return value to proper type.
7242 2003-01-19 Ulrich Drepper <drepper@redhat.com>
7245 * strftime.c (my_strftime): Handle very large width
7246 specifications for numeric values correctly. Improve checks for
7249 2003-01-19 Jim Meyering <jim@meyering.net>
7251 * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
7252 (nl_get_alt_digit) [! defined my_strftime]: Define.
7253 (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
7254 _nl_get_alt_digit and _nl_get_walt_digit.
7256 * strftime.c (my_strftime): Merge in locale-related changes from libc.
7257 These changes have no effect outside of _LIBC.
7259 2003-04-10 Bruno Haible <bruno@clisp.org>
7261 * findprog.h: New file, from GNU gettext.
7262 * findprog.c: New file, from GNU gettext.
7264 2003-04-05 Jim Meyering <jim@meyering.net>
7266 Merge changes from Coreutils.
7268 * exclude.h (PARAMS): Remove definition and uses.
7269 * exclude.c: Remove uses of `PARAMS'.
7271 * dirname.c [TEST_DIRNAME]: Update build instructions for test.
7272 Add test-cases for DOS filenames. Declare program_name.
7273 (main): Set up program_name. Patch by Rich Dawe.
7275 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
7277 Use mntctl's return value to drive the entry-processing loop, since
7278 we can't rely on the value of the vmt_length member in the last
7279 entry. On some systems doing so could result in exhausting
7280 virtual memory. Based in part on a patch from Mike Jetzer.
7282 2003-04-04 Bruno Haible <bruno@clisp.org>
7284 * linebreak.h: New file, from GNU gettext.
7285 * linebreak.c: New file, from GNU gettext with slight modifications.
7286 * lbrkprop.h: New file, from GNU gettext.
7288 2003-04-03 Bruno Haible <bruno@clisp.org>
7290 * utf8-ucs4.h: New file, from GNU gettext.
7291 * utf16-ucs4.h: New file, from GNU gettext.
7292 * ucs4-utf8.h: New file, from GNU gettext.
7293 * ucs4-utf16.h: New file, from GNU gettext.
7295 2003-04-02 Bruno Haible <bruno@clisp.org>
7297 * binary-io.h: New file, from GNU gettext.
7299 2003-04-01 Bruno Haible <bruno@clisp.org>
7301 * pathname.h: New file, from GNU gettext.
7302 * concatpath.c: New file, from GNU gettext.
7304 2003-03-30 Bruno Haible <bruno@clisp.org>
7306 * copy-file.c (copy_file_preserving): Don't set owner if the function
7307 chown() doesn't exist.
7309 2003-03-28 Bruno Haible <bruno@clisp.org>
7311 * copy-file.h: New file, from GNU gettext.
7312 * copy-file.c: New file, from GNU gettext.
7314 2003-03-18 Jim Meyering <jim@meyering.net>
7316 * quote.c (quote_n): Fix typo in comment.
7318 2003-03-14 Jim Meyering <jim@meyering.net>
7320 Merge changes from Coreutils.
7321 * obstack.h (obstack_object_size): Declare temporary, __o,
7322 to be const, in order to avoid warnings.
7323 (obstack_room): Likewise.
7324 (obstack_empty_p): Likewise.
7326 2003-03-13 Paul Eggert <eggert@twinsun.com>
7328 Merge changes from Bison.
7329 * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
7330 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
7331 when compiling Bison 1.875's `bitset bset = obstack_alloc
7332 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
7333 * hash.c: Include <stdbool.h> unconditionally.
7335 2003-03-09 Paul Eggert <eggert@twinsun.com>
7337 * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
7338 Reported by Bruce Becker; see:
7339 http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
7341 2003-03-03 Paul Eggert <eggert@twinsun.com>
7342 Bruno Haible <bruno@clisp.org>
7344 * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
7345 Reported by John Hughes, see
7346 http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
7348 2003-02-19 Paolo Bonzino <bonzini@gnu.org>
7350 * poll_.h: New file.
7353 2003-02-18 Paolo Bonzino <bonzini@gnu.org>
7355 * mathl.h: New file.
7356 * acosl.c: New file.
7357 * asinl.c: New file.
7358 * atanl.c: New file.
7359 * ceill.c: New file.
7362 * floorl.c: New file.
7363 * frexpl.c: New file.
7364 * ldexpl.c: New file.
7366 * sincosl.c: New file.
7368 * sqrtl.c: New file.
7370 * trigl.c: New file.
7371 * trigl.h: New file.
7373 2003-02-17 Bruno Haible <bruno@clisp.org>
7375 * mkdtemp.h: New file, from GNU gettext.
7376 * mkdtemp.c: New file, from GNU gettext.
7378 2003-01-31 Bruno Haible <bruno@clisp.org>
7380 * rename.c: #undef rename before defining rpl_rename.
7381 * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
7383 2003-01-30 Bruno Haible <bruno@clisp.org>
7385 * printf-args.h: New file, from GNU gettext.
7386 * printf-args.c: New file, from GNU gettext.
7387 * printf-parse.h: New file, from GNU gettext.
7388 * printf-parse.c: New file, from GNU gettext.
7389 * vasnprintf.h: New file, from GNU gettext.
7390 * vasnprintf.c: New file, from GNU gettext.
7391 * asnprintf.c: New file, from GNU gettext.
7392 * vasprintf.h: New file, from GNU gettext with modifications.
7393 * vasprintf.c: New file, from GNU gettext.
7394 * asprintf.c: New file, from GNU gettext.
7396 2003-01-29 Bruno Haible <bruno@clisp.org>
7398 * stpncpy.h: New file, from GNU gettext with modifications.
7399 * stpncpy.c: New file, from GNU gettext with modifications.
7401 2003-01-28 Bruno Haible <bruno@clisp.org>
7403 * c-ctype.h: New file, from GNU gettext, with changes suggested by
7405 * c-ctype.c: New file, from GNU gettext, with changes suggested by
7408 2003-01-27 Bruno Haible <bruno@clisp.org>
7410 * xsetenv.h: New file, from GNU gettext.
7411 * xsetenv.c: New file, from GNU gettext.
7413 2003-01-23 Bruno Haible <bruno@clisp.org>
7415 * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
7417 2003-01-22 Bruno Haible <bruno@clisp.org>
7419 * exit.h: New file, from GNU gettext.
7421 2003-01-11 Bruno Haible <bruno@clisp.org>
7423 * stpcpy.h (stpcpy): Use ANSI C function declarations.
7424 * strcase.h (strcasecmp, strncasecmp): Likewise.
7426 2003-01-14 Jim Meyering <jim@meyering.net>
7428 * same.c (same_name): Tweak a comment.
7430 2003-01-11 Bruno Haible <bruno@clisp.org>
7432 * same.c (same_name): Reorder tests so as to avoid calling stat()
7433 when a string comparison is sufficient.
7435 2003-01-11 Bruno Haible <bruno@clisp.org>
7437 * readtokens.c (readtoken): Cast character to 'unsigned char', not
7440 2003-01-11 Bruno Haible <bruno@clisp.org>
7442 * hash-pjw.c: Add comment about low quality of this function.
7444 2003-01-12 Paul Eggert <eggert@twinsun.com>
7446 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
7447 to avoid collisions with libcurses and libreadline.
7449 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
7450 * getstr.h, getstr.c: Remove.
7451 * getline.c: Include "getline.h", to check interface.
7452 Move body of old getstr.c here: this defines MIN_CHUNK and
7453 declares getdelim2, which is renamed from getstr.
7454 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
7456 * linebuffer.c (readlinebuffer): Renamed from readline.
7458 * linebuffer.h: Likewise.
7459 (readline): Remove backward-compatibility macro.
7461 2003-01-12 Jim Meyering <jim@meyering.net>
7463 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
7465 2003-01-10 Bruno Haible <bruno@clisp.org>
7467 * alloca_.h: New file.
7468 * getdate.y: Unconditionally include alloca.h.
7469 * makepath.c: Likewise.
7470 * setenv.c: Likewise.
7471 * userspec.c: Likewise.
7473 2003-01-09 Bruno Haible <bruno@clisp.org>
7475 * stdbool.h.in: New file.
7477 2003-01-08 Bruno Haible <bruno@clisp.org>
7479 * safe-read.c: Include specification header first, to ensure its
7481 * full-write.c: Likewise.
7483 2003-01-08 Jim Meyering <jim@meyering.net>
7485 * full-write.c: Undefine and define-away `const' after inclusion
7486 of errno.h, not before. Suggestion from Bruno Haible.
7488 2003-01-07 Jim Meyering <jim@meyering.net>
7490 * full-write.c: Rework so that it may serve to define full_read, too.
7491 * full-read.c: Simply #define FULL_READ and include full-write.c.
7493 2003-01-06 Jim Meyering <jim@meyering.net>
7495 * version-etc.c: Update year in translatable copyright string.
7497 2002-12-25 Bruno Haible <bruno@clisp.org>
7499 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
7500 * xstrtol.h: Likewise.
7501 * xstrtoimax.c: Likewise.
7502 * xstrtoumax.c: Likewise.
7503 * human.h: Likewise.
7505 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
7506 on systems that have <inttypes.h> but not <stdint.h>.
7508 2002-12-31 Paul Eggert <eggert@twinsun.com>
7510 * memcoll.c (memcoll): Fall back on a simple algorithm using
7511 memcmp if strcoll doesn't work.
7513 2002-12-23 Bruno Haible <bruno@clisp.org>
7515 * localcharset.h: New file.
7516 * localcharset.c: Include it.
7517 * unicodeio.c: Likewise.
7519 2002-12-22 Bruno Haible <bruno@clisp.org>
7521 * utime.c (utime_null): No need to call ftruncate if the file was
7524 2002-12-23 Bruno Haible <bruno@clisp.org>
7526 * memcoll.c (STRCOLL): New macro.
7529 2002-12-22 Bruno Haible <bruno@clisp.org>
7531 * getstr.h (getstr): Define, to avoid clash with libcurses.
7532 * linebuffer.h (readline): Define, to avoid clash with libreadline.
7534 2002-12-22 Bruno Haible <bruno@clisp.org>
7536 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
7538 2002-12-23 Bruno Haible <bruno@clisp.org>
7540 * getline.h: Include <stddef.h>, for size_t.
7542 * unicodeio.h: Include <stddef.h>, for size_t.
7543 * unicodeio.c: Don't include <stddef.h>.
7545 2002-12-17 Bruno Haible <bruno@clisp.org>
7547 * canon-host.c (strdup): Remove unused declaration.
7549 * fsusage.c: Include full_read.h.
7550 (get_fs_usage): Use full_read instead of safe_read.
7552 * utime.c (utime_null): Use SAFE_READ_ERROR.
7554 2002-12-11 Bruno Haible <bruno@clisp.org>
7556 * setenv.h: Rewritten to cope with systems that have setenv() but not
7558 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
7561 2002-12-11 Bruno Haible <bruno@clisp.org>
7563 * setenv.c (alloca): Fall back to malloc.
7565 (setenv): Use freea() to free memory allocated with alloca().
7567 2002-11-13 Bruno Haible <bruno@clisp.org>
7569 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
7570 function declarations.
7571 * unsetenv.c (unsetenv): Likewise.
7573 2002-03-04 Bruno Haible <bruno@clisp.org>
7575 Portability to AIX 4.3.3.
7576 * unsetenv.c: New file, extracted from setenv.c.
7577 * setenv.c: Move the unsetenv() function to unsetenv.c.
7579 2001-12-20 Bruno Haible <bruno@clisp.org>
7581 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
7582 use malloc instead. For SunOS 4.
7584 2001-12-11 Bruno Haible <bruno@clisp.org>
7586 * setenv.c: Declare alloca.
7587 (compar_fn_t): New typedef.
7588 (KNOWN_VALUE, STORE_VALUE): Use it.
7590 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
7593 2002-12-10 Paul Eggert <eggert@twinsun.com>
7595 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
7596 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
7597 Choose values that are less likely to collide with system fnmatch
7599 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
7600 defined (e.g., a pure POSIX system).
7601 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
7602 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
7604 2002-12-06 Jim Meyering <jim@meyering.net>
7606 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
7608 Merge in changes from libc's misc/error.c, in preparation
7609 for the merge of gnulib's changes back into libc.
7611 * error.c (_): Define only if not already defined.
7612 Move definition to follow all #include directives.
7613 Include unlocked-io.h only if !_LIBC.
7614 [_LIBC]: Include <libio/libioP.h>.
7615 [USE_IN_LIBIO]: Include <libio/iolibio.h>
7616 (fflush): Tweak definition to use INTUSE.
7619 2002-12-05 Paul Eggert <eggert@twinsun.com>
7621 * alloca.c [defined emacs]: Include "lisp.h".
7622 (xalloc_die) [defined emacs]: New macro.
7623 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
7624 [! defined emacs]: Include <xalloc.h>.
7625 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
7626 (pointer): Typedef to POINTER_TYPE *.
7627 (malloc): Remove decl; we now always use xmalloc.
7628 (alloca): Use old-style definition, since Emacs needs this.
7629 Check for arithmetic overflow when computing combined size.
7631 2002-12-04 Paul Eggert <eggert@twinsun.com>
7633 Do not generate unlocked-io.h automatically, since it's easier to
7634 maintain it by hand.
7636 * unlocked-io.h: New file, from GNU diffutils,
7637 but with proper copyright notice and attribution.
7639 * Makefile.am: Add copyright notice.
7640 (libfetish_a_SOURCES): Add unlocked-io.h.
7641 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
7642 (DISTCLEANFILES, io_functions): Remove macros.
7643 (EXTRA_DIST): Remove gen_uio.
7644 (unlocked-io.h): Remove rule.
7646 2002-12-04 Jim Meyering <jim@meyering.net>
7648 Reflect the fact that stat.c and lstat.c are no longer generated.
7649 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
7650 (DISTCLEANFILES): Likewise.
7651 (EXTRA_DIST): Likewise.
7652 (all_local): Don't depend on stat.c or lstat.c.
7653 (stat.c, lstat.c): Remove rules.
7654 (EXTRA_DIST): Remove xstat.in.
7656 * xstat.in: Remove file. Contents moved into stat.c.
7657 * stat.c: New file. Contents mostly from xstat.in.
7658 * stat.c: Rework so that it may serve to define rpl_lstat, too.
7659 * lstat.c: New file. Simply #define LSTAT and include stat.c.
7661 * safe-read.c: Rework so that it may serve to define safe_write, too.
7662 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
7664 2002-12-03 Jim Meyering <jim@meyering.net>
7666 * safe-read.c, safe-write.c: Change variable names and comments, but
7667 not semantics, to minimize the differences between these two files.
7668 (safe_read): Change comment to mention SAFE_READ_ERROR.
7670 * safe-read.c (IS_EINTR): Define.
7671 (safe_read): Use IS_EINTR in place of in-function cpp directives.
7673 2002-12-02 Bruno Haible <bruno@clisp.org>
7675 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
7676 Define, taken from safe-read.c.
7677 (INT_MAX): Provide fallback.
7678 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
7679 * safe-write.h (SAFE_WRITE_ERROR): Define.
7681 * safe-read.c (EINTR): Remove definition.
7682 (safe_read): Don't use EINTR if it is absent.
7684 2002-12-02 Jim Meyering <jim@meyering.net>
7686 * safe-read.c (EINTR): Define.
7687 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
7688 (INT_MAX): Provide fallback.
7689 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
7691 * safe-read.h (SAFE_READ_ERROR): Define.
7693 2002-12-01 Jim Meyering <jim@meyering.net>
7695 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
7696 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
7698 2002-11-27 Paul Eggert <eggert@twinsun.com>
7700 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
7701 hash_rehash): Replace `if (limit <= value) abort ();' with
7702 `if (! (value < limit)) abort ();', for readability.
7704 2002-11-26 <karl@gnu.org>
7706 * strdup.c: copy from libc again, with jim's ok.
7707 * .cppi-disable: re-add strdup.c
7709 2002-11-25 <karl@gnu.org>
7711 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
7712 instead of "strtol.c".
7714 2002-11-25 Jim Meyering <jim@meyering.net>
7716 * mktime.c: Sync from libc, now that it has the latest fix.
7718 2002-11-24 <karl@gnu.org>
7720 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
7721 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
7723 2002-11-24 Jim Meyering <jim@meyering.net>
7725 Update from coreutils:
7727 * mktime.c: Merge in changes from libc.
7729 Avoid a link-time failure on some Linux systems.
7730 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
7731 (__mon_yday): Declare with the STATIC attribute.
7732 (__mktime_internal): Likewise.
7733 Based on a report from Greg Schafer.
7735 2002-11-23 Jim Meyering <jim@meyering.net>
7737 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
7738 Use `unsigned', not `int', as type of index.
7740 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
7742 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
7744 2002-11-22 Paul Eggert <eggert@twinsun.com>
7746 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
7747 hint that one should use `if (! x) abort ();' rather than `assert
7748 (x);', and anyway it's one less thing to worry about configuring.
7749 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
7750 hash_rehash, hash_insert): Use abort rather than assert.
7752 2002-11-22 Paul Eggert <eggert@twinsun.com>
7754 * quotearg.h: Allow multiple inclusion by surrounding with
7755 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
7756 so that we can be included first.
7757 (PARAMS): Remove; we now assume C89 or later. All uses removed.
7758 * quotearg.c: Include quotearg.h immediately after config.h.
7759 No need to include stddef.h or sys/types.h any more.
7760 Surround local include files with "", not "<>".
7761 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
7762 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
7763 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
7764 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7765 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7766 (ISPRINT): Remove; no longer needed now that we assume C89.
7768 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
7771 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
7772 quotearg_char): Use SIZE_MAX rather than
7773 (size_t) -1 when we are talking about "infinity".
7775 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
7777 2002-11-22 Bruno Haible <bruno@clisp.org>
7779 * safe-read.h: Assume C89. Add comments.
7780 (safe_read): Change return type to size_t.
7781 * safe-read.c (safe_read): Change return type to size_t. Handle byte
7782 counts > SSIZE_MAX correctly.
7783 * safe-write.h: New file.
7784 * safe-write.c: New file.
7785 * full-read.h: New file.
7786 * full-read.c: New file.
7787 * full-write.h: Assume C89. Add comments.
7788 * full-write.c: Include safe-write.h.
7789 (full_write): Rewritten to use safe_write.
7790 Suggested by Jim Meyering and Paul Eggert.
7792 2002-11-21 Bruno Haible <bruno@clisp.org>
7794 Remove case insensitive option matching.
7795 * argmatch.h (argcasematch): Remove declaration.
7796 (ARGCASEMATCH): Remove macro.
7797 (__xargmatch_internal): Remove case_sensitive argument.
7798 (XARGMATCH): Update.
7799 (XARGCASEMATCH): Remove macro.
7800 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
7801 case_sensitive argument.
7802 (argcasematch): Remove function.
7803 (__xargmatch_internal): Remove case_sensitive argument.
7804 (main): Use XARGMATCH instead of XARGCASEMATCH.
7806 * xmalloc.c: Change compile-time error message. Add comment about
7807 required autoconf version.
7809 2002-11-21 Jim Meyering <jim@meyering.net>
7811 * strdup.c (strdup): Tweak comment and initial #if/#include.
7813 Merge in changes from the coreutils.
7815 2002-09-25 Paul Eggert <eggert@twinsun.com>
7816 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
7817 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
7818 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
7819 int. Work more efficiently if X is the same width as uintmax_t.
7820 Do not compare X to -1, to avoid bogus compiler warning.
7821 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
7822 Don't assume that f_frsize and f_bsize are the same type.
7824 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
7827 * makepath.c (make_path): Restore umask *before* creating the final
7829 (make_path): Minor reformatting.
7831 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
7832 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
7834 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
7835 ones. At least on GNU/Linux systems, `auto' means something else.
7838 2002-11-20 Paul Eggert <eggert@twinsun.com>
7840 Merge argmatch cleanups from Bison. Assume C89.
7842 * argmatch.c: Include config.h here, not in argmatch.h.
7843 Include stdlib.h, for EXIT_FAILURE.
7844 Always include <string.h>, since we assume C89.
7845 (EXIT_FAILURE): Remove pre-C89 bug workaround.
7846 * argmatch.h: Do not include <config.h> or <sys/types.h>.
7847 Include <stddef.h> instead, since it's all we need for size_t.
7848 (PARAMS): Remove. All uses removed.
7849 (ARRAY_CARDINALITY): Do not bother to #undef.
7850 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
7851 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
7852 Remove unnecessary parentheses.
7853 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
7854 Insert necessary parentheses.
7855 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
7856 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
7858 2002-11-19 Bruno Haible <bruno@clisp.org>
7860 * mbswidth.c: Include mbswidth.h right at the beginning.
7861 * mbswidth.h: Include <stddef.h>, for size_t.
7863 * mbswidth.h (PARAMS): Remove macro.
7864 (mbswidth, mbsnwidth): Use ANSI C function declarations.
7865 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
7867 * gcd.h (PARAMS): Remove macro.
7868 (gcd): Use ANSI C function declarations.
7869 * gcd.c (gcd): Likewise.
7871 2002-11-15 Bruno Haible <bruno@clisp.org>
7873 * strcspn.c: Include <stddef.h>.
7874 (strcspn): Use ANSI C function declaration. Change return type to
7876 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
7877 (strpbrk): Use NULL.
7878 * strpbrk.h (PARAMS): Remove macro.
7879 (strpbrk): Use ANSI C function declaration.
7880 * strstr.c: Don't include <sys/types.h>.
7881 * strstr.h (PARAMS): Remove macro.
7882 (strstr): Use ANSI C function declarations.
7884 2002-11-06 Bruno Haible <bruno@clisp.org>
7886 * gcd.h (gcd): Change argument type to 'unsigned long'.
7887 * gcd.c (gcd): Likewise.
7889 2002-11-05 Bruno Haible <bruno@clisp.org>
7891 * gcd.h: New file, from gettext-0.11.5.
7892 * gcd.c: New file, from gettext-0.11.5.
7894 2002-11-05 Bruno Haible <bruno@clisp.org>
7896 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
7897 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
7898 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
7899 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
7901 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
7902 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
7904 * closeout.c: Include gettext.h instead of <libintl.h>.
7905 * human.c: Include gettext.h instead of <libintl.h>.
7906 * quotearg.c: Include gettext.h instead of <libintl.h>.
7907 * rpmatch.c: Include gettext.h instead of <libintl.h>.
7908 * unicodeio.c: Include gettext.h instead of <libintl.h>.
7909 * userspec.c: Include gettext.h instead of <libintl.h>.
7910 * version-etc.c: Include gettext.h instead of <libintl.h>.
7911 * xmalloc.c: Include gettext.h instead of <libintl.h>.
7912 (textdomain): Remove definition.
7913 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
7915 * long-options.c: Remove include of <libintl.h> and definition of _.
7916 * same.c: Remove include of <libintl.h> and definition of _.
7918 2002-11-04 Bruno Haible <bruno@clisp.org>
7920 * stpcpy.h: New file, from GNU gettext-0.11.5.
7921 * strcase.h: New file, from GNU gettext-0.11.5.
7922 * strpbrk.h: New file, from GNU gettext-0.11.5.
7923 * strstr.h: New file, from GNU gettext-0.11.5.
7924 * xgetcwd.h: New file, from GNU gettext-0.11.5.
7926 2002-05-09 Bruno Haible <bruno@clisp.org>
7928 * config.charset: Update for newest glibc. Add canonical names
7929 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
7931 2002-05-09 Bruno Haible <bruno@clisp.org>
7933 * localcharset.c (get_charset_aliases): Add more Windows specific
7936 2002-05-08 Owen Taylor <otaylor@redhat.com>
7938 * config.charset: A few additions for Solaris.
7940 2001-12-05 Bruno Haible <bruno@clisp.org>
7942 * localcharset.c (locale_charset): Don't return an empty string.
7944 2001-10-23 Bruno Haible <haible@clisp.cons.org>
7946 * config.charset: msdos in uk_UA uses CP1125.
7948 2001-08-05 Bruno Haible <haible@clisp.cons.org>
7950 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
7951 * localcharset.c (locale_charset): Declare as extern "C".
7953 2002-02-15 Bruno Haible <bruno@clisp.org>
7955 * config.charset [msdosdjgpp]: For Russian, use CP866.
7957 2002-02-11 Bruno Haible <bruno@clisp.org>
7959 * config.charset: Add support for NetBSD.
7961 2002-09-25 <karl@gnu.org>
7963 * strdup.c: copy from libc/string (via ../config/srclist*).
7964 * getopt*: copy from libc/posix.
7965 * gettext.h: copy from gettext.
7966 * .cppi-disable: add strdup.c, gettext.h.
7968 2002-07-01 Jim Meyering <meyering@lucent.com>
7970 * c-stack.c: Include sys/time.h.
7971 From Volker Borchert.
7973 2002-06-11 Paul Eggert <eggert@twinsun.com>
7975 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
7976 New macro. Use it uniformly instead of
7977 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
7978 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
7979 reported by Vin Shelton.
7981 2002-06-22 Jim Meyering <meyering@lucent.com>
7983 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
7984 redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
7986 2002-06-22 Paul Eggert <eggert@twinsun.com>
7988 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
7989 Do not assume SA_SIGINFO behavior.
7990 Bug reported by Jim Meyering on NetBSD 1.5.2.
7992 2002-06-22 Jim Meyering <meyering@lucent.com>
7994 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
7996 * exitfail.c, exitfail.h: Likewise.
7997 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
7999 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
8001 (EXTRA_DIST): Add fnmatch_loop.c.
8002 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
8004 * fnmatch_loop.c: New file, from diffutils-2.8.2.
8005 * fnmatch.c: Update from diffutils-2.8.2.
8006 * fnmatch_.h: New file. From diffutils-2.8.2.
8007 * fnmatch.h: Remove file.
8009 2002-06-18 Paul Eggert <eggert@twinsun.com>
8011 * file-type.h: Report an error if neither S_ISREG nor
8012 S_IFREG is defined, instead of using a test specific to glibc
8013 2.2. This should be safe, since POSIX requires S_ISREG and
8014 Unix Version 7 had S_IFREG. We don't need to check for
8015 <sys/types.h> since we don't use any symbols that it defines.
8017 2002-06-15 Jim Meyering <meyering@lucent.com>
8019 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
8020 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
8021 have been included before this file.
8023 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
8025 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
8026 so that each temporary file name is unique and valid in the first
8027 8 characters, for operation under DOS.
8029 2002-06-15 Jim Meyering <meyering@lucent.com>
8031 Work even with DJGPP 2.03, which lacks support for symlinks.
8033 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
8035 * lchown.c (S_ISLNK): Likewise.
8037 2002-06-14 Jim Meyering <meyering@lucent.com>
8039 * file-type.h: Use the version from diffutils-2.8.2.
8040 * file-type.c: Likewise.
8042 2002-05-27 Jim Meyering <meyering@lucent.com>
8044 Fix a problem seen only on nonconforming systems whereby ls.c's
8045 use of localtime, and then of gettimeofday would cause trouble:
8046 the localtime call used to initialize rpl_gettimeofday's save
8047 mechanism would clobber ls's current local time information so
8048 that in any long listing the first file would always be listed
8049 with date 1970-01-01. Analysis by Volker Borchert.
8051 * gettimeofday.c (localtime): Undefine.
8052 (rpl_localtime): New function.
8054 2002-05-22 Jim Meyering <meyering@lucent.com>
8056 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
8057 * file-type.h: New file.
8058 * file-type.c (file_type): New file/function. Extracted from diffutils.
8060 2002-04-29 Paul Eggert <eggert@twinsun.com>
8062 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
8064 2002-04-28 Paul Eggert <eggert@twinsun.com>
8066 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
8067 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
8068 of 127, since 64 is the largest conceivable number for ancient
8070 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
8072 2002-04-28 Jim Meyering <meyering@lucent.com>
8074 * sig2str.c (WTERMSIG): Remove definition (unused).
8076 2002-04-28 Paul Eggert <eggert@twinsun.com>
8078 * sig2str.h, sig2str.c: New files.
8079 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
8081 2002-04-24 Jim Meyering <meyering@lucent.com>
8083 * gettext.h: New file, from Gettext.
8084 * Makefile.am (INCLUDES): Remove -I../intl.
8085 (libfetish_a_SOURCES): Add gettext.h.
8087 2002-04-16 Jim Meyering <meyering@lucent.com>
8089 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
8090 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
8091 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
8093 2002-04-12 Jim Meyering <meyering@lucent.com>
8095 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
8097 2002-03-10 Jim Meyering <meyering@lucent.com>
8099 * makepath.c (make_path): Remove a comma from a diagnostic.
8100 Suggestion from Santiago Vila.
8102 2002-03-08 Jim Meyering <meyering@lucent.com>
8104 * rename.c: Mention that this wrapper is needed also on
8105 mips-dec-ultrix4.4 systems.
8107 2002-03-02 Jim Meyering <meyering@lucent.com>
8109 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
8110 not HAVE_CLOCK_SETTIME.
8112 2002-02-27 Paul Eggert <eggert@twinsun.com>
8114 * nanosleep.h: Rename to....
8115 * timespec.h: New name for nanosleep.h. All uses changed.
8117 * gettime.c: New file.
8118 * settime.c: New file.
8121 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
8122 timespec.h. Remove nanosleep.h.
8124 2002-02-25 Paul Eggert <eggert@twinsun.com>
8126 * acl.c, acl.h: New files.
8127 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
8129 2002-02-24 Jim Meyering <meyering@lucent.com>
8131 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
8132 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
8133 cause trouble. Reported by Nelson Beebe.
8135 2002-02-23 Paul Eggert <eggert@twinsun.com>
8137 * path-concat.c (xpath_concat): Reorder code to pacify
8138 compilers that don't know that xalloc_die never returns.
8140 2002-02-20 Jim Meyering <meyering@lucent.com>
8142 * getdate.c: Regenerate using bison-1.33.
8144 2002-02-15 Paul Eggert <eggert@twinsun.com>
8146 * posixver.c, posixver.h: New files.
8147 * Makefile.am (libfetish_a_SOURCES): Add them.
8149 2002-02-02 Paul Eggert <eggert@twinsun.com>
8150 Bruno Haible <bruno@clisp.org>
8152 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
8153 (fwrite_success_callback): New declaration.
8154 * unicodeio.c (unicode_to_mb): New function, extracted from
8155 print_unicode_char. Call failure callback instead of error.
8156 (fwrite_success_callback): New function.
8157 (exit_failure_callback): New function.
8158 (fallback_failure_callback): New function.
8159 (print_unicode_char): Call unicode_to_mb.
8161 2002-01-26 Jim Meyering <meyering@lucent.com>
8163 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
8165 2002-01-22 Jim Meyering <meyering@lucent.com>
8167 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
8168 Otherwise, some versions of automake would omit the rule that makes
8169 Makefile from Makefile.in.
8171 2001-01-21 Paul Eggert <eggert@twinsun.com>
8173 * xmemcoll.h, xmemcoll.c: New files.
8174 * Makefile.am (libfetish_a_SOURCES): Add them.
8175 * memcoll.c: Include errno.h, and declare errno if not defined.
8176 (memcoll): Set errno to zero if there is no error.
8178 * quotearg.c (quotearg_buffer_restyled):
8179 Fix bug with quoting buffers containing NUL when backslashing escapes.
8180 This bug was exposed by the other changes in this patch.
8181 (quotearg_n_options): New arg ARGSIZE.
8182 All callers changed.
8183 (quoting_options_from_style): New function.
8184 (quotearg_n_style): Use it.
8185 (quotearg_n_style_mem): New function.
8187 * quotearg.h (quotearg_n_style_mem): New function.
8189 2002-01-16 Jim Meyering <meyering@lucent.com>
8191 * getdate.y: Add three semicolons, each just before a closing brace.
8192 Bison (as of version 1.31) no longer papers over that mistake.
8194 2002-02-14 Paul Eggert <eggert@twinsun.com>
8196 * backupfile.c (ISDIGIT): Comment fix.
8197 * getdate.y (ISDIGIT): Likewise.
8198 * posixtm.c (ISDIGIT, year): Likewise.
8199 * strverscmp.c (ISDIGIT): Likewise.
8200 * userspec.c (ISDIGIT): Likewise.
8202 2002-01-05 Jim Meyering <meyering@lucent.com>
8204 * version-etc.c (version_etc_copyright): Update copyright year.
8206 2001-01-19 Paul Eggert <eggert@twinsun.com>
8208 * closeout.c (close_stdout_status): If ferror (stdout), do
8209 not silently exit merely because the output buffer happens to
8210 have nothing pending.
8212 2001-12-18 Paul Eggert <eggert@twinsun.com>
8214 See the big note in ../ChangeLog.
8215 * human.c (suffixes): Prefer K to k for 1024.
8216 (generate_suffix_backwards): New function.
8217 (human_readable_inexact): Use it.
8218 * xstrtol.c (__xstrtol): If there is no number but there
8219 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
8220 Accept 'K' as well as 'k'.
8222 2001-12-15 Jim Meyering <meyering@lucent.com>
8224 * regex.h (__restrict_arr): Update from libc.
8226 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
8227 as `remote' if the name starts with `//'. Suggested by Michael Stone.
8230 2001-12-10 Jim Meyering <meyering@lucent.com>
8232 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
8233 Instead, include "xalloc.h".
8234 (initbuffer): Don't cast xmalloc return value to char*.
8235 (readline): Reword comment.
8236 Don't cast xrealloc return value to char*
8239 2001-12-09 Jim Meyering <meyering@lucent.com>
8241 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
8242 `signed and unsigned type in conditional expression'.
8243 * posixtm.c (posix_time_parse): Likewise.
8245 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
8247 * readtokens.c (readtoken): Declare an index to be of type unsigned
8248 to avoid a pedantic warning.
8250 * getstr.c: Don't include assert.h.
8251 (getstr): Remove warning-evoking assertions.
8252 Return -1 if offset parameter is out of bounds.
8253 Change the type of a local from int to size_t.
8255 * strftime.c (my_strftime_localtime_r): Include this function
8256 definition in the `#if ! HAVE_TM_GMTOFF' block.
8258 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
8259 Include xalloc.h instead.
8261 2001-12-02 Jim Meyering <meyering@lucent.com>
8263 * tempname.c: Don't declare getenv, thus reverting the change of
8264 2001-11-18. It's no longer necessary, now that stdlib.h is always
8267 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
8268 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
8270 2001-11-30 Akim Demaille <akim@epita.fr>
8272 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
8273 before being defined.
8275 2001-11-27 Paul Eggert <eggert@twinsun.com>
8277 * quotearg.h (quotearg_n, quotearg_n_style):
8278 First arg is int, not unsigned.
8279 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
8280 (SIZE_MAX, UINT_MAX): New macros.
8281 (quotearg_n_options): Abort if N is negative.
8282 Avoid overflow check on hosts where size_t is 64 bits and int
8283 is 32 bits, as overflow is impossible there.
8284 Fix off-by-one typo that caused unnecessary reallocation.
8286 2001-11-27 Jim Meyering <meyering@lucent.com>
8288 * tempname.c: Merge with version from libc.
8289 * regex.c: Likewise.
8291 * tempname.c: Include stdlib.h unconditionally. On some old systems
8292 for which STDC_HEADERS is 0, it was not included, resulting in a
8293 warning about an integer-to-pointer conversion problem with getenv.
8294 Reported by Volker Borchert.
8296 2001-11-26 Jim Meyering <meyering@lucent.com>
8298 * gtod.h: Remove file.
8299 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
8300 * gettimeofday.c: Don't include gtod.h.
8301 (GTOD_init): Remove function.
8302 (rpl_gettimeofday): Do its job here instead, rather than aborting.
8303 Suggestion from Volker Borchert.
8305 2001-11-23 Jim Meyering <meyering@lucent.com>
8307 * hash.h (struct hash_table): Don't define here. Merely declare it.
8308 * hash.c (struct hash_table): Define it here instead.
8310 2001-11-22 Jim Meyering <meyering@lucent.com>
8312 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
8314 2001-11-18 Paul Eggert <eggert@twinsun.com>
8316 * tempname.c (TMP_MAX): Remove; no longer needed.
8317 (TEMPORARIES): New macro.
8318 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
8319 removes an artificial limitation (e.g. HP-UX 10.20, where
8322 2001-11-18 Jim Meyering <meyering@lucent.com>
8324 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
8327 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
8328 files will be created before anything else.
8330 2001-11-17 Jim Meyering <meyering@lucent.com>
8332 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
8333 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
8334 rather than group writable. Patch by Juan F. Codagnone.
8336 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
8337 Instead, include "xalloc.h".
8339 * mountlist.c: Include unlocked-io.h after all system headers.
8340 Remove explicit declarations of xmalloc, xrealloc,
8341 and xstrdup. Instead, include "xalloc.h".
8343 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
8344 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
8345 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
8347 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
8348 Reported by Padraig Brady.
8350 * mkstemp.c: #undef mkstemp.
8352 (rpl_mkstemp): Rename from mkstemp.
8355 2001-11-16 Jim Meyering <meyering@lucent.com>
8357 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
8358 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
8359 determine the amount of total physical memory, use pstat_getstatic.
8360 HPUX-11 doesn't define _SC_PHYS_PAGES.
8361 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
8362 If sysconf couldn't be used to determine the amount of available
8363 physical memory, use both pstat_getstatic and pstat_getdynamic.
8364 Based on a patch from Bob Proulx.
8366 2001-11-05 Jim Meyering <meyering@lucent.com>
8368 * xstat.in (slash_aware_lstat): Correct a misleading comment.
8370 2001-11-03 Jim Meyering <meyering@lucent.com>
8372 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
8373 in argmatch_to_argument call.
8375 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
8378 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
8379 e.g., a fault due to an attempt to free a NULL pointer.
8381 2001-11-01 Jim Meyering <meyering@lucent.com>
8383 * dirfd.c, dirfd.h: New files.
8384 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
8386 * hash.c (hash_print) [TESTING]: Clean up.
8388 2001-10-22 Paul Eggert <eggert@twinsun.com>
8390 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
8391 to avoid a warning if -Wall.
8393 2001-10-21 Paul Eggert <eggert@twinsun.com>
8395 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
8397 2001-10-21 Jim Meyering <meyering@lucent.com>
8399 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
8400 this code would end up calling gettext even in packages built
8402 * getopt.c (_): Likewise.
8403 * regex.c (_): Likewise.
8405 2001-10-20 Paul Eggert <eggert@twinsun.com>
8407 * error.c (strerror_r): Do not declare unless !_LIBC.
8408 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
8409 Use strerror_r that is only a macro, even if it is not a function.
8410 (strerror): Check for HAVE_DECL_STRERROR before declaring.
8411 (private_strerror): Use prototypes, not old-style function definition.
8412 (print_errno_message): New function.
8413 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
8415 (error_tail, error, error_at_line): Use it.
8417 2001-10-11 Jim Meyering <meyering@lucent.com>
8419 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
8420 and quote_n (1, ... to avoid clobbering a buffer.
8422 2001-10-05 Jim Meyering <meyering@lucent.com>
8424 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
8425 * hash-pjw.c: New file (factored out of fileutils' remove.c).
8426 * hash-pjw.h: New file.
8428 2001-09-30 Jim Meyering <meyering@lucent.com>
8430 * mountlist.c [MOUNTED_GETFSSTAT]:
8431 Include <sys/ucred.h>, for Apple Darwin.
8432 Include sys/mount.h and sys/fs_types.h only if available.
8434 (read_filesystem_list): Use FS_TYPE.
8436 2001-09-29 Paul Eggert <eggert@twinsun.com>
8438 * exclude.c (excluded_filename): 0 -> false, since it's
8441 2001-09-28 Paul Eggert <eggert@twinsun.com>
8443 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
8444 #defines strtoimax. Also treat the other strto* functions
8447 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
8448 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
8449 (strtoimax, strtoumax): Do not declare if already defined as a macro.
8451 2001-09-26 Jim Meyering <meyering@lucent.com>
8453 Most macros in unlocked-io.h had the wrong number of arguments.
8454 * gen-uio: New script.
8455 (USE_UNLOCKED_IO): Define to 1 if not already defined.
8456 * unlocked-io.hin: Remove file.
8457 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
8458 rather than trying to embed it here.
8459 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
8460 Reported by Padraig Brady.
8462 2001-09-25 Volker Borchert <bt@teknon.de>
8464 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
8466 2001-09-23 Jim Meyering <meyering@lucent.com>
8468 * mountlist.c: Remove useless parentheses in #if directives.
8469 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
8470 the deprecated MOUNTED symbol is no longer defined in mntent.h.
8472 2001-09-22 Jim Meyering <meyering@lucent.com>
8474 * localcharset.c: Update from latest gettext.
8475 * config.charset: Likewise.
8477 2001-09-20 Jim Meyering <meyering@lucent.com>
8479 * xstrtol.c (strtoimax): Guard declaration with
8480 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
8481 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
8482 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
8483 (strtoumax): Likewise, for completeness (it wasn't necessary).
8485 2001-09-06 Paul Eggert <eggert@twinsun.com>
8487 * strtoimax.c (HAVE_LONG_LONG):
8488 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
8489 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
8490 to work around bug in IBM C compiler.
8492 2001-09-16 Jim Meyering <meyering@lucent.com>
8494 * mkdir.c: New file.
8496 2001-09-04 Paul Eggert <eggert@twinsun.com>
8498 * xgetcwd.c: Revert some of the previous change; intead,
8499 fix the HAVE_GETCWD_NULL code to behave more like the
8500 !HAVE_GETCWD_NULL code used to.
8503 (xgetcwd): Do not return NULL when memory is exhausted; instead,
8506 2001-09-04 Paul Eggert <eggert@twinsun.com>
8508 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
8509 Use ssize_t, not int, to store result of readlink.
8510 Check for ssize_t overflow as well as size_t overflow,
8511 as POSIX says the result of readlink is implementation-defined
8512 when ssize_t overflows.
8513 Remove unnecessary cast to char*.
8514 Use free+malloc instead of realloc, as the storage doesn't need
8515 to be preserved and it's clearer and can be more efficient that way.
8516 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
8517 * xreadlink.h (xreadlink): Update prototype.
8519 2001-09-03 Paul Eggert <eggert@twinsun.com>
8521 * exclude.c (fnmatch_no_wildcards): Fix confusion between
8522 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
8523 spotted by Jim Meyering.
8525 2001-09-03 Jim Meyering <meyering@lucent.com>
8527 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
8529 2001-09-03 Paul Eggert <eggert@twinsun.com>
8531 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
8532 like the HAVE_GETCWD_NULL code.
8533 Include pathmax.h if not HAVE_GETCWD.
8534 Do not include xalloc.h.
8535 (INITIAL_BUFFER_SIZE): New symbol.
8536 Do not use xmalloc / xrealloc, since the caller is responsible for
8537 handling errors. Preserve errno around `free' during failure.
8538 Do not overrun buffer when using getwd.
8540 2001-09-03 Paul Eggert <eggert@twinsun.com>
8542 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
8543 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
8545 2001-09-02 Jim Meyering <meyering@lucent.com>
8547 * error.c: Update from GNU libc.
8549 2001-09-01 Jim Meyering <meyering@lucent.com>
8551 * xreadlink.c: New file.
8552 * xreadlink.h: New file.
8553 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
8555 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
8556 doesn't conflict with sparc Solaris 7's definition in
8557 /usr/include/sys/int_types.h.
8559 * exclude.c: Use `""', not `<>' to #include non-system header files.
8560 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
8561 and strncasecmp as r-values. Unixware didn't have declarations.
8563 2001-08-31 Jim Meyering <meyering@lucent.com>
8565 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
8566 Use an initial, malloc'd, buffer of length 128 rather than
8567 a statically allocated one of length 1024.
8569 2001-08-30 Paul Eggert <eggert@twinsun.com>
8571 * xgetcwd.c: Don't include pathmax.h.
8572 Include stdlib.h and unistd.h if available.
8574 (xmalloc, xstrdup, free): Remove decls.
8575 (xgetcwd): Don't assume sizes fit in unsigned.
8576 Check for overflow when computing sizes.
8577 Simplify reallocation code.
8579 2001-08-28 Paul Eggert <eggert@twinsun.com>
8581 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
8583 * strtoimax.c: Renamed from strtoxmax.c, removing the
8586 Also, make the following further changes to make this file's
8587 configuration more similar to that of strtol.c:
8588 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
8589 (strtoumax, uintmax_t, strtoull, strtol): Remove.
8590 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
8591 (strtoimax): Renamed from strtoumax. All uses of unsigned values
8592 changed to signed values.
8594 And make the following changes as well:
8595 Fix copyright notice, as 1999 was missing.
8596 (verify): New macro.
8597 (strtoimax): Check sizes at compile-time, not run-time.
8598 Prefer strtol to strtoll if both work.
8599 (main): Remove; it was not that useful and was a pain to maintain.
8601 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
8603 2001-08-30 Paul Eggert <eggert@twinsun.com>
8605 * savedir.c (savedir): Remove size parameter, as POSIX says that
8606 a directory's st_size can have an arbitrary value, so the old
8607 usage could waste an arbitrary amount of memory. All uses
8609 * savedir.h: Update prototype.
8611 2001-08-30 Paul Eggert <eggert@twinsun.com>
8613 * xstrtol.c (strtoimax): New decl.
8615 2001-08-28 Paul Eggert <eggert@twinsun.com>
8617 * xstrtol.h: Add copyright notice.
8618 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
8619 LONGINT_INVALID_SUFFIX_CHAR.
8621 2001-08-30 Paul Eggert <eggert@twinsun.com>
8623 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8626 2001-08-30 Paul Eggert <eggert@twinsun.com>
8628 * hash.c: Remove '2001' from copyright notice.
8630 2001-08-30 Paul Eggert <eggert@twinsun.com>
8632 * full-write.h: New file.
8633 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
8634 * full-write.c: Correct credits, as cccp.c no longer
8635 exists and anyway it was so heavily changed from the old cccp
8636 code as to be unrecognizable. Include full-write.h.
8637 (full_write) Return size_t, with short writes meaning failure.
8638 All callers changed. This fixes a bug with large buffers
8640 * utime.c: Include full-write.h.
8642 2001-08-30 Paul Eggert <eggert@twinsun.com>
8644 Merge 'exclude' changes from tar 1.13.22.
8645 This fixes one or two unlikely storage allocation overflow bugs,
8646 but doesn't change user-visible behavior otherwise.
8648 2001-08-30 Paul Eggert <eggert@twinsun.com>
8650 * exclude.c (bool): Declare, perhaps by including stdbool.h.
8651 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
8652 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
8653 Include if available.
8654 (<xalloc.h>): Include
8655 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
8656 (verify): New macro. Use it to verify that EXCLUDE macros do not
8657 collide with FNM macros.
8658 (struct patopts): New struct.
8659 (struct exclude): Use it, as exclude patterns now come with options.
8660 (new_exclude): Support above changes.
8661 (new_exclude, add_exclude_file):
8662 Initial size must now be a power of two to simplify overflow checking.
8663 (free_exclude, fnmatch_no_wildcards): New function.
8664 (excluded_filename): No longer requires options arg, as the options
8665 are determined by add_exclude. Now returns bool, not int.
8666 (excluded_filename, add_exclude):
8667 Add support for the fancy new exclusion options.
8668 (add_exclude, add_exclude_file): Now takes int options arg.
8669 Check for arithmetic overflow when computing sizes.
8670 (add_exclude_file): xrealloc might modify errno, so don't
8671 realloc until after errno might be used.
8673 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
8675 (free_exclude): New decl.
8676 (add_exclude, add_exclude_file): Now takes int options arg.
8677 (excluded_filename): No longer requires options arg, as the options
8678 are determined by add_exclude. Now returns bool, not int.
8680 2001-08-30 Paul Eggert <eggert@twinsun.com>
8682 * alloca.c (alloca): Arg is of type size_t, not unsigned.
8684 2001-08-27 Jim Meyering <meyering@lucent.com>
8686 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
8688 * version-etc.c (N_): Remove definition.
8689 Revert most of last change.
8690 Instead, simply don't mark the `Copyright...' string for translation.
8691 Based on advice from Paul Eggert.
8693 * strtoxmax.c: Tweak comment.
8695 2001-08-26 Jim Meyering <meyering@lucent.com>
8697 * version-etc.c (version_etc_copyright_fmt): Replace literal year
8698 of copyright with `%s' so translators don't get an untranslated
8700 (COPYRIGHT_YEAR): Define.
8701 (version_etc): Use fprintf rather than fputs.
8702 Suggestion from Ulrich Drepper.
8704 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
8706 * strtoll.c: New file, from GNU libc.
8707 * xstrtoimax.c: New file.
8709 * xstrtol.h: Add xstrtoimax.
8710 * strtoumax.c: New file. Simply include "strtoumax.c".
8711 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
8713 * strtoumax.c: Factor to work both for unsigned and signed types, ...
8714 * strtoxmax.c: ... then renamed to this.
8716 2001-08-13 Paul Eggert <eggert@twinsun.com>
8718 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
8719 Port to Solaris 8, where 'sed' requires a space after the 'r'
8720 command, and where sh dislikes "$/". Clean up the spacing a bit.
8721 Redirect output to $tmp just once.
8723 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
8725 * addext.c (<errno.h>): Include.
8726 (errno): Declare if not defined.
8727 (addext): Work correctly when pathconf returns -1 and leaves
8728 errno alone because there is no limit. Also, work even if
8729 pathconf returns a value greater than SIZE_MAX.
8731 2001-08-12 Jim Meyering <meyering@lucent.com>
8733 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
8734 Simply `return getcwd (NULL, 0);'.
8735 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
8736 Use 1300 as initial value for length, not PATH_MAX.
8738 * pathmax.h: Clean up cpp syntax.
8740 2001-08-12 Jim Meyering <meyering@lucent.com>
8742 * gettimeofday.c: New file.
8744 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
8746 2001-08-04 Jim Meyering <meyering@lucent.com>
8748 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
8749 to get in sync with glibc.
8751 2001-08-03 Paul Eggert <eggert@twinsun.com>
8753 The following changes are from gettext 0.10.39 as maintained by
8756 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
8757 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
8758 with inverted sense. All uses changed.
8760 * mbswidth.c: Don't include <limits.h>.
8761 Include <stdlib.h> and <string.h> unconditionally.
8762 (iswcntrl, mbsinit, ISCNTRL): New macros.
8763 (mbsnwidth): Use K&R style function declarations.
8764 Don't bother checking for MB_LEN_MAX == 1, since the compiler
8765 can optimize it when MB_CUR_MAX == 1.
8766 The width of control characters is zero, not 1.
8768 2001-07-15 Jim Meyering <meyering@lucent.com>
8770 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
8771 (BUILT_SOURCES): Add unlocked-io.h.
8772 (io_functions): Define.
8773 (unlocked-io.h): New rule.
8774 (DISTCLEANFILES): Add unlocked-io.h.
8775 (all-local): Depend on unlocked-io.h, to ensure it is created.
8777 * unlocked-io.hin: New file
8779 * regex.c: Update from glibc.
8781 2001-07-05 Jim Meyering <meyering@lucent.com>
8783 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
8785 (libfetish_a_SOURCES): Put all .h files here instead.
8786 Remove a thus-exposed (better checks in automake) duplicate and
8787 two unnecessary .h files.
8789 2001-06-11 Jim Meyering <meyering@lucent.com>
8791 * regex.c: Update from GNU libc.
8793 2001-05-27 Jim Meyering <meyering@lucent.com>
8795 * readutmp.h (UT_TYPE): Define.
8797 2001-05-24 Jim Meyering <meyering@lucent.com>
8799 * argmatch.c: Include "quote.h".
8800 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
8801 quote function. Reported by Göran Uddeborg.
8803 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
8805 * dirname.c (dir_name): Compute append_dot using path, not newpath
8806 which is not yet declared.
8808 2001-05-11 Paul Eggert <eggert@twinsun.com>
8810 * Makefile.am (libfetish_a_SOURCES):
8811 Add strftime.c, since we now compile it on all hosts.
8813 * strftime.c (my_strftime):
8814 Define to nstrftime if emacs, but only if my_strftime is not defined.
8815 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
8816 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
8817 Add one more extra argument: a nanoseconds value.
8820 (my_strftime function): Add %N format.
8821 (emacs_strftimeu): Renamed from emacs_strftime,
8822 with extra ut argument.
8824 2001-05-11 Paul Eggert <eggert@twinsun.com>
8826 dirname code cleanup. base_name now behaves more compatibly
8827 with POSIX basename when given file names that have trailing
8828 slashes, and similarly for dir_name. Add new primitives
8829 base_len and dir_len. Put the directory-name-related decls
8832 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
8833 * backupfile.c (base_name): Likewise.
8834 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
8835 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
8836 * makepath.c (strip_trailing_slashes): Likewise.
8837 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
8839 * rename.c (strip_trailing_slashes): Likewise.
8840 * same.c (base_name): Likewise.
8841 * stripslash.c (ISSLASH): Likewise.
8843 * addext.c: Include <dirname.h> after size_t is defined.
8844 * backupfile.c: Likewise.
8846 * addext.c (addext): Use base_len to trim redundant
8847 trailing slashes instead of doing it ourselves.
8848 But do not trim the last slash if it is not redundant.
8850 * backupfile.c (find_backup_file_name,
8851 max_backup_version): Use base_len instead of rolling it ourselves.
8852 Handle the case of "" and (on DOS) "C:" correctly.
8854 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
8855 Include <string.h>, <dirname.h>.
8856 (base_name): Allow file names ending in slashes, other than names
8857 that are all slashes. In this case, return the basename followed
8858 by the slashes. This is more general, and can be used in places
8859 where the original base_name purposely had an assertion failure.
8860 (base_len): New function.
8862 * dirname.c: Include <string.h> instead of <stdlib.h>.
8863 Do not include <assert.h>; no longer needed.
8865 (memrchr): Remove decl.
8866 (dir_name_r): Remove.
8867 (dir_len): Renamed from dirlen. All callers changed.
8868 Rewrite in terms of base_name, for simplicity and consistency.
8869 (dir_name): Never return NULL. All callers changed.
8870 Do not include <stdlib.h> in test program; no longer needed.
8871 return 0; is fine for test program.
8873 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
8875 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
8877 * path-concat.c (path_concat): Use base_len to compute
8878 base length, not strlen; this means we cannot rely on memcpy
8881 * same.c (STREQ): Remove.
8882 (same_name): Handle the case where the basename ends in trailing '/'.
8884 * stripslash.c (strip_trailing_slashes): Return nonzero if
8885 a slash was stripped. Do not strip the last slash after a
8888 2001-04-08 Jim Meyering <meyering@lucent.com>
8890 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
8891 recomputed; that's necessary when the offset spans a DST transition.
8892 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
8894 2001-04-02 Jim Meyering <meyering@lucent.com>
8896 * regex.h, regex.c: Update from GNU libc.
8898 2001-03-19 Paul Eggert <eggert@twinsun.com>
8900 * version-etc.c (version_etc_copyright): Update to 2001.
8902 2001-03-16 Paul Eggert <eggert@twinsun.com>
8904 * tempname.c (uint64_t): Define to uintmax_t if
8905 not defined, and if UINT64_MAX is not defined.
8906 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
8907 Reported by John David Anglin.
8909 2001-03-10 Bruno Haible <haible@clisp.cons.org>
8911 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
8912 alias if codeset is empty.
8913 * config.charset (BeOS): Use wildcard syntax.
8915 2001-03-13 Jim Meyering <meyering@lucent.com>
8917 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
8918 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
8921 2001-03-06 Bruno Haible <haible@clisp.cons.org>
8923 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
8925 * unicodeio.c (print_unicode_char): Simplify accordingly.
8927 2001-03-06 Bruno Haible <haible@clisp.cons.org>
8929 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
8930 support for DOS/DJGPP.
8932 2001-02-28 Paul Eggert <eggert@twinsun.com>
8934 * Makefile.am (libfetish_a_SOURCES):
8935 Add dup-safer.c, fopen-safer.c.
8936 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
8938 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
8940 2001-02-25 Paul Eggert <eggert@twinsun.com>
8942 The mkstemp replacement is taken from glibc 2.2.2, with some
8943 portability fixes for use outside glibc, as follows:
8945 * tempname.c (struct_stat64): New macro.
8946 (direxists, __gen_tempname): Use it.
8947 This avoids a portability problem with Solaris 8.
8949 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
8950 (<stddef.h>, <stdint.h>, <string.h>):
8951 Include only if STDC_HEADERS || _LIBC.
8952 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
8953 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
8954 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
8955 (__set_errno): Define this macro if <errno.h> doesn't.
8956 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
8957 Define these macros if <stdio.h> doesn't.
8958 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
8959 Define these macros if <sys/stat.h>
8960 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
8961 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
8962 __xstat64): Define if not _LIBC.
8963 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
8964 (__gen_tempname): Invoke gettimeofday only if
8965 HAVE_GETTIMEOFDAY || _LIBC;
8966 otherwise, fall back on plain "time".
8967 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
8969 * mkstemp.c (__GT_FILE): Define to zero if not defined.
8971 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
8973 2001-02-17 Jim Meyering <meyering@lucent.com>
8975 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
8976 around included file name.
8978 * strnlen.c (__strnlen): Merge in a change from GNU libc.
8980 * strftime.c: Update from GNU libc (the only changes were to comments).
8982 2001-02-13 Bruno Haible <haible@clisp.cons.org>
8984 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
8986 2001-02-17 Paul Eggert <eggert@twinsun.com>
8988 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
8989 Remove workaround macros for hosts that have mbrtowc but not
8990 mbstate_t, as we now insist on proper declarations for both
8991 before using mbrtowc.
8993 2001-02-17 Jim Meyering <meyering@lucent.com>
8995 * regex.c: Update from libc.
8997 2001-02-16 Paul Eggert <eggert@twinsun.com>
8999 * alloca.c (malloc): Undef before defining, since stdlib.h
9000 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
9001 Reported by Mark Hounschell via Paul Eggert.
9003 2001-01-30 Bruno Haible <haible@clisp.cons.org>
9005 * config.charset: Update for FreeBSD 4.2.
9007 2001-01-26 Jim Meyering <meyering@lucent.com>
9009 * quotearg.c: Include stddef.h.
9010 * quote.c: Include stddef.h.
9011 Reported by Axel Kittenberger.
9013 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
9014 line in double quotes so that it evokes a better diagnostic.
9015 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
9016 Reported by Axel Kittenberger.
9018 2001-01-15 Bruno Haible <haible@clisp.cons.org>
9020 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
9021 to avoid a warning. Add back 'const' to inptr.
9023 2001-01-16 Jim Meyering <meyering@lucent.com>
9025 * basename.c: Include <stdio.h>, needed by assert on SunOS 4.
9028 2001-01-14 Jim Meyering <meyering@lucent.com>
9030 * rename.c: New file. From Volker Borchert.
9031 Include stdlib.h, string.h or strings.h, and xalloc.h.
9032 Use strip_trailing_slashes rather than open-coding it.
9034 2001-01-03 Paul Eggert <eggert@twinsun.com>
9036 * strftime.c: Sync with glibc time/strftime.c 1.81.
9038 2001-01-03 Jim Meyering <meyering@lucent.com>
9040 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
9041 local `inptr' to avoid warning with some system declarations of iconv.
9043 2000-12-29 Paul Eggert <eggert@twinsun.com>
9045 * modechange.c: Do not assume that mode_t uses the
9046 traditional octal encoding. E.g. "chmod 1 FOO" should set
9047 the other-execute bit of FOO even if S_IXOTH != 1.
9049 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
9050 WOTH, XOTH, ALLM): New macros.
9051 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
9052 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
9054 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
9055 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
9057 No need to use uintmax_t; unsigned long is long enough.
9058 Don't bother to get suffix since we don't use it.
9060 2000-12-24 Jim Meyering <meyering@lucent.com>
9062 * hash.c (is_prime): Return explicit boolean values.
9063 (hash_get_first): Return NULL to appease Irix5.6's 89.
9064 Reported by Nelson Beebe.
9066 2000-10-31 Bruno Haible <haible@clisp.cons.org>
9068 * localcharset.c (locale_charset): Add support for Win32.
9070 2000-12-18 Paul Eggert <eggert@twinsun.com>
9072 * physmem.h, physmem.c: New files.
9074 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
9075 (noinst_HEADERS): Add physmem.h.
9077 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
9078 't' for compatibility with Solaris 8 sort.
9080 2000-12-18 Bruno Haible <haible@clisp.cons.org>
9082 * config.charset: Add support for BeOS.
9084 2000-12-16 Jim Meyering <meyering@lucent.com>
9086 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
9087 SHELLS_FILE to a file name that's useful on djgpp systems.
9089 (ADDITIONAL_DEFAULT_SHELLS): Define.
9090 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
9091 Based mostly on a patch from Prashant TR.
9093 2000-12-16 Jim Meyering <meyering@lucent.com>
9095 This bug had a serious impact on chown: `chown N:M FILE' (for integer
9096 N and M) would have treated it like `chown N:N FILE'.
9098 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
9100 2000-10-31 Bruno Haible <haible@clisp.cons.org>
9102 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
9103 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
9104 to the list of canonical encodings. Rename EUC-CN to GB2312.
9106 2000-12-08 Andreas Schwab <schwab@suse.de>
9108 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
9109 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
9111 2000-12-07 Jim Meyering <meyering@lucent.com>
9113 * stripslash.c (ISSLASH): Define.
9114 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
9117 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
9118 (dir_name_r): Declare this function as static.
9119 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
9120 manifest itself on a name containing a mix of slashes and
9122 Make this function work with names starting with a DOS-style
9123 drive letter and colon prefix.
9124 (dir_name): Append `.' if necessary.
9125 Based mostly on patches from Prashant TR and Eli Zaretskii.
9127 * dirname.h (dir_name_r): Remove prototype.
9129 2000-12-05 Jim Meyering <meyering@lucent.com>
9131 * dirname.c (dir_name_r): Add `const' in a few local declarations.
9133 2000-12-04 Jim Meyering <meyering@lucent.com>
9135 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
9136 Also include memory.h, stdlib.h, unistd.h if appropriate.
9137 Reported by Andreas Jaeger (conflicting declaration of malloc).
9139 2000-12-02 Jim Meyering <meyering@lucent.com>
9141 * closeout.h: Make idempotent, to avoid some obscure warnings.
9143 2000-12-01 Paul Eggert <eggert@twinsun.com>
9145 * memrchr.c: Include <config.h> before any system include file.
9147 2000-11-29 Paul Eggert <eggert@twinsun.com>
9149 * dirname.c (dir_name_r): Fix typo: int -> size_t.
9151 2000-11-26 Jim Meyering <meyering@lucent.com>
9153 * memcoll.c: Include sys/types.h. From Werner Almesberger.
9155 2000-11-22 Paul Eggert <eggert@twinsun.com>
9157 * strftime.c (my_strftime): Do not invoke mbrlen with a
9158 size of (size_t) -1; it's not portable.
9160 2000-11-17 Akim Demaille <akim@epita.fr>
9162 * obstack.h: Formatting changes.
9163 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
9164 prevent type checking.
9165 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9166 cast the value to (void *): assigning a `foo *' to a `void *'
9168 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9170 2000-11-17 Jim Meyering <meyering@lucent.com>
9172 * strstr.c: Update from GNU libc.
9174 2000-11-16 Jim Meyering <meyering@lucent.com>
9176 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
9178 2000-11-11 Jim Meyering <meyering@lucent.com>
9180 * error.c: Add a couple #includes, merging from GNU libc version.
9182 2000-11-10 Jim Meyering <meyering@lucent.com>
9184 * obstack.h: Update from GNU libc.
9185 * obstack.c: Likewise.
9187 2000-11-06 Paul Eggert <eggert@twinsun.com>
9189 * getusershell.c (setusershell): Use rewind rather than
9190 fseek/fseeko, to avoid configuration hassles with fseeko.
9191 Don't bother opening SHELLS_FILE if shellstream is NULL;
9194 2000-11-05 Jim Meyering <meyering@lucent.com>
9196 * makepath.h (make_dir): Declare.
9197 * makepath.c (make_dir): Remove `static' attribute.
9200 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
9202 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
9203 last one in a bucket, advance to the next bucket.
9205 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
9207 * fnmatch.c: Do not comment out all the code if we are using
9208 the GNU C library, because in some cases we are replacing buggy
9209 code in the GNU C library itself.
9211 2000-10-30 Paul Eggert <eggert@twinsun.com>
9213 * error.h, getline.h, modechange.h:
9214 Remove "2000" from Copyright line, as the file hasn't been
9215 changed this year other than in the copyright notice.
9217 * xalloc.h: Add "2000" to Copyright line, as this file
9218 was changed this year.
9220 2000-10-30 Paul Eggert <eggert@twinsun.com>
9222 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
9223 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
9224 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
9226 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
9228 * regex.h (__restrict_arr): Move definition out of #ifndef block.
9229 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
9230 doesn't define __restrict_arr.
9232 2000-10-29 Jim Meyering <meyering@lucent.com>
9234 * xstat.in: Fix grammar in comment.
9236 2000-10-28 Jim Meyering <meyering@lucent.com>
9238 * memchr.c: Update from libc.
9239 Adjust for portability:
9240 [HAVE_STDLIB_H]: Include stdlib.h.
9241 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
9242 Undef __memchr, too.
9243 [!weak_alias]: Define __memchr to memchr.
9245 * regex.c: Update from libc.
9246 * regex.h: Likewise.
9247 * getopt1.c: Likewise.
9248 * memcmp.c: Likewise.
9250 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
9251 Avoid using fseek, when possible -- it's broken by design.
9252 Patch by Ulrich Drepper.
9254 2000-10-26 Jim Meyering <meyering@lucent.com>
9256 * strftime.c: Update from libc.
9258 2000-10-25 Jim Meyering <meyering@lucent.com>
9260 * obstack.c: Update from libc.
9262 2000-10-23 Jim Meyering <meyering@lucent.com>
9264 * hard-locale.c (hard_locale): Revert last change -- it was simply
9265 wrong. That set_locale call must not have any side effects.
9268 2000-10-22 Jim Meyering <meyering@lucent.com>
9270 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
9271 [CYCLIC]: Remove now-unused definition.
9273 * save-cwd.c (O_DIRECTORY): Define, if needed.
9274 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
9275 Suggestion from Ulrich Drepper.
9277 2000-10-21 Jim Meyering <meyering@lucent.com>
9279 * dirname.c (dir_name_r): New function, factored out of dir_name.
9280 (dir_name): Use dir_name_r.
9281 * dirname.h (dir_name_r): Declare it.
9283 2000-10-21 Jim Meyering <meyering@lucent.com>
9285 * dirname.c (memrchr): Declare if necessary.
9286 (dir_name): Remove the restriction that there be no
9287 trailing slashes. Now, this code skips past them, effectively
9289 [TEST_DIRNAME] (main): New unit tests.
9291 * memrchr.c: New file from GNU libc.
9292 Undef __memrchr, too.
9293 [!weak_alias]: Define __memrchr to memrchr.
9294 Guard weak_alias use with `#ifdef weak_alias'.
9296 2000-10-17 Jim Meyering <meyering@lucent.com>
9298 * quote.h (PARAMS): Define and use.
9299 Reported by Akim Demaille.
9301 * getopt.c: Update from libc.
9303 2000-10-16 Jim Meyering <meyering@lucent.com>
9305 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
9308 2000-09-25 Jim Meyering <meyering@lucent.com>
9310 * md5.h (rol): Define (from GnuPG).
9312 * sha.c: Give credit (GnuPG) where due.
9313 (M): Use rol rather than open-coding it.
9314 Add a FIXME comment.
9316 2000-09-21 Jim Meyering <meyering@lucent.com>
9318 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
9319 Reported by Michael Stone.
9321 2000-09-20 Jim Meyering <meyering@lucent.com>
9323 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
9324 (noinst_HEADERS): Add sha.h.
9325 Based on code from Scott G. Miller and from GnuPG.
9327 2000-09-15 Jim Meyering <meyering@lucent.com>
9329 * regex.c: Update from libc.
9331 2000-09-10 Jim Meyering <meyering@lucent.com>
9333 * getopt.c (_getopt_internal): Update from glibc.
9335 2000-09-09 Jim Meyering <meyering@lucent.com>
9337 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
9338 think it should be used as a general replacement for isascii.
9339 * fnmatch.c: Likewise.
9340 * mbswidth.c: Likewise
9341 * regex.c: Likewise.
9344 * userspec.c: Include sys/param.h and limits.h.
9346 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
9347 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
9348 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
9349 UID, GID. Check range.
9351 2000-09-06 Jim Meyering <meyering@lucent.com>
9353 * getopt.c (_getopt_internal): Update from glibc.
9355 2000-08-30 Jim Meyering <meyering@lucent.com>
9357 * strftime.c: Merge in changes from GNU libc.
9359 2000-08-26 Jim Meyering <meyering@lucent.com>
9361 * closeout.c: Include "__fpending.h".
9362 (close_stdout_status): Return right away if there's nothing to flush.
9364 * Makefile.am (noinst_HEADERS): Add __fpending.h.
9365 * __fpending.c: New file.
9366 * __fpending.h: New file.
9368 2000-08-07 Paul Eggert <eggert@twinsun.com>
9370 Standardize on "memory exhausted" instead of "Memory exhausted"
9371 or "virtual memory exhausted".
9372 * obstack.c (print_and_abort): Use "memory exhausted", not
9373 "virtual memory exhausted".
9374 * same.c (same_name): Invoke xalloc_die instead of printing
9376 * userspec.c (parse_user_spec): Likewise.
9377 * bumpalloc.h: comment fix
9378 * same.c, userspec.c: Include xalloc.h.
9380 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
9381 not char *const and pointing to a constant array.
9382 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
9383 (xrealloc): Comment fix.
9385 * userspec.c (parse_user_spec):
9386 Don't translate a message until just before returning,
9387 to avoid unnecessary translation.
9389 2000-08-07 Jim Meyering <meyering@lucent.com>
9391 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
9392 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
9393 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
9394 getgroups.c, gethostname.c, getopt.h, group-member.c,
9395 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
9396 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
9397 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
9398 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
9399 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
9400 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
9401 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
9402 yesno.c: Back out Copyright date changes for each file with no change
9403 this year. This eases coordination with other programs using the same
9404 source code modules. From Paul Eggert.
9406 2000-08-03 Greg McGary <greg@mcgary.org>
9408 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
9409 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
9410 (EXTEND_BUFFER): Use them.
9412 2000-08-01 Jim Meyering <meyering@lucent.com>
9414 * dirname.c (ISSLASH): Define.
9415 (BACKSLASH_IS_PATH_SEPARATOR): Define.
9416 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
9417 both `\' and `/' may be use as path separators.
9418 Based on a patch from Prashant TR.
9420 2000-07-31 Paul Eggert <eggert@twinsun.com>
9422 * quotearg.c (quotearg_n_options): Don't make the initial
9423 slot vector a constant, since it might get modified.
9425 2000-07-31 Jim Meyering <meyering@lucent.com>
9427 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
9428 * obstack.c (print_and_abort): Likewise.
9430 2000-07-30 Paul Eggert <eggert@twinsun.com>
9432 * quotearg.c (quotearg_n_options): Preallocate a slot 0
9433 buffer, so that the caller can always quote one small
9434 component of a "memory exhausted" message in slot 0.
9435 From a suggestion by Jim Meyering.
9437 2000-07-30 Jim Meyering <meyering@lucent.com>
9439 * makepath.c (make_path): Quote the other instance, too.
9441 * quotearg.c (N_STATIC_SLOTVECS): Define.
9442 (STATIC_BUF_SIZE): Define.
9443 (quotearg_n_options): Use only statically allocated storage when
9444 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
9445 than STATIC_BUF_SIZE.
9447 2000-07-29 Jim Meyering <meyering@lucent.com>
9449 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
9450 * dirname.c (dir_name): Likewise.
9452 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
9454 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
9455 (dir_name): Assert that there are no trailing slashes.
9457 2000-07-18 Bruno Haible <haible@clisp.cons.org>
9459 * mbswidth.h (mbswidth): Add a flags argument.
9460 (mbswidth): New declaration.
9461 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
9462 * mbswidth.c (mbswidth): Add a flags argument.
9463 (mbsnwidth): New function.
9465 2000-07-24 Jim Meyering <meyering@lucent.com>
9467 * mbswidth.c: Remove useless #else. From Bruno Haible.
9469 2000-07-23 Paul Eggert <eggert@twinsun.com>
9471 * mbswidth.c (_XOPEN_SOURCE):
9472 Don't define; this causes problems on Solaris 7.
9473 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
9475 2000-07-23 Paul Eggert <eggert@twinsun.com>
9478 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
9479 so that mbstate_t is always defined.
9481 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
9482 be 1 in at least one GCC installation, and this configuration
9483 error is likely to be common. Ignoring MB_LEN_MAX hurts
9484 performance on hosts that have mbrtowc but have only unibyte
9485 locales, but I assume these hosts are rare.
9487 2000-07-23 Paul Eggert <eggert@twinsun.com>
9489 * quotearg.c: Streamline by invoking multibyte code only if needed.
9490 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
9491 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
9492 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
9493 invoke multibyte primitives.
9495 2000-07-23 Jim Meyering <meyering@lucent.com>
9497 * basename.c (base_name): Add an assertion.
9499 2000-07-15 Bruno Haible <clisp.cons.org>
9501 * quotearg.c: When the system forces us to redefine mbstate_t,
9502 shadow its mbsinit function.
9504 2000-07-16 Bruno Haible <haible@clisp.cons.org>
9506 * mbswidth.h: New file.
9507 * mbswidth.c: New file.
9508 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
9509 (noinst_HEADERS): Add mbswidth.h.
9511 2000-07-17 Bruno Haible <haible@clisp.cons.org>
9513 * config.charset: Add support for FreeBSD. Improve support for HP-UX
9516 2000-07-15 Jim Meyering <meyering@lucent.com>
9518 * makepath.c: Include quote.h.
9519 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
9520 corresponding argument in a `quote (...)' call.
9521 Give better diagnostics.
9523 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
9524 (noinst_HEADERS): Add quote.h.
9526 * quote.c (quote, quote_n): New file. Two functions taken verbatim
9527 from tar's src/misc.c.
9528 * quote.h: New file. Prototypes for same.
9530 2000-07-10 Paul Eggert <eggert@twinsun.com>
9532 From a suggestion by Bruno Haible.
9533 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
9534 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
9535 to decide whether to define the BeOS workaround macro;
9536 this adjusts to the change to AC_MBSTATE_T.
9538 2000-07-13 Paul Eggert <eggert@twinsun.com>
9540 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
9542 * quotearg.c (quoting_style_args, quoting_style_vals,
9543 quotearg_buffer_restyled): Add support for
9544 clocale_quoting_style. Undo previous change to
9545 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
9546 and "{RIGHT QUOTATION MARK}" msgids.
9548 2000-07-05 Paul Eggert <eggert@twinsun.com>
9550 The old behavior of quoting `like this' doesn't look good with
9551 newer, ISO-style fonts. See:
9552 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
9554 Instead, quote "like this" by default. Let the translator
9555 tailor the locale-specific quoting behavior by providing
9556 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
9558 * quotearg.c (N_): New macro.
9559 (gettext_default): New function.
9560 (quotearg_buffer_restyled): Use
9561 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
9562 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
9564 2000-07-09 Jim Meyering <meyering@lucent.com>
9566 * Most files: Update copyright dates to include 2000.
9568 2000-07-08 Jim Meyering <meyering@lucent.com>
9570 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
9572 (xgethostname): Remove now-unnecessary #ifdef.
9573 Move declaration of `err' into loop where it's used.
9575 2000-07-05 Bruno Haible <haible@clisp.cons.org>
9577 * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
9578 by allocating a larger buffer. Test the gethostname return value for
9579 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
9580 returns an error and ENAMETOOLONG isn't defined.
9582 2000-07-05 Paul Eggert <eggert@twinsun.com>
9583 and Bruno Haible <haible@clisp.cons.org>
9585 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
9587 2000-07-05 Bruno Haible <haible@clisp.cons.org>
9589 * quotearg.c (struct quoting_options): Simplify quote_these_too
9592 2000-07-03 Jim Meyering <meyering@lucent.com>
9594 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
9595 Reported by Bruno Haible.
9597 2000-07-04 Jim Meyering <meyering@lucent.com>
9599 * quotearg.c: Make inclusion of <wchar.h> independent of whether
9600 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
9603 2000-07-03 Paul Eggert <eggert@twinsun.com>
9604 and Bruno Haible <haible@clisp.cons.org>
9606 * quotearg.c (mbrtowc):
9607 Assign to *pwc, and return 1 only if result is nonzero.
9608 (iswprint): Use ISPRINT when substituting our own mbrtowc.
9610 2000-07-03 Jim Meyering <meyering@lucent.com>
9612 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
9613 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
9616 2000-07-02 Jim Meyering <meyering@lucent.com>
9618 * quotearg.c (mbstate_t): Don't define here.
9620 2000-07-02 Jim Meyering <meyering@lucent.com>
9622 * nanosleep.c (SIGCONT): Define if not already defined.
9624 2000-06-17 Bruno Haible <haible@clisp.cons.org>
9626 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
9627 per change in ../m4/ls-mntd-fs.m4.
9628 (read_filesystem_list): Ignore symbolic links.
9630 2000-06-29 Jim Meyering <meyering@lucent.com>
9632 * same.c: Include <string.h> or <strings.h>, as appropriate,
9633 for declaration of strcmp.
9635 * long-options.c: Include <stdlib.h>, for declaration of exit.
9637 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
9638 Avoid warning by casting result to `char *' to remove `const'.
9640 2000-06-17 Bruno Haible <haible@clisp.cons.org>
9642 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
9644 2000-06-26 Paul Eggert <eggert@twinsun.com>
9646 savedir now sets errno on failure and invokes xmalloc to get memory.
9647 Fix a couple of other minor bugs while we're at it.
9649 * savedir.c (<unistd.h>): Do not include; there's no need.
9650 (NAMLEN): Remove macro.
9651 (malloc, realloc): Remove decls.
9653 ("xalloc.h"): Include.
9654 (NAME_SIZE_DEFAULT): New macro.
9655 (savedir): Use xmalloc / xrealloc to allocate memory.
9656 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
9657 Skip "" directory entries.
9658 Use strlen to calculate directory entry length, since the old method
9659 is rarely used these days and isn't worth supporting.
9660 Don't use a pointer after freeing it.
9661 Check for integer overflow when calculating allocation size.
9662 Use memcpy to copy entries, instead of stpcpy.
9663 Set errno properly when returning NULL.
9664 Check for readdir error.
9666 2000-06-26 Jim Meyering <meyering@lucent.com>
9668 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
9670 2000-06-17 Bruno Haible <haible@clisp.cons.org>
9672 * getusershell.c (xmalloc, xrealloc): Remove functions.
9674 Don't include <stdlib.h>. Don't declare malloc, realloc.
9676 2000-06-23 Bruno Haible <haible@clisp.cons.org>
9678 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
9680 2000-06-24 Jim Meyering <meyering@lucent.com>
9682 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
9684 2000-06-21 Jim Meyering <meyering@lucent.com>
9686 * getpass.c: New file, from Bruno Haible. Required for BeOS.
9688 2000-06-19 Paul Eggert <eggert@twinsun.com>
9690 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
9691 (mbrtowc, mbstate_t): Define substitutes if
9692 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
9693 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
9694 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
9696 2000-06-17 Bruno Haible <haible@clisp.cons.org>
9698 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
9699 than 1024, return a memory chunk of least possible size, instead
9700 of size PATH_MAX + 2. In the loop, increment the size proportionally.
9701 Use free/xmalloc instead of xrealloc to avoid copying for very long
9704 2000-06-17 Bruno Haible <haible@clisp.cons.org>
9706 * canon-host.c (canon_host): Use malloc and memcpy to copy an
9707 address, not strdup. Include <stdlib.h> and don't declare free().
9709 2000-06-17 Bruno Haible <haible@clisp.cons.org>
9711 * path-concat.c (path_concat): Don't access dir[-1] if dir is
9714 2000-06-21 Jim Meyering <meyering@lucent.com>
9716 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
9717 (noinst_HEADERS): Add getstr.h.
9719 * getline.c (getstr): Move into a separate file.
9720 * getstr.c (getstr): New file, extracted from getline.c, with
9721 the following changes: new parameter, delim2; both delim[12]
9722 parameters have type `int', not `char'. The latter would lose
9723 with 8-bit delimiters.
9724 * getstr.h: New file.
9726 2000-06-19 Jim Meyering <meyering@lucent.com>
9728 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
9730 2000-06-18 Jim Meyering <meyering@lucent.com>
9732 * mkdir.c: Remove file, due mainly to copyright incompatibility.
9733 Besides, these days every porting target provides a mkdir function.
9735 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
9736 (this snippet comes from src/system.h).
9738 2000-06-15 Paul Eggert <eggert@twinsun.com>
9740 * human.c (adjust_value): New function.
9741 (human_readable_inexact): Apply rounding style even when
9742 printing approximate values.
9744 2000-06-14 Paul Eggert <eggert@twinsun.com>
9746 * human.c (human_readable_inexact): Allow an input block
9747 size that is not a multiple of the output block size, and vice versa.
9748 Reported by Piergiorgio Sartor.
9750 2000-06-14 Paul Eggert <eggert@twinsun.com>
9752 * getdate.y (get_date): Apply relative times after time
9753 zone indicator, not before. Reported by Todd A. Jacobs.
9755 2000-06-13 Jim Meyering <meyering@lucent.com>
9757 * Makefile.am (all-local): Depend on lstat.c and stat.c.
9759 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
9761 2000-06-12 Paul Eggert <eggert@twinsun.com>
9763 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
9765 2000-06-04 Paul Eggert <eggert@twinsun.com>
9767 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
9769 2000-06-04 Jim Meyering <meyering@lucent.com>
9771 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
9772 SunOS 4.1.4 for which gid_t is an unsigned type.
9774 2000-06-03 Jim Meyering <meyering@lucent.com>
9776 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
9778 2000-05-26 Bruno Haible <haible@clisp.cons.org>
9780 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
9781 newer, don't install charset.alias.
9782 * config.charset: Change the Linux/glibc rules so they become empty
9783 on glibc-2.1 or newer.
9785 2000-06-02 Jim Meyering <meyering@lucent.com>
9787 * mountlist.c: Back out last change. Instead, do this...
9788 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
9789 member using the same `ignore'-testing code.
9790 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
9794 2000-05-29 Jim Meyering <meyering@lucent.com>
9796 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
9797 with the `ignore' attribute. Based on a patch from Mark D. Roth.
9799 2000-05-22 Jim Meyering <meyering@lucent.com>
9801 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
9803 2000-05-18 Jim Meyering <meyering@lucent.com>
9805 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
9806 back, too, since it may have been modified by allocate_entry.
9807 (hash_delete): Rewrite to use neither the assignment operator
9808 nor the comma operator in an if-expression.
9810 2000-05-15 Paul Eggert <eggert@twinsun.com>
9813 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
9814 Remove; no longer needed.
9815 "quotearg.h": Add include.
9816 (file_name): Do not bother to explicitly initialize to NULL; it's less
9817 efficient on some hosts.
9818 (close_stdout_status): Remove test as to whether stdout was already
9819 closed; it breaks for the case "echo x | sort >&-".
9820 Quote file name colons.
9821 Do not assume that _("write error") lacks format strings.
9823 2000-05-15 Jim Meyering <meyering@lucent.com>
9825 * version-etc.c (version_etc_copyright): Update the copyright string
9826 used in all --version output.
9828 2000-05-14 Jim Meyering <meyering@lucent.com>
9830 * closeout.c (close_stdout_set_file_name): New function.
9831 (close_stdout_status): Use new file-scoped global.
9832 Return right away if fstat says the stdout file descriptor is invalid.
9833 * closeout.h (close_stdout_set_file_name): Declare.
9835 2000-05-10 Jim Meyering <meyering@lucent.com>
9837 * closeout.c [default_exit_status]: New file-scoped variable.
9838 (close_stdout_set_status): New function.
9839 * closeout.h (close_stdout_set_status): Declare.
9841 2000-05-08 Jim Meyering <meyering@lucent.com>
9843 * long-options.c: Don't include closeout.h.
9844 (parse_long_options): Don't call close_stdout for --version.
9846 2000-05-06 Jim Meyering <meyering@lucent.com>
9848 * strnlen.c: Undefine __strnlen and strnlen.
9849 [!weak_alias]: Define __strnlen to strnlen.
9851 * atexit.c: New file, from libiberty.
9853 2000-05-06 Jim Meyering <meyering@lucent.com>
9855 * closeout.c (close_stdout_status): Also check for errors on the
9858 2000-05-05 Bruno Haible <haible@clisp.cons.org>
9860 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
9861 instead of xmalloc, xrealloc, path_concat.
9862 (locale_charset): Treat empty environment variables as absent.
9863 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
9865 2000-05-04 Jim Meyering <meyering@lucent.com>
9867 * getopt.c: Update from glibc.
9868 * obstack.c: Likewise.
9869 * obstack.h: Likewise.
9870 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
9872 * regex.h: Likewise.
9873 * strndup.c: Likewise.
9874 * strnlen.c: New file, from glibc.
9876 2000-05-01 Jim Meyering <meyering@lucent.com>
9878 * full-write.c (full_write): Remove `FIXME' part of comment.
9880 2000-04-29 Jim Meyering <meyering@lucent.com>
9882 * path-concat.c: Declare strdup only if it's not defined.
9883 * canon-host.c: Likewise.
9885 2000-04-28 Jim Meyering <meyering@lucent.com>
9887 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
9888 redefinition warning on some systems (HPUX). Otherwise, regex.h is
9889 included first, then limits.h is included by locale.h by libintl.h.
9890 From John David Anglin.
9892 2000-04-25 Jim Meyering <meyering@lucent.com>
9894 * makepath.c (S_IRWXUGO): Define.
9895 (make_path): Always perform explicit chmod if MODE specifies any
9896 of the `special' permission bits. Prompted by a bug report against
9897 install from Mate Wierdl and Joost van Baal.
9899 2000-04-18 Jim Meyering <meyering@lucent.com>
9903 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
9904 getpagesize. For BeOS. Based on a patch from Bruno Haible.
9906 2000-04-17 Jim Meyering <meyering@lucent.com>
9908 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
9909 the definition of it to rpl_strftime also defined-away the system's
9912 2000-04-15 Jim Meyering <meyering@lucent.com>
9914 Use `C' to denote so-called `contiguous' files, the same way
9916 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
9917 (ftypelet): Use S_ISCTG.
9918 From Michael Deutschmann.
9920 2000-04-14 Jim Meyering <meyering@lucent.com>
9922 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
9924 2000-04-08 Jim Meyering <meyering@lucent.com>
9926 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
9927 names don't conflict. Reported by Eli Zaretskii.
9929 2000-03-28 Bruno Haible <haible@clisp.cons.org>
9931 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
9932 bug. Deal with the different error behavior of Irix iconv.
9934 2000-04-07 Jim Meyering <meyering@lucent.com>
9936 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
9937 to work around system header problems on AIX 3.2.5. From Bruno Haible.
9939 2000-04-05 Jim Meyering <meyering@lucent.com>
9941 Portability tweaks required for ultrix4.3.
9942 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
9943 * readutmp.c: Include sys/types.h before sys/stat.h.
9944 * canon-host.c: Declare strdup.
9945 * path-concat.c: Likewise.
9946 From John David Anglin.
9948 2000-04-04 Jim Meyering <meyering@lucent.com>
9950 Be more DOS 8.3-friendly.
9951 * ref-add.sin: Renamed from ref-add.sed.in.
9952 * ref-del.sin: Renamed from ref-del.sed.in.
9953 * Makefile.am: Reflect renaming.
9954 Reported by Eli Zaretskii.
9956 Use a temporary file name that won't clash with `charset.alias'
9957 in the DOS 8.3 name space.
9958 * Makefile.am (charset_tmp): Define.
9959 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
9960 (uninstall-local): Likewise.
9961 Reported by Eli Zaretskii.
9963 2000-03-29 Paul Eggert <eggert@twinsun.com>
9965 * time/strftime.c (my_strftime): Make sure we call the system
9966 strftime, not ourselves, when invoking the underlying strftime.
9968 2000-03-24 Jim Meyering <meyering@lucent.com>
9970 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
9971 (charset_alias): Define.
9972 (install-exec-local): Factor out common code.
9973 (uninstall-local): Split lines longer than 80.
9974 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
9976 (.sed.in.sed): New rule. Don't redirect directly to $@.
9977 (CLEANFILES): Add ref-add.sed and ref-del.sed.
9979 2000-03-19 Bruno Haible <haible@clisp.cons.org>
9981 * config.charset: Output a line containing "Packages using this file".
9982 * ref-add.sed.in, ref-del.sed.in: New files.
9983 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
9984 ref-del.sed): New rules.
9986 2000-03-17 Jim Meyering <meyering@lucent.com>
9988 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
9989 Otherwise, include <strings.h>
9991 2000-03-17 Bruno Haible <haible@clisp.cons.org>
9993 * unicodeio.c (utf8_wctomb): New function.
9994 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
9995 format instead of in UCS-4 with platform dependent endianness.
9997 2000-03-07 Paul Eggert <eggert@twinsun.com>
9999 * savedir.c (savedir): Work even if directory size is
10000 negative; this can happen with some screwy NFS configurations.
10002 2000-03-06 Jim Meyering <meyering@lucent.com>
10004 * localcharset.c (get_charset_aliases): Don't try to free file_name
10005 if it's NULL (because we ran out of memory). From Bruno Haible.
10007 2000-03-05 Jim Meyering <meyering@lucent.com>
10009 * localcharset.c ("path-concat.h"): Include.
10010 (get_charset_aliases): Use path_concat instead of ANSI string
10013 * unicodeio.h (PARAMS): Define.
10014 Use it to guard prototype.
10016 2000-03-04 Jim Meyering <meyering@lucent.com>
10018 * Makefile.am (install-exec-local): Create $(libdir) before installing
10020 (uninstall-local): Uncomment this rule so `make distcheck' works
10023 * unicodeio.c (<errno.h>): Include it.
10024 (errno): Declare if not defined.
10026 * localcharset.c: Add Bruno's comment justifying use of volatile.
10028 * config.charset: New version, incorporating remarks from a linux
10029 i18n mailing list. From Bruno Haible.
10031 2000-03-02 Jim Meyering <meyering@lucent.com>
10033 * Makefile.am (EXTRA_DIST): Add config.charset.
10035 2000-03-01 Jim Meyering <meyering@lucent.com>
10037 * localcharset.c: Guard some #includes with `#if HAVE_...'.
10038 * unicodeio.c: Likewise.
10040 2000-02-02 Bruno Haible <haible@clisp.cons.org>
10042 * config.charset: New file.
10043 * localcharset.c: New file.
10044 * unicodeio.h, unicodeio.c: New files.
10045 * Makefile.am (DEFS): Add -DLIBDIR=...
10046 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
10047 (noinst_HEADERS): Add unicodeio.h.
10048 (all-local, install-exec-local, charset.alias): New targets.
10050 2000-02-28 Paul Eggert <eggert@twinsun.com>
10052 * quotearg.c (ALERT_CHAR): New macro.
10053 (quotearg_buffer_restyled): Use it.
10055 2000-02-27 Jim Meyering <meyering@lucent.com>
10057 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
10058 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
10060 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
10061 not `#if STDC_HEADERS'.
10062 Declare malloc if needed.
10064 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
10065 now that autoconf always defines the HAVE_DECL_ symbols.
10066 * human.c: Likewise.
10067 * same.c: Likewise.
10068 * strtoumax.c: Likewise.
10070 * backupfile.c: Arrange for cpp to fail if the configure-time
10071 declaration check was not run.
10072 * hash.c: Likewise.
10073 * human.c: Likewise.
10074 * same.c: Likewise.
10075 * strtoumax.c: Likewise.
10077 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
10078 then first look up the entire `.'-containing string as a login name.
10080 2000-02-18 Paul Eggert <eggert@twinsun.com>
10082 * getdate.y: Handle two-digit years with leading zeros correctly.
10083 (textint): New typedef.
10084 (parser_control): Member year changed from int to textint.
10086 (YYSTYPE): Removed; replaced by %union with int and textint members.
10087 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
10088 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
10089 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
10090 (tSNUMBER, tUNUMBER): Now of type <textintval>.
10091 (date, number, to_year): Use width of number in digits, not its value,
10092 to determine whether it's a 2-digit year, or a 2-digit time.
10093 (yylex): Store number of digits of numeric tokens.
10094 Reported by John Kendall.
10096 (parser_control): Changed from struct parser_control to typedef (for
10097 consistency). All uses changed.
10099 (tID): Removed; not used.
10100 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
10102 2000-02-14 Paul Eggert <eggert@twinsun.com>
10104 * getpagesize.h (getpagesize): Port to VMS for Alpha;
10105 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
10107 2000-02-12 Jim Meyering <meyering@lucent.com>
10109 * userspec.c (ISDIGIT): Define it.
10110 (isdigit): Remove definition.
10111 (is_number): Use ISDIGIT, not isdigit.
10112 <libintl.h>: Include.
10113 (_ and N_): Define.
10114 (parse_user_spec): Mark translatable strings.
10116 2000-02-10 Jim Meyering <meyering@lucent.com>
10118 With these changes, nanosleep.[ch] are finally enough like the other
10119 lib/* replacement files to compile on a few more losing systems.
10121 * nanosleep.h: Don't include config.h.
10122 Remove prototype from declaration of nanosleep.
10123 (PARAMS): Remove now-unneeded definition.
10124 * nanosleep.c: #undef nanosleep.
10125 (rpl_nanosleep): Rename from nanosleep.
10127 2000-02-03 Jim Meyering <meyering@lucent.com>
10129 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
10130 rather than with `#if HAVE_UTMPNAME'.
10132 2000-02-01 Jim Meyering <meyering@lucent.com>
10134 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
10136 2000-01-31 Jim Meyering <meyering@lucent.com>
10138 * nanosleep.h (nanosleep): Guard declaration with
10139 `#if ! HAVE_DECL_NANOSLEEP'.
10140 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
10141 the declaration in that vendor's sys/timers.h.
10142 Reported by Christian Krackowizer.
10144 * quotearg.c (ISASCII): Add #undef and move definition to follow
10145 inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
10146 (ISPRINT): Likewise.
10147 Reported by Tom Tromey.
10149 2000-01-30 Jim Meyering <meyering@lucent.com>
10151 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
10152 uses of ->ut_name. The latter doesn't work with new Linux header files
10153 where only utmpx.ut_user is declared.
10155 * readutmp.h (UT_USER): Define.
10157 2000-01-23 Jim Meyering <meyering@lucent.com>
10159 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
10162 2000-01-22 Jim Meyering <meyering@lucent.com>
10164 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
10165 [! HAVE_DECL_STRTOULL]: Declare strtoull.
10166 Required for some AIX systems. Reported by Christian Krackowizer.
10167 [TESTING] (main): New function.
10169 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
10170 * dirname.c (dir_name): Support for DOS-style file names with drive
10173 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
10175 * strverscmp.c (ISDIGIT): Define.
10176 (strverscmp): Use ISDIGIT, not isdigit.
10178 2000-01-17 Paul Eggert <eggert@twinsun.com>
10180 * nanosleep.c (nanosleep):
10181 Don't use SA_INTERRUPT to decide whether to call sigaction, as
10182 POSIX.1 doesn't require SA_INTERRUPT and some systems
10183 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
10184 it's been part of POSIX.1 since day 1 (in 1988).
10186 2000-01-17 Jim Meyering <meyering@lucent.com>
10188 * interlock: Remove unused file. Reported by François Pinard.
10190 2000-01-16 Paul Eggert <eggert@twinsun.com>
10192 * quotearg.c (quotearg_buffer_restyled): Do not quote
10193 alert, backslash, formfeed, and vertical tab unnecessarily in
10194 shell quoting style.
10197 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
10198 Free Software Foundation, Inc.
10199 Copying and distribution of this file, with or without modification,
10200 are permitted provided the copyright notice and this notice are preserved.