diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-17 01:04:52 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-17 01:04:52 +0000 |
commit | 6fab3fdec9db75c61d2e0f060f1ba9e48f3e4780 (patch) | |
tree | c7295091c346cfd30f441bc15af5e326c47085a2 | |
parent | b7a4adc026e8007f83a054d1df1e3cef6ae8e1cb (diff) | |
download | coreutils-6fab3fdec9db75c61d2e0f060f1ba9e48f3e4780.tar.xz |
(getopt_long, _getopt_long_r, getopt_long_only,
_getopt_long_only_r): Argv is now char**, not char *__getopt_argv_const*.
-rw-r--r-- | lib/getopt_.h | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/getopt_.h b/lib/getopt_.h index d933ce780..c5c836e64 100644 --- a/lib/getopt_.h +++ b/lib/getopt_.h @@ -53,18 +53,6 @@ # define optopt __GETOPT_PREFIX##optopt #endif -/* The elements of the ARGV arguments to getopt aren't really const, - because we permute them. For glibc, __getopt_argv_const is const - so that prototypes pretend the elements are const, to be compatible - with Posix. However, drop this pretense for standalone - applications, since it's not needed there and it's safer not to lie - to compilers. */ -#ifdef __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -#else -# define __getopt_argv_const const -#endif - /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include <features.h>, but @@ -186,16 +174,15 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -extern int getopt (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts) +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; #ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, +extern int getopt_long (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, +extern int getopt_long_only (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; |