Ulrich Drepper 511676f708 Update.
2004-03-08  Paul Eggert  <eggert@cs.ucla.edu>

	Merge from gnulib.  We now assume C89 or better.
	* posix/getopt1.c (const): Remove.
	* posix/getopt.c (const): Likewise.
	* posix/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
	_getopt_long_only_r, main): Use prototypes, not old-style definitions.
	* posix/getopt.c (exchange, _getopt_initialize, _getopt_internal_r,
	_getopt_internal, getopt, main): Likewise.
	* posix/getopt.h (getopt, getopt_long, getopt_long_only): Likewise.
	* posix/getopt.c [!defined VMS || !HAVE_STRING_H]:
	Include <string.h> regardless.  No need for <strings.h>.
	[!defined _LIBC]: Include "gettext.h" rather than rolling it ourselves.
	(_): Define to gettext always.
	(my_index): Remove: all uses changed to strchr.
	(strlen): Remove declaration.
	* posix/getopt.h (struct option.name): Always const char *.

2004-03-08  Marcus Brinkmann  <marcus@gnu.org>

	* posix/getopt.h (_getopt_internal): Move to ...
	* posix/getopt_int.h: ... here.  New file.
	* include/getopt_int.h: New file.
	* include/getopt.h: Remove libc_hidden_proto for getopt_long
	and getopt_long_only.
	* posix/getopt1.c: Include "getopt_int.h".  Remove
	libc_hidden_def for getopt_long and getopt_long_only.
	(_getopt_long_r, _getopt_long_only_r): New functions.
	* posix/getopt.c: Include "getopt_int.h".
	(__getopt_initialized): Variable removed.
	(nextchar, ordering, posixly_correct, first_nonopt, last_nonopt):
	Static variables removed.
	(nonoption_flags_max_len, nonoption_flags_len) [_LIBC &&
	USE_NONOPTION_FLAGS]: Static variables removed.
	(getopt_data): New static variable.
	(SWAP_FLAGS): Use d->__nonoption_flags_len instead
	nonoption_flags_len.
	(exchange): Add new argument D of type struct getopt_data *.
	Replace optind with d->optind, optarg with d->optarg, opterr with
	d->opterr, optopt with d->optopt, nextchar with d->__nextchar,
	first_nonopt with d->__first_nonopt, last_nonopt with
	d->__last_nonopt, d->ordering with d->__ordering,
	d->posixly_correct with d->__posixly_correct (which is now an
	int instead a string, so fix users), nonoption_flags_len
	with d->__nonoption_flags_len, nonoption_flags_max_len with
	d->__nonoption_flags_max_len.
	(_getopt_initialize): Likewise.
	(_getopt_internal): Rename to ...
	(_getopt_internal_r): ... this.  Also add new argument D of type
	struct getopt_data * and use of members of D rather than global or
	static variables as described for exchange() above.  Add new argument
	to invocations of _getopt_initialize and exchange.
	(_getopt_internal): Reimplement in terms of _getopt_internal_r.
	* argp/argp-parse.c: Include <getopt_int.h>.
	[_LIBC]: Do not include <bits/libc-lock.h>.
	[!_LIBC && HAVE_CTHREADS_H]: Do not include <cthreads.h>.
	[!_LIBC] (_argp_hang): Make static.
	(getopt_lock, LOCK_GETOPT, UNLOCK_GETOPT): Remove.
	(_argp_unlock_xxx): Remove.
	(parser_init): Do not use LOCK_GETOPT.
	(parser_finalize): Do not use UNLOCK_GETOPT.
	(struct parser): New member OPT_DATA.
	(parser_init): Initialize parser->opt_data.  Use
	parser->opt_data.opterr instead of opterr.
	(parser_parse_opt): Use parser->opt_data.optarg instead optarg.
	(parser_parse_next): Likewise.  Use parser->opt_data.optind
	instead optind.  Use parser->opt_data.optopt instead of optopt.
	Call _getopt_long_only_r and _getopt_long_r instead of
	getopt_long_only and getopt_long, and pass the extra argument.
2004-03-09 10:36:53 +00:00
..
2003-12-27 23:40:06 +00:00
2003-04-19 16:57:17 +00:00
2002-12-06 21:28:23 +00:00
2003-12-27 23:40:06 +00:00
2002-08-03 07:02:10 +00:00
2004-02-23 19:54:06 +00:00
2001-02-07 07:25:37 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2002-07-27 08:28:46 +00:00
2002-07-27 08:28:46 +00:00
2002-07-27 08:28:46 +00:00
2002-08-12 19:50:26 +00:00
2002-08-26 23:00:40 +00:00
2003-12-30 20:01:17 +00:00
2003-10-02 22:41:11 +00:00
2003-12-22 06:52:35 +00:00
2003-01-16 19:20:36 +00:00
2003-11-12 07:56:31 +00:00
2003-11-29 06:13:09 +00:00
2003-12-22 06:52:35 +00:00
2003-11-26 03:24:15 +00:00
2003-11-19 19:37:31 +00:00
2004-01-14 01:45:37 +00:00
2004-02-11 22:49:57 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2003-06-13 21:05:42 +00:00
2003-11-18 19:12:03 +00:00
2001-07-06 04:58:11 +00:00
2004-01-01 20:42:01 +00:00
2004-03-09 10:36:53 +00:00
2001-08-11 19:43:52 +00:00
2004-03-09 10:36:53 +00:00
2004-03-09 10:36:53 +00:00
2004-03-09 10:36:53 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2003-10-27 01:36:12 +00:00
2004-03-09 08:50:17 +00:00
2003-12-27 23:40:06 +00:00
2003-11-26 03:24:15 +00:00
2003-11-26 03:24:15 +00:00
2003-11-13 01:04:26 +00:00
2001-07-06 04:58:11 +00:00
2004-03-05 10:54:16 +00:00
2004-02-26 01:32:44 +00:00
2004-02-26 01:32:44 +00:00
2004-01-30 05:22:32 +00:00
2004-03-04 23:37:01 +00:00
1999-08-30 19:23:15 +00:00
2004-03-05 10:54:16 +00:00
2003-11-26 03:24:15 +00:00
2003-11-13 20:04:16 +00:00
2003-05-10 07:48:16 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2000-04-15 16:51:16 +00:00
2001-07-06 04:58:11 +00:00
2003-04-19 16:57:17 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2000-01-18 10:53:15 +00:00
2001-03-15 09:36:19 +00:00
2000-01-18 10:53:15 +00:00
2003-12-04 08:04:57 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-10-27 03:00:50 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2002-09-30 07:47:16 +00:00
2003-12-04 08:04:57 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2003-11-29 06:13:09 +00:00
2001-07-06 04:58:11 +00:00
2003-12-23 02:29:44 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2001-07-06 04:58:11 +00:00
2004-03-09 08:50:17 +00:00
2000-09-06 18:07:07 +00:00
2003-09-04 16:19:05 +00:00
2003-09-17 00:49:19 +00:00
1996-11-27 06:13:15 +00:00
2003-09-18 02:54:32 +00:00
2000-10-21 00:02:39 +00:00