From: Sam Hocevar Date: Wed, 1 Feb 2006 13:01:06 +0000 (+0000) Subject: * Got rid of SYS_DARWIN everywhere. X-Git-Tag: 0.9.0-test0~12547 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b76d7cf6283749d91448cb2b175f7cd9889fbe02;p=vlc * Got rid of SYS_DARWIN everywhere. --- diff --git a/include/main.h b/include/main.h index c36fd2d80c..a2a5c35ac5 100644 --- a/include/main.h +++ b/include/main.h @@ -70,7 +70,7 @@ struct libvlc_t #if defined( SYS_BEOS ) vlc_object_t * p_appthread; char * psz_vlcpath; -#elif defined( SYS_DARWIN ) +#elif defined( __APPLE__ ) char * psz_vlcpath; vlc_iconv_t iconv_macosx; /* for HFS+ file names */ vlc_mutex_t iconv_lock; @@ -110,7 +110,7 @@ struct vlc_t /* Locks */ vlc_mutex_t config_lock; /* lock for the config file */ -#ifdef SYS_DARWIN +#ifdef __APPLE__ vlc_mutex_t quicktime_lock; /* QT is not thread safe on OSX */ #endif diff --git a/include/os_specific.h b/include/os_specific.h index 11a86645b7..b58b0cf585 100644 --- a/include/os_specific.h +++ b/include/os_specific.h @@ -28,7 +28,7 @@ #if defined( SYS_BEOS ) # include "beos_specific.h" -#elif defined( SYS_DARWIN ) +#elif defined( __APPLE__ ) # include "darwin_specific.h" #elif defined( WIN32 ) || defined( UNDER_CE ) # include "win32_specific.h" diff --git a/include/vlc_common.h b/include/vlc_common.h index 77ba6b7ea3..0921ae44c6 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -796,14 +796,14 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ) # define vlc_strdup NULL #endif -#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS) +#if !defined(HAVE_VASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) # define vasprintf vlc_vasprintf VLC_EXPORT( int, vlc_vasprintf, (char **, const char *, va_list ) ); #elif !defined(__PLUGIN__) # define vlc_vasprintf NULL #endif -#if !defined(HAVE_ASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS) +#if !defined(HAVE_ASPRINTF) || defined(__APPLE__) || defined(SYS_BEOS) # define asprintf vlc_asprintf VLC_EXPORT( int, vlc_asprintf, (char **, const char *, ... ) ); #elif !defined(__PLUGIN__) diff --git a/include/vlc_config.h b/include/vlc_config.h index 41f9d89d37..966b1517bd 100644 --- a/include/vlc_config.h +++ b/include/vlc_config.h @@ -47,7 +47,7 @@ /* The configuration file and directory */ #ifdef SYS_BEOS # define CONFIG_DIR "config/settings/VideoLAN Client" -#elif SYS_DARWIN +#elif __APPLE__ # define CONFIG_DIR "Library/Preferences/VLC" #elif defined( WIN32 ) || defined( UNDER_CE ) # define CONFIG_DIR "vlc" diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 6036ac43ba..913c89ad9b 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -69,7 +69,7 @@ *****************************************************************************/ /* Thread priorities */ -#ifdef SYS_DARWIN +#ifdef __APPLE__ # define VLC_THREAD_PRIORITY_LOW (-47) # define VLC_THREAD_PRIORITY_INPUT 37 # define VLC_THREAD_PRIORITY_AUDIO 37 diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c index 30e906d814..46d164ffe0 100644 --- a/modules/access/vcd/cdrom.c +++ b/modules/access/vcd/cdrom.c @@ -47,7 +47,7 @@ #if defined( SYS_BSDI ) # include -#elif defined ( SYS_DARWIN ) +#elif defined ( __APPLE__ ) # include # include # include @@ -221,7 +221,7 @@ int ioctl_GetTracksMap( vlc_object_t *p_this, const vcddev_t *p_vcddev, * vcd device mode */ -#if defined( SYS_DARWIN ) +#if defined( __APPLE__ ) CDTOC *pTOC; int i_descriptors; @@ -581,7 +581,7 @@ int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev, * vcd device mode */ -#if defined( SYS_DARWIN ) +#if defined( __APPLE__ ) dk_cd_read_t cd_read; memset( &cd_read, 0, sizeof(cd_read) ); @@ -953,7 +953,7 @@ static void CloseVCDImage( vlc_object_t * p_this, vcddev_t *p_vcddev ) free( p_vcddev->p_sectors ); } -#if defined( SYS_DARWIN ) +#if defined( __APPLE__ ) /**************************************************************************** * darwin_getTOC: get the TOC ****************************************************************************/ @@ -1098,7 +1098,7 @@ static int darwin_getNumberOfTracks( CDTOC *pTOC, int i_descriptors ) return( i_tracks ); } -#endif /* SYS_DARWIN */ +#endif /* __APPLE__ */ #if defined( WIN32 ) /***************************************************************************** diff --git a/modules/access/vcd/cdrom_internals.h b/modules/access/vcd/cdrom_internals.h index e53ec856f9..f83ce1a250 100644 --- a/modules/access/vcd/cdrom_internals.h +++ b/modules/access/vcd/cdrom_internals.h @@ -66,7 +66,7 @@ struct vcddev_s /***************************************************************************** * Platform specifics *****************************************************************************/ -#if defined( SYS_DARWIN ) +#if defined( __APPLE__ ) #define darwin_freeTOC( p ) free( (void*)p ) #define CD_MIN_TRACK_NO 01 #define CD_MAX_TRACK_NO 99 @@ -204,7 +204,7 @@ struct SRB_ExecSCSICmd static int OpenVCDImage( vlc_object_t *, const char *, struct vcddev_s * ); static void CloseVCDImage( vlc_object_t *, struct vcddev_s * ); -#if defined( SYS_DARWIN ) +#if defined( __APPLE__ ) static CDTOC *darwin_getTOC( vlc_object_t *, const struct vcddev_s * ); static int darwin_getNumberOfDescriptors( CDTOC * ); static int darwin_getNumberOfTracks( CDTOC *, int ); diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c index 2cbe087c66..4e9fe1846e 100644 --- a/modules/audio_filter/resampler/bandlimited.c +++ b/modules/audio_filter/resampler/bandlimited.c @@ -106,7 +106,7 @@ static int Create( vlc_object_t *p_this ) return VLC_EGENERIC; } -#if !defined( SYS_DARWIN ) +#if !defined( __APPLE__ ) if( !config_GetInt( p_this, "hq-resampling" ) ) { return VLC_EGENERIC; diff --git a/modules/codec/cmml/browser_open.c b/modules/codec/cmml/browser_open.c index cfa3c6de82..f8a8a8e9ca 100644 --- a/modules/codec/cmml/browser_open.c +++ b/modules/codec/cmml/browser_open.c @@ -31,7 +31,7 @@ int browser_Open( const char *psz_url ) { -#ifdef SYS_DARWIN +#ifdef __APPLE__ char *psz_open_commandline; psz_open_commandline = strdup( "/usr/bin/open " ); diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c index c80960d120..b4f96e1410 100644 --- a/modules/codec/mpeg_audio.c +++ b/modules/codec/mpeg_audio.c @@ -106,7 +106,7 @@ vlc_module_begin(); set_description( _("MPEG audio layer I/II/III parser") ); set_category( CAT_INPUT ); set_subcategory( SUBCAT_INPUT_ACODEC ); -#if defined(SYS_DARWIN) || defined(UNDER_CE) +#if defined(__APPLE__) || defined(UNDER_CE) set_capability( "decoder", 5 ); #else set_capability( "decoder", 100 ); diff --git a/modules/codec/quicktime.c b/modules/codec/quicktime.c index 7bd7f49c84..0f403038e4 100644 --- a/modules/codec/quicktime.c +++ b/modules/codec/quicktime.c @@ -31,11 +31,11 @@ #include #include -#if !defined (SYS_DARWIN) && !defined(WIN32) +#if !defined (__APPLE__) && !defined(WIN32) # define LOADER 1 #endif -#ifdef SYS_DARWIN +#ifdef __APPLE__ #include #include #include @@ -83,7 +83,7 @@ static picture_t *DecodeVideo( decoder_t *, block_t ** ); #define FCC( a, b , c, d ) \ ((uint32_t)( ((a)<<24)|((b)<<16)|((c)<<8)|(d))) -#ifndef SYS_DARWIN +#ifndef __APPLE__ typedef struct OpaqueSoundConverter* SoundConverter; #ifndef LOADER typedef long OSType; @@ -103,12 +103,12 @@ typedef struct SoundComponentData { long reserved; } SoundComponentData; -#endif /* SYS_DARWIN */ +#endif /* __APPLE__ */ struct decoder_sys_t { /* library */ -#ifndef SYS_DARWIN +#ifndef __APPLE__ #ifdef LOADER ldt_fs_t *ldt_fs; #endif /* LOADER */ @@ -117,7 +117,7 @@ struct decoder_sys_t HINSTANCE qts; OSErr (*InitializeQTML) ( long flags ); OSErr (*TerminateQTML) ( void ); -#endif /* SYS_DARWIN */ +#endif /* __APPLE__ */ /* Audio */ int (*SoundConverterOpen) ( const SoundComponentData *, @@ -288,7 +288,7 @@ static void Close( vlc_object_t *p_this ) /* get lock, avoid segfault */ var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); -#ifdef SYS_DARWIN +#ifdef __APPLE__ /* on OS X QT is not threadsafe */ vlc_mutex_lock( &p_dec->p_vlc->quicktime_lock ); #endif @@ -314,7 +314,7 @@ static void Close( vlc_object_t *p_this ) if( p_sys->plane) free( p_sys->plane ); } -#ifndef SYS_DARWIN +#ifndef __APPLE__ FreeLibrary( p_sys->qtml ); FreeLibrary( p_sys->qts ); msg_Dbg( p_dec, "FreeLibrary ok." ); @@ -330,7 +330,7 @@ static void Close( vlc_object_t *p_this ) #endif #endif -#ifdef SYS_DARWIN +#ifdef __APPLE__ vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock ); #endif vlc_mutex_unlock( lockval.p_address ); @@ -362,12 +362,12 @@ static int OpenAudio( decoder_t *p_dec ) /* get lock, avoid segfault */ var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); -#ifdef SYS_DARWIN +#ifdef __APPLE__ /* on OS X QT is not threadsafe */ vlc_mutex_lock( &p_dec->p_vlc->quicktime_lock ); #endif -#ifdef SYS_DARWIN +#ifdef __APPLE__ EnterMovies(); #endif @@ -377,7 +377,7 @@ static int OpenAudio( decoder_t *p_dec ) goto exit_error; } -#ifndef SYS_DARWIN +#ifndef __APPLE__ if( ( i_error = p_sys->InitializeQTML( 6 + 16 ) ) ) { msg_Dbg( p_dec, "error on InitializeQTML = %d", i_error ); @@ -476,7 +476,7 @@ static int OpenAudio( decoder_t *p_dec ) p_sys->i_out = 0; p_sys->i_out_frames = 0; -#ifdef SYS_DARWIN +#ifdef __APPLE__ vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock ); #endif vlc_mutex_unlock( lockval.p_address ); @@ -487,7 +487,7 @@ exit_error: #ifdef LOADER Restore_LDT_Keeper( p_sys->ldt_fs ); #endif -#ifdef SYS_DARWIN +#ifdef __APPLE__ vlc_mutex_unlock( &p_dec->p_vlc->quicktime_lock ); #endif vlc_mutex_unlock( lockval.p_address ); @@ -672,7 +672,7 @@ static int OpenVideo( decoder_t *p_dec ) var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); -#ifdef SYS_DARWIN +#ifdef __APPLE__ EnterMovies(); #endif @@ -682,7 +682,7 @@ static int OpenVideo( decoder_t *p_dec ) goto exit_error; } -#ifndef SYS_DARWIN +#ifndef __APPLE__ if( ( i_result = p_sys->InitializeQTML( 6 + 16 ) ) ) { msg_Dbg( p_dec, "error on InitializeQTML = %d", (int)i_result ); @@ -919,7 +919,7 @@ static int QTAudioInit( decoder_t *p_dec ) { decoder_sys_t *p_sys = p_dec->p_sys; -#ifdef SYS_DARWIN +#ifdef __APPLE__ p_sys->SoundConverterOpen = (void*)SoundConverterOpen; p_sys->SoundConverterClose = (void*)SoundConverterClose; p_sys->SoundConverterSetInfo = (void*)SoundConverterSetInfo; @@ -974,7 +974,7 @@ static int QTAudioInit( decoder_t *p_dec ) } msg_Dbg( p_dec, "Standard init done" ); -#endif /* else SYS_DARWIN */ +#endif /* else __APPLE__ */ return VLC_SUCCESS; } @@ -987,7 +987,7 @@ static int QTVideoInit( decoder_t *p_dec ) { decoder_sys_t *p_sys = p_dec->p_sys; -#ifdef SYS_DARWIN +#ifdef __APPLE__ p_sys->FindNextComponent = (void*)FindNextComponent; p_sys->OpenComponent = (void*)OpenComponent; p_sys->ImageCodecInitialize = (void*)ImageCodecInitialize; @@ -1047,7 +1047,7 @@ static int QTVideoInit( decoder_t *p_dec ) msg_Err( p_dec, "failed getting proc address" ); return VLC_EGENERIC; } -#endif /* SYS_DARWIN */ +#endif /* __APPLE__ */ return VLC_SUCCESS; } diff --git a/modules/control/http/http.c b/modules/control/http/http.c index 40b3db2ffe..ee53459b3c 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -83,7 +83,7 @@ static void Run ( intf_thread_t *p_intf ); /***************************************************************************** * Local functions *****************************************************************************/ -#if !defined(SYS_DARWIN) && !defined(SYS_BEOS) && !defined(WIN32) +#if !defined(__APPLE__) && !defined(SYS_BEOS) && !defined(WIN32) static int DirectoryCheck( char *psz_dir ) { DIR *p_dir; @@ -271,7 +271,7 @@ static int Open( vlc_object_t *p_this ) p_sys->i_files = 0; p_sys->pp_files = NULL; -#if defined(SYS_DARWIN) || defined(SYS_BEOS) || defined(WIN32) +#if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32) if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL ) { char * psz_vlcpath = p_intf->p_libvlc->psz_vlcpath; diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index 177afb4a37..00ecd8ecb4 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -4618,7 +4618,7 @@ void matroska_segment_c::ParseInfo( KaxInfo *info ) msg_Dbg( &sys.demuxer, "| | + family=%d", *(uint32*)uid->GetBuffer() ); } -#if defined( HAVE_GMTIME_R ) && !defined( SYS_DARWIN ) +#if defined( HAVE_GMTIME_R ) && !defined( __APPLE__ ) else if( MKV_IS_ID( l, KaxDateUTC ) ) { KaxDateUTC &date = *(KaxDateUTC*)l; diff --git a/modules/gui/wxwidgets/dialogs/updatevlc.cpp b/modules/gui/wxwidgets/dialogs/updatevlc.cpp index d426880728..e0988db28b 100644 --- a/modules/gui/wxwidgets/dialogs/updatevlc.cpp +++ b/modules/gui/wxwidgets/dialogs/updatevlc.cpp @@ -39,7 +39,7 @@ # define UPDATE_VLC_OS "windows" # define UPDATE_VLC_ARCH "i386" #else -#ifdef SYS_DARWIN +#ifdef __APPLE__ # define UPDATE_VLC_OS "macosx" # define UPDATE_VLC_ARCH "ppc" #else diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c index 672eb69718..04fb9ac522 100644 --- a/modules/misc/freetype.c +++ b/modules/misc/freetype.c @@ -48,7 +48,7 @@ #include FT_FREETYPE_H #include FT_GLYPH_H -#ifdef SYS_DARWIN +#ifdef __APPLE__ #define DEFAULT_FONT "/System/Library/Fonts/LucidaGrande.dfont" #elif defined( SYS_BEOS ) #define DEFAULT_FONT "/boot/beos/etc/fonts/ttfonts/Swiss721.ttf" @@ -248,7 +248,7 @@ static int Create( vlc_object_t *p_this ) #ifdef WIN32 GetWindowsDirectory( psz_fontfile, PATH_MAX + 1 ); strcat( psz_fontfile, "\\fonts\\arial.ttf" ); -#elif SYS_DARWIN +#elif __APPLE__ strcpy( psz_fontfile, DEFAULT_FONT ); #else msg_Err( p_filter, "user didn't specify a font" ); diff --git a/modules/misc/logger.c b/modules/misc/logger.c index 0aa85a3aab..72d402d88d 100644 --- a/modules/misc/logger.c +++ b/modules/misc/logger.c @@ -41,7 +41,7 @@ #define MODE_HTML 1 #define MODE_SYSLOG 2 -#ifdef SYS_DARWIN +#ifdef __APPLE__ #define LOG_DIR "Library/Logs/" #endif @@ -193,7 +193,7 @@ static int Open( vlc_object_t *p_this ) psz_file = config_GetPsz( p_intf, "logfile" ); if( !psz_file ) { -#ifdef SYS_DARWIN +#ifdef __APPLE__ char *psz_homedir = p_this->p_vlc->psz_homedir; if( !psz_homedir ) diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c index c446f856f0..d896e7ca3e 100644 --- a/modules/video_output/opengl.c +++ b/modules/video_output/opengl.c @@ -33,7 +33,7 @@ #include #include -#ifdef SYS_DARWIN +#ifdef __APPLE__ #include #include @@ -133,7 +133,7 @@ vlc_module_begin(); set_category( CAT_VIDEO ); set_subcategory( SUBCAT_VIDEO_VOUT ); set_description( _("OpenGL video output") ); -#ifdef SYS_DARWIN +#ifdef __APPLE__ set_capability( "video output", 200 ); #else set_capability( "video output", 20 ); @@ -187,7 +187,7 @@ static int CreateVout( vlc_object_t *p_this ) var_Create( p_vout, "opengl-effect", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); p_sys->i_index = 0; -#ifdef SYS_DARWIN +#ifdef __APPLE__ p_sys->i_tex_width = p_vout->fmt_in.i_width; p_sys->i_tex_height = p_vout->fmt_in.i_height; #else @@ -268,7 +268,7 @@ static int Init( vout_thread_t *p_vout ) p_sys->p_vout->pf_init( p_sys->p_vout ); -#if defined( SYS_DARWIN ) || (VLCGL_FORMAT == YCBCR_MESA) +#if defined( __APPLE__ ) || (VLCGL_FORMAT == YCBCR_MESA) p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2'); i_pixel_pitch = 2; @@ -478,7 +478,7 @@ static int Manage( vout_thread_t *p_vout ) i_ret = p_sys->p_vout->pf_manage( p_sys->p_vout ); p_vout->i_changes = p_sys->p_vout->i_changes; -#ifdef SYS_DARWIN +#ifdef __APPLE__ if( p_sys->p_vout->pf_lock && p_sys->p_vout->pf_lock( p_sys->p_vout ) ) { @@ -558,7 +558,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) return; } -#ifdef SYS_DARWIN +#ifdef __APPLE__ int i_new_index; i_new_index = ( p_sys->i_index + 1 ) & 1; @@ -608,7 +608,7 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic ) /* glTexCoord works differently with GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_EXT */ -#ifdef SYS_DARWIN +#ifdef __APPLE__ f_x = (float)p_vout->fmt_out.i_x_offset; f_y = (float)p_vout->fmt_out.i_y_offset; f_width = (float)p_vout->fmt_out.i_x_offset + @@ -749,7 +749,7 @@ static int InitTextures( vout_thread_t *p_vout ) glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); -#ifdef SYS_DARWIN +#ifdef __APPLE__ /* Tell the driver not to make a copy of the texture but to use our buffer */ glEnable( GL_UNPACK_CLIENT_STORAGE_APPLE ); diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index dc235483f5..77d2332627 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -1958,7 +1958,7 @@ static int InitDisplay( vout_thread_t *p_vout ) if( config_GetInt( p_vout, MODULE_STRING "-shm" ) ) { -# ifdef SYS_DARWIN +# ifdef __APPLE__ /* FIXME: As of 2001-03-16, XFree4 for MacOS X does not support Xshm */ # else p_vout->p_sys->b_shm = diff --git a/src/vlc.c b/src/vlc.c index 61d37bc509..2f2750ad55 100644 --- a/src/vlc.c +++ b/src/vlc.c @@ -54,7 +54,7 @@ int main( int i_argc, char *ppsz_argv[] ) { int i_ret; -#ifndef SYS_DARWIN +#ifndef __APPLE__ /* This clutters OSX GUI error logs */ fprintf( stderr, "VLC media player %s\n", VLC_Version() ); #endif