ChangeLog 297 KB
Newer Older
1 2
2005-10-11  Simon Josefsson  <jas@extundo.com>

Simon Josefsson's avatar
Simon Josefsson committed
3 4
	* crc.h, crc.c: New files.

5 6
	* gc.h (gc_hash_buffer): Add doc.

7 8 9 10 11 12 13 14
2005-10-11  Bruno Haible  <bruno@clisp.org>

	* strcasecmp.c: Include limits.h.
	(strcasecmp): Avoid integer overflow on exotic platforms.
	* strncasecmp.c: Include limits.h.
	(strncasecmp): Avoid integer overflow on exotic platforms.
	Reported by Paul Eggert.

Simon Josefsson's avatar
Simon Josefsson committed
15 16 17 18 19 20
2005-10-06  Simon Josefsson  <jas@extundo.com>

	* hmac-md5.c: New file.

	* hmac.h: New file.

21 22 23 24
2005-10-06  Simon Josefsson  <jas@extundo.com>

	* memxor.c (memxor): Avoid casts and warnings.

25 26 27 28
2005-10-05  Derek Price  <derek@ximbiot.com>

	* getdelim.c (SIZE_MAX): New macro, if not already defined.

29 30
2005-10-05  Simon Josefsson  <jas@extundo.com>

31 32
	* memxor.c (memxor): Fix compiler error.

33 34 35
	* md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
	<http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.

Simon Josefsson's avatar
Simon Josefsson committed
36 37
	* memxor.h, memxor.c: New files.

38 39
	* getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
	we assume all systems have it, suggested by Jim Meyering
40 41
	<jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
	any systems lack sys/socket.h; mingw32 is known to lack it, but we
42 43
	don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
	same reasons.
44

45 46 47 48
2005-10-04  Bruno Haible  <bruno@clisp.org>

	* verify.h (verify_true): Provide alternative definition for C++.

49 50 51 52 53
2005-10-04  Simon Josefsson  <jas@extundo.com>

	* getaddrinfo.h: Move sys/types.h include first, reported by "Mark
	D. Baushke" <mdb@gnu.org>.

54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>

	* getdelim.c: Include getdelim.h first.  Include <limits.h>.
	(SSIZE_MAX): New macro, if not already defined.
	(getdelim): Fix buffer overrun on 64-bit hosts with lines longer
	than 2 GiB.

2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>

	* exclude.c: Include verify.h.
	(verify): Remove.  All callers changed to use verify.h's version.
	* strtoimax.c: Likewise.
	* utimecmp.c: Likewis.e

	Sync from coreutils.
	* .cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h, getpass.c
	mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
	* .cvsignore: Add fts.h, search.h, t-fpending.
	* settime.c (settime): Fix { typo in previous patch.  Also, don't
	bother returning ENOSYS if settimeofday or stime fails; just let
	them return whatever errno they want to return.
	* utimens.c: Include unistd.h, for dup2.
	(futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
	(futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.

2005-10-02  Jim Meyering  <jim@meyering.net>

	Sync from coreutils.
	* fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
	* openat-die.c: Use `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H'.
	* openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
	Remove AT_FDCWD test.
	Do not consume the fd unless successful.
	* openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
	* settime.c (settime): Move the HAVE_STIME block `up' into an #elif
	block, so that we don't even try to compile it if settimeofday is
	available.  This works around a compilation failure on OSF1 V5.1,
	due to stime requiring a `long int*' while tv_sec is `int'.

93 94 95 96
2005-09-30  Eric Blake  <ebb9@byu.net>  (tiny change)

	* getdelim.c (getdelim): Remove unused variables.

97 98 99 100 101 102
2005-10-01  Simon Josefsson  <jas@extundo.com>

	* getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
	Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
	AI_* and EAI_* definitions.  Protect function declarations.

103 104 105 106 107 108
2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>

	* xtime.h (XTIME_PRECISION): Now of type int, not long long int,
	so that the code works even with ancient cpp.  Portability problem
	with GCC 2.7.2.1 reported by Thomas M.Ott.

Jim Meyering's avatar
Jim Meyering committed
109 110 111 112 113 114 115 116
2005-09-27  Jim Meyering  <jim@meyering.net>

	* getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef HAVE_CONFIG_H.

	* intprops.h (signed_type_or_expr__): Define.
	(INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
	for unsigned types.

117 118 119 120 121 122 123
2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>

	* verify.h (verify_expr): Remove, replacing with:
	(verify_true): New macro that returns true instead of void.
	(verify_type__): Remove.
	(verify): Use verify_true rather than verify_type__.

124 125
2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>

126 127 128 129
	* utimens.c (ENOSYS): Define if not already defined.
	(futimens): Support having a null PATH if the file descriptor
	is nonnegative.

130 131 132
	* regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
	Remove.
	(__attribute): Define to empty unless GCC 3.1 or later.
133
	This works around a core dump on OpenBSD 3.4, which has GCC
134 135 136 137 138
	2.95.3, which dumps core when given __attribute__(()).  It also
	simplifies other tests, since we really don't want to bother with
	worrying about which ancient version of GCC supported what.
	Original problem reported by Yoann Vandoorselaere, with part of
	the fix suggested by Derek Price.
139

Jim Meyering's avatar
Jim Meyering committed
140 141 142 143 144 145
2005-09-24  Jim Meyering  <jim@meyering.net>

	* verify.h (verify_type__): Use `unsigned int' as the bitfield type
	so we can once again use a positive bitfield width of 1 -- now we
	don't have to explain why we were using a bitfield width of 2.

Paul Eggert's avatar
Paul Eggert committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	* getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
	Problem reported by Eric Blake.
	(getaddrinfo): Initialize se so that it's not garbage.
	Redo internal storage allocation so that it doesn't make unportable
	assumptions about alignment.
	Fix a memory leak.

	* utimens.c (futimens): Use futimesat if available.
	Prefer it to futimes since it doesn't have the futimes bug.

	* verify.h (GL_CONCAT0, GL_CONCAT): Remove.
	(verify): Don't use the __LINE__ trick, as it doesn't work in general.
	Instead, declare a function that returns a pointer to an array,
	and use verify_type__ to declare the size of the array.
	Problem and germ of a solution reported by Bruno Haible.
	(verify_type__): Use 2, not 1, for bitfield size, to avoid
	a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.

166 167 168 169
2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>

	Sync from coreutils.

Paul Eggert's avatar
Paul Eggert committed
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
	* .cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
	stat-time.h.
	* argmatch.h: Include verify.h
	(ARGMATCH_VERIFY): Use verify rather than rolling our own.
	(ARGMATCH_ASSERT): Remove; unused.
	* canonicalize.c: Assume STDC_HEADERS.
	* exclude.c: Include "strcase.h".
	* regex_internal.h [!defined _LIBC]: Likewise.
	* getusershell.c: Include stdio--.h rather than stdio.h
	and stdio-safer.h.
	(getusershell): Call fopen, not fopen_safer.
	* save-cwd.c: Include fcntl--.h rather than fcntl.h.
	Do not include unistd-safer.h.
	(save_cwd): Don't call fd_safer; no longer needed
	now that we include fcntl--.h.

186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
	* getdate.y (relative_time): New type.
	(RELATIVE_TIME_0): New constant.
	(parser_control): Use relative_time instead of doing it ourselves.
	(%union): Add new relative_time rel member.
	(tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
	Now typeless.
	(relunit, relunit_snumber): Now of type rel.
	(zone, rel, relunit, get_date): Adjust to above changes.

	* getloadavg.c: Include fcntl--.h rather than fcntl.h.
	Do not include unistd-safer.h.
	(getloadavg): Don't call fd_safer; no longer needed
	now that we include fcntl--.h.

	* mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
	(make_dir_parents): Treat ENOSYS like EEXIST.

	Improve quality of diagnostics on restore_cwd failure.
	* mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
	(make_dir_parents): Last arg is now int * (for errno), not bool *.
	* mkdir-p.c (make_dir, make_dir_parents): Likewise.
	Rewrite "mkdir -p" algorithm to avoid the need for "stat"
	each time through the loop.  Do not diagnose restore_cwd failure;
	that is the caller's job (and perhaps the caller does not care).

	* mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
	(make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
	If the file already exists but is not a directory, don't bother
	to try to make its parents.
	Close potential file descriptor leak if we can't chdir("/") (!).
	Don't always return true if chdir($PWD) fails; return true only
	if the requested action was done successfully (except for the
	chdir($PWD)).
	Don't log final directory unless we actually made it.
	Refactor to avoid duplicate code to fix up permissions.
	Don't attempt to fix up parent permissions if chdir($PWD) fails.

	* strftime.c (my_strftime): Rewrite the previous change slightly,
	to make it a bit faster and (I hope) clearer.
	* strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
	Fix bug in formats like %2N.

	* verify.h: New file.

2005-09-22  Jim Meyering  <jim@meyering.net>

	Sync from coreutils.

Paul Eggert's avatar
Paul Eggert committed
234 235 236 237 238 239 240 241 242
	* backupfile.c: Use ARGMATCH_VERIFY, just in case.

	* posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
	the .tm_year member, since otherwise gcc-4.0 would now warn about
	tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.

	* quotearg.c (quotearg_n_options): Change code to be suboptimal, in
	order to avoid an unsuppressible warning from gcc on 64-bit systems.

243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
	* getdate.y (get_date): Undo part of the 2005-04-04 change, so that
	the command "date -d'2005-03-27 +1 day'" succeeds once again, even
	when run in a time zone for which daylight savings time is in effect
	for the starting date.

	* mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
	stop us from restricting permissions of just-created absolute-named
	directories.
	* mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
	to restore initial working directory.
	* mkdir-p.c (make_dir_parents): New parameter: different_working_dir,
	to tell caller if/when we change the working directory and are
	unable to return to the initial one.
	* mkdir-p.h (make_dir_parents): Update prototype.
	* mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
	`return false'.  This fixes a bug introduced on 2004-07-30.

	* openat.c (fdopendir): Be sure to close the supplied
	file descriptor before returning.  This makes our replacement
	implementation a little closer to Solaris's, where fdopendir
	ties the file descriptor to the returned DIR* pointer.
	* openat.c (unlinkat): New function.
	* openat.h (unlinkat): Add prototype.
	* openat-die.c (openat_save_fail): Rename from openat_save_die.
	(openat_restore_fail): Rename from openat_restore_die.
	* openat.c, openat.h: Reflect s/_die/_fail/ renaming.

	Provide an alternative to exiting immediately upon save_cwd or
	restore_cwd failure.  Now, an application can arrange e.g.,
	to perform a longjump in that case.
	* openat.c: Include dirname.h.
	Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
	(rpl_openat, fdopendir, fstatat): Call openat_save_die
	and openat_restore_die rather than calling error directly.
	Don't include "error.h" or "exitfail.h"; they're no longer needed.

	* openat-die.c (openat_save_die, openat_restore_die): New file.
	* openat.h (openat_save_die, openat_restore_die): Declare and define.

	* strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
	size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
			    int utc, int nanoseconds);
	Background:
	date should not have to allocate a megabyte of virtual memory to
	handle a format argument like +%1048575T.  When implemented with
	strftime, it must allocate such a buffer, use strftime to fill it
	in, print it, then free it.
	With fprintftime, it simply prints everything and exits.
	With no need for memory allocation, that's one fewer way to fail.
	* strftime.c (my_strftime): Parse the colons of %:::z *after* the
	optional field width, not before, so we accept %9:z, not %:9z.
	(my_strftime): Be sure to use L_('x') for literals.

Paul Eggert's avatar
Paul Eggert committed
296 297 298 299 300 301 302 303
	* backupfile.c, canon-host.c, canonicalize.c, chown.c, cloexec.c:
	* dup-safer.c, dup2.c, euidaccess.c, fd-safer.c, fileblocks.c:
	* fopen-safer.c, fsusage.c, ftruncate.c, getcwd.c, getcwd.h:
	* getloadavg.c, getopt_.h, getpagesize.h, getugroups.c, group-member.c:
	* human.h, idcache.c, mkdir-p.c, mountlist.c, nanosleep.c, pathmax.h:
	* physmem.c, posixver.c, putenv.c, raise.c, safe-read.c, same.c:
	* save-cwd.c, setenv.c, settime.c, tempname.c, unlinkdir.c:
	* unsetenv.c, userspec.c, xgethostname.c, xreadlink.c:
304
	Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
Paul Eggert's avatar
Paul Eggert committed
305 306 307

	* chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
	* getloadavg.c, mountlist.c, openat.h, save-cwd.c, tempname.c:
308 309 310 311 312 313 314 315 316 317 318
	Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
	and don't include <sys/file.h>).

2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)

	Sync from coreutils.

	* getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
	[__linux__]: Allocate a big enough buffer for /proc/loadavg.
	[!LDAV_DONE]: Avoid unused variable warning.

319 320 321 322
2005-09-21  Bruno Haible  <bruno@clisp.org>

	* unicodeio.h (unicode_to_mb): New declaration.

323 324 325 326
2005-09-20  Derek Price  <derek@ximbiot.com>

	* getaddrinfo.c: Don't include <netdb.h> included from getaddrinfo.h.

327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Use a consistent style for including <config.h>.
	* __fpending.c, acl.c, argmatch.c,
	argp-help.c, argp-parse.c,
	argp-pvh.c, backupfile.c, basename.c, c-stack.c,
	calloc.c, check-version.c, cloexec.c, closeout.c, copy-file.c,
	creat-safer.c, cycle-check.c, dirfd.c, dirname.c, dup-safer.c,
	dup2.c, euidaccess.c, exclude.c, exitfail.c, fatal-signal.c,
	fd-safer.c, file-type.c, fileblocks.c, filemode.c,
	filenamecat.c, findprog.c, fnmatch.c, fopen-safer.c, free.c,
	fsusage.c, ftruncate.c, full-write.c, fwriteerror.c,
	getaddrinfo.c, getcwd.c, getdelim.c, getline.c, getlogin_r.c,
	getndelim2.c, getnline.c, getopt1.c, getpass.c, group-member.c,
	hard-locale.c, hash-pjw.c, hash.c, human.c, idcache.c,
	inet_ntop.c, isdir.c, long-options.c, malloc.c, memcasecmp.c,
	memcmp.c, memcoll.c, memcpy.c, memmove.c, mkdir-p.c,
	modechange.c, mountlist.c, open-safer.c, physmem.c,
	pipe-safer.c, pipe.c, poll.c, posixver.c, progname.c,
	progreloc.c, putenv.c, quote.c, quotearg.c, readline.c,
	readlink.c, realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c,
	safe-read.c, same.c, save-cwd.c, savedir.c, sig2str.c,
	strcspn.c, strerror.c, stripslash.c, strncasecmp.c, strndup.c,
	strnlen.c, strnlen1.c, strsep.c, strstr.c, strtod.c,
	strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c,
	userspec.c, utimecmp.c, version-etc-fsf.c,
	version-etc.c, wait-process.c, xalloc-die.c, xgetcwd.c,
	xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xsetenv.c,
	xstrndup.c, xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c:
	Standardize inclusion of config.h.
	* __fpending.h, dirfd.h, getdate.h, human.h,
	inttostr.h:  Removed inclusion of config.h from header files.
	* inttostr.c:  Adjusted in-tree users.
	* timespec.h: Remove superfluous warning to include config.h.
	* atexit.c, chdir-long.c chown.c, fchown-stub.c, getgroups.c,
	gettimeofday.c, lchown.c, lstat.c, mkdir.c, mkstemp.c,
	nanosleep.c, openat.c, raise.c, readtokens0.c, readutmp.c,
	unlinkdir.c: Guard inclusion of config.h with HAVE_CONFIG_H.

366
2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
367 368 369 370 371 372

	* stat-time.h: New file.
	* timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
	(MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
	in a different way.
	(timespec_cmp): New function.
373 374 375 376
	* utimecmp.c: Include stat-time.h.
	(SYSCALL_RESOLUTION): Depend on whether various struct stat
	members exist, not on the obsolescent ST_MTIM_NSEC.
	(utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
377

378 379 380 381 382 383 384
2005-09-15  Derek Price  <derek@ximbiot.com>
	    Paul Eggert  <eggert@cs.ucla.edu>

	* regcomp.c, regexec.c, regex_internal.c: Back out previous
	changes, consolidating in...
	* regex_internal.h: ...this file.

385 386
2005-09-15  Derek Price  <derek@ximbiot.com>

387 388 389 390 391 392
	* regex_internal.h: Blank `pure' for GNUC < 3.
	* regex_internal.c: Ditto, using this...
	(__GNUC_PREREQ): ...new macro.
	* regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1 using...
	(__GNUC_PREREQ): ...this new macro.

393 394
	* strstr.h: Include string.h. Define strstr as a macro here.

395 396 397 398 399 400
2005-09-13  Derek Price  <derek@ximbiot.com>

	* canon-host.c (canon_host_r): Set *cherror on memory allocation
	failure.
	Reported by Jim Meyering  <jim@meyering.net>.

Jim Meyering's avatar
Jim Meyering committed
401 402 403 404 405
2005-09-13  Jim Meyering  <jim@meyering.net>

	* canon-host.c: Filter through gnu indent and reword comments slightly.
	* canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.

406 407 408 409 410
2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)

	* lib/base64.c: Typo.
	(base64_encode): Put b64str in initialized data section.

411 412 413 414 415 416 417 418 419 420 421 422 423 424
2005-09-12  Derek Price  <derek@ximbiot.com>

	Return usable errors from canon-host.
	* canon-host.h: New file.
	* canon-host.c (canon_host): Wrap...
	(canon_host_r): ...this new function, which now relies exclusively on
	getaddrinfo.
	(ch_strerror): New function.
	(last_cherror): New global.
	* getaddrinfo.c: Move include of getaddrinfo.h first to test interface.
	(getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
	void *.
	(freeaddrinfo): Free ai->ai_canonname when set.

425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
2005-09-12  Derek Price  <derek@ximbiot.com>
	    Paul Eggert  <eggert@cs.ucla.edu>

	* glob-libc.h: Renamed from glob_.h.  The new version is
	taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
	protecting things that should be done only in gnulib contexts.
	* glob_.h: New file, containing only the glob things needed for
	gnulib.
	(GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
	(__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
	(glob, globfree, glob_pattern_p): Now defined simply in terms of
	rpl_glob, rpl_globfree, rpl_glob_pattern_p.
	(__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
	and to respect the namespace rules better.

440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>

	Merge glibc and coreutils changes into gnulib, plus a few
	extra fixes.
	* md5.c: Use #error rather than a string.
	(CYCLIC): New macro, from glibc source.  Use it instead of rol.
	* md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
	(__attribute__): Define to empty for non recent-GCC.
	(__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
	(__md5_process_bytes, __md5_read_ctx, __md5_stream):
	Renamed from their non-__ counterparts, with new macros replacing
	them if not _LIBC.  Add __THROW attribute.
	(rol): Remove.
	(struct md5_ctx): Align buffer if using GCC.
	* sha1.h (struct sha1_ctx): Likewise.
	* sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
	The old name was backwards.
	(NOTSWAP): Remove; not used.
	(rol): New macro, moved here from md5.h.
	(sha1_process_block): Remove a FIXME that doesn't make sense.

461 462 463 464 465 466
2005-09-12  Derek Price  <derek@ximbiot.com>

	* gai_strerror.c: Include config.h when available.  Include
	getaddrinfo.h before other headers to test interface.
	Reported by Larry Jones <lawrence.jones@ugs.com>.

467 468 469 470 471 472
2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>

	* glob.c (glob, globfree, __glob_pattern_p): Use old-style function
	definitions, since that's the preferred style in glibc.
	Fix a minor spacing issue, and update copyright notice to match glibc's.

473 474 475 476
2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>

	* regex_internal.h (bitset_not): Add parens to avoid gcc -Wall warning.

477 478 479 480 481
2005-09-06  Simon Josefsson  <jas@extundo.com>

	* getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
	TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.

482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>

	Change bitset word type from unsigned int to unsigned long int,
	as this has better performance on typical 64-bit hosts.
	Port bitset code to hosts with unusual word sizes.
	* regcomp.c (build_equiv_class, build_charclass, build_range_exp):
	(build_collating_symbol):
	Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
	argument is a bitset.  This is merely a style issue, but it makes
	it clearer that an entire array is expected.
	(re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
	* regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
	Port to the case where bitset_word is not the same as unsigned int.
	* regex_internal.h (bitset_set, bitset_clear, bitset_contain):
	(bitset_not, bitset_merge, bitset_set_all, bitset_mask):
	Likewise.
	* regexec.c (check_dst_limits_calc_pos_1, check_subexp_matching_top):
	(build_trtable, group_nodes_into_DFAstates):
	Likewise.
	* regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
	Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
	* regex_internal.h (bitset_set_all, bitset_not): Likewise.
	* regexec.c (group_nodes_into_DFAstates): Likewise.
	* regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
	* regcomp.c (optimize_subexps, lower_subexp):
	Work even if bitset_word has holes in its bitwise representation.
	* regex_internal.h (BITSET_WORD_BITS): Likewise.
	* regexec.c (check_dst_limits_calc_pos_1, check_subexp_matching_top):
	Likewise.
	* regex_internal.c (re_string_reconstruct):
	Don't assume UCHAR_MAX == 255.
	* regex_internal.h (bitset_set_all): Likewise.
	* regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
	All uses changed.
	(BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
	(bitset_word): New type, replacing 'unsigned int' for bitset uses.
	All uses changed.
	(BITSET_WORD_MAX): New macro.
	(bitset_set, bitset_clear, bitset_contain, bitset_empty):
	(bitset_set_all, bitset_copy):  Now inline functions, not macros.
	(bitset_empty, bitset_copy):
	Prefer sizeof (bitset) to multiplying it out ourselves.
	(bitset_not_merge): Remove; unused.
	(bitset_contain): Return bool, not unsigned int with one bit on.
	All callers changed.
	* regexec.c (build_trtable): Don't assume bitset has no stricter
	alignment than re_node_set; do this by defining a new internal
	type struct dests_alloc and using it to allocate memory.

531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552
2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>

	Check for arithmetic overflow when calculating sizes, to prevent
	some buffer-overflow issues.  These patches are conservative, in the
	sense that when I couldn't determine whether an overflow was possible,
	I inserted a run-time check.
	* regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New macros.
	(SIZE_MAX) [!defined SIZE_MAX]: New macro.
	(re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
	(re_xnrealloc, re_x2nrealloc): New inline functions.
	* lib/regcomp.c (init_dfa, analyze, build_range_exp, parse_bracket_exp):
	(build_equiv_class, build_charclass): Check for arithmetic overflow
	in size expression calculations.
	* lib/regex_internal.c (re_string_realloc_buffers):
	(build_wcs_upper_buffer, re_node_set_add_intersect):
	(re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
	(re_dfa_add_node, register_state): Likewise.
	* lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
	(prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
	(build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
	(match_ctx_add_subtop, match_ctx_add_sublast): Likewise.

553 554
2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>

555 556 557 558 559
	* glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
	to avoid a collision with bits/local_lim.h in glibc.
	All uses changed.  Problem reported by Dmitry V. Levin in
	<http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.

560 561
	* regex_internal.c (build_wcs_upper_buffer): Fix portability
	bugs in int versus size_t comparisons.
562 563
	(re_string_context_at): Fix bug where the code assumed that
	Idx is signed.
564

565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603
	Use bool where appropriate.
	* regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
	All callers changed.
	(calc_eclosure_iter): Likewise, for ROOT arg.
	(parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
	(build_charclass_op): Likewise, for NON_MATCH arg.
	* regex_internal.c (re_string_allocate, re_string_construct):
	(re_string_construct_common): Likewise, for ICASE arg.
	* regexec.c (re_search_2_stub, re_search_stub):
	Likewise, for RET_LEN arg.
	(check_matching): Likewise, for FL_LONGEST_MATCH arg.
	(set_regs): Likewise, for FL_BACKTRACK arg.
	* regcomp.c (re_compile_fastmap_iter, optimize_utf8):
	(duplicate_node_closure, calc_inveclosure, calc_eclosure):
	(calc_eclosure_iter, parse_bracket_exp):
	Use bool for internal variables that are booleans.
	* regexec.c (re_search_internal, check_matching, proceed_next_node):
	(set_regs, build_sifted_states, sift_states_bkref):
	(check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
	(expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
	(find_collation_sequence_value):
	Likewise.
	* regex_internal.c (re_node_set_insert, re_node_set_insert_last):
	(re_node_set_compare):
	Return bool, not int. All callers changed.
	* regexec.c (check_halt_node_context, check_dst_limits):
	(build_trtable, check_node_accept): Likewise.
	* regex_internal.h: Include stdbool.h.

	Fix bugs uncovered when converting to bool.
	* regcomp.c (calc_eclosure_iter): Check for storage allocation
	failure instead of charging ahead blindly.
	* regex_internal.c (register_state): Likewise.
	* regexec.c (re_search_2_stub): Use simpler method than boolean
	for freeing internal storage.
	(group_nodes_into_DFA_states): Use unsigned int, not int, for
	bitset pieces used as boolean, to avoid undefined behavior
	on hosts that do int overflow checking.

604 605 606 607 608
2005-08-31  Derek Price  <derek@ximbiot.com>

	* getdelim.c (getdelim): Return EOF on EOF.
	Reported by Larry Jones <lawrence.jones@ugs.com>.

609 610 611 612 613 614 615 616 617 618 619 620 621 622
2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>

	* regex_internal.c (re_string_reconstruct): Don't assume buffer
	lengths fit in regoff_t; this isn't true if regoff_t is the same
	width as size_t.
	* regex.c (re_search_internal): 5th arg is LAST_START
	(= START + RANGE) instead of RANGE.  This avoids overflow
	problems when regoff_t is the same width as size_t.
	All callers changed.
	(re_search_2_stub): Check for overflow when adding the
	sizes of the two strings.
	(re_search_stub): Check for overflow when adding START
	to RANGE; if it occurs, substitute the extreme value.

623 624 625 626 627 628 629 630 631 632
2005-08-31  Jim Meyering  <jim@meyering.net>

	* regcomp.c (search_duplicated_node): Make first pointer arg
	a pointer-to-const.
	* regex_internal.c (create_ci_newstate, create_cd_newstate):
	(register_state): Likewise.
	* regexec.c (search_cur_bkref_entry, check_dst_limits):
	(check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
	(group_nodes_into_DFAstates): Likewise.

633 634
2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>

635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
	On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
	old glibc regex code mishandles strings longer than 2**31 bytes.
	This patch fixes this when the regex code is used in gnulib
	(i.e., outside glibc).

	This patch should not affect the use of the regex code inside
	glibc.  No doubt this problem also needs to be handled for glibc
	as well, but the result will be an incompatible change to the
	glibc ABI, and the old ABI will have to be supported too.  That
	can be the the subject for another patch.

	* regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
	governing whether the rest of this patch is active.  By default,
	the macro is disabled and the patch has no effect.
	(regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
	(__re_idx_t, __re_size_t, __re_long_size_t): New types.
	(struct re_pattern_buffer, re_search, re_search_2, re_match):
	(re_match_2, re_set_registers): Use the new types.
	* regex_internal.h (Idx, re_hashval_t): New types.
	(REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
	New macros.
	(re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
	(re_string_context_at, bin_tree_t, re_dfastate_t):
	(struct re_state_table_entry, state_array_t, re_sub_match_last_t):
	(re_sub_match_top_t, re_match_context_t, re_sift_context_t):
	(struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
	(re_string_char_size_at, re_string_wchar_at):
	(re_string_elem_size_at):
	Use the new types and macros to port to 64-bit hosts.
	Use unsigned types for internal values, so that the code
	mostly works even for arrays larger than SSIZE_MAX.
	* regcomp.c (re_compile_internal, init_dfa, duplicate_node):
	(search_duplicated_node, calc_eclosure_iter, fetch_number):
	(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
	(build_equiv_class, build_charclass, re_compile_fastmap_iter):
	(free_dfa_content, create_initial_state, optimize_utf8, analyze):
	(optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
	(calc_inveclosure, parse_dup_op, build_range_exp):
	(build_collating_symbol, parse_bracket_exp, build_charclass_op):
	(fetch_number, create_token_tree, mark_opt_subexp):
	Likewise.
	* regex_internal.c (re_string_construct_common, create_ci_newstate):
	(create_cd_newstate, re_string_allocate, re_string_construct):
	(re_string_realloc_buffers, build_wcs_upper_buffer):
	(re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
	(re_string_reconstruct, re_string_peek_byte_case):
	(re_string_fetch_byte_case, re_string_context_at):
	(re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
	(re_node_set_init_copy, re_node_set_add_intersect):
	(re_node_set_init_union, re_node_set_merge, re_node_set_insert):
	(re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
	(re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
	(re_acquire_state, re_acquire_state_context, register_state):
	Likewise.
	* regex.c (match_ctx_init, match_ctx_add_entry, search_cur_bkref_entry):
	(match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
	(re_search_internal, re_search_2_stub, re_search_stub)
	(re_copy_regs, check_matching, check_halt_state_context, update_regs):
	(push_fail_stack, sift_states_iter_mb, build_sifted_states):
	(update_cur_sifted_state, check_dst_limits):
	(check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
	(check_subexp_limits, sift_states_bkref, merge_state_array):
	(check_subexp_matching_top, get_subexp, get_subexp_sub):
	(find_subexp_node, check_arrival, check_arrival_add_next_nodes):
	(check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
	(expand_bkref_cache, check_node_accept_bytes):
	(group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
	(re_search, re_match_2, re_search_2, prune_impossible_nodes):
	(acquire_init_state_context, check_halt_node_context):
	(proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
	(sift_states_backward, clean_state_log_if_needed):
	(sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
	(find_recover_state, transit_state_sb, transit_state_mb):
	(transit_state_bkref, build_trtable, match_ctx_clean):
	Likewise.
	* regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
	to work around an assumption that REG_MISSING is negative.

713 714 715 716 717 718 719 720 721
	* regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
	(seek_collating_symbol_entry) [defined _LIBC]:
	(lookup_collation_sequence_value) [defined _LIBC]:
	(build_range_exp, build_collating_symbol) [defined _LIBC]:
	Use prototypes rather than old-style function definitions.
	* regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
	(transit_state_sb) [0]:
	(find_collation_sequence_value) [defined _LIBC]: Likewise.

722 723 724
	* regexec.c (re_search_internal): Simplify update of rm_so and
	rm_eo.

725 726 727 728 729 730 731
	* regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
	(optimize_subexps, lower_subexp):
	Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
	since the signed shift might overflow.  Use 1u<<31 instead.
	* regex_internal.h (bitset_set, bitset_clear, bitset_contain): Likewise.
	* regexec.c (check_dst_limits_calc_pos_1, check_subexp_matching_top):
	Likewise.
732

733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749
	* regcomp.c (optimize_subexps, lower_subexp):
	Use CHAR_BIT rather than 8, for clarity.
	* regexec.c (check_dst_limits_calc_pos_1):
	(check_subexp_matching_top): Likewise.
	* regcomp.c (init_dfa): Make table_size unsigned, so that we don't
	have to worry about portability issues when shifting it left.
	Remove no-longer-needed test for table_size > 0.
	* regcomp.c (parse_sub_exp): Do not shift more bits than there are
	in a word, as the resulting behavior is undefined.
	* regexec.c (check_dst_limits_calc_pos_1): Likewise;
	in one case, a <= should have been an <, and in another case the
	whole test was missing.
	* regex_internal.h (BYTE_BITS): Remove.  All uses changed to
	the standard name CHAR_BIT.
	* regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
	this is not true on one's complement and signed-magnitude hosts.

750 751 752 753 754
	* regex_internal.h (re_sub_match_top_t): Remove unused member
	next_last_offset.
	(struct re_dfa_t): Remove unused member states_alloc.
	* regcomp.c (init_dfa): Don't initialize unused members.

755 756 757 758 759 760
2005-08-31  Bruno Haible  <bruno@clisp.org>

	* strstr.c: Include <stddef.h>, for NULL.
	* strcasestr.c: Likewise.
	Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.

761 762 763 764
2005-08-30  "Oskar Liljeblad" <oskar@osk.mine.nu>

	* iconvme.h: Add prototype for iconv_alloc.

765 766 767 768 769 770 771 772
2005-08-29  Simon Josefsson  <jas@extundo.com>

	* iconvme.c: Fix errno.

2005-08-29  "Oskar Liljeblad" <oskar@osk.mine.nu>

	* iconvme.c: Split iconv_string into iconv_alloc.

Jim Meyering's avatar
Jim Meyering committed
773 774
2005-08-27  Jim Meyering  <jim@meyering.net>

Jim Meyering's avatar
Jim Meyering committed
775 776 777 778 779 780 781 782 783
	* fopen-safer.c: Merge minor changes from coreutils.
	* dup-safer.c: Likewise.
	* fd-safer.c: Likewise.

	Merge from coreutils.
	* stdio--.h: New file.
	* stdlib--.h: New file.
	* mkstemp-safer.c: New file.

Jim Meyering's avatar
Jim Meyering committed
784 785 786 787 788
	GNU tar needs these.
	* pipe-safer.c: New file.
	* creat-safer.c: New file.
	* fcntl--.h (creat): Define to creat_safer.
	* fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
Jim Meyering's avatar
Jim Meyering committed
789
	* unistd--.h (pipe): Define to pipe_safer.
Jim Meyering's avatar
Jim Meyering committed
790 791
	* unistd-safer.h: Declare pipe_safer.

792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814
2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>

	* regex_internal.h: Remove all references to
	RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
	or better.
	(bitset_not, bitset_merge, bitset_not_merge):
	(bitset_mask, re_string_allocate, re_string_construct):
	(re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
	(re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
	(re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
	(re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
	(re_node_set_init_union, re_node_set_merge, re_node_set_insert):
	(re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
	(re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
	(re_acquire_state_context):
	Remove unnecessary forward decls.
	(re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
	Put __attribute at function definition,
	now that the function decl has been removed.
	* lib/regex_internal.c (re_string_peek_byte_case):
	(re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
	Likewise.

815 816 817 818 819
2005-08-26  Simon Josefsson  <jas@extundo.com>

	* getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
	Haible <bruno@clisp.org>.

820 821 822 823 824 825 826 827 828 829 830 831 832
2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	* regexec.c (set_regs): Don't alloca with an unbounded size.

	alloca modernization/simplification for regex.
	* regex.c: Remove portability cruft for alloca.  This no longer
	needs to be at the start of the file, and can be moved into
	regex_internal.h and simplified.
	* regex_internal.h: Include <alloca.h>.
	(__libc_use_alloca) [!defined _LIBC]: New macro.
	* regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
	now works outside glibc.

833 834 835 836 837 838
2005-08-24  Simon Josefsson  <jas@extundo.com>

	* getpass.c: Add WIN32 implementation.  Conditionalize use of
	termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
	GLIBC specific code.

839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855
2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	Make regex safe for g++.  This fixes one real bug (an "err"
	that should have been "*err").  g++ problem reported by
	Sam Steingold.
	* regex_internal.h (re_calloc): New macro, consistent with
	re_malloc etc.  All callers of calloc changed to use re_calloc.
	* regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
	not int.  All callers changed.
	* regcomp.c (re_compile_fastmap_iter): Don't use alloca (mb_cur_max);
	just use an array of size MB_LEN_MAX.
	* regexec.c (push_fail_stack): Use re_realloc, not realloc.
	(find_recover_state): Change "err" to "*err"; this fixes what
	appears to be a real bug.
	(check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
	versus int.

Jim Meyering's avatar
Jim Meyering committed
856 857 858 859 860 861
2005-08-25  Jim Meyering  <jim@meyering.net>

	* open-safer.c: Include <config.h>.
	Otherwise, we'd lose LARGEFILE support in any file using
	e.g. "fcntl--.h"

862 863
2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>

864 865 866
	* regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
	* regex.h (regerror): Likewise.

867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
	* regex.c: Do not include <sys/types.h>, as POSIX no longer
	requires this.  (The code never needed it.)

	* regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
	All uses of recently-renamed identifiers changed to use the new,
	POSIX-compliant names.  The code will build and run just fine
	without these changes, but it's better to eat our own dog food
	and use the standard-conforming names.

	* regex.h: Fix a multitude of POSIX name space violations.
	These changes have an effect only for programs that define
	_POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
	do not change anything for programs compiled in the normal way.
	Also, there is no effect on the ABI.

	(_REGEX_SOURCE): New macro.
	Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
	defined and _GNU_SOURCE is not; this fixes a name space violation.

	Rename the following macros to obey POSIX requirements.
	The old names are still visible as macros if _REGEX_SOURCE is defined.
	(REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
	RE_BACKSLASH_ESCAPE_IN_LISTS.
	(REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
	(REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
	(REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
	(REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
	(REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
	(REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
	(REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
	(REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
	(REG_INTERVALS): renamed from RE_INTERVALS.
	(REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
	(REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
	(REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
	(REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
	(REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
	(REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
	(REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
	(REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
	RE_UNMATCHED_RIGHT_PAREN_ORD.
	(REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
	(REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
	(REG_DEBUG): renamed from RE_DEBUG.
	(REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
	(REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
	unusual, since we can't clash with the POSIX REG_ICASE.
	(REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
	(REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
	(REG_NO_SUB): renamed from RE_NO_SUB.
	(REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
	(REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
	(REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
	(REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
	(REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
	(REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
	(REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
	(REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
	(REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
	(_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
	(REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
	(REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
	RE_SYNTAX_POSIX_MINIMAL_BASIC.
	(REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
	(REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
	RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
	(REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
	(REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
	(REG_REALLOCATE): Renamed from REGS_REALLOCATE.
	(REG_FIXED): Renamed from REGS_FIXED.
	(REG_NREGS): Renamed from RE_NREGS.

	(REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
	of other REG_* macros, since POSIX says the user is allowed to
	#undef these macros selectively.

	(reg_errcode_t): Update comment stating what other tables need
	to be consistent.

	Rename the following enum values to obey POSIX requirements.
	The old names are still visible as macros.
	(_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
	is not defined, since GNU is supposed to be a superset of POSIX as
	much as possible, and since we want reg_errcode_t to be a signed
	type for implementation consistency.
	(_REG_NOERROR): Renamed from REG_NOERROR.
	(_REG_NOMATCH): Renamed from REG_NOMATCH.
	(_REG_BADPAT): Renamed from REG_BADPAT.
	(_REG_ECOLLATE): Renamed from REG_ECOLLATE.
	(_REG_ECTYPE): Renamed from REG_ECTYPE.
	(_REG_EESCAPE): Renamed from REG_EESCAPE.
	(_REG_ESUBREG): Renamed from REG_ESUBREG.
	(_REG_EBRACK): Renamed from REG_EBRACK.
	(_REG_EPAREN): Renamed from REG_EPAREN.
	(_REG_EBRACE): Renamed from REG_EBRACE.
	(_REG_BADBR): Renamed from REG_BADBR.
	(_REG_ERANGE): Renamed from REG_ERANGE.
	(_REG_ESPACE): Renamed from REG_ESPACE.
	(_REG_BADRPT): Renamed from REG_BADRPT.
	(_REG_EEND): Renamed from REG_EEND.
	(_REG_ESIZE): Renamed from REG_ESIZE.
	(_REG_ERPAREN): Renamed from REG_ERPAREN.
	(REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
	(REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
	(REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
	(REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.

	(_REG_RE_NAME, _REG_RM_NAME): New macros.
	(REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
	changed.  But support the old name if the new one is not defined
	and if _REGEX_SOURCE.

	Change the following member names in struct re_pattern_buffer.
	The old names are still supported if !_REGEX_SOURCE.
	The new names are always supported, regardless of _REGEX_SOURCE.
	(re_buffer): Renamed from buffer.
	(re_allocated): Renamed from allocated.
	(re_used): Renamed from used.
	(re_syntax): Renamed from syntax.
	(re_fastmap): Renamed from fastmap.
	(re_translate): Renamed from translate.
	(re_can_be_null): Renamed from can_be_null.
	(re_regs_allocated): Renamed from regs_allocated.
	(re_fastmap_accurate): Renamed from fastmap_accurate.
	(re_no_sub): Renamed from no_sub.
	(re_not_bol): Renamed from not_bol.
	(re_not_eol): Renamed from not_eol.
	(re_newline_anchor): Renamed from newline_anchor.

	Change the following member names in struct re_registers.
	The old names are still supported if !_REGEX_SOURCE.
	The new names are always supported, regardless of _REGEX_SOURCE.
	(rm_num_regs): Renamed from num_regs.
	(rm_start): Renamed from start.
	(rm_end): Renamed from end.

	(re_set_syntax, re_compile_pattern, re_compile_fastmap):
	(re_search, re_search_2, re_match, re_match_2, re_set_registers):
	Prepend __ to parameter names.

	Undo yesterday's changes.

Jim Meyering's avatar
Jim Meyering committed
1009 1010 1011 1012 1013
2005-08-24  Jim Meyering  <jim@meyering.net>

	Sync from coreutils.
	* fcntl--.h, fcntl-safer.h, open-safer.c: New files.

1014 1015 1016 1017 1018
2005-08-21  Bruno Haible  <bruno@clisp.org>

	* lock.h: Add multiple inclusion guard.
	* tls.h: Add multiple inclusion guard.

1019 1020
2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>

1021 1022 1023 1024 1025
	* regex.h (REG_NOSYS)
	[!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
	Define, since POSIX requires it as of 2001.
	(_REG_ENOSYS) [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
	New private symbol, used to keep the enum signed in all cases.
1026 1027 1028
	* regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James Youngman
	in <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.

1029 1030 1031 1032 1033 1034 1035
	* regex_internal.c (re_string_skip_chars, register_state):
	(calc_state_hash):
	Remove forward decls; no longer needed now that we use prototypes.
	* regexec.c (acquire_init_state_context, check_halt_node_context):
	(proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
	(clean_state_log_if_needed): Likewise.

1036 1037
2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>

1038 1039 1040 1041 1042
	Fix problems reported by Sam Steingold in
	<http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
	* regexec.c (sift_states_bkref): Fix portability bug: the code
	assumed that reg_errcode_t is a signed type, which is not
	necessarily true if _XOPEN_SOURCE is not defined.
1043 1044 1045
	* regex_internal.c (calc_state_hash): Put 'inline' before type, since
	some compilers warn about it otherwise.

1046 1047 1048 1049 1050
2005-08-20  Jim Meyering  <jim@meyering.net>

	* regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
	of unused local, dfa.

1051 1052
2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>

1053
	* regcomp.c (create_initial_state): Remove duplicate decl.
1054 1055 1056 1057
	(init_word_char, create_initial_state, duplicate_node_closure):
	(fetch_token, peek_token_bracket, build_range_exp):
	(build_collating_symbol): Remove forward decls; no longer needed
	now that we use prototypes.
1058

1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073
	* regcomp.c:
	(re_compile_pattern, re_set_syntax, re_compile_fastmap):
	(re_compile_fastmap_iter, regcomp, regerror, regfree):
	(re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
	(create_initial_state, optimize_utf8, analyze, postorder, preorder):
	(optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
	(link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
	(duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
	(fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
	(parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
	(build_range_exp, build_collating_symbol, parse_bracket_exp):
	(parse_bracket_element, parse_bracket_symbol, build_equiv_class):
	(build_charclass, build_charclass_op, fetch_number, create_tree):
	(create_token_tree, mark_opt_subexp, duplicate_tree):
	Use prototypes rather than old-style definitions.
1074

1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123
	* regex_internal.c:
	(re_string_allocate, re_string_construct, re_string_realloc_buffers):
	(re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
	(re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
	(re_string_reconstruct, re_string_peek_byte_case):
	(re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
	(re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
	(re_node_set_init_copy, re_node_set_add_intersect):
	(re_node_set_init_union, re_node_set_merge, re_node_set_insert):
	(re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
	(re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
	(re_acquire_state, re_acquire_state_context, register_state):
	(create_ci_newstate, create_cd_newstate, free_state):
	Likewise.
	* regexec.c (regexec, re_match, re_search, re_match_2, re_search_2):
	(re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
	(re_search_internal, prune_impossible_nodes):
	(acquire_init_state_context, check_matching, static):
	(check_halt_node_context, check_halt_state_context, proceed_next_node):
	(push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
	(update_regs, sift_states_backward, build_sifted_states):
	(clean_state_log_if_needed, merge_state_array):
	(update_cur_sifted_state, add_epsilon_src_nodes):
	(sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
	(check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
	(sift_states_iter_mb, transit_state, merge_state_with_log, static):
	(find_recover_state, check_subexp_matching_top, transit_state_mb):
	(transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
	(check_arrival, check_arrival_add_next_nodes):
	(check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
	(expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
	(check_node_accept_bytes, check_node_accept, extend_buffers):
	(match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
	(search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
	(sift_ctx_init):
	Likewise.

	* regex_internal.h:
	(re_string_allocate, re_string_construct, re_string_reconstruct):
	(re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
	(build_upper_buffer, re_string_translate_buffer, re_string_destruct):
	(re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
	(re_string_context_at, re_string_peek_byte_case):
	(re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
	is defined, since we now use prototypes always.

	* regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
	C89 or better.  All uses removed.

Paul Eggert's avatar
Paul Eggert committed
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145
2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>

	* regex_internal.c (re_acquire_state, re_acquire_state_context)
	[defined lint]: Suppress bogus uninitialized-variable warnings.

	* regcomp.c (duplicate_node): Return new index, not an error code,
	and let the caller return REG_ESPACE if out of space.  This
	removes an uninitialied-variable warning with GCC 4.0.1, and also
	avoids taking the address of a local variable.  All callers
	changed.

2005-08-19  Jim Meyering  <jim@meyering.net>

	* regexec.c (proceed_next_node): Redo local variables to
	avoid GCC shadowing warnings.

2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>

	* regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
	(re_node_set_insert_last, re_dfa_add_node):
	Rename local variables to avoid GCC shadowing warnings.

Bruno Haible's avatar
Bruno Haible committed
1146 1147 1148 1149 1150
2005-08-18  Bruno Haible  <bruno@clisp.org>

	* strstr.c (strstr): Fix return value in multibyte case.
	* strcasestr.c (strcasestr): Likewise.

Jim Meyering's avatar
Jim Meyering committed
1151 1152 1153 1154 1155 1156 1157 1158 1159 1160
2005-08-17  Jim Meyering  <jim@meyering.net>

	Make the %s format (seconds since the epoch) work for a negative
	number and when used with a zero-padded field width, e.g. %015s.

	* strftime.c (my_strftime): Move the `do_number_sign_and_padding'
	label so that it precedes the code to set `digits'.  Otherwise,
	%0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
	print `00-22'.  Now, it prints `-0022', as it should.

Paul Eggert's avatar
Paul Eggert committed
1161 1162 1163 1164
2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>

	* regex.h: Remove useless space-before-tab.  From coreutils.

Bruno Haible's avatar
Bruno Haible committed
1165 1166 1167 1168 1169
2005-08-17  Bruno Haible  <bruno@clisp.org>

	* strcasestr.h: New file.
	* strcasestr.c: New file.

1170 1171 1172 1173 1174
2005-08-17  Bruno Haible  <bruno@clisp.org>

	* strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
	* strstr.c: Completely rewritten, with multibyte locale support.

1175 1176 1177 1178
2005-08-17  Bruno Haible  <bruno@clisp.org>

	* strcasecmp.c: Use mbuiter.h.

Bruno Haible's avatar
Bruno Haible committed
1179 1180 1181 1182
2005-08-17  Bruno Haible  <bruno@clisp.org>

	* mbuiter.h: New file.

1183 1184 1185 1186 1187 1188 1189
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* strcasecmp.c (struct mbiter_multi): Remove at_end field.
	(mbi_init): Update.
	(mbi_avail, mbi_advance): Let the iteration end before the terminating
	NUL byte, not after it.

1190 1191 1192 1193 1194 1195 1196
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
	the valid ones. Makes the comparison operations transitive:
	cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
	* strcasecmp.c (strcasecmp): Use mb_casecmp.

1197 1198 1199 1200 1201 1202 1203
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* strcase.h (strcasecmp): Add note in comments.
	* strncasecmp.c: Use code from strcasecmp.c.
	* strcasecmp.c: Use mbchar module. Define private mbiter variant.
	(strcasecmp): Work correctly in multibyte locales.

Bruno Haible's avatar
Bruno Haible committed
1204 1205 1206 1207 1208
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* strnlen1.h: New file.
	* strnlen1.c: New file.

Bruno Haible's avatar
Bruno Haible committed
1209 1210 1211 1212
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* mbfile.h: New file.

Bruno Haible's avatar
Bruno Haible committed
1213 1214 1215 1216
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* mbiter.h: New file.

Bruno Haible's avatar
Bruno Haible committed
1217 1218 1219 1220 1221
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* mbchar.h: New file.
	* mbchar.c: New file.

Bruno Haible's avatar
Bruno Haible committed
1222 1223 1224 1225 1226
2005-08-16  Bruno Haible  <bruno@clisp.org>

	* tls.h: New file, from GNU gettext.
	* tls.c: New file, from GNU gettext.

1227 1228 1229 1230 1231
2005-08-15  Bruno Haible  <bruno@clisp.org>

	* regex.h (__restrict_arr): Don't define to __restrict if __cplusplus
	is defined.

Jim Meyering's avatar
Jim Meyering committed
1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249
2005-08-14  Jim Meyering  <jim@meyering.net>

	Sync from coreutils.

	* fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
	Use the hash-table-based cycle-detection code not just when
	FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
	Reported by James Youngman in
	<http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
	* fts_.h: Mention that with FTS_LOGICAL, we use FTS_TIGHT_CYCLE_CHECK.
	* fts.c (fts_cross_check) [FTS_DEBUG]: s/active_dir_ht/fts_cycle.ht/.
	This lets us compile with -DFTS_DEBUG, once again.
	* fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
	* fts.c (fd_safer): Remove decl.
	Include fcntl--.h rather than unistd-safer.h
	(fts_safe_changedir): Don't call fd_safer; no longer needed
	now that we include fcntl--.h.

Simon Josefsson's avatar
Simon Josefsson committed
1250 1251 1252 1253
2005-08-11  Simon Josefsson  <jas@extundo.com>

	* readline.h, readline.c: New file.

1254 1255 1256 1257
2005-08-11  Bruno Haible  <bruno@clisp.org>

	* strnlen.h (strnlen): Change parameter name to match comment.

1258 1259 1260 1261 1262 1263
2005-08-10  Simon Josefsson  <jas@extundo.com>

	* strndup.c: Use strnlen.h.

	* strnlen.h: New file.

1264 1265 1266 1267 1268 1269
2005-08-02  Simon Josefsson  <jas@extundo.com>

	* getline.h, getline.c: Rewrite.

	* getdelim.h, getdelim.c: New files, ported from glibc.

Bruno Haible's avatar
Bruno Haible committed
1270 1271 1272 1273 1274 1275 1276 1277 1278
2005-07-31  Bruno Haible  <bruno@clisp.org>

	* lock.h (gl_lock_initializer): New macro.
	(gl_lock_define_initialized): Use it.
	(gl_rwlock_initializer): New macro.
	(gl_rwlock_define_initialized): Use it.
	(gl_recursive_lock_initializer): New macro.
	(gl_recursive_lock_define_initialized): Use it.

1279 1280 1281 1282 1283
2005-07-26  Bruno Haible  <bruno@clisp.org>

	* lock.h: Update from GNU gettext.
	* lock.c: Update from GNU gettext.

1284 1285 1286 1287 1288 1289 1290 1291
2005-07-18  Bruno Haible  <bruno@clisp.org>

	* lock.h (gl_once_t): New type.
	(gl_once_define, gl_once): New macros.
	* lock.c (fresh_once): New variable.
	(glthread_once, glthread_once_call, glthread_once_singlethreaded): New
	functions.

1292 1293 1294 1295
2005-07-18  Simon Josefsson  <jas@extundo.com>

	* check-version.c (check_version): Accept identical versions too.

Bruno Haible's avatar
Bruno Haible committed
1296 1297 1298 1299 1300
2005-07-18  Bruno Haible  <bruno@clisp.org>

	* lock.h: New file, from GNU gettext.
	* lock.c: New file, from GNU gettext.

1301 1302 1303 1304 1305
2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>

	* quotearg.c: Add translator comment suggested by Bruno Haible,
	with a minor change.

1306 1307 1308 1309 1310 1311 1312 1313
2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>

	* version-etc-fsf.c (version_etc_copyright): Parameterize the
	copyright symbol and the year.
	* version-etc.c (COPYRIGHT_YEAR): New constant.
	(version_etc_va): Use parameterized copyright notice.
	Reword to conform to the current GNU coding standards.

1314 1315 1316 1317
2005-07-11  Simon Josefsson  <jas@extundo.com>

	* size_max.h: New file.

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
1318 1319 1320 1321 1322
2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>

	* argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
	block of defines.

1323 1324 1325 1326 1327 1328
2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
       and  Paul Eggert  <eggert@cs.ucla.edu>

	* regcomp.c (init_dfa, build_range_exp): Store __btowc value
	in wint_t, not wchar_t.  Remove now-unnecessary cast.

1329 1330 1331 1332 1333 1334 1335
2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>

	* regex.c, regex.h: Sync from libc.
	* regcomp.c, regexec_internal.c, regex_internal.h, regexec.c:
	New files, synced from libc, except that regex_internal.h
	currently has a small porting fix.

1336 1337 1338 1339 1340 1341 1342 1343 1344 1345
2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>

	Remove the dependency of the strftime module on the tzset module.
	* strftime.c (my_strftime) [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
	Copy the input structure, to work around some of the bug with
	Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
	Solaris releases, you should also use the tzset module, but we won't
	require it as a dependency any more since we don't want LGPLed code
	to depend on GPLed code.

Jim Meyering's avatar
Jim Meyering committed
1346 1347 1348 1349
2005-07-02  Jim Meyering  <jim@meyering.net>

	* backupfile.c (backup_args): Change a `0' to NULL.

1350 1351 1352 1353 1354 1355 1356 1357
2005-07-01  Jim Meyering  <jim@meyering.net>

	* chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
	* getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
	* save-cwd.c, tempname.c:
	Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
	and don't include <sys/file.h>).

1358 1359 1360 1361 1362
2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>

	* xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
	declares only 'struct timespec;' (!).

Jim Meyering's avatar
Jim Meyering committed
1363 1364 1365 1366 1367 1368
2005-06-29  Jim Meyering  <jim@meyering.net>

	* mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
	type name.  Use the variable name instead.
	* idcache.c (getuser, getuidbyname, getgroup, getgidbyname): Likewise.

1369 1370 1371 1372
2005-06-28  Simon Josefsson  <jas@extundo.com>

	* check-version.h, check-version.c: New files.

1373 1374 1375 1376 1377 1378 1379 1380 1381
2005-06-28  Simon Josefsson  <jas@extundo.com>

	* base64.c (base64_encode): Indent.  Rename 'b64' to avoid
	collision with global variable.  Better indentation.  Don't
	increment buffer pointer beyond buffer end.  Based on comments
	from Paul Eggert <eggert@cs.ucla.edu>.

	* base64.h: Indent.

1382 1383 1384 1385 1386 1387
2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>

	* canon-host.c (canon-host): Append trailing "," to 0 in
	initializer of struct addrinfo, as an indication that we don't
	care how many members the structure has.

1388 1389 1390 1391 1392 1393 1394 1395 1396
2005-06-24  Derek Price  <derek@ximbiot.com>
	and Bruno Haible  <bruno@clisp.org>

	Remove stat module & update lstat.
	* stat.c: Remove this file...
	(slash_aware_lstat): ...moving this content and its support...
	* lstat.c (rpl_lstat): ...into here.
	* lstat.h: New file.

1397 1398 1399 1400 1401 1402 1403 1404 1405 1406
2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>

	* mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
	(ranged_convert): Don't save conversion in a temporary struct.
	This causes a warning with GCC 4.0.0, and anyway in the typical
	case it's not worth the extra 100 bytes or so of code.
	(ranged_convert, __mktime_internal): When calling a function via a
	pointer P, use P () rather than (*P) (), as we now assume C89 or
	better.

1407 1408
2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>

1409 1410 1411
	* readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
	"who -r" failed to give output.  Problem reported by Tim Waugh.

1412 1413 1414 1415
	* xmalloc.c (HAVE_GNU_CALLOC): New constant.
	(xcalloc): Use it to avoid needless tests.
	Problem reported by Jim Meyering.

Jim Meyering's avatar
Jim Meyering committed
1416 1417 1418 1419 1420
2005-06-16  Jim Meyering  <jim@meyering.net>

	* calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
	when either N or S is zero.

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
1421 1422 1423
2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>

	* argp.h (__option_is_short): Check upper limit of
Jim Meyering's avatar
Jim Meyering committed
1424 1425
	__key. Isprint() requires its argument to have the value
	of an unsigned char or EOF.
Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
1426

1427 1428 1429 1430 1431 1432
2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>

	* fnmatch.c (fnmatch): If there is an encoding error in a
	multibyte string or pattern, fall back on unibyte matching.
	Problem reported by James Youngman.

1433 1434 1435 1436 1437
2005-06-08  Bruno Haible  <bruno@clisp.org>

	* binary-io.h (fileno): Undefine before defining it. Avoids a gcc
	warning on mingw.

Bruno Haible's avatar
Bruno Haible committed
1438 1439 1440 1441 1442 1443
2005-06-08  Bruno Haible  <bruno@clisp.org>

	* csharpcomp.h: New file, from GNU gettext.
	* csharpcomp.c: New file, from GNU gettext.
	* csharpcomp.sh.in: New file, from GNU gettext.

Derek R. Price's avatar
Derek R. Price committed
1444 1445 1446 1447 1448
2005-06-07  Derek Price  <derek@ximbiot.com>

	Sync from CVS.
	* glob_.h: Indent nested #ifdef.

Paul Eggert's avatar
Paul Eggert committed
1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501
2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>

	Sync from coreutils.
	Use "file name" when talking about file names, instead of "filename"
	or "path", as per the GNU coding standards.
	* mkdir-p.c: Renamed from makepath.c.
	(make_dir_parents): Renamed from make_path.  All callers changed.
	* mkdir-p.h: Likewise.  All includers changed.
	* filenamecat.c: Renamed from path-concat.c.
	(file_name_concat): Renamed from path_concat.  All callers changed.
	[TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
	* filenamecat.h: Likewise.  All includers changed.
	* acl.c: Don't use "path" or "filename" to mean "file name"
	in comments or local variable names.
	* basename.c: Likewise.
	* canonicalize.c, canonicalize.h: Likewise.
	* dirname.c, dirname.h: Likewise.
	* euidaccess.c: Likewise.
	* exclude.c: Likewise
	* fnmatch_.h, fnmatch_loop.c: Likewise.
	* fsusage.c, fsuage.h: Likewise.
	* fts.c, fts_.h: Likewise.
	* getcwd.c: Likewise.
	* getloadavg.c: Likewise.
	* mkstemp.c: Likewise.
	* mountlist.c, mountlist.h: Likewise.
	* openat.c, openat.h: Likewise.
	* readlink-stub.c: Likewise.
	* readutmp.c, readutmp.h: Likewise.
	* rename.c: Likewise.
	* rmdir.c: Likewise.
	* same.c: Likewise.
	* savedir.c: Likewise.
	* stripslash.c: Likewise.
	* tempname.c: Likewise.
	* xreadlink.c: Likewise.
	* exclude.c (excluded_file_name): Renamed from excluded_filename.
	All uses changed.
	* exclude.h: Likewise.

	* euidaccess.c (getuid, getgid, getuid, getegid)
	[!defined _POSIX_VERSION]: Remove decls; not needed these days.
	* idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
	[!defined _POSIX_VERSION]: Remove decls; not needed these days.
	* pathmax.h: Include <limits.h> unconditionally, since other
	files have been getting away with it for years (MORE/BSD 4.3
	is extinct now).
	* userspec.c (getpwnam, getgrnam, getgrgid)
	[!defined _POSIX_VERSION]: Remove decls; not needed these days.

	* pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
	Define to 256, not 255, as per modern POSIX.

Bruno Haible's avatar
Bruno Haible committed
1502 1503 1504 1505 1506 1507
2005-06-01  Bruno Haible  <bruno@clisp.org>

	* csharpexec.h: New file, from GNU gettext.
	* csharpexec.c: New file, from GNU gettext.
	* csharpexec.sh.in: New file, from GNU gettext.

Derek R. Price's avatar
Derek R. Price committed
1508 1509 1510 1511 1512 1513
2005-05-31  Derek Price  <derek@ximbiot.com>
	    Paul Eggert  <eggert@cs.ucla.edu>

	Sync from cvs.
	* glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.

1514 1515 1516 1517 1518
2005-05-29  Derek Price  <derek@ximbiot.com>
	    Paul Eggert  <eggert@cs.ucla.edu>

	* glob_.h, glob.c: New files.

1519 1520
2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>

1521 1522
	* getlogin_r.c (getlogin_r): Don't set errno to 0 on return.

Jim Meyering's avatar
Jim Meyering committed
1523
	* fts.c: Don't worry about debugging on pre-C99-compatible hosts;
1524 1525 1526 1527
	the configuration hassle isn't worth it.
	Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
	(LONGEST_MODIFIER, PRIuMAX): Remove.

Bruno Haible's avatar
Bruno Haible committed
1528 1529 1530 1531
2005-05-27  Bruno Haible  <bruno@clisp.org>

	* getlogin_r.h: Remove second include of <stddef.h>.

1532 1533 1534 1535 1536
2005-05-25  Bruno Haible  <bruno@clisp.org>
	    Derek Price  <derek@ximbiot.com>

	* getlogin_r.h: Simplify API documentation.

1537 1538 1539 1540 1541
2005-05-25  Derek Price  <derek@ximbiot.com>
	    Paul Eggert  <eggert@cs.ucla.edu>

	* getlogin_r.c, getlogin_r.h: New files.

1542 1543 1544 1545 1546 1547
2005-05-22  Bruno Haible  <bruno@clisp.org>

	* minmax.h: Include <limits.h> only when it defines MIN, MAX.
	Also include <sys/param.h> if it defines MIN, MAX.
	Based on a patch by Derek Price <derek@ximbiot.com>.

1548 1549
2005-05-22  Bruno Haible  <bruno@clisp.org>

Bruno Haible's avatar
Bruno Haible committed
1550 1551 1552 1553
	* stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
	(INT64_MIN): Fix definition.
	Suggested by Paul Eggert <eggert@cs.ucla.edu>.

1554 1555 1556
	* stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
	NEED_SIGNED_INT_TYPES.

1557 1558 1559
	* stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
	HAVE_SYSTEM_INTTYPES.

1560 1561 1562 1563 1564
2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>

	* fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
	so that unistd-safer.h (GPL'ed code) need not be included.

Paul Eggert's avatar
Paul Eggert committed
1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601
2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>

	New fts module.
	* fts.c: Don't include "cycle-check.h" or "hash.h".
	(setup_dir, free_dir): New functions.
	(enter_dir, leave_dir): Define trivial
	alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
	(HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
	(LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
	(struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
	Move to fts-cycle.c.
	(fts_open): Use setup_dir.
	(fts_close): Use free_dir.
	(fts_read): Have just one copy of the ENTER_DIR code rather than three.
	This adds a label and some gotos, but the alternatives were messier.
	Check for memory allocation failure when entering a dir.
	(fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
	* fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
	(FTS): New member fts_cycle, that is a union that contains the
	old active_dir_ht and cycle_state.  All uses changed to mention
	fts_cycle.ht and fts_cycle.state.
	* fts-cycle.c: New file, containing GPL'ed code migrated out of
	fts.c, with the following changes:
	(setup_dir, free_dir): New functions.
	(enter_dir): Now returns bool.  Return true if successful, false
	if memory exhausted.  All callers changed.
	Do not bother partly cleaning up on
	memory allocation failure; that is free_dir's job.
	However, free ad if hash_insert fails, to avoid memory leak.
	(enter_dir, leave_dir): Accommodate change to FTS by inspecting
	fts->fts_options to see which union member to use.

2005-05-20  Jim Meyering  <jim@meyering.net>

	* unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
	Now a macro, to pacify GCC.

1602 1603 1604 1605
2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)

	* chown.c (rpl_chown): Return -1 on failure.

Paul Eggert's avatar
Paul Eggert committed
1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620
2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>

	* canonicalize.c: Include canonicalize.h first, to test interface.
	Include <stddef.h> unconditionally, since we assume C89 now.
	All uses of PTR_INT_TYPE replaced by ptrdiff_t.
	* fts.c: Include fts_.h first, to check interface.
	Do not include intprops.h; no longer needed.
	Include cycle-check.h and hash.h, since fts_.h no longer does.
	Remove unnecessary casts of closedir to void.
	(fts_build): Use a simpler method (not involving TYPE_SIGNED) to
	decide whether to decrement nlinks.
	* fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
	(FTS): Use struct hash_table * instead of Hash_table, so that
	we no longer need to include hash.h here.

1621 1622 1623 1624
2005-05-17  Jim Meyering  <jim@meyering.net>

	* fts.c, fts_.h: New files, from coreutils.

Paul Eggert's avatar
Paul Eggert committed
1625 1626 1627
2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>

	Sync from coreutils.
Paul Eggert's avatar
Paul Eggert committed
1628
	* unlinkdir.c, unlinkdir.h: New files.
Paul Eggert's avatar
Paul Eggert committed
1629
	* gethrxtime.c, gethrxtime.h, getpass.h, mountlist.h, path-concat.c,
1630
	regex.h, unlocked-io.h, xtime.h:
Paul Eggert's avatar
Paul Eggert committed
1631 1632 1633 1634 1635 1636
	White space changes only.
	* makepath.c (make_path): Port to hosts where leading "//" is special.
	* yesno.c: Include getline.h, not ctype.h.
	(yesno): Don't remove leading white space; POSIX doesn't allow it.
	Use getline to remove arbitrary restriction on response length.

1637 1638 1639 1640 1641 1642 1643 1644 1645
2005-05-13  Bruno Haible  <bruno@clisp.org>

	* stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
	int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
	UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
	INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
	INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
	Add support for 64-bit integers in the MSVC compiler.

Paul Eggert's avatar
Paul Eggert committed
1646 1647
2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>

1648 1649 1650 1651
	* byteswap_.h, getsubopt.h, iconvme.h, strsep.c, strsep.h:
	Change the initial comment to refer to GPL, not LGPL.
	gnulib-tool will change it to LGPL as needed.

Paul Eggert's avatar
Paul Eggert committed
1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729
	* __fpending.c, acl.c, acl.h, alloca_.h, allocsa.c, allocsa.h,
	argmatch.c, argmatch.h, argp-ba.c, argp-eexst.c, argp-fmtstream.c,
	argp-fmtstream.h, argp-fs-xinl.c, argp-help.c, argp-namefrob.h,
	argp-parse.c, argp-pv.c, argp-pvh.c, argp-xinl.c, argp.h, argz.c,
	argz_.h, asnprintf.c, asprintf.c, atanl.c, backupfile.c,
	backupfile.h, base64.c, base64.h, basename.c, binary-io.h,
	byteswap_.h, c-ctype.c, c-ctype.h, c-stack.c, c-stack.h,
	c-strtod.c, calloc.c, canon-host.c, canonicalize.c,
	canonicalize.h, ceill.c, chdir-long.c, chdir-long.h, chown.c,
	classpath.c, classpath.h, cloexec.c, closeout.c, closeout.h,
	concatpath.c, config.charset, copy-file.c, copy-file.h,
	cycle-check.c, cycle-check.h, diacrit.c, diacrit.h, dirfd.c,
	dirfd.h, dirname.c, dirname.h, dummy.c, dup-safer.c, dup2.c,
	eealloc.h, error.c, error.h, euidaccess.c, exclude.c, exclude.h,
	execute.c, execute.h, exit.h, exitfail.c, exitfail.h, expl.c,
	fatal-signal.c, fatal-signal.h, fd-safer.c, file-type.c,
	file-type.h, fileblocks.c, filemode.c, filemode.h, findprog.c,
	findprog.h, floorl.c, fnmatch.c, fnmatch_.h, fnmatch_loop.c,
	fopen-safer.c, free.c, frexpl.c, fsusage.c, fsusage.h,
	full-read.c, full-read.h, full-write.c, full-write.h,
	fwriteerror.c, fwriteerror.h, gai_strerror.c, gcd.c, gcd.h,
	getaddrinfo.c, getaddrinfo.h, getcwd.c, getcwd.h, getdate.h,
	getdate.y, getdomainname.c, getdomainname.h, getgroups.c,
	gethostname.c, gethrxtime.c, gethrxtime.h, getline.c, getline.h,
	getloadavg.c, getndelim2.c, getndelim2.h, getnline.c, getnline.h,
	getopt.c, getopt1.c, getopt_.h, getopt_int.h, getpagesize.h,
	getpass.c, getpass.h, getsubopt.c, getsubopt.h, gettext.h,
	gettime.c, gettimeofday.c, getugroups.c, getusershell.c,
	group-member.c, group-member.h, hard-locale.c, hard-locale.h,
	hash-pjw.c, hash-pjw.h, hash.c, hash.h, human.c, human.h,
	iconvme.c, iconvme.h, idcache.c, inet_ntop.h, intprops.h,
	inttostr.c, inttostr.h, isdir.c, javacomp.c, javacomp.h,
	javacomp.sh.in, javaexec.c, javaexec.h, javaexec.sh.in,
	lbrkprop.h, lchown.c, ldexpl.c, linebreak.c, linebreak.h,
	linebuffer.c, linebuffer.h, localcharset.c, localcharset.h,
	logl.c, long-options.c, long-options.h, lstat.c, makepath.c,
	makepath.h, malloc.c, mathl.h, mbswidth.c, mbswidth.h, md5.c,
	md5.h, memcasecmp.c, memcasecmp.h, memchr.c, memcmp.c, memcoll.c,
	memcoll.h, memcpy.c, memmem.c, memmem.h, mempcpy.c, mempcpy.h,
	memrchr.c, memrchr.h, memset.c, minmax.h, mkdir.c, mkdtemp.c,
	mkdtemp.h, mkstemp.c, mktime.c, modechange.c, modechange.h,
	mountlist.c, mountlist.h, nanosleep.c, obstack.c, obstack.h,
	openat.c, openat.h, pagealign_alloc.c, pagealign_alloc.h,
	path-concat.c, path-concat.h, pathmax.h, pathname.h, physmem.c,
	physmem.h, pipe.c, pipe.h, poll.c, poll_.h, posixtm.c, posixtm.h,
	posixver.c, printf-args.c, printf-args.h, printf-parse.c,
	printf-parse.h, progname.c, progname.h, progreloc.c, putenv.c,
	quote.c, quote.h, quotearg.c, quotearg.h, raise.c, readlink.c,
	readtokens.c, readtokens.h, readtokens0.c, readtokens0.h,
	readutmp.c, readutmp.h, realloc.c, ref-add.sin, ref-del.sin,
	regex.c, regex.h, rename.c, rmdir.c, rpmatch.c, safe-read.c,
	safe-read.h, safe-write.c, safe-write.h, same.c, same.h,
	save-cwd.c, save-cwd.h, savedir.c, savedir.h, setenv.c, setenv.h,
	settime.c, sh-quote.c, sh-quote.h, sha1.c, sha1.h, sig2str.c,
	sig2str.h, sincosl.c, snprintf.c, snprintf.h, sqrtl.c,
	stat-macros.h, stat.c, stdbool_.h, stdint_.h, stdio-safer.h,
	stpcpy.c, stpcpy.h, stpncpy.c, stpncpy.h, strcase.h, strcasecmp.c,
	strchrnul.c, strchrnul.h, strcspn.c, strdup.c, strdup.h,
	strerror.c, strftime.c, strftime.h, stripslash.c, strndup.c,
	strndup.h, strnlen.c, strpbrk.c, strpbrk.h, strsep.c, strsep.h,
	strstr.c, strstr.h, strtod.c, strtoimax.c, strtok_r.c, strtok_r.h,
	strtol.c, strtoll.c, strtoul.c, strtoull.c, strverscmp.c,
	strverscmp.h, sysexit_.h, tempname.c, time_r.c, time_r.h,
	timegm.c, timegm.h, timespec.h, trigl.c, trigl.h, ucs4-utf16.h,
	ucs4-utf8.h, unicodeio.c, unicodeio.h, unistd-safer.h,
	unlocked-io.h, unsetenv.c, userspec.c, utf16-ucs4.h, utf8-ucs4.h,
	utime.c, utimecmp.c, utimecmp.h, utimens.c, vasnprintf.c,
	vasnprintf.h, vasprintf.c, vasprintf.h, version-etc-fsf.c,
	version-etc.c, version-etc.h, vsnprintf.c, vsnprintf.h,
	w32spawn.h, wait-process.c, wait-process.h, xalloc-die.c,
	xalloc.h, xallocsa.c, xallocsa.h, xasprintf.c, xgetcwd.c,
	xgetcwd.h, xgetdomainname.c, xgetdomainname.h, xgethostname.c,
	xmalloc.c, xmemcoll.c, xnanosleep.c, xreadlink.c, xreadlink.h,
	xsetenv.c, xsetenv.h, xsize.h, xstrndup.c, xstrndup.h, xstrtod.c,
	xstrtod.h, xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtoumax.c,
	xtime.h, xvasprintf.c, xvasprintf.h, yesno.c, yesno.h:
	Update FSF postal mail address.

1730 1731 1732 1733 1734 1735 1736 1737 1738
2005-05-10  Yoann Vandoorselaere <yoann.v@prelude-ids.com>

	* getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
	specified in ai_socktype. Fix invalid ai_protocol
	check. ai_protocol is usually set to 0 or depending on
	ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
	SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
	ai_socktype / ai_protocol in the returned addrinfo structure.

Bruno Haible's avatar
Bruno Haible committed
1739
2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1740
	    Bruno Haible  <bruno@clisp.org>
Bruno Haible's avatar
Bruno Haible committed
1741 1742 1743 1744

	* inet_ntop.h: New file.
	* inet_ntop.c: New file, from glibc with modifications.

Jim Meyering's avatar
Jim Meyering committed
1745 1746 1747 1748
2005-05-08  Jim Meyering  <jim@meyering.net>

	* classpath.c (PATH_SEPARATOR): Remove insignificant trailing blank.

Paul Eggert's avatar
Paul Eggert committed
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830
2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>

	Merge from coreutils.  Among other things,
	add bulletproofing for cases where stdin, stdout, or stderr are closed.
	* fd-safer.c: New file.
	* fcntl-safer.h, open-safer.c: Remove.
	* chdir-long.c: Fix comment "fetish" -> "coreutils".
	* dup-safer.c: Include unistd-safer.h first.
	Don't include errno.h.
	(dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
	* file-type.h: Don't assume invoker included sys/stat.h first.
	* file-type.c: Rely on file-type.h change.
	* getloadavg.c: Include unistd-safer.h.
	(getloadavg): Use safer open.
	* getusershell.c: Include "stdio-safer.h".
	(getusershell): Use safer fopen.
	* long-options.c (long_options): Use NULL rather than 0.
	* modechange.h (mode_free): Remove; all callers changed to invoke
	'free'.
	* modechange.c: Likewise.
	xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
	(MODE_DONE): New constant.
	(struct mode_change): Remove 'next' member.
	(make_node_op_equals): New function; like the old one of the
	same name, except it allocates an array.
	(mode_compile, mode_create_from_ref): Use it.
	(mode_compile): Allocate result as an array, not a linked list.
	Parse octal string ourself, so that we catch mistakes like "+0".
	(mode_adjust): Arg is an array, not a linked list.
	* modechange.c: Include stat-macros.h, xalloc.h.
	(S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
	(S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
	(S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
	Remove.  This is now stat-macros.h's job.
	(talloc): Remove.  All callers replaced by xalloc, so that
	our invokers don't have to worry about reporting memory failures.
	(make_node_op_equals): Remove.
	(MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
	New constants.
	(struct mode_change): Moved here from modechange.h.
	(mode_append_entry): Remove.
	(mode_compile): Remove MASKED_OPS arg, since it encouraged
	apps to have incorrect behavior.  Use simpler algorithm for head
	and tail.  Don't futz with umask; that's now the job of mode_adjust.
	Detect more invalid usages rather than having somewhat-random behavior.
	Don't insert an "a=" action, as that leads to incorrect behavior.
	(mode_compile, mode_create_from_ref): Return NULL on error instead
	of an enum, since now there's only one way to have an error.  All
	callers changed.
	(mode_adjust): Accept new arg UMASK_VALUE, and interpret it
	at the correct time.  Simplify calculation of "+u" and its ilk.
	Don't mishandle "+X".
	(mode_free): Remove "register" and localize decls.
	* modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
	(struct mode_change): Move to modechange.c; callers don't
	need to see this stuff.
	(MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
	(MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
	(mode_change, mode_adjust): Reflect the new signatures noted above.
	* nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
	that might redefine system include files.
	(siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
	(my_usleep): Use NULL rather than (void *) 0.
	(rpl_nanosleep) [!defined SA_NOCLDSTOP]:
	Use siginterrupt to specify that system calls should be interrupted.
	(rpl_nanosleep): Move initialization of suspended closer to call of
	my_usleep.
	* readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
	* readutmp.c: Likewise.  Include signal.h, stdbool.h.
	(desirable_utmp_entry): New function.
	(read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
	using x2nrealloc, to simplify logic.
	(read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
	size calculation.  Do not assume utmp file is a regular file.
	* readutmp.h (UT_PID): Moved here from ../src/who.c.
	(READ_UTMP_CHECK_PIDS): New constant.
	* save-cwd.c: Include unistd-safer.h.
	(save_cwd): Use fd_safer.
	* tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
	[!_LIBC] Include "stat-macros.h" instead.
	* unistd-safer.h (fd_safer): New decl.

Paul Eggert's avatar
Paul Eggert committed
1831 1832 1833 1834
2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>

	* byteswap_.h: New file.

1835
2005-04-25  Albert Chin  <china@thewrittenword.com>
1836 1837 1838 1839

	* regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
	Toolkit C bug.

1840 1841 1842 1843 1844 1845 1846 1847
2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>

	* getdate.y (zone): Allow relunit_snumber after tZONE, so
	that "UTC +1 second" continues to work.  Problem reported
	by Dmitry V. Levin.
	(relunit_snumber): New rule.
	(relunit): Use it.

1848 1849 1850 1851 1852 1853 1854 1855 1856
2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>

	* getdate.y (universal_time_zone_table): New constant.
	(time_zone_table): Remove GMT, UT, UTC entries; they're now in
	universal_time_zone_table.
	(lookup_zone): Prefer universal_time_zone_table to
	local_time_zone_table, so that "GMT" time stamps are allowed in
	London during the summer.  Problem reported by Ian Abbott.

Jim Meyering's avatar
Jim Meyering committed
1857 1858 1859 1860 1861 1862
2005-04-12  Jim Meyering  <jim@meyering.net>

	* human.c (humblock): Set *options even when returning due to
	xstrtoumax conversion failure.  Thanks to a used-uninitialized
	warning from gcc-4.

Jim Meyering's avatar
Jim Meyering committed
1863 1864 1865 1866 1867
2005-04-09  Jim Meyering  <jim@meyering.net>

	* posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
	-Wuninitialized: initialize tm0.tm_year.

1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881
2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>

	* getdate.y (parser_control): rels_seen is now a boolean, not a
	count, since there's no maximum.  All uses changed.
	Add member dsts_seen.
	(local_zone): Accumulate dsts_seen rather than relying on tm_isdst
	not being INT_MAX.
	(get_date): Initialize dsts_seen, and check that it doesn't go over 1.
	Use pc_rels_seen to decide whther a date is absolute.

	* getdate.y (number): Don't overwrite year.
	(get_date): Initialize pc.year.digits to 0, not 4, to enable above
	check.

1882 1883 1884 1885 1886
2005-04-02  Simon Josefsson  <jas@extundo.com>

	* getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
	patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.

Jim Meyering's avatar
Jim Meyering committed
1887 1888 1889 1890
2005-03-27  Jim Meyering  <jim@meyering.net>

	* argmatch.c: Clarify comment: null-terminated -> NULL-terminated.

1891 1892 1893
2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>

	* intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
1894
	"one's complement" -> "ones' complement" in comment, as per Knuth.
1895
	"value of type" -> "type or expression" in comment.
1896
	* mktime.c, strftime.c: Propagate intprops.h comment nits.
1897

Jim Meyering's avatar
Jim Meyering committed
1898 1899 1900 1901 1902 1903
2005-03-26  Jim Meyering  <jim@meyering.net>

	Comment nits.
	* intprops.h: Add the apostrophe in `(one|two)'s complement'.
	Correct typos: s/or/of/.

Jim Meyering's avatar
Jim Meyering committed
1904 1905 1906 1907
2005-03-23  Jim Meyering  <jim@meyering.net>

	* canonicalize.c: Remove duplicate `#include "stat-macros.h"'.

1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927
2005-03-21  Jim Meyering  <jim@meyering.net>

	Changes imported from coreutils.

	* cycle-check.c: Don't include xalloc.h.

	* path-concat.c: Don't include assert.h.
	(path_concat): Remove assertion that would have triggered
	for ABASE starting with more than one slash.
	Reported by Andreas Schwab.

	* path-concat.c (path_concat): Set *BASE_IN_RESULT
	properly when ABASE is an absolute file name.
	Correct the description of this function.
	Include <assert.h>.
	Add an assertion and a test driver.
	This fixes a bug introduced on 2004-07-02.
	Andreas Schwab reported the resulting failure of cp --parents:
	http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html

1928 1929 1930 1931 1932 1933
2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>

	* strftime.c (my_strftime): If the underlying strftime returns 0
	(which shouldn't happen), generate nothing instead of returning 0
	immediately, so that nstrftime (NULL, ...) doesn't return 0.

1934 1935 1936 1937
2005-03-16  Bruno Haible  <bruno@clisp.org>

	* stdint_.h: Use HAVE_LONG_LONG_64BIT instead of HAVE_LONGLONG_64BIT.

1938 1939 1940 1941 1942 1943
2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>

	* strftime.c (my_strftime): Prepend space to format so that we can
	reliably distinguish strftime failure from empty output on POSIX
	hosts.

Simon Josefsson's avatar
Simon Josefsson committed
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953
2005-03-08  Paul Eggert  <eggert@cs.ucla.edu>

	* iconvme.c (SIZE_MAX): New macro, if not already defined.
	(iconv_string): Don't guess a size-zero buffer, as that might cause
	buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
	result would be 'too large', where 'too large' is (heuristically)
	the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
	overflow concerns.  This will prevent some unwanted malloc failures
	when the inputs are very large.

1954 1955 1956 1957 1958
2005-03-15  Bruno Haible  <bruno@clisp.org>

	* regex.c (byte_re_match_2_internal): Rename local variable 'not' to
	'negate'.

1959 1960 1961
	* regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
	variable.

1962 1963
	* regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc results.

1964 1965 1966 1967 1968 1969 1970 1971
2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>

	* mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
	TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
	intprops.h.
	* strtol.c: Likewise.

2005-03-14  Simon Josefsson  <jas@extundo.com>
1972 1973 1974 1975

	* timegm.h: Use proper prototype CPP guards, reported by Dave Love
	<fx@gnu.org>.

1976 1977 1978 1979 1980 1981 1982 1983 1984
2005-03-14  Jim Meyering  <jim@meyering.net>

	* strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
	&& HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
	to be nonzero so that we (and caller) can detect the difference
	between a valid zero-length expansion and an error return, even
	when the underlying strftime fails before writing anything into
	that location.

Jim Meyering's avatar
Jim Meyering committed
1985 1986 1987 1988 1989
2005-03-10  Jim Meyering  <jim@meyering.net>

	* save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
	so that this module works on systems without fchdir.

1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>

	Factor int-properties macros into a single file, except for
	glibc-related files.
	* intprops.h: New file.
	* getloadavg.c: Include it instead of limits.h.
	(INT_STRLEN_BOUND): Remove.
	* human.c: Include intprops.h.
	(group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
	* human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000.
	* inttostr.h: Include intprops.h instead of limits.h.
	(INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
	* mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
	for consistency with intprops.h.
	(time_t_is_integer, twos_complement_arithmetic): Use them.
	* sig2str.h: Include <signal.h>, intprops.h.
	(INT_STRLEN_BOUND): Remove.
	* strftime.c (TYPE_SIGNED): Remove.
	(INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
	* strtol.c: Adjust comments to match intprops.h.
	* userspec.c: Include intprops.h.
	(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
	* utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
	* utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
	instead of rolling our own expressions.
	* xstrtol.c: Include xstrtol.h first, to test interface.

	* strftime.c: Include <stdbool.h>.  Use bool where appropriate,
	instead of int.
	(my_strftime): Do not mishandle years close to INT_MAX, by doing
	the right thing even if adding 1900 would overflow.  Similarly
	for tm_mon + 1 and tm_yday + 1.
	Make %Y always equivalent to %C%y, and similarly for %G and %g.
	(DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
	(DO_SIGNED_NUMBER): New macro.
	(my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.

2027 2028 2029 2030
2005-03-07  Bruno Haible  <bruno@clisp.org>

	* pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.

2031
2005-03-03  Derek R. Price  <derek@ximbiot.com>
2032
	    Bruno Haible  <bruno@clisp.org>
2033 2034 2035 2036

	* pagealign_alloc.h: New file.
	* pagealign_alloc.c: New file.

Bruno Haible's avatar
Bruno Haible committed
2037 2038 2039 2040 2041
2005-01-28  Bruno Haible  <bruno@clisp.org>

	* stpncpy.h (stpncpy): Define as a macro without arguments, so that
	stpncpy.c uses it.

2042 2043 2044 2045 2046 2047 2048 2049 2050 2051
2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>

	Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
	The workaround isn't strictly needed for POSIX conformance, and
	it's too much of a pain to configure and maintain.  We'll ask
	people to fix their kernels instead.
	* xnanosleep.c: Don't include gethrxtime.h or xtime.h.
	(NANOSLEEP_BUG_WORKAROUND): Remove.
	(xnanosleep): Remove the workaround.

2052 2053 2054 2055
2005-02-12  Bruno Haible  <bruno@clisp.org>

	* vasnprintf.c (EOVERFLOW): Define to a fallback if needed.

2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071
2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>

	* gethrxtime.h, gethrxtime.c, xtime.h: New files.
	* timespec.h (gettime): Return void, since it always
	succeeds now.  All uses changed.
	* gettime.c (gettime) Likewise.
	[HAVE_NANOTIME]: Prefer nanotime.
	Assume gettimeofday succeeds, as POSIX requires.
	Assime time () succeeds, since other code already does.
	* xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
	(timespec_subtract): Remove.
	(NANOSLEEP_BUG_WORKAROUND): New constant.
	(xnanosleep): Use gethrxtime rather than gettime; this simplifies
	things considerably.  Use it only on GNU/Linux hosts, since the
	workaround shouldn't be needed elsewhere.

2072 2073 2074 2075
2005-02-24  Bruno Haible  <bruno@clisp.org>

	* gettext.h: Update from GNU gettext 0.14.2.

2076 2077 2078 2079 2080
2005-02-24  Bruno Haible  <bruno@clisp.org>

	* localcharset.c: Update from GNU gettext 0.14.2.
	* config.charset: Update from GNU gettext 0.14.2.

2081 2082 2083 2084
2005-02-22  Simon Josefsson  <jas@extundo.com>

	* iconvme.h, iconvme.c: New files, from libc.

Jim Meyering's avatar
Jim Meyering committed
2085 2086 2087 2088 2089 2090
2005-02-20  Neil Conway  <neilc@samurai.com>

	* xgethostname.c (xgethostname): Check for ENOMEM, which is
	returned by OSX/Darwin if the specified buffer is not large
	enough for the hostname.

2091 2092 2093 2094 2095 2096 2097
2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>

	* memrchr.h: New file.
	* chdir-long.c: Include it.
	* memrchr.c [!defined _LIBC]: Include it rather than <string.h>
	Don't bother including stddef.h.

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2098 2099 2100 2101 2102 2103
2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>

	* argp-help.c (__argp_help): Create a fake struct argp_state and
	pass it to _help, otherwise the latter coredumps trying to
	dereference state.root_argp.

2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114
2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>

	* mountlist.h (MOUNTLIST_H_): New macro, to protect against double
	inclusion.
	Include <sys/types.h>, for dev_t.
	(ME_DUMMY, ME_REMOTE): Move from here....
	* mountlist.c (ME_DUMMY, ME_REMOTE): To here.
	(ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
	Dmitry V. Levin.
	Include mountlist.h first, to test the interface.

2115 2116 2117 2118 2119
2005-01-29  Bruno Haible  <bruno@clisp.org>

	* progname.c (program_name): Initialize.
	Needed when linking statically on MacOS X.

Bruno Haible's avatar
Bruno Haible committed
2120 2121 2122 2123 2124 2125
2005-01-28  Bruno Haible  <bruno@clisp.org>

	* javacomp.sh.in: New file, from GNU gettext.
	* javacomp.h: New file, from GNU gettext.
	* javacomp.c: New file, from GNU gettext.

Bruno Haible's avatar
Bruno Haible committed
2126 2127 2128 2129 2130 2131
2005-01-26  Bruno Haible  <bruno@clisp.org>

	* javaexec.sh.in: New file, from GNU gettext.
	* javaexec.h: New file, from GNU gettext.
	* javaexec.c: New file, from GNU gettext.

2132 2133 2134 2135
2005-01-26  Simon Josefsson  <jas@extundo.com>

	* gai_strerror.c: Use GPL in header.

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2136 2137 2138 2139
2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>

	* argp-help.c (hol_entry_help): Avoid using non-constant
	initializers for struct pentry_state.
Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2140 2141 2142
	(__argp_error): Check return value of __asprintf
	(__argp_failure): Translate error message

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2143 2144
	* argp-parse.c: Removed braces around the expansion of N_()

2145
2005-01-21  Jim Meyering  <jim@meyering.net>
2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159

	* openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
	same value as for Solaris 9.

	* chdir-long.c (chdir_long): Rewrite to remove limitation on
	component length.  This included changing the parameter to be
	of type `char *' rather than `char const *'.
	* chdir-long.h (chdir_long): Update prototype.

	* openat.c (fdopendir, fstatat): New functions.
	* openat.h: Include headers required for use of DIR and struct stat.
	[AT_SYMLINK_NOFOLLOW]: Define.
	(fdopendir, fstatat): Add prototypes.

Bruno Haible's avatar
Bruno Haible committed
2160 2161 2162 2163 2164
2005-01-21  Bruno Haible  <bruno@clisp.org>

	* classpath.h: New file, from GNU gettext.
	* classpath.c: New file, from GNU gettext.

2165 2166 2167 2168 2169 2170 2171
2005-01-20  Simon Josefsson  <jas@extundo.com>

	* version-etc-fsf.c: New file, with version_etc_copyright.
	* version-etc.c: Remove version_etc_copyright.
	* version-etc.h (version_etc_copyright): Use [] instead of * in
	prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.

2172 2173 2174 2175 2176 2177
2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>

	* save-cwd.c (save_cwd): Remove code to support the case
	where fchdir is missing or flaky.

2005-01-20  Simon Josefsson  <jas@extundo.com>
2178 2179 2180 2181 2182 2183 2184

	* base64.h (isbase64): Add.

	* base64.c (isb64): Rename to isbase64, use to_uchar instead of
	using a unsigned prototype, don't inline.
	(base64_decode): Use it.

Bruno Haible's avatar
Bruno Haible committed
2185 2186 2187 2188 2189
2005-01-19  Bruno Haible  <bruno@clisp.org>

	* sh-quote.h: New file, from GNU gettext.
	* sh-quote.c: New file, from GNU gettext.

Paul Eggert's avatar
Paul Eggert committed
2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218
2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>

	Merge changes from coreutils, as described below in several
	changelogs dated today.

	* save-cwd.c: Include "save-cwd.h" before other include files.
	(O_DIRECTORY): Remove; not needed here, since "." must be
	a directory.  All uses removed.
	(save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
	universal on Suns, and we also need to test for IRIX.
	Revamp code to use 'if' rather than '#if'.
	Avoid unnecessary comparison of cwd->desc to 0.

	* utimens.c (futimens): Robustify the previous patch, by checking
	for known valid error numbers rather than observed invalid ones.

2005-01-18  Jim Meyering  <jim@meyering.net>

	* version-etc.c (version_etc_copyright): Update copyright date.

	* utimens.c (futimens): Account for the fact that futimes
	can also fail with errno == ENOSYS or errno == ENOENT.
	Patch from Dmitry V. Levin.

	Change the name of the robust chdir function from chdir to chdir_long.
	* save-cwd.c: Include chdir-long.h rather than chdir.h.
	(restore_cwd): Use chdir_long, not chdir.
	* chdir-long.c: Renamed from chdir.c.
	* chdir-long.h: Renamed from chdir.h.
Bruno Haible's avatar
Bruno Haible committed
2219 2220 2221
	[!defined PATH_MAX]: Define chdir_long to chdir on systems like the
	Hurd.

Paul Eggert's avatar
Paul Eggert committed
2222 2223 2224 2225 2226 2227
2005-01-18  Bob Proulx  <bob@proulx.com>

	* obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to simplify
	offsetof() macro construct to avoid compile failure with native HP-UX
	11.0 ANSI C compiler.

2228 2229 2230 2231 2232
2005-01-06  Bruno Haible  <bruno@clisp.org>

	* stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming, redundant
	because stpncpy.m4 takes care of it.

Bruno Haible's avatar
Bruno Haible committed
2233 2234 2235 2236 2237 2238 2239 2240
2004-01-24  Bruno Haible  <bruno@clisp.org>

	* progreloc.c (xstrdup): Define as strdup if no xmalloc should be used.

2003-10-09  Bruno Haible  <bruno@clisp.org>

	* progreloc.c: Include xalloc.h instead of xmalloc.h.

2241 2242 2243 2244 2245 2246 2247
2005-01-06  Bruno Haible  <bruno@clisp.org>

	* fwriteerror.h (fwriteerror): Change specification to include fclose.
	* fwriteerror.c: Include <stdbool.h>.
	(fwriteerror): At the end, close the file stream. Record whether
	stdout was already closed.

2248 2249 2250 2251 2252 2253
2004-05-27  Bruno Haible  <bruno@clisp.org>

	* execute.c (environ): Declare if needed.
	* pipe.c (environ): Likewise.
	Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.

2254 2255 2256 2257 2258 2259
2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>

	* human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
	definitions to be after all include files, to avoid collisions.
	Problem reported by Bob Proulx.

2260 2261 2262 2263 2264 2265
2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>

	* error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
	not needed.  This removes a dependency on the gettext module.
	[defined _LIBC]: Do not include <libintl.h>; not needed.

2266 2267 2268
2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>

	* c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
2269
	HAVE_DECL_STRTOLD.
2270

2271 2272
2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>

2273 2274 2275 2276 2277
	* argp-parse.c: Include <stddef.h>.
	(alignof, alignto): New macros.
	(parser_init): Don't assume that void * is aligned sufficiently
	for struct option.

2278 2279 2280 2281
	* getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
	need to extend the stack.
	(YYINITDEPTH): New macro, so that the initial stack isn't overly
	large.
2282

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2283 2284
2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>

2285
	* argp-parse.c (parser_init): Avoid arithmetics on void pointers.
Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2286

2287 2288 2289 2290 2291 2292 2293 2294
2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>

	* alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
	Remove now-obsolete comment about AIX.
	* getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
	(YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
	(YYMAXDEPTH): New macro.

2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305
2004-12-18  Bruno Haible  <bruno@clisp.org>

	* fatal-signal.c (fatal_signals): Make non-const.
	(init_fatal_signals): New function.
	(uninstall_handlers, install_handlers): Ignore signals that were set to
	SIG_IGN.
	(at_fatal_signal): Call init_fatal_signals.
	(init_fatal_signal_set): Likewise. Ignore signals that were set to
	SIG_IGN.
	Reported by Paul Eggert.

Paul Eggert's avatar
Paul Eggert committed
2306 2307 2308 2309 2310 2311 2312 2313 2314
2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>

	* getdate.y (textint): New member "negative".
	(time_zone_hhmm): New function.
	Expect 14 shift-reduce conflicts, not 13.
	(o_colon_minutes): New rule.
	(time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
	(yylex): Set the "negative" member of signed numbers.

2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326
2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>

	Changes imported from coreutils.
	* hard-locale.c: Assume <locale.h> exists.
	Include "strdup.h".
	(GLIBC_VERSION): New macro.
	(hard_locale): Assume setlocale exists.
	Rewrite to avoid #ifdef.
	Use strdup rather than malloc + strcpy.
	* human.c: Assume <locale.h> exists.
	(human_readable): Assume localeconv exists.

2327 2328 2329 2330 2331
2004-12-01  Jakub Jelinek  <jakub@redhat.com>

	* mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
	convert T2, not T.  (Imported from libc.)

2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348
2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>

	* getcwd.c (is_ENAMETOOLONG): New macro.
	(__getcwd.c): Don't restore errno; glibc doesn't.
	[HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
	first, falling back to our code only if its results look suspicious.
	Ensure that the resulting buffer is only as large as necessary.

	* readutmp.c: Include readutmp.h first.
	Include <errno.h>, since readutmp.h no longer does that.
	* readutmp.h: Don't include <errno.h>,
	<sys/param.h>, <time.h>; not needed to establish interface.
	(errno): Remove decl.
	(HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
	(UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
	UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.

Simon Josefsson's avatar
Simon Josefsson committed
2349 2350 2351 2352
2004-11-28  Simon Josefsson  <jas@extundo.com>

	* base64.h, base64.c: New file.

2353 2354 2355 2356
2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>

	* getcwd.h: New file, which I forgot to check in on 2004-11-25.

2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419
2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>

	Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
	HP's ANSI C compiler.
	* fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
	Declaring int functions causes warnings on some modern systems and
	shouldn't be needed to compile on ancient ones.
	* same.c (MIN) [defined MIN]: Don't define, since it's already
	defined.

	* getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
	with the following changes.
	(__set_errno): Parenthesize properly.
	Include <stdbool.h>.
	(MIN, MAX, MATCHING_INO): New macros.
	(__getcwd): Define with prototype, not K&R form.
	Use heuristics to allocate default buffer on stack if possible.
	If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
	behavior, and to avoid the PATH_MAX limit when computing
	../../../../...
	Use MATCHING_INO to compare inode number to file.
	Check for arithmetic overflow in size calculations.
	Fix bug in reallocation of dot array that caused getcwd to fail
	on directories nested deeper than 75.
	Be more careful about saving errno on error.
	Do not use realloc; use only free+malloc, as this is a bit
	more flexible and avoids a needless copy operation.
	Do not inspect st_dev and st_ino for symbolic links; POSIX
	doesn't specify the latter.
	Check for closedir errors.
	Avoid needless casts.
	Use "#ifdef weak_alias" around weak_alias, to be like other
	glibc code.
	The following changes to getcwd.c have effect only when used in
	gnulib; they have no effect inside glibc proper.
	(#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
	as alloca isn't used.
	(alloca, __alloca): Likewise.
	[!_LIBC]: Include "getcwd.h", "mempcpy.h".
	Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
	unconditionally, as gnulib assumes C89 or better.
	Do not include <sys/param.h>.
	(errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
	no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
	better.
	(NULL) [!defined NULL]: Remove; we assume C89 or better.
	Include <dirent.h> in a way that is compatible with modern Autoconf.
	(_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
	New macros, if not already defined.
	Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
	Use "_LIBC", not "defined _LIBC", for consistency.
	(HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
	a mempcpy module.
	(__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
	(GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
	* xgetcwd.c: David MacKenzie's old code was removed, so give
	credit only to Jim Meyering and adjust the copyright dates.
	Do not include <limits.h>, <stdio.h>, <sys/types.h>,
	<stdlib.h>, <unistd.h>, "pathmax.h".
	Instead, include "xgetcwd.h" (first) and "getcwd.h".
	(INITIAL_BUFFER_SIZE): Remove.
	(xgetcwd): Rely on getcwd, since we now depend on a reliable one.

Jim Meyering's avatar
Jim Meyering committed
2420 2421 2422 2423
2004-11-23  Jim Meyering  <jim@meyering.net>

	* getopt_.h: Remove trailing blanks.

Paul Eggert's avatar
Paul Eggert committed
2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435
2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>

	* utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
	(futimens): New function, which uses futimes if available.
	(futimens, utimens): Support timespec==NULL, with same semantics
	as utime and utimens.
	* utimens.h (futimens): New decl.

2004-11-23  Jim Meyering  <jim@meyering.net>

	* __fpending.c: Add comment.

Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2436 2437
2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>

2438
	* getopt_.h: Re-addition of __getopt_argv_const caused
Sergey Poznyakoff's avatar
Sergey Poznyakoff committed
2439 2440 2441 2442 2443 2444 2445 2446 2447
	redefinition warnings. To avoid them, include the defines
	in `#if !defined __need_getopt ... #endif'. The only place
	where __getopt_argv_const is used is in definitions
	of getopt_long and getopt_long_only below, which are as well
	protected by `#ifndef __need_getopt'.
	[defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
	__need_getopt after including <stdio.h> and <unistd.h> These
	headers might have defined it.

2448 2449
2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>

2450 2451
	* getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
	New macros.
2452
	(getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
2453
	optopt): Use them instead of invoking ## directly; otherwise, the
2454 2455
	symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.

2456 2457 2458 2459 2460
2004-11-19  Bruno Haible  <bruno@clisp.org>

	* strtok_r.c: Move comments from here...
	* strtok_r.h: ... to here.

2461 2462 2463 2464 2465 2466 2467
2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>

	* realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
	might fail.  Problem reported by Yoann Vandoorselaere.
	* calloc.c (rpl_calloc): Defend against buggy calloc implementations
	that mishandle size_t overflow.

2468 2469
2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
2470 2471 2472 2473
	* canon-host.c: Include "strdup.h".
	(canon_host): Use getaddrinfo if available, so that IPv6 works.
	Use strdup instead of malloc/strcpy to duplicate strings.

2474 2475 2476 2477 2478 2479 2480 2481 2482
	* human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
	(human_space_before_unit): New constant.
	* human.c (human_readable): Support it.

	* xgetcwd.c: Include <limits.h>, for PATH_MAX.
	(xgetcwd): Set errno correctly when failing.
	Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
	the failure is actually due to a PATH_MAX problem.

2483 2484 2485 2486 2487 2488 2489 2490 2491
	Further getopt changes to make it more likely that glibc will
	buy the changes back.
	* getopt.c (POSIXLY_CORRECT): New constant.
	(getopt): Use it, so to preserve glibc semantic
	* getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
	when compiling for libc.
	* getopt_.h (__getopt_argv_const): Bring it back.
	(getopt_long, getopt_long_only): Use it.

2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504
	* getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal):
	New arg POSIXLY_CORRECT.  All callers changed.
	(getopt): Argv is now char * const *, as per standard.
	(_getopt_internal_r, _getopt_internal): Argv is now char **,
	not char *__getopt_argv_const *.
	* getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
	_getopt_long_only_r): Likewise.
	* getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
	* getopt_int.h (_getopt_internal, _getopt_internal_r,
	_getopt_long_r, _getopt_long_only_r): Likewise.
	* getopt_.h (__getopt_argv_const): Remove.
	(getopt): Argv is now char * const *, as per standard.

2505 2506 2507 2508
	* getdate.y (tORDINAL): New token.
	(day, relunit): Allow it for relative times.
	(relative_time_table): Use tORDINAL for ordinals.

Jim Meyering's avatar
.  
Jim Meyering committed
2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519
2004-11-15  Jim Meyering  <jim@meyering.net>

	* closeout.c: Include "__fpending.h" once again.
	Include <stdbool.h>.
	(close_stdout): Don't fail just because stdout was closed initially,
	since some programs don't write to stdout in the normal course of
	operation (other than --version and --help), and we don't want this
	function to make e.g. `touch file >&-' fail.
	But do fail if it was closed and someone has tried to write to it.
	E.g., `printf foo >&-' must fail.

Simon Josefsson's avatar
Simon Josefsson committed
2520 2521 2522 2523
2004-11-11  Simon Josefsson  <jas@extundo.com>

	* strtok_r.h, strtok_r.c: New file.

2524 2525
2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>

2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536
	* getopt_.h (__getopt_argv_const): New macro, to be used so that
	we can stop lying to compilers about the constness of argv when we
	are compiled outside glibc.
	(getopt, getopt_long, getopt_long_only): Use it.
	* getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal,
	getopt): Likewise.
	* getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
	_getopt_long_only_r): Likewise.
	* getopt_int.h (_getopt_internal, _getopt_internal_r, _getopt_long_r,
	_getopt_long_only_r): Likewise.

2537
	* getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
2538
	Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
2539 2540 2541 2542 2543
	Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
	the other external symbols.
	(getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
	declaration, since the above renaming now works around collisions.

Jim Meyering's avatar
Jim Meyering committed
2544 2545 2546 2547 2548 2549 2550 2551
2004-11-11  Jim Meyering  <jim@meyering.net>

	* linebreak.c: Remove trailing blanks.
	* alloca_.h: Likewise.
	* acosl.c: Likewise.
	* euidaccess.c: Likewise.
	* allocsa.h: Likewise.

2552
2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
Simon Josefsson's avatar
Simon Josefsson committed
2553

2554 2555 2556 2557 2558
	* mktime.c (SHR): New macro, which is a portable
	substitute for >> that should work even on Crays.
	(TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
	Problem reported by Mark D. Baushke in
	<http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
2559 2560 2561 2562 2563 2564 2565
	* getdate.y (SHR): Likewise.
	(tm_diff): Use it.
	* strftime.c (SHR): Likewise.
	(tm_diff): Use it.
	* quotearg.c (struct quoting_options): Use unsigned int for
	quote_these_too, so that right shifts are well defined.  All uses
	changed.
2566 2567 2568 2569

2004-11-10  Simon Josefsson  <jas@extundo.com>

	* getaddrinfo.h, getaddrinfo.c: New files.
Simon Josefsson's avatar
Simon Josefsson committed
2570

Jim Meyering's avatar
Jim Meyering committed
2571 2572 2573 2574 2575 2576 2577
2004-11-10  Jim Meyering  <jim@meyering.net>

	Ensure that no close failure goes unreported.
	* closeout.c (close_stdout): Always close stdout.  I.e., don't
	return early when it seems there's nothing to flush.
	Don't include __fpending.h.

2578 2579 2580 2581
2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>

	* strftime.c (DO_MULTIBYTE): Check for wchar.h, too.

2582 2583 2584 2585 2586
2004-11-05  Bruno Haible  <bruno@clisp.org>

	* readlink.c: Include stddef.h, needed for size_t on Woe32.
	Reported by Mark D. Baushke <mdb@cvshome.org>.

2587 2588 2589 2590 2591 2592 2593 2594 2595
2004-11-04  Bruno Haible  <bruno@clisp.org>

	2004-09-11  Bruno Haible  <bruno@clisp.org>
		* allocsa.valgrind: New file.
	2004-02-06  Bruno Haible  <bruno@clisp.org>
		* allocsa.h (sa_alignof): Define differently with HP-UX cc, to
		avoid a bug of this cc on HP-UX 10.20 dealing with enums.
		Reported by Christopher Seip <chris.seip@hp.com>.

2596 2597 2598 2599 2600 2601
2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>

	* xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
	with errno == ERANGE if the buffer is too small.
	Problem reported by Mark D. Baushke.

2602 2603 2604 2605 2606 2607 2608 2609 2610 2611
2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>

	* xreadlink.c (MAXSIZE): New macro.
	(xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
	size does not exceed MAXSIZE.  Avoid cast.
	As suggested by Mark D. Baushke in
	<http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
	if readlink fails with buffer size just under MAXSIZE, try again
	with MAXSIZE.

2612
2004-11-02  Derek R. Price  <derek@ximbiot.com>
2613
	and  Paul Eggert  <eggert@cs.ucla.edu>
2614 2615 2616 2617

	* getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
	(get_date): Overparenthesize to avoid GCC warning.

2618 2619 2620 2621 2622
2004-11-02  Bruno Haible  <bruno@clisp.org>

	* setenv.h (unsetenv): Define as a macro if the system's unsetenv()
	function returns void.

Simon Josefsson's avatar