From: RĂ©mi Denis-Courmont Date: Sun, 28 Feb 2010 14:05:14 +0000 (+0200) Subject: Remove Apple getopt_long bug-to-bug X-Git-Tag: 1.1.0-pre1~599 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2b1c487cf82250a85af291e5e382028b7f87d9c6;p=vlc Remove Apple getopt_long bug-to-bug --- diff --git a/src/config/cmdline.c b/src/config/cmdline.c index cfca4f2475..c721c456e8 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -142,13 +142,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, if( p_longopts[i_index].name == NULL ) continue; p_longopts[i_index].has_arg = (p_item->i_type == CONFIG_ITEM_BOOL) ? no_argument : -#ifndef __APPLE__ required_argument; -#else -/* It seems that required_argument is broken on Darwin. - * Radar ticket #6113829 */ - optional_argument; -#endif p_longopts[i_index].flag = &flag; p_longopts[i_index].val = 0; i_index++; @@ -257,14 +251,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, psz_name = p_conf->psz_name; } -#ifdef __APPLE__ - if( p_conf->i_type != CONFIG_ITEM_BOOL && !optarg ) - { - fprintf( stderr, "Warning: missing argument for option --%s\n", p_conf->psz_name ); - fprintf( stderr, "Try specifying options as '--optionname=value' instead of '--optionname value'\n" ); - continue; - } -#endif + switch( p_conf->i_type ) { case CONFIG_ITEM_STRING: