]> git.sesse.net Git - vlc/commitdiff
* Got rid of SYS_DARWIN everywhere.
authorSam Hocevar <sam@videolan.org>
Wed, 1 Feb 2006 13:01:06 +0000 (13:01 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 1 Feb 2006 13:01:06 +0000 (13:01 +0000)
19 files changed:
include/main.h
include/os_specific.h
include/vlc_common.h
include/vlc_config.h
include/vlc_threads.h
modules/access/vcd/cdrom.c
modules/access/vcd/cdrom_internals.h
modules/audio_filter/resampler/bandlimited.c
modules/codec/cmml/browser_open.c
modules/codec/mpeg_audio.c
modules/codec/quicktime.c
modules/control/http/http.c
modules/demux/mkv.cpp
modules/gui/wxwidgets/dialogs/updatevlc.cpp
modules/misc/freetype.c
modules/misc/logger.c
modules/video_output/opengl.c
modules/video_output/x11/xcommon.c
src/vlc.c

index c36fd2d80c1cba4f775405931886ac2e9581edb8..a2a5c35ac502bb30811bfdb59709d130b8c90055 100644 (file)
@@ -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
 
index 11a86645b7647f361da056fae45f06647be86cbb..b58b0cf585e199f4cb841bb4d91a115a6fd5fdf5 100644 (file)
@@ -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"
index 77ba6b7ea37970a0b0e3def43d0ad9eb48f8e55f..0921ae44c6a61235b504df5f40df17deeee214b2 100644 (file)
@@ -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__)
index 41f9d89d37568528f5c605ad1420e35583d27d45..966b1517bd43081f40710d0d7874b5bde6782f85 100644 (file)
@@ -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"
index 6036ac43ba41b3891fa47b864a86a648e0812430..913c89ad9bcfdac2d0786aae6bdbc5440302d9f8 100644 (file)
@@ -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
index 30e906d814062a4f932e6d009cd3748f80558fa9..46d164ffe017b342fd13f1a4b34ab76887c46d95 100644 (file)
@@ -47,7 +47,7 @@
 
 #if defined( SYS_BSDI )
 #   include <dvd.h>
-#elif defined ( SYS_DARWIN )
+#elif defined ( __APPLE__ )
 #   include <CoreFoundation/CFBase.h>
 #   include <IOKit/IOKitLib.h>
 #   include <IOKit/storage/IOCDTypes.h>
@@ -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 )
 /*****************************************************************************
index e53ec856f9cd732fb6f8274b5841ddfcfc18cec6..f83ce1a250d70b311a8597329953dcef80395790 100644 (file)
@@ -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 );
index 2cbe087c665430078710d2797d630ae128c21679..4e9fe1846e505279c3294a00ccd151684a9654b3 100644 (file)
@@ -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;
index cfa3c6de82e14796803deebfdcff1f47b5b32e1a..f8a8a8e9caa38b52f4966a32a10392f37c6339ab 100644 (file)
@@ -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 " );
index c80960d120557bceb95994e9cab96295953ba030..b4f96e141001aa81557fb2ce15c4db795c2e738d 100644 (file)
@@ -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 );
index 7bd7f49c842a484fa19fb7734b31d21a752d5043..0f403038e48710c7e66196ac6004f7ec2824f03c 100644 (file)
 #include <vlc/vout.h>
 #include <vlc/decoder.h>
 
-#if !defined (SYS_DARWIN) && !defined(WIN32)
+#if !defined (__APPLE__) && !defined(WIN32)
 # define LOADER 1
 #endif
 
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
 #include <QuickTime/QuickTimeComponents.h>
 #include <QuickTime/Movies.h>
 #include <QuickTime/ImageCodec.h>
@@ -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;
 }
index 40b3db2ffee80ccd7d64f218124b80aa7c954904..ee53459b3c2a18f92304add38eec3b2f7c3ebac9 100644 (file)
@@ -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;
index 177afb4a3725001494225275ab83662bfdef3c19..00ecd8ecb41dd8c6d6ff1d526d1cdac5e9d24ff1 100644 (file)
@@ -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;
index d4268807281dd533cbfbf37acedb661d5f021218..e0988db28bd9252604ec5df99b4251554ffd4552 100644 (file)
@@ -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
index 672eb69718efcc87b18de46fe45fc4ec8d77459e..04fb9ac5229fefeecae3999e94886ab3adde4875 100644 (file)
@@ -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" );
index 0aa85a3aab840d24e3884589d00d3774799bfbba..72d402d88d5724e4bac8f52dfd0e9ea93520ff05 100644 (file)
@@ -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 )
index c446f856f03bbb81a18452d05de9ee89e333bafa..d896e7ca3e52c75245cddae800f5f448b45ceaaa 100644 (file)
@@ -33,7 +33,7 @@
 #include <vlc/vlc.h>
 #include <vlc/vout.h>
 
-#ifdef SYS_DARWIN
+#ifdef __APPLE__
 #include <OpenGL/gl.h>
 #include <OpenGL/glext.h>
 
@@ -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 );
index dc235483f52cb9e41574c1bd6e7229dedaafd547..77d2332627b46b0d3ee39a2ba83a4a8685beac5c 100644 (file)
@@ -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 =
index 61d37bc509ac9f0e074775e5bfff5507c2cc1146..2f2750ad55f4d6b391a7ed8696e48b346563b6d5 100644 (file)
--- 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