From 6023b5f57f8b4869d75dd43ea6fdd96253312d5a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 29 Aug 2013 21:56:17 +0300 Subject: Sync getopt with GLIBC. --- getopt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'getopt.c') diff --git a/getopt.c b/getopt.c index 7679991d..bab52a05 100644 --- a/getopt.c +++ b/getopt.c @@ -236,7 +236,7 @@ exchange (char **argv, struct _getopt_data *d) { /* Bottom segment is the short one. */ int len = middle - bottom; - register int i; + int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) @@ -253,7 +253,7 @@ exchange (char **argv, struct _getopt_data *d) { /* Top segment is the short one. */ int len = top - middle; - register int i; + int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) @@ -574,8 +574,8 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring, || pfound->flag != p->flag || pfound->val != p->val) { - /* Second or later nonexact match found. */ - struct option_list *newp = malloc (sizeof (*newp)); + /* Second or later nonexact match found. */ + struct option_list *newp = alloca (sizeof (*newp)); newp->p = p; newp->needs_free = 1; newp->next = ambig_list; -- cgit v1.2.3 From c3e4d0cf3f1fd24164e0a58db23b86b56c6dc7c8 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 8 Sep 2013 12:46:20 +0200 Subject: Fixes based on problems from a static checker. --- getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'getopt.c') diff --git a/getopt.c b/getopt.c index bab52a05..fa258382 100644 --- a/getopt.c +++ b/getopt.c @@ -575,7 +575,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring, || pfound->val != p->val) { /* Second or later nonexact match found. */ - struct option_list *newp = alloca (sizeof (*newp)); + struct option_list *newp = malloc (sizeof (*newp)); newp->p = p; newp->needs_free = 1; newp->next = ambig_list; -- cgit v1.2.3 From 772793d99fbb08a03576c375b870ec36bb11cb8d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 24 Dec 2013 21:42:53 +0200 Subject: Fix getopt.c for Illumos. --- getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'getopt.c') diff --git a/getopt.c b/getopt.c index fa258382..a45e30f4 100644 --- a/getopt.c +++ b/getopt.c @@ -57,7 +57,7 @@ /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ -#if defined (__GNU_LIBRARY__) || defined (__CYGWIN__) || defined(__DJGPP__) || defined(__APPLE__) || defined(__MINGW32__) +#if defined (__GNU_LIBRARY__) || defined (__CYGWIN__) || defined(__DJGPP__) || defined(__APPLE__) || defined(__MINGW32__) || defined(__sun) /* Illumos */ /* Don't include stdlib.h for * non-GNU C libraries * non-Cygwin -- cgit v1.2.3 From b4aa6a524d929ecf7c458acc456db50d6f11e7f4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 20 Feb 2014 19:45:41 +0200 Subject: Sync getopt with GLIBC. --- getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'getopt.c') diff --git a/getopt.c b/getopt.c index a45e30f4..7bd42bb6 100644 --- a/getopt.c +++ b/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-2013 Free Software Foundation, Inc. + Copyright (C) 1987-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or -- cgit v1.2.3