1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

* include/features.h: If no feature selection given and we select

by default a POSIX mode, also define __USE_POSIX_IMPLICITLY.
	* posix/Versions: Export __posix_getopt.
	* posix/getopt.c (_getopt_initialize): Take additional parameter.
	Use it to alternatively initialize __posixly_correct.
	(_getopt_internal_r): Take addition parameter.  Pass on to
	_getopt_initialize.
	(_getopt_internal): Take addition parameter.  Pass on to
	_getopt_internal_r.
	(getopt): Pass additional zero to _getopt_internal.
	(__posix_getopt): New function.
	* posix/getopt.h: Add redirection for getopt.
	* posix/getopt1.c (getopt_long): Pass additional zero to
	_getopt_internal.
	(getopt_long_only): Likewise.
	(_getopt_long_r): Pass additional zero to _getopt_internal_r.
	(_getopt_long_only_r): Likewise.
	* posix/getopt_int.h: Adjust declarations of _getopt_internal and
	_getopt_internal_r.
This commit is contained in:
Ulrich Drepper
2009-02-26 01:22:06 +00:00
parent 67108e401f
commit 2e6d6bacc2
7 changed files with 75 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004
Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -24,7 +24,7 @@
extern int _getopt_internal (int ___argc, char *const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only);
int __long_only, int posixly_correct);
/* Reentrant versions which can handle parsing multiple argument
@@ -114,7 +114,8 @@ struct _getopt_data
extern int _getopt_internal_r (int ___argc, char *const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, struct _getopt_data *__data);
int __long_only, struct _getopt_data *__data,
int posixly_correct);
extern int _getopt_long_r (int ___argc, char *const *___argv,
const char *__shortopts,