Ignore:
Timestamp:
Dec 2, 2008, 3:57:01 AM (12 years ago)
Author:
livings124
Message:

BeOS and Amiga support is, at least for now, a lost cause and hasn't worked for long over a year - removing from the source (if you for whatever unknown reason still need this, get it through SVN)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r7113 r7232  
    1111 */
    1212
    13 #ifdef __BEOS__
    14  #include <signal.h>
    15  #include <fs_info.h>
    16  #include <FindDirectory.h>
    17  #include <kernel/OS.h>
    18  #define BEOS_MAX_THREADS 256
    19 #elif defined( WIN32 )
     13#ifdef WIN32
    2014 #include <windows.h>
    2115 #include <shlobj.h> /* for CSIDL_APPDATA, CSIDL_MYDOCUMENTS */
     
    5549***/
    5650
    57 #ifdef __BEOS__
    58 typedef thread_id tr_thread_id;
    59 #elif defined( WIN32 )
     51#ifdef WIN32
    6052typedef DWORD tr_thread_id;
    6153#else
     
    6658tr_getCurrentThread( void )
    6759{
    68 #ifdef __BEOS__
    69     return find_thread( NULL );
    70 #elif defined( WIN32 )
     60#ifdef WIN32
    7161    return GetCurrentThreadId( );
    7262#else
     
    7969                    tr_thread_id b )
    8070{
    81 #ifdef __BEOS__
    82     return a == b;
    83 #elif defined( WIN32 )
     71#ifdef WIN32
    8472    return a == b;
    8573#else
     
    115103    tr_thread * t = _t;
    116104
    117 #ifdef __BEOS__
    118     /* This is required because on BeOS, SIGINT is sent to each thread,
    119        which kills them not nicely */
    120     signal( SIGINT, SIG_IGN );
    121 #endif
    122 
    123105    t->func( t->arg );
    124106
     
    138120    t->arg  = arg;
    139121
    140 #ifdef __BEOS__
    141     t->thread =
    142         spawn_thread( (void*)ThreadFunc, "beos thread", B_NORMAL_PRIORITY,
    143                      t );
    144     resume_thread( t->thread );
    145 #elif defined( WIN32 )
     122#ifdef WIN32
    146123    {
    147124        unsigned int id;
     
    166143{
    167144    int                 depth;
    168 #ifdef __BEOS__
    169     sem_id              lock;
    170     thread_id           lockThread;
    171 #elif defined( WIN32 )
     145#ifdef WIN32
    172146    CRITICAL_SECTION    lock;
    173147    DWORD               lockThread;
     
    183157    tr_lock *           l = tr_new0( tr_lock, 1 );
    184158
    185 #ifdef __BEOS__
    186     l->lock = create_sem( 1, "" );
    187 #elif defined( WIN32 )
     159#ifdef WIN32
    188160    InitializeCriticalSection( &l->lock ); /* supports recursion */
    189161#else
     
    200172tr_lockFree( tr_lock * l )
    201173{
    202 #ifdef __BEOS__
    203     delete_sem( l->lock );
    204 #elif defined( WIN32 )
     174#ifdef WIN32
    205175    DeleteCriticalSection( &l->lock );
    206176#else
     
    213183tr_lockLock( tr_lock * l )
    214184{
    215 #ifdef __BEOS__
    216     acquire_sem( l->lock );
    217 #elif defined( WIN32 )
     185#ifdef WIN32
    218186    EnterCriticalSection( &l->lock );
    219187#else
     
    242210    --l->depth;
    243211    assert( l->depth >= 0 );
    244 #ifdef __BEOS__
    245     release_sem( l->lock );
    246 #elif defined( WIN32 )
     212#ifdef WIN32
    247213    LeaveCriticalSection( &l->lock );
    248214#else
     
    255221***/
    256222
    257 #if !defined( WIN32 ) && !defined( __BEOS__ ) && !defined( __AMIGAOS4__ )
     223#ifndef WIN32
    258224 #include <pwd.h>
    259225#endif
     
    275241            SHGetFolderPath( NULL, CSIDL_MYDOCUMENTS, NULL, 0, appdata );
    276242            home = tr_strdup( appdata );
    277 #elif defined( __BEOS__ ) || defined( __AMIGAOS4__ )
    278             home = tr_strdup( "" );
    279243#else
    280244            struct passwd * pw = getpwuid( getuid( ) );
     
    299263    if( !path )
    300264    {
    301 #ifdef __BEOS__
    302         char buf[MAX_PATH_LENGTH];
    303         find_directory( B_USER_SETTINGS_DIRECTORY,
    304                        dev_for_path( "/boot" ), true,
    305                        buf, sizeof( buf ) );
    306         path = tr_buildPath( buf, "Transmission", NULL );
    307 #elif defined( SYS_DARWIN )
     265#ifdef SYS_DARWIN
    308266        path = tr_buildPath( getHomeDir( ), "Library",
    309267                              "Application Support",
    310268                              "Transmission", NULL );
    311 #elif defined( __AMIGAOS4__ )
    312         path = tr_strdup( "PROGDIR:.transmission" );
    313269#elif defined( WIN32 )
    314270        char appdata[MAX_PATH]; /* SHGetFolderPath() requires MAX_PATH */
     
    349305    if( !path )
    350306    {
    351 #if defined( __BEOS__ ) || defined( WIN32 )
     307#if defined( WIN32 )
    352308        path = tr_buildPath( getOldConfigDir( ), "Cache", NULL );
    353309#elif defined( SYS_DARWIN )
Note: See TracChangeset for help on using the changeset viewer.