From c4fef7e0c05f6e406186630b1b3566e951b805ce Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 1 Feb 2006 12:44:16 +0000 Subject: [PATCH] * Replaced "SYS_DARWIN" with either __APPLE__ (meaning OS X) or __ppc__ and __ppc64__ (meaning PowerPC). --- src/extras/libc.c | 4 ++-- src/interface/interface.c | 14 +++++++------- src/interface/intf_eject.c | 2 +- src/libvlc.c | 8 ++++---- src/libvlc.h | 10 +++++----- src/misc/charset.c | 10 +++++----- src/misc/configuration.c | 2 +- src/misc/cpu.c | 6 +++--- src/misc/messages.c | 6 +++--- src/misc/modules.c | 2 +- src/misc/threads.c | 6 +++--- src/network/httpd.c | 2 +- src/video_output/video_output.c | 2 +- src/video_output/vout_intf.c | 2 +- 14 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/extras/libc.c b/src/extras/libc.c index 80dfba9a3e..e1b6a174f8 100644 --- a/src/extras/libc.c +++ b/src/extras/libc.c @@ -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; diff --git a/src/interface/interface.c b/src/interface/interface.c index 9350bc8f55..a378ef27bb 100644 --- a/src/interface/interface.c +++ b/src/interface/interface.c @@ -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 +#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 *****************************************************************************/ diff --git a/src/interface/intf_eject.c b/src/interface/intf_eject.c index cd3b0606aa..f245cc2374 100644 --- a/src/interface/intf_eject.c +++ b/src/interface/intf_eject.c @@ -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]; diff --git a/src/libvlc.c b/src/libvlc.c index be5f115df8..52dd749946 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -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, diff --git a/src/libvlc.h b/src/libvlc.h index 1d75f26d65..4099339905 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -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' diff --git a/src/misc/charset.c b/src/misc/charset.c index e33c4bf537..491d654660 100644 --- a/src/misc/charset.c +++ b/src/misc/charset.c @@ -43,7 +43,7 @@ # include #endif -#ifdef SYS_DARWIN +#ifdef __APPLE__ # include # include #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; diff --git a/src/misc/configuration.c b/src/misc/configuration.c index 8346fee28a..73b42f0e1e 100644 --- a/src/misc/configuration.c +++ b/src/misc/configuration.c @@ -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 */ diff --git a/src/misc/cpu.c b/src/misc/cpu.c index 26c5d2be68..46a3abe5f1 100644 --- a/src/misc/cpu.c +++ b/src/misc/cpu.c @@ -33,7 +33,7 @@ # include /* longjmp, setjmp */ #endif -#if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__)) +#if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__)) #include #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 ); diff --git a/src/misc/messages.c b/src/misc/messages.c index 2f2fcd0b88..3d37972f7b 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -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 ); diff --git a/src/misc/modules.c b/src/misc/modules.c index 977466c2d9..743ac51963 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -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 diff --git a/src/misc/threads.c b/src/misc/threads.c index 8eb35c739a..cf73302444 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -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 { diff --git a/src/network/httpd.c b/src/network/httpd.c index 4f68b35e5d..37b9c5c3ae 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -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 { diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index d0e0e40521..7e77af015a 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -43,7 +43,7 @@ #include /* for input_thread_t and i_pts_delay */ #include "vlc_playlist.h" -#if defined( SYS_DARWIN ) +#if defined( __APPLE__ ) #include "darwin_specific.h" #endif diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c index 1af5d8f23a..4301e47331 100644 --- a/src/video_output/vout_intf.c +++ b/src/video_output/vout_intf.c @@ -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", -- 2.39.2