Changeset c4fef7e0c05f6e406186630b1b3566e951b805ce
- Timestamp:
- 01/02/06 13:44:16
(3 years ago)
- Author:
- Sam Hocevar <sam@videolan.org>
- git-committer:
- Sam Hocevar <sam@videolan.org> 1138797856 +0000
- git-parent:
[7fc2d7308d17b202d6a1212438bcd19985f5f92e]
- git-author:
- Sam Hocevar <sam@videolan.org> 1138797856 +0000
- Message:
- Replaced "SYS_DARWIN" with either APPLE (meaning OS X) or ppc and
ppc64 (meaning PowerPC).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2cb472d |
rc4fef7e |
|
| 183 | 183 | * vasprintf: |
|---|
| 184 | 184 | *****************************************************************************/ |
|---|
| 185 | | #if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS) |
|---|
| | 185 | #if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 186 | 186 | int vlc_vasprintf(char **strp, const char *fmt, va_list ap) |
|---|
| 187 | 187 | { |
|---|
| … | … | |
| 229 | 229 | * asprintf: |
|---|
| 230 | 230 | *****************************************************************************/ |
|---|
| 231 | | #if !defined(HAVE_ASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS) |
|---|
| | 231 | #if !defined(HAVE_ASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 232 | 232 | int vlc_asprintf( char **strp, const char *fmt, ... ) |
|---|
| 233 | 233 | { |
|---|
| ra1e597b |
rc4fef7e |
|
| 46 | 46 | #include "video_output.h" |
|---|
| 47 | 47 | |
|---|
| 48 | | #ifdef SYS_DARWIN |
|---|
| 49 | | # include "Cocoa/Cocoa.h" |
|---|
| 50 | | #endif /* SYS_DARWIN */ |
|---|
| | 48 | #ifdef __APPLE__ |
|---|
| | 49 | # include <Cocoa/Cocoa.h> |
|---|
| | 50 | #endif |
|---|
| 51 | 51 | |
|---|
| 52 | 52 | /***************************************************************************** |
|---|
| … | … | |
| 61 | 61 | vlc_value_t , vlc_value_t , void * ); |
|---|
| 62 | 62 | |
|---|
| 63 | | #ifdef SYS_DARWIN |
|---|
| | 63 | #ifdef __APPLE__ |
|---|
| 64 | 64 | /***************************************************************************** |
|---|
| 65 | 65 | * VLCApplication interface |
|---|
| … | … | |
| 154 | 154 | int intf_RunThread( intf_thread_t *p_intf ) |
|---|
| 155 | 155 | { |
|---|
| 156 | | #ifdef SYS_DARWIN |
|---|
| | 156 | #ifdef __APPLE__ |
|---|
| 157 | 157 | NSAutoreleasePool * o_pool; |
|---|
| 158 | 158 | |
|---|
| … | … | |
| 309 | 309 | { |
|---|
| 310 | 310 | p_intf->b_die = VLC_TRUE; |
|---|
| 311 | | #ifdef SYS_DARWIN |
|---|
| | 311 | #ifdef __APPLE__ |
|---|
| 312 | 312 | if( strncmp( p_intf->p_vlc->psz_object_name, "clivlc", 6 ) ) |
|---|
| 313 | 313 | { |
|---|
| … | … | |
| 458 | 458 | } |
|---|
| 459 | 459 | |
|---|
| 460 | | #ifdef SYS_DARWIN |
|---|
| | 460 | #ifdef __APPLE__ |
|---|
| 461 | 461 | /***************************************************************************** |
|---|
| 462 | 462 | * VLCApplication implementation |
|---|
| r2cb472d |
rc4fef7e |
|
| 102 | 102 | int i_ret = VLC_SUCCESS; |
|---|
| 103 | 103 | |
|---|
| 104 | | #ifdef SYS_DARWIN |
|---|
| | 104 | #ifdef __APPLE__ |
|---|
| 105 | 105 | FILE *p_eject; |
|---|
| 106 | 106 | char *psz_disk; |
|---|
| r2f503ef |
rc4fef7e |
|
| 251 | 251 | /* Initialize mutexes */ |
|---|
| 252 | 252 | vlc_mutex_init( p_vlc, &p_vlc->config_lock ); |
|---|
| 253 | | #ifdef SYS_DARWIN |
|---|
| | 253 | #ifdef __APPLE__ |
|---|
| 254 | 254 | vlc_mutex_init( p_vlc, &p_vlc->quicktime_lock ); |
|---|
| 255 | 255 | vlc_thread_set_priority( p_vlc, VLC_THREAD_PRIORITY_LOW ); |
|---|
| … | … | |
| 2014 | 2014 | |
|---|
| 2015 | 2015 | char * psz_path; |
|---|
| 2016 | | #if defined( SYS_DARWIN ) || defined ( WIN32 ) || defined( SYS_BEOS ) |
|---|
| | 2016 | #if defined( __APPLE__ ) || defined ( WIN32 ) || defined( SYS_BEOS ) |
|---|
| 2017 | 2017 | char psz_tmp[1024]; |
|---|
| 2018 | 2018 | #endif |
|---|
| … | … | |
| 2027 | 2027 | else if( psz_lang ) |
|---|
| 2028 | 2028 | { |
|---|
| 2029 | | #ifdef SYS_DARWIN |
|---|
| | 2029 | #ifdef __APPLE__ |
|---|
| 2030 | 2030 | /* I need that under Darwin, please check it doesn't disturb |
|---|
| 2031 | 2031 | * other platforms. --Meuuh */ |
|---|
| … | … | |
| 2051 | 2051 | |
|---|
| 2052 | 2052 | /* Specify where to find the locales for current domain */ |
|---|
| 2053 | | #if !defined( SYS_DARWIN ) && !defined( WIN32 ) && !defined( SYS_BEOS ) |
|---|
| | 2053 | #if !defined( __APPLE__ ) && !defined( WIN32 ) && !defined( SYS_BEOS ) |
|---|
| 2054 | 2054 | psz_path = LOCALEDIR; |
|---|
| 2055 | 2055 | #else |
|---|
| r2f503ef |
rc4fef7e |
|
| 146 | 146 | "-1 (default), 48000, 44100, 32000, 22050, 16000, 11025, 8000.") |
|---|
| 147 | 147 | |
|---|
| 148 | | #if !defined( SYS_DARWIN ) |
|---|
| | 148 | #if !defined( __APPLE__ ) |
|---|
| 149 | 149 | #define AOUT_RESAMP_TEXT N_("High quality audio resampling") |
|---|
| 150 | 150 | #define AOUT_RESAMP_LONGTEXT N_( \ |
|---|
| … | … | |
| 1055 | 1055 | add_integer( "aout-rate", -1, NULL, AOUT_RATE_TEXT, |
|---|
| 1056 | 1056 | AOUT_RATE_LONGTEXT, VLC_TRUE ); |
|---|
| 1057 | | #if !defined( SYS_DARWIN ) |
|---|
| | 1057 | #if !defined( __APPLE__ ) |
|---|
| 1058 | 1058 | add_bool( "hq-resampling", 1, NULL, AOUT_RESAMP_TEXT, |
|---|
| 1059 | 1059 | AOUT_RESAMP_LONGTEXT, VLC_TRUE ); |
|---|
| … | … | |
| 1091 | 1091 | add_bool( "quiet-synchro", 0, NULL, QUIET_SYNCHRO_TEXT, |
|---|
| 1092 | 1092 | QUIET_SYNCHRO_LONGTEXT, VLC_TRUE ); |
|---|
| 1093 | | #ifndef SYS_DARWIN |
|---|
| | 1093 | #ifndef __APPLE__ |
|---|
| 1094 | 1094 | add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, VLC_TRUE ); |
|---|
| 1095 | 1095 | #endif |
|---|
| … | … | |
| 1376 | 1376 | MINIMIZE_THREADS_LONGTEXT, VLC_TRUE ); |
|---|
| 1377 | 1377 | |
|---|
| 1378 | | #if !defined(SYS_DARWIN) && !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H) |
|---|
| | 1378 | #if !defined(__APPLE__) && !defined(SYS_BEOS) && defined(PTHREAD_COND_T_IN_PTHREAD_H) |
|---|
| 1379 | 1379 | add_bool( "rt-priority", VLC_FALSE, NULL, RT_PRIORITY_TEXT, |
|---|
| 1380 | 1380 | RT_PRIORITY_LONGTEXT, VLC_TRUE ); |
|---|
| … | … | |
| 1468 | 1468 | add_category_hint( N_("Hot keys"), HOTKEY_CAT_LONGTEXT , VLC_FALSE ); |
|---|
| 1469 | 1469 | |
|---|
| 1470 | | #if defined(SYS_DARWIN) |
|---|
| | 1470 | #if defined(__APPLE__) |
|---|
| 1471 | 1471 | /* Don't use the following combo's */ |
|---|
| 1472 | 1472 | |
|---|
| r2cb472d |
rc4fef7e |
|
| 44 | 44 | #endif |
|---|
| 45 | 45 | |
|---|
| 46 | | #ifdef SYS_DARWIN |
|---|
| | 46 | #ifdef __APPLE__ |
|---|
| 47 | 47 | # include <errno.h> |
|---|
| 48 | 48 | # include <string.h> |
|---|
| … | … | |
| 239 | 239 | const char *psz_codeset; |
|---|
| 240 | 240 | |
|---|
| 241 | | #if !(defined WIN32 || defined OS2 || defined SYS_DARWIN) |
|---|
| | 241 | #if !(defined WIN32 || defined OS2 || defined __APPLE__) |
|---|
| 242 | 242 | |
|---|
| 243 | 243 | # if HAVE_LANGINFO_CODESET |
|---|
| … | … | |
| 255 | 255 | * use setlocale here; it would return "C" when it doesn't support the |
|---|
| 256 | 256 | * locale name the user has set. Darwin's setlocale is broken. */ |
|---|
| 257 | | # if HAVE_SETLOCALE && !SYS_DARWIN |
|---|
| | 257 | # if HAVE_SETLOCALE && !__APPLE__ |
|---|
| 258 | 258 | psz_locale = setlocale( LC_ALL, NULL ); |
|---|
| 259 | 259 | # endif |
|---|
| … | … | |
| 275 | 275 | # endif /* HAVE_LANGINFO_CODESET */ |
|---|
| 276 | 276 | |
|---|
| 277 | | #elif defined SYS_DARWIN |
|---|
| | 277 | #elif defined __APPLE__ |
|---|
| 278 | 278 | |
|---|
| 279 | 279 | /* Darwin is always using UTF-8 internally. */ |
|---|
| … | … | |
| 346 | 346 | char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string ) |
|---|
| 347 | 347 | { |
|---|
| 348 | | #ifdef SYS_DARWIN |
|---|
| | 348 | #ifdef __APPLE__ |
|---|
| 349 | 349 | if ( p_this->p_libvlc->iconv_macosx != (vlc_iconv_t)-1 ) |
|---|
| 350 | 350 | { |
|---|
| r2cb472d |
rc4fef7e |
|
| 1364 | 1364 | p_this->p_vlc->ppsz_argv = ppsz_argv; |
|---|
| 1365 | 1365 | |
|---|
| 1366 | | #ifdef SYS_DARWIN |
|---|
| | 1366 | #ifdef __APPLE__ |
|---|
| 1367 | 1367 | /* When vlc.app is run by double clicking in Mac OS X, the 2nd arg |
|---|
| 1368 | 1368 | * is the PSN - process serial number (a unique PID-ish thingie) |
|---|
| rad54c6e |
rc4fef7e |
|
| 34 | 34 | #endif |
|---|
| 35 | 35 | |
|---|
| 36 | | #if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__)) |
|---|
| | 36 | #if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__)) |
|---|
| 37 | 37 | #include <sys/sysctl.h> |
|---|
| 38 | 38 | #endif |
|---|
| … | … | |
| 67 | 67 | volatile uint32_t i_capabilities = CPU_CAPABILITY_NONE; |
|---|
| 68 | 68 | |
|---|
| 69 | | #if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__)) |
|---|
| | 69 | #if defined(__APPLE__) && (defined(__ppc__) || defined(__ppc64__)) |
|---|
| 70 | 70 | int selectors[2] = { CTL_HW, HW_VECTORUNIT }; |
|---|
| 71 | 71 | int i_has_altivec = 0; |
|---|
| … | … | |
| 268 | 268 | return i_capabilities; |
|---|
| 269 | 269 | |
|---|
| 270 | | #elif defined( __powerpc__ ) |
|---|
| | 270 | #elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ ) |
|---|
| 271 | 271 | |
|---|
| 272 | 272 | # ifdef CAN_COMPILE_ALTIVEC && defined( HAVE_SIGNAL_H ) |
|---|
| r444653a |
rc4fef7e |
|
| 303 | 303 | msg_item_t item; /* message in case of a full queue */ |
|---|
| 304 | 304 | |
|---|
| 305 | | #if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS) |
|---|
| | 305 | #if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 306 | 306 | int i_size = strlen(psz_format) + INTF_MAX_MSG_SIZE; |
|---|
| 307 | 307 | #endif |
|---|
| … | … | |
| 318 | 318 | * Convert message to string |
|---|
| 319 | 319 | */ |
|---|
| 320 | | #if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined( SYS_BEOS ) |
|---|
| | 320 | #if defined(HAVE_VASPRINTF) && !defined(__APPLE__) && !defined( SYS_BEOS ) |
|---|
| 321 | 321 | vlc_va_copy( args, _args ); |
|---|
| 322 | 322 | vasprintf( &psz_str, psz_format, args ); |
|---|
| … | … | |
| 364 | 364 | } |
|---|
| 365 | 365 | |
|---|
| 366 | | #if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS) |
|---|
| | 366 | #if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 367 | 367 | vlc_va_copy( args, _args ); |
|---|
| 368 | 368 | vsnprintf( psz_str, i_size, psz_format, args ); |
|---|
| r8eaff12 |
rc4fef7e |
|
| 764 | 764 | if( !(*ppsz_path)[0] ) continue; |
|---|
| 765 | 765 | |
|---|
| 766 | | #if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 ) |
|---|
| | 766 | #if defined( SYS_BEOS ) || defined( __APPLE__ ) || defined( WIN32 ) |
|---|
| 767 | 767 | |
|---|
| 768 | 768 | /* Handle relative as well as absolute paths */ |
|---|
| r2cb472d |
rc4fef7e |
|
| 572 | 572 | i_ret = pthread_create( &p_this->thread_id, NULL, func, p_data ); |
|---|
| 573 | 573 | |
|---|
| 574 | | #ifndef SYS_DARWIN |
|---|
| | 574 | #ifndef __APPLE__ |
|---|
| 575 | 575 | if( config_GetInt( p_this, "rt-priority" ) ) |
|---|
| 576 | 576 | #endif |
|---|
| … | … | |
| 602 | 602 | } |
|---|
| 603 | 603 | } |
|---|
| 604 | | #ifndef SYS_DARWIN |
|---|
| | 604 | #ifndef __APPLE__ |
|---|
| 605 | 605 | else |
|---|
| 606 | 606 | { |
|---|
| … | … | |
| 662 | 662 | |
|---|
| 663 | 663 | #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) |
|---|
| 664 | | #ifndef SYS_DARWIN |
|---|
| | 664 | #ifndef __APPLE__ |
|---|
| 665 | 665 | if( config_GetInt( p_this, "rt-priority" ) ) |
|---|
| 666 | 666 | #endif |
|---|
| rf0a2b19 |
rc4fef7e |
|
| 1466 | 1466 | |
|---|
| 1467 | 1467 | va_start( args, psz_value ); |
|---|
| 1468 | | #if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined(SYS_BEOS) |
|---|
| | 1468 | #if defined(HAVE_VASPRINTF) && !defined(__APPLE__) && !defined(SYS_BEOS) |
|---|
| 1469 | 1469 | vasprintf( &value, psz_value, args ); |
|---|
| 1470 | 1470 | #else |
|---|
| r2cb472d |
rc4fef7e |
|
| 44 | 44 | #include "vlc_playlist.h" |
|---|
| 45 | 45 | |
|---|
| 46 | | #if defined( SYS_DARWIN ) |
|---|
| | 46 | #if defined( __APPLE__ ) |
|---|
| 47 | 47 | #include "darwin_specific.h" |
|---|
| 48 | 48 | #endif |
|---|
| rec98101 |
rc4fef7e |
|
| 377 | 377 | } |
|---|
| 378 | 378 | |
|---|
| 379 | | #if defined(SYS_DARWIN) || defined(SYS_BEOS) |
|---|
| | 379 | #if defined(__APPLE__) || defined(SYS_BEOS) |
|---|
| 380 | 380 | if( !val.psz_string && p_vout->p_vlc->psz_homedir ) |
|---|
| 381 | 381 | { |
|---|