glibc/posix
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
..
bits (_POSIX_NGROUPS_MAX): Define to 8 or 0 depending on selected standard. (NGROUPS_MAX): Define to 8 if not defined. 2003-07-02 07:17:15 +00:00
glob 2002-08-26 Brian Youmans <3diff@gnu.org> 2002-08-26 22:40:48 +00:00
rxspencer Update. 2003-12-27 23:40:06 +00:00
sys Update. 2003-04-19 16:57:17 +00:00
.cvsignore
annexc.c (fmt, testfmt): Remove -D_LIBC. 2002-12-06 21:28:23 +00:00
BOOST.tests Update. 2003-12-27 23:40:06 +00:00
bsd-getpgrp.c Update. 2002-08-03 07:02:10 +00:00
bug-ga1.c * posix/bug-ga1.c: Include <string.h> for memset prototype. 2004-02-21 18:40:55 +00:00
bug-ga2.c Update. 2004-02-23 19:54:06 +00:00
bug-regex1.c Include <wchar.h> for fwide. 2001-02-07 07:25:37 +00:00
bug-regex2.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
bug-regex3.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
bug-regex4.c 2003-04-07 Jakub Jelinek <jakub@redhat.com> 2003-04-08 01:23:29 +00:00
bug-regex5.c * scripts/abilist.awk: Grok function descriptor symbols. 2002-11-21 03:41:31 +00:00
bug-regex6.c Update. 2002-07-27 08:28:46 +00:00
bug-regex7.c Update. 2002-07-27 08:28:46 +00:00
bug-regex8.c Update. 2002-07-27 08:28:46 +00:00
bug-regex9.c Update. 2002-08-12 19:50:26 +00:00
bug-regex10.c Update. 2002-08-26 23:00:40 +00:00
bug-regex11.c Update. 2003-12-30 20:01:17 +00:00
bug-regex12.c Update. 2003-10-02 22:41:11 +00:00
bug-regex13.c Update. 2003-12-22 06:52:35 +00:00
bug-regex14.c * posix/regcomp.c (re_comp): Call __regfree on re_comp_buf. 2002-10-24 00:22:27 +00:00
bug-regex15.c 2002-12-13 Roland McGrath <roland@redhat.com> 2002-12-13 21:32:03 +00:00
bug-regex16.c Update. 2003-01-16 19:20:36 +00:00
bug-regex17.c Update. 2003-11-12 07:56:31 +00:00
bug-regex18.c Update. 2003-11-29 06:13:09 +00:00
bug-regex19.c Update. 2003-12-22 06:52:35 +00:00
bug-regex20.c Update. 2003-11-26 03:24:15 +00:00
bug-regex21.c Update. 2003-11-19 19:37:31 +00:00
bug-regex22.c Update. 2004-01-14 01:45:37 +00:00
bug-regex23.c Update. 2004-02-11 22:49:57 +00:00
confstr.c 2003-03-04 Roland McGrath <roland@redhat.com> 2003-03-05 03:02:26 +00:00
cpio.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
Depend
execl.c * include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr, 2002-08-04 03:30:56 +00:00
execle.c * include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr, 2002-08-04 03:30:56 +00:00
execlp.c * include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr, 2002-08-04 03:30:56 +00:00
execv.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
execvp.c * include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr, 2002-08-04 03:30:56 +00:00
fnmatch.c Update. 2003-11-18 19:12:03 +00:00
fnmatch.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
fnmatch_loop.c Update. 2003-06-13 21:05:42 +00:00
getconf.c Update copyright year. 2004-01-01 20:42:01 +00:00
getopt.c Update. 2004-03-09 10:36:53 +00:00
getopt.h Update. 2004-03-09 10:36:53 +00:00
getopt1.c Update. 2004-03-09 10:36:53 +00:00
getopt_init.c Update. 2001-08-11 19:43:52 +00:00
getopt_int.h Update. 2004-03-09 10:36:53 +00:00
glob.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
globtest.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
globtest.sh Update. 2003-10-27 01:36:12 +00:00
Makefile Update. 2004-03-09 08:50:17 +00:00
PCRE.tests Update. 2003-12-27 23:40:06 +00:00
ptestcases.h Update. 2003-11-26 03:24:15 +00:00
PTESTS Update. 2003-11-26 03:24:15 +00:00
PTESTS2C.sed Update. 2003-11-13 01:04:26 +00:00
re_comp.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
regcomp.c Update. 2004-03-05 10:54:16 +00:00
regex.c Update. 2004-01-30 05:22:32 +00:00
regex.h Update. 2004-03-04 23:37:01 +00:00
regex_internal.c Update. 2004-02-26 01:32:44 +00:00
regex_internal.h Update. 2004-02-26 01:32:44 +00:00
regexbug1.c
regexec.c Update. 2004-03-05 10:54:16 +00:00
runptests.c Update. 2003-11-26 03:24:15 +00:00
runtests.c Update. 2003-11-13 20:04:16 +00:00
sched.h Update. 2003-05-10 07:48:16 +00:00
spawn.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawn.h Update. 2003-04-19 16:57:17 +00:00
spawn_faction_addclose.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawn_faction_adddup2.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawn_faction_addopen.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawn_faction_destroy.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawn_faction_init.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawn_int.h
spawnattr_destroy.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_getdefault.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_getflags.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_getpgroup.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_getschedparam.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_getschedpolicy.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_getsigmask.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_init.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_setdefault.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_setflags.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_setpgroup.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_setschedparam.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_setschedpolicy.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnattr_setsigmask.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
spawnp.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tar.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
test-vfork.c (noop): Add __attribute_noinline__. 2003-01-09 19:45:08 +00:00
testcases.h
testfnm.c Update. 2001-03-15 09:36:19 +00:00
TESTS
TESTS2C.sed
transbug.c * posix/transbug.c: Include <string.h> for memset and strlen 2003-06-25 11:04:58 +00:00
tst-boost.c Update. 2003-12-04 08:04:57 +00:00
tst-chmod.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-dir.c * locale/programs/ld-ctype.c (ctype_read): When given a repertoire 2002-08-26 11:39:12 +00:00
tst-exec.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-fnmatch.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-fnmatch.input Update. 2001-10-27 03:00:50 +00:00
tst-fork.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-getaddrinfo.c * catgets/open_catalog.c (__open_catalog): Don't use a value type 2002-09-24 04:24:25 +00:00
tst-getconf.sh * sysdeps/generic/libc-tls.c (__pthread_initialize_minimal): Pass 2002-09-01 12:39:40 +00:00
tst-getlogin.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-gnuglob.c * locale/programs/ld-ctype.c (ctype_read): When given a repertoire 2002-08-26 11:39:12 +00:00
tst-mmap.c Fix format strings. 2002-09-30 07:47:16 +00:00
tst-nanosleep.c * posix/tst-nanosleep.c: Include <time.h> for nanosleep 2003-06-25 11:14:37 +00:00
tst-nice.c 2003-03-20 Roland McGrath <roland@redhat.com> 2003-03-20 11:40:36 +00:00
tst-pcre.c Update. 2003-12-04 08:04:57 +00:00
tst-preadwrite.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-preadwrite64.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-regex.c Update. 2003-11-29 06:13:09 +00:00
tst-regexloc.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-rxspencer.c Update. 2003-12-23 02:29:44 +00:00
tst-spawn.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-truncate.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-truncate64.c Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
tst-vfork1.c Update. 2004-03-09 08:50:17 +00:00
tstgetopt.c
unistd.h Update. 2003-09-04 16:19:05 +00:00
Versions Update. 2003-09-17 00:49:19 +00:00
wait.h
wordexp-test.c Update. 2003-09-18 02:54:32 +00:00
wordexp-tst.sh
wordexp.h (CFLAGS-oldtmpfile.c): Add -fexceptions. 2003-09-02 07:14:15 +00:00