X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetopt1.c;h=cc0746ea43cecc504f6313f6683eee4ff30bcd20;hb=b308a020b78bf5b76dac9dd70fe03d11f96ce3c7;hp=a6fdee5a5762ebb53fb8dc678fbd2ecdbe80ed53;hpb=bb80ed7b35908700f5ca59dc7ddc0506f9d03f7c;p=gnulib.git diff --git a/lib/getopt1.c b/lib/getopt1.c index a6fdee5a5..cc0746ea4 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004 + Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -15,15 +15,12 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -#include -#endif - #ifdef _LIBC # include #else +# include # include "getopt.h" #endif #include "getopt_int.h" @@ -44,16 +41,17 @@ int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { - return _getopt_internal (argc, argv, options, long_options, opt_index, 0); + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 0, 0); } int -_getopt_long_r (int argc, char *__getopt_argv_const *argv, const char *options, +_getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d); + 0, 0, d); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. @@ -66,17 +64,17 @@ getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { - return _getopt_internal (argc, argv, options, long_options, opt_index, 1); + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 1, 0); } int -_getopt_long_only_r (int argc, char *__getopt_argv_const *argv, - const char *options, +_getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d); + 1, 0, d); }