X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetopt1.c;h=25d792650f7351705012b0aa7608ebe7fa76d075;hb=ecbe47ca1c551b24c8a4d7309daba56006956849;hp=706f59c08377edabb0ff72f84d168828db20effa;hpb=8f3f62dcc4a7ea403bd3cbbf860364f192507014;p=gnulib.git diff --git a/lib/getopt1.c b/lib/getopt1.c index 706f59c08..25d792650 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -15,10 +15,10 @@ 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 +# include #endif #ifdef _LIBC @@ -41,19 +41,20 @@ #endif int -getopt_long (int argc, char *const *argv, const char *options, +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 *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. @@ -62,19 +63,21 @@ _getopt_long_r (int argc, char *const *argv, const char *options, instead. */ int -getopt_long_only (int argc, char *const *argv, const char *options, +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 *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); }