kbuild: use getopt_long(), not its _only() variant
RFC 1/1 kbuild: use getopt_long(), not its _only() variant
NetBSD lacks getopt_long_only() whereas getopt_long() works just fine.
--- scripts/kconfig/conf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/kconfig/conf.c +1 -1
@@ -466,7 +466,7 @@ int main(int ac, char **av)bindtextdomain (PACKAGE ,LOCALEDIR );textdomain (PACKAGE ); -while ((opt =getopt_long_only (ac, av,"" , long_opts,NULL )) !=-1 ) { +while ((opt =getopt_long (ac, av,"" , long_opts,NULL )) !=-1 ) { input_mode = (enum input_mode )opt;switch (opt) {case silentoldconfig:
Signature · 1 line
1.7.2.30.gc37d7.dirty
Quoted 12 lines · Arnaud Lacombe
NetBSD lacks
getopt_long_only()whereasgetopt_long()works just fine.Signed-off-by Arnaud Lacombe <[email protected]>--- scripts/kconfig/conf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)scripts/kconfig/conf.c +0
-0
scripts/kconfig/conf.c int main(int ac, char **av) · line 472
Quoted 8 lines
scripts/kconfig/conf.c +1
-1@@ -466,7 +466,7 @@ int main(int ac, char **av)bindtextdomain (PACKAGE ,LOCALEDIR );textdomain (PACKAGE ); -while ((opt =getopt_long_only (ac, av,"" , long_opts,NULL )) !=-1 ) { +while ((opt =getopt_long (ac, av,"" , long_opts,NULL )) !=-1 ) { input_mode = (enum input_mode )opt;switch (opt) {case silentoldconfig:
scripts/kconfig/Makefile uses the two-dash notation, so getopt_long_only() really isn't necessary. Applied to kbuild-2.6.git#kconfig.
Michal
Quoted 16 lines · Michal Marek
Quoted 15 lines · Arnaud Lacombe
NetBSD lacks
getopt_long_only()whereasgetopt_long()works just fine.Signed-off-by Arnaud Lacombe <[email protected]>--- scripts/kconfig/conf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)scripts/kconfig/conf.c +0
-0@@ -466,7 +466,7 @@ int main(int ac, char **av)bindtextdomain (PACKAGE ,LOCALEDIR );textdomain (PACKAGE );
Quoted 9 lines
scripts/kconfig/conf.c int main(int ac, char **av) · line 472
Quoted 5 lines
scripts/kconfig/conf.c +1
-1-while ((opt =getopt_long_only (ac, av,"" , long_opts,NULL )) !=-1 ) { +while ((opt =getopt_long (ac, av,"" , long_opts,NULL )) !=-1 ) { input_mode = (enum input_mode )opt;switch (opt) {case silentoldconfig:
scripts/kconfig/Makefileuses the two-dash notation, sogetopt_long_only()really isn't necessary. Applied to kbuild-2.6.git#kconfig.
Seems I forgot to do so - I had meant to ack this patch.
Thanks,
Sam
Quoted 5 lines · Sam Ravnborg
Quoted 4 lines · Michal Marek
Quoted 3 lines · Arnaud Lacombe
NetBSD lacks
getopt_long_only()whereasgetopt_long()works just fine.Signed-off-by Arnaud Lacombe <[email protected]>
...
Quoted 1 line
Seems I forgot to do so - I had meant to ack this patch.
I haven't pushed it yet, so I did a git commit --amend and added your ACK.
Michal