Changeset 2614
- Timestamp:
- Aug 4, 2007, 1:17:39 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r2589 r2614 132 132 ;; 133 133 134 * BeOS*)134 *beos*) 135 135 beos="yes" 136 136 RELEASE=`uname -r` -
trunk/libtransmission/http.c
r2607 r2614 31 31 #include <sys/types.h> 32 32 33 #ifdef SYS_BEOS33 #ifdef __BEOS__ 34 34 extern int vasprintf( char **, const char *, va_list ); 35 35 #endif -
trunk/libtransmission/natpmp.c
r2591 r2614 25 25 #include <assert.h> 26 26 #include <errno.h> 27 #include <netdb.h> 27 28 #include <stdlib.h> 28 29 #include <string.h> -
trunk/libtransmission/net.c
r2596 r2614 261 261 unsigned long flags = 1; 262 262 if( ioctlsocket( s, FIONBIO, &flags) == SOCKET_ERROR ) 263 #elif defined( SYS_BEOS)263 #elif defined(__BEOS__) 264 264 int flags = 1; 265 265 if( setsockopt( s, SOL_SOCKET, SO_NONBLOCK, -
trunk/libtransmission/net.h
r2611 r2614 31 31 typedef int socklen_t; 32 32 typedef uint16_t tr_port_t; 33 #elif defined(__BEOS__) 34 #include <sys/socket.h> 35 #include <netinet/in.h> 36 typedef unsigned short tr_port_t; 37 typedef int socklen_t; 33 38 #else 34 39 #include <sys/socket.h> … … 36 41 #include <arpa/inet.h> 37 42 typedef in_port_t tr_port_t; 38 #endif39 40 #ifdef SYS_BEOS41 #include <inttypes.h>42 typedef uint32_t socklen_t;43 43 #endif 44 44 -
trunk/libtransmission/platform.c
r2607 r2614 29 29 #include <string.h> 30 30 31 #ifdef SYS_BEOS31 #ifdef __BEOS__ 32 32 #include <signal.h> 33 33 #include <fs_info.h> … … 63 63 char * name; 64 64 65 #ifdef SYS_BEOS65 #ifdef __BEOS__ 66 66 thread_id thread; 67 67 #elif defined(WIN32) … … 85 85 char* name = tr_strdup( t->name ); 86 86 87 #ifdef SYS_BEOS87 #ifdef __BEOS__ 88 88 /* This is required because on BeOS, SIGINT is sent to each thread, 89 89 which kills them not nicely */ … … 113 113 t->name = tr_strdup( name ); 114 114 115 #ifdef SYS_BEOS115 #ifdef __BEOS__ 116 116 t->thread = spawn_thread( (void*)ThreadFunc, name, B_NORMAL_PRIORITY, t ); 117 117 resume_thread( t->thread ); … … 130 130 if( t != NULL ) 131 131 { 132 #ifdef SYS_BEOS132 #ifdef __BEOS__ 133 133 long exit; 134 134 wait_for_thread( t->thread, &exit ); … … 154 154 struct tr_lock_s 155 155 { 156 #ifdef SYS_BEOS156 #ifdef __BEOS__ 157 157 sem_id lock; 158 158 #elif defined(WIN32) … … 168 168 tr_lock_t * l = tr_new0( tr_lock_t, 1 ); 169 169 170 #ifdef SYS_BEOS170 #ifdef __BEOS__ 171 171 l->lock = create_sem( 1, "" ); 172 172 #elif defined(WIN32) … … 182 182 tr_lockFree( tr_lock_t * l ) 183 183 { 184 #ifdef SYS_BEOS184 #ifdef __BEOS__ 185 185 delete_sem( l->lock ); 186 186 #elif defined(WIN32) … … 195 195 tr_lockTryLock( tr_lock_t * l ) /* success on zero! */ 196 196 { 197 #ifdef SYS_BEOS197 #ifdef __BEOS__ 198 198 return acquire_sem_etc( l->lock, 1, B_RELATIVE_TIMEOUT, 0 ); 199 199 #elif defined(WIN32) … … 207 207 tr_lockLock( tr_lock_t * l ) 208 208 { 209 #ifdef SYS_BEOS209 #ifdef __BEOS__ 210 210 acquire_sem( l->lock ); 211 211 #elif defined(WIN32) … … 219 219 tr_lockUnlock( tr_lock_t * l ) 220 220 { 221 #ifdef SYS_BEOS221 #ifdef __BEOS__ 222 222 release_sem( l->lock ); 223 223 #elif defined(WIN32) … … 344 344 struct tr_cond_s 345 345 { 346 #ifdef SYS_BEOS346 #ifdef __BEOS__ 347 347 sem_id sem; 348 348 thread_id threads[BEOS_MAX_THREADS]; … … 373 373 { 374 374 tr_cond_t * c = tr_new0( tr_cond_t, 1 ); 375 #ifdef SYS_BEOS375 #ifdef __BEOS__ 376 376 c->sem = create_sem( 1, "" ); 377 377 c->start = 0; … … 389 389 tr_condWait( tr_cond_t * c, tr_lock_t * l ) 390 390 { 391 #ifdef SYS_BEOS391 #ifdef __BEOS__ 392 392 393 393 /* Keep track of that thread */ … … 434 434 } 435 435 436 #ifdef SYS_BEOS436 #ifdef __BEOS__ 437 437 static int condTrySignal( tr_cond_t * c ) 438 438 { … … 461 461 tr_condSignal( tr_cond_t * c ) 462 462 { 463 #ifdef SYS_BEOS463 #ifdef __BEOS__ 464 464 465 465 acquire_sem( c->sem ); … … 484 484 tr_condBroadcast( tr_cond_t * c ) 485 485 { 486 #ifdef SYS_BEOS486 #ifdef __BEOS__ 487 487 488 488 acquire_sem( c->sem ); … … 508 508 tr_condFree( tr_cond_t * c ) 509 509 { 510 #ifdef SYS_BEOS510 #ifdef __BEOS__ 511 511 delete_sem( c->sem ); 512 512 #elif defined(WIN32) … … 524 524 ***/ 525 525 526 #if !defined(WIN32) && !defined( SYS_BEOS) && !defined(__AMIGAOS4__)526 #if !defined(WIN32) && !defined(__BEOS__) && !defined(__AMIGAOS4__) 527 527 #include <pwd.h> 528 528 #endif … … 544 544 #ifdef WIN32 545 545 SHGetFolderPath( NULL, CSIDL_PROFILE, NULL, 0, buf ); 546 #elif defined( SYS_BEOS) || defined(__AMIGAOS4__)546 #elif defined(__BEOS__) || defined(__AMIGAOS4__) 547 547 *buf = '\0'; 548 548 #else … … 596 596 597 597 h = tr_getHomeDirectory(); 598 #ifdef SYS_BEOS598 #ifdef __BEOS__ 599 599 find_directory( B_USER_SETTINGS_DIRECTORY, 600 600 dev_for_path("/boot"), true, buf, buflen ); … … 641 641 642 642 p = tr_getPrefsDirectory(); 643 #if defined( SYS_BEOS) || defined(WIN32)643 #if defined(__BEOS__) || defined(WIN32) 644 644 tr_buildPath( buf, buflen, p, "Cache", NULL ); 645 645 #elif defined( SYS_DARWIN ) … … 672 672 p = tr_getPrefsDirectory (); 673 673 674 #if defined( SYS_BEOS) || defined(WIN32)674 #if defined(__BEOS__) || defined(WIN32) 675 675 tr_buildPath( buf, buflen, p, "Torrents", NULL ); 676 676 #elif defined( SYS_DARWIN ) -
trunk/libtransmission/upnp.c
r2591 r2614 26 26 #include <errno.h> 27 27 #include <limits.h> 28 #include <netdb.h> 28 29 #include <stdarg.h> 29 30 #include <stdio.h> -
trunk/libtransmission/utils.c
r2607 r2614 38 38 #ifdef WIN32 39 39 #include <windows.h> /* for Sleep */ 40 #elif defined(SYS_BEOS) 40 #elif defined(__BEOS__) 41 #include <kernel/OS.h> 41 42 extern int vasprintf( char **, const char *, va_list ); 42 43 #endif … … 721 722 tr_wait( uint64_t delay_milliseconds ) 722 723 { 723 #ifdef SYS_BEOS724 #ifdef __BEOS__ 724 725 snooze( 1000 * delay_milliseconds ); 725 726 #elif defined(WIN32)
Note: See TracChangeset
for help on using the changeset viewer.