Commit c4fef7e0 authored by Sam Hocevar's avatar Sam Hocevar

* Replaced "SYS_DARWIN" with either __APPLE__ (meaning OS X) or __ppc__ and

    __ppc64__ (meaning PowerPC).
parent 7fc2d730
......@@ -182,7 +182,7 @@ char * vlc_strcasestr( const char *psz_big, const char *psz_little )
/*****************************************************************************
* vasprintf:
*****************************************************************************/
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
#if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS)
int vlc_vasprintf(char **strp, const char *fmt, va_list ap)
{
/* Guess we need no more than 100 bytes. */
......@@ -228,7 +228,7 @@ int vlc_vasprintf(char **strp, const char *fmt, va_list ap)
/*****************************************************************************
* asprintf:
*****************************************************************************/
#if !defined(HAVE_ASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
#if !defined(HAVE_ASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS)
int vlc_asprintf( char **strp, const char *fmt, ... )
{
va_list args;
......
......@@ -45,9 +45,9 @@
#include "vlc_video.h"
#include "video_output.h"
#ifdef SYS_DARWIN
# include "Cocoa/Cocoa.h"
#endif /* SYS_DARWIN */
#ifdef __APPLE__
# include <Cocoa/Cocoa.h>
#endif
/*****************************************************************************
* Local prototypes
......@@ -60,7 +60,7 @@ static int SwitchIntfCallback( vlc_object_t *, char const *,
static int AddIntfCallback( vlc_object_t *, char const *,
vlc_value_t , vlc_value_t , void * );
#ifdef SYS_DARWIN
#ifdef __APPLE__
/*****************************************************************************
* VLCApplication interface
*****************************************************************************/
......@@ -153,7 +153,7 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
*/
int intf_RunThread( intf_thread_t *p_intf )
{
#ifdef SYS_DARWIN
#ifdef __APPLE__
NSAutoreleasePool * o_pool;
if( p_intf->b_block )
......@@ -308,7 +308,7 @@ static void Manager( intf_thread_t *p_intf )
if( p_intf->p_vlc->b_die )
{
p_intf->b_die = VLC_TRUE;
#ifdef SYS_DARWIN
#ifdef __APPLE__
if( strncmp( p_intf->p_vlc->psz_object_name, "clivlc", 6 ) )
{
[NSApp stop: NULL];
......@@ -457,7 +457,7 @@ static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS;
}
#ifdef SYS_DARWIN
#ifdef __APPLE__
/*****************************************************************************
* VLCApplication implementation
*****************************************************************************/
......
......@@ -101,7 +101,7 @@ int __intf_Eject( vlc_object_t *p_this, const char *psz_device )
{
int i_ret = VLC_SUCCESS;
#ifdef SYS_DARWIN
#ifdef __APPLE__
FILE *p_eject;
char *psz_disk;
char sz_cmd[32];
......
......@@ -250,7 +250,7 @@ int VLC_Create( void )
/* Initialize mutexes */
vlc_mutex_init( p_vlc, &p_vlc->config_lock );
#ifdef SYS_DARWIN
#ifdef __APPLE__
vlc_mutex_init( p_vlc, &p_vlc->quicktime_lock );
vlc_thread_set_priority( p_vlc, VLC_THREAD_PRIORITY_LOW );
#endif
......@@ -2013,7 +2013,7 @@ static void SetLanguage ( char const *psz_lang )
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
char * psz_path;
#if defined( SYS_DARWIN ) || defined ( WIN32 ) || defined( SYS_BEOS )
#if defined( __APPLE__ ) || defined ( WIN32 ) || defined( SYS_BEOS )
char psz_tmp[1024];
#endif
......@@ -2026,7 +2026,7 @@ static void SetLanguage ( char const *psz_lang )
}
else if( psz_lang )
{
#ifdef SYS_DARWIN
#ifdef __APPLE__
/* I need that under Darwin, please check it doesn't disturb
* other platforms. --Meuuh */
setenv( "LANG", psz_lang, 1 );
......@@ -2050,7 +2050,7 @@ static void SetLanguage ( char const *psz_lang )
}
/* Specify where to find the locales for current domain */
#if !defined( SYS_DARWIN ) && !defined( WIN32 ) && !defined( SYS_BEOS )
#if !defined( __APPLE__ ) && !defined( WIN32 ) && !defined( SYS_BEOS )
psz_path = LOCALEDIR;
#else
snprintf( psz_tmp, sizeof(psz_tmp), "%s/%s", libvlc.psz_vlcpath,
......
......@@ -145,7 +145,7 @@ static char *ppsz_snap_formats[] =
"You can force the audio output frequency here. Common values are " \
"-1 (default), 48000, 44100, 32000, 22050, 16000, 11025, 8000.")
#if !defined( SYS_DARWIN )
#if !defined( __APPLE__ )
#define AOUT_RESAMP_TEXT N_("High quality audio resampling")
#define AOUT_RESAMP_LONGTEXT N_( \
"This uses a high quality audio resampling algorithm. High quality "\
......@@ -1054,7 +1054,7 @@ vlc_module_begin();
VOLUME_STEP_LONGTEXT, VLC_TRUE );
add_integer( "aout-rate", -1, NULL, AOUT_RATE_TEXT,
AOUT_RATE_LONGTEXT, VLC_TRUE );
#if !defined( SYS_DARWIN )
#if !defined( __APPLE__ )
add_bool( "hq-resampling", 1, NULL, AOUT_RESAMP_TEXT,
AOUT_RESAMP_LONGTEXT, VLC_TRUE );
#endif
......@@ -1090,7 +1090,7 @@ vlc_module_begin();
SKIP_FRAMES_LONGTEXT, VLC_TRUE );
add_bool( "quiet-synchro", 0, NULL, QUIET_SYNCHRO_TEXT,
QUIET_SYNCHRO_LONGTEXT, VLC_TRUE );
#ifndef SYS_DARWIN
#ifndef __APPLE__
add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, VLC_TRUE );
#endif
add_bool( "video-on-top", 0, NULL, VIDEO_ON_TOP_TEXT,
......@@ -1375,7 +1375,7 @@ vlc_module_begin();
add_bool( "minimize-threads", 0, NULL, MINIMIZE_THREADS_TEXT,
MINIMIZE_THREADS_LONGTEXT, VLC_TRUE );
#if !defined(SYS_DARWIN) && !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
#if !defined(__APPLE__) && !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H)
add_bool( "rt-priority", VLC_FALSE, NULL, RT_PRIORITY_TEXT,
RT_PRIORITY_LONGTEXT, VLC_TRUE );
#endif
......@@ -1467,7 +1467,7 @@ vlc_module_begin();
set_subcategory( SUBCAT_INTERFACE_HOTKEYS );
add_category_hint( N_("Hot keys"), HOTKEY_CAT_LONGTEXT , VLC_FALSE );
#if defined(SYS_DARWIN)
#if defined(__APPLE__)
/* Don't use the following combo's */
/* copy KEY_MODIFIER_COMMAND|'c'
......
......@@ -43,7 +43,7 @@
# include <windows.h>
#endif
#ifdef SYS_DARWIN
#ifdef __APPLE__
# include <errno.h>
# include <string.h>
#endif
......@@ -238,7 +238,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
{
const char *psz_codeset;
#if !(defined WIN32 || defined OS2 || defined SYS_DARWIN)
#if !(defined WIN32 || defined OS2 || defined __APPLE__)
# if HAVE_LANGINFO_CODESET
/* Most systems support nl_langinfo( CODESET ) nowadays. */
......@@ -254,7 +254,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
* (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
* use setlocale here; it would return "C" when it doesn't support the
* locale name the user has set. Darwin's setlocale is broken. */
# if HAVE_SETLOCALE && !SYS_DARWIN
# if HAVE_SETLOCALE && !__APPLE__
psz_locale = setlocale( LC_ALL, NULL );
# endif
if( psz_locale == NULL || psz_locale[0] == '\0' )
......@@ -274,7 +274,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
psz_codeset = buf;
# endif /* HAVE_LANGINFO_CODESET */
#elif defined SYS_DARWIN
#elif defined __APPLE__
/* Darwin is always using UTF-8 internally. */
psz_codeset = "UTF-8";
......@@ -345,7 +345,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string )
{
#ifdef SYS_DARWIN
#ifdef __APPLE__
if ( p_this->p_libvlc->iconv_macosx != (vlc_iconv_t)-1 )
{
const char *psz_in = psz_string;
......
......@@ -1363,7 +1363,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
p_this->p_vlc->i_argc = *pi_argc;
p_this->p_vlc->ppsz_argv = ppsz_argv;
#ifdef SYS_DARWIN
#ifdef __APPLE__
/* When vlc.app is run by double clicking in Mac OS X, the 2nd arg
* is the PSN - process serial number (a unique PID-ish thingie)
* still ok for real Darwin & when run from command line */
......
......@@ -33,7 +33,7 @@
# include <setjmp.h> /* longjmp, setjmp */
#endif
#if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__))
#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__))
#include <sys/sysctl.h>
#endif
......@@ -66,7 +66,7 @@ uint32_t CPUCapabilities( void )
{
volatile uint32_t i_capabilities = CPU_CAPABILITY_NONE;
#if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__))
#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__))
int selectors[2] = { CTL_HW, HW_VECTORUNIT };
int i_has_altivec = 0;
size_t i_length = sizeof( i_has_altivec );
......@@ -267,7 +267,7 @@ uint32_t CPUCapabilities( void )
# endif
return i_capabilities;
#elif defined( __powerpc__ )
#elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ )
# ifdef CAN_COMPILE_ALTIVEC && defined( HAVE_SIGNAL_H )
void (*pf_sigill) (int) = signal( SIGILL, SigHandler );
......
......@@ -302,7 +302,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
msg_item_t * p_item = NULL; /* pointer to message */
msg_item_t item; /* message in case of a full queue */
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
#if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS)
int i_size = strlen(psz_format) + INTF_MAX_MSG_SIZE;
#endif
int i;
......@@ -317,7 +317,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
/*
* Convert message to string
*/
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined( SYS_BEOS )
#if defined(HAVE_VASPRINTF) && !defined(__APPLE__) && !defined( SYS_BEOS )
vlc_va_copy( args, _args );
vasprintf( &psz_str, psz_format, args );
va_end( args );
......@@ -363,7 +363,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
p_obj = p_obj->p_parent;
}
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
#if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS)
vlc_va_copy( args, _args );
vsnprintf( psz_str, i_size, psz_format, args );
va_end( args );
......
......@@ -763,7 +763,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
{
if( !(*ppsz_path)[0] ) continue;
#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 )
#if defined( SYS_BEOS ) || defined( __APPLE__ ) || defined( WIN32 )
/* Handle relative as well as absolute paths */
#ifdef WIN32
......
......@@ -571,7 +571,7 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
i_ret = pthread_create( &p_this->thread_id, NULL, func, p_data );
#ifndef SYS_DARWIN
#ifndef __APPLE__
if( config_GetInt( p_this, "rt-priority" ) )
#endif
{
......@@ -601,7 +601,7 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
i_priority = 0;
}
}
#ifndef SYS_DARWIN
#ifndef __APPLE__
else
{
i_priority = 0;
......@@ -661,7 +661,7 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
}
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
#ifndef SYS_DARWIN
#ifndef __APPLE__
if( config_GetInt( p_this, "rt-priority" ) )
#endif
{
......
......@@ -1465,7 +1465,7 @@ void httpd_MsgAdd( httpd_message_t *msg, char *name, char *psz_value, ... )
char *value = NULL;
va_start( args, psz_value );
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined(SYS_BEOS)
#if defined(HAVE_VASPRINTF) && !defined(__APPLE__) && !defined(SYS_BEOS)
vasprintf( &value, psz_value, args );
#else
{
......
......@@ -43,7 +43,7 @@
#include <vlc/input.h> /* for input_thread_t and i_pts_delay */
#include "vlc_playlist.h"
#if defined( SYS_DARWIN )
#if defined( __APPLE__ )
#include "darwin_specific.h"
#endif
......
......@@ -376,7 +376,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
val.psz_string = 0;
}
#if defined(SYS_DARWIN) || defined(SYS_BEOS)
#if defined(__APPLE__) || defined(SYS_BEOS)
if( !val.psz_string && p_vout->p_vlc->psz_homedir )
{
asprintf( &val.psz_string, "%s/Desktop",
......
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