Commit 7b3b8483 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Backport [19806] and [19807]: remove rc-fake-tty and rc-unix from Win32

parent cdb4a361
...@@ -185,15 +185,16 @@ vlc_module_begin(); ...@@ -185,15 +185,16 @@ vlc_module_begin();
set_subcategory( SUBCAT_INTERFACE_MAIN ); set_subcategory( SUBCAT_INTERFACE_MAIN );
set_description( _("Remote control interface") ); set_description( _("Remote control interface") );
add_bool( "rc-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE ); add_bool( "rc-show-pos", 0, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE );
#ifdef HAVE_ISATTY
add_bool( "rc-fake-tty", 0, NULL, TTY_TEXT, TTY_LONGTEXT, VLC_TRUE );
#endif
add_string( "rc-unix", 0, NULL, UNIX_TEXT, UNIX_LONGTEXT, VLC_TRUE );
add_string( "rc-host", 0, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
#ifdef WIN32 #ifdef WIN32
add_bool( "rc-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, VLC_FALSE ); add_bool( "rc-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, VLC_FALSE );
#else
#if defined (HAVE_ISATTY)
add_bool( "rc-fake-tty", 0, NULL, TTY_TEXT, TTY_LONGTEXT, VLC_TRUE );
#endif
add_string( "rc-unix", 0, NULL, UNIX_TEXT, UNIX_LONGTEXT, VLC_TRUE );
#endif #endif
add_string( "rc-host", 0, NULL, HOST_TEXT, HOST_LONGTEXT, VLC_TRUE );
set_capability( "interface", 20 ); set_capability( "interface", 20 );
set_callbacks( Activate, Deactivate ); set_callbacks( Activate, Deactivate );
...@@ -209,7 +210,8 @@ static int Activate( vlc_object_t *p_this ) ...@@ -209,7 +210,8 @@ static int Activate( vlc_object_t *p_this )
char *psz_host, *psz_unix_path; char *psz_host, *psz_unix_path;
int *pi_socket = NULL; int *pi_socket = NULL;
#if defined(HAVE_ISATTY) && !defined(WIN32) #ifndef WIN32
#if defined(HAVE_ISATTY)
/* Check that stdin is a TTY */ /* Check that stdin is a TTY */
if( !config_GetInt( p_intf, "rc-fake-tty" ) && !isatty( 0 ) ) if( !config_GetInt( p_intf, "rc-fake-tty" ) && !isatty( 0 ) )
{ {
...@@ -223,7 +225,7 @@ static int Activate( vlc_object_t *p_this ) ...@@ -223,7 +225,7 @@ static int Activate( vlc_object_t *p_this )
{ {
int i_socket; int i_socket;
#if !defined(AF_LOCAL) || defined(WIN32) #ifndef AF_LOCAL
msg_Warn( p_intf, "your OS doesn't support filesystem sockets" ); msg_Warn( p_intf, "your OS doesn't support filesystem sockets" );
free( psz_unix_path ); free( psz_unix_path );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -274,8 +276,9 @@ static int Activate( vlc_object_t *p_this ) ...@@ -274,8 +276,9 @@ static int Activate( vlc_object_t *p_this )
} }
pi_socket[0] = i_socket; pi_socket[0] = i_socket;
pi_socket[1] = -1; pi_socket[1] = -1;
#endif #endif /* AF_LOCAL */
} }
#endif /* !WIN32 */
if( ( pi_socket == NULL ) && if( ( pi_socket == NULL ) &&
( psz_host = config_GetPsz( p_intf, "rc-host" ) ) != NULL ) ( psz_host = config_GetPsz( p_intf, "rc-host" ) ) != NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment