glibc/include
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
..
arpa * include/libc-symbols.h (hidden_weak): Define it for [__ASSEMBLER__]. 2002-08-03 12:09:37 +00:00
bits * include/bits/dlfcn.h: New file. 2002-08-10 07:54:55 +00:00
gnu * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional 2002-10-11 10:52:20 +00:00
net * include/sys/wait.h (__waitpid): Add libc_hidden_proto. 2002-08-13 01:08:15 +00:00
netinet Update. 2003-06-14 09:00:28 +00:00
protocols (abmon): Remove spaces. 1998-11-12 18:03:43 +00:00
rpc * include/rpc/rpc.h: Declare thread variables with their correct 2004-02-09 10:47:53 +00:00
rpcsvc * include/rpcsvc/nis.h: New. Bounce to nis/rpcsvc. * include/rpcsvc/nis_tags.h: Likewise. * include/rpcsvc/nislib.h: Likewise. 1998-02-04 10:32:05 +00:00
sys * include/sys/resource.h (__getrusage): Mark hidden. * include/sys/time.h (__settimeofday, __setitimer, __utimes): Likewise. * include/sys/wait.h (__wait4): Likewise. 2003-06-30 23:15:13 +00:00
aio.h Update. 1999-11-23 17:22:17 +00:00
aliases.h Declare __getaliasent_r as hidden. 2002-03-18 23:38:37 +00:00
alloca.h (extend_alloca): New define. Based on stack direction it'll try to append to the previouls allocated buffer. 2002-11-20 19:42:37 +00:00
argp.h Update. 2000-12-28 15:08:51 +00:00
argz.h 2002-08-03 Roland McGrath <roland@redhat.com> 2002-08-04 01:28:06 +00:00
assert.h * sysdeps/mach/_strerror.c (__strerror_r): Add libc_hidden_def. 2002-08-30 01:31:18 +00:00
atomic.h Update. 2003-09-22 21:30:25 +00:00
byteswap.h Update. 1998-04-10 10:52:25 +00:00
complex.h Update. 1998-08-03 16:47:01 +00:00
ctype.h * include/ctype.h (__ctype_b_loc, __ctype_toupper_loc, 2003-07-29 23:48:35 +00:00
des.h Update. 1998-03-24 10:39:42 +00:00
dirent.h Update. 2001-08-20 07:17:10 +00:00
dlfcn.h Update. 2004-03-06 08:19:29 +00:00
elf.h Update. 2000-06-08 04:48:56 +00:00
endian.h Update. 2001-03-30 05:34:59 +00:00
envz.h 2002-08-03 Roland McGrath <roland@redhat.com> 2002-08-04 01:28:06 +00:00
err.h * include/sys/syslog.h: Use libc_hidden_proto for syslog, vsyslog. 2002-08-03 12:59:33 +00:00
errno.h Update. 2002-12-31 20:46:11 +00:00
error.h Update. 1997-06-21 02:59:26 +00:00
execinfo.h Update. 1999-11-23 17:22:17 +00:00
fcntl.h Update. 2003-09-04 14:08:24 +00:00
features.h Update. 2003-05-17 00:38:41 +00:00
fenv.h Update. 2002-09-10 01:40:26 +00:00
fnmatch.h * include/sys/resource.h: Use libc_hidden_proto for getpriority, 2002-08-04 03:50:21 +00:00
fpu_control.h Update. 1999-11-23 17:22:17 +00:00
ftw.h Update. 1997-06-21 02:59:26 +00:00
gconv.h Update. 1997-11-18 02:50:07 +00:00
getopt_int.h Update. 2004-03-09 10:36:53 +00:00
getopt.h Update. 2004-03-09 10:36:53 +00:00
glob.h * include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr, 2002-08-04 03:30:56 +00:00
gmp.h * include/gmp.h: Include/gmp-mparam.h. * stdlib/strtod.c: Include gmp-mparam.h before gmp.h and gmp-impl.h. 2003-03-14 05:48:18 +00:00
gnu-versions.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
grp.h * include/sys/wait.h (__waitpid): Add libc_hidden_proto. 2002-08-13 01:08:15 +00:00
iconv.h Update. 1999-08-21 00:38:15 +00:00
ifaddrs.h Update. 2003-06-10 08:58:05 +00:00
langinfo.h * ctype/ctype.h (isascii_l, toascii_l): Define to __*_l counterparts. 2002-08-27 23:36:31 +00:00
libc-internal.h * include/libc-internal.h: Declare __libc_thread_freeres. 2003-02-22 22:46:40 +00:00
libc-symbols.h Update. 2004-03-08 21:31:23 +00:00
libgen.h Update. 1997-06-21 02:59:26 +00:00
libintl.h (__ngettext, __dngettext, __dcngettext): New declarations. (__gettext, __dgettext, __dcgettext, __dcgettext_internal): Add attribute declarations. 2002-05-01 16:41:24 +00:00
libio.h Update. 2002-12-20 09:33:33 +00:00
limits.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
link.h Update. 2004-01-24 20:12:10 +00:00
locale.h 2002-08-27 Roland McGrath <roland@redhat.com> 2002-08-28 06:59:14 +00:00
malloc.h * include/fcntl.h: Declare __libc_creat. 2003-01-13 03:42:27 +00:00
math.h Update. 2002-09-10 01:40:26 +00:00
mcheck.h * include/sys/resource.h: Use libc_hidden_proto for getpriority, 2002-08-04 03:50:21 +00:00
memory.h Update. 1997-06-21 02:59:26 +00:00
mntent.h Update. 2002-04-09 20:36:24 +00:00
monetary.h Update. 1997-06-21 02:59:26 +00:00
netdb.h Update. 2003-04-24 23:45:17 +00:00
netgroup.h Update. 1997-06-21 02:59:26 +00:00
nl_types.h Update. 1997-12-22 20:53:38 +00:00
nss.h Update. 1997-06-21 02:59:26 +00:00
nsswitch.h Update. 1997-06-21 02:59:26 +00:00
obstack.h Update. 2002-08-04 09:27:27 +00:00
poll.h Update. 2000-08-21 16:02:48 +00:00
printf.h Update. 2002-08-03 07:02:10 +00:00
pthread.h * sysdeps/generic/libc-tls.c (__libc_setup_tls): Make the phdr loop 2002-08-05 06:38:00 +00:00
pwd.h * include/bits/dlfcn.h: New file. 2002-08-10 07:54:55 +00:00
regex.h Update. 1998-12-08 13:12:47 +00:00
resolv.h Update. 2003-07-22 23:10:17 +00:00
sched.h Update. 2003-03-03 22:02:13 +00:00
search.h * include/sys/resource.h: Use libc_hidden_proto for getpriority, 2002-08-04 03:50:21 +00:00
set-hooks.h Update. 2003-06-11 21:57:23 +00:00
setjmp.h Update. 2003-08-31 18:10:47 +00:00
sgtty.h Update. 1997-06-21 02:59:26 +00:00
shadow.h * include/bits/dlfcn.h: New file. 2002-08-10 07:54:55 +00:00
shlib-compat.h * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional 2002-10-11 10:52:20 +00:00
signal.h Update. 2003-04-29 22:49:58 +00:00
spawn.h Update. 2000-10-01 19:15:29 +00:00
stab.h Update. 1997-06-21 02:59:26 +00:00
stdio_ext.h Update. 2002-04-09 20:36:24 +00:00
stdio.h Update. 2003-08-27 20:23:17 +00:00
stdlib.h * ctype/ctype.h (isascii_l, toascii_l): Define to __*_l counterparts. 2002-08-27 23:36:31 +00:00
string.h Update. 2003-04-29 22:49:58 +00:00
strings.h Update. 1997-06-21 02:59:26 +00:00
stub-tag.h Update. 1997-10-15 05:34:02 +00:00
stubs-prologue.h * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional 2002-10-11 10:52:20 +00:00
syscall.h Update. 1997-06-21 02:59:26 +00:00
sysexits.h Update. 1997-06-21 02:59:26 +00:00
syslog.h Update. 1997-06-21 02:59:26 +00:00
tar.h Update. 1997-06-21 02:59:26 +00:00
termios.h * include/unistd.h (seteuid, setegid): Add libc_hidden_proto. 2002-08-13 00:24:58 +00:00
tgmath.h Update. 1998-09-06 23:45:24 +00:00
time.h Update. 2003-06-25 08:47:01 +00:00
tls.h * elf/tst-tls12.c (main): Fix declaration. 2003-04-23 01:54:52 +00:00
ttyent.h * include/search.h: Use libc_hidden_proto for hsearch_r, lfind. 2002-08-04 01:29:29 +00:00
ucontext.h Update. 1999-10-12 18:17:41 +00:00
ulimit.h Update. 1999-11-23 17:22:17 +00:00
unistd.h * include/unistd.h (__libc_enable_secure): Mark attribute_relro. (__libc_enable_secure_internal): Likewise. 2004-01-16 08:21:37 +00:00
utime.h * include/stdlib.h: Use libc_hidden_proto for qsort. 2002-08-03 22:26:33 +00:00
utmp.h Update. 1999-11-23 17:22:17 +00:00
values.h Update to LGPL v2.1. 2001-07-06 04:58:11 +00:00
wchar.h Update. 2003-11-15 21:58:21 +00:00
wctype.h Update. 2004-03-05 10:54:16 +00:00
wordexp.h * include/unistd.h: Use libc_hidden_proto for _exit, alarm, confstr, 2002-08-04 03:30:56 +00:00
xlocale.h Update. 1997-06-21 02:59:26 +00:00