Changeset 3765


Ignore:
Timestamp:
Nov 9, 2007, 4:32:19 AM (14 years ago)
Author:
charles
Message:
  • add O_LARGEFILE support to fdlimit for the benefit of 32-bit posix machines
  • minor tweaks
Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r3753 r3765  
    3434#include <unistd.h>
    3535#include <libgen.h> /* basename, dirname */
    36 #include <fcntl.h>
    37 
    38 #include <sys/queue.h> /* evhttp.h needs this */
     36#include <fcntl.h> /* O_LARGEFILE */
     37
    3938#include <event.h>
    40 #include <evhttp.h>
    4139#include <evutil.h>
    4240
     
    8987enum
    9088{
    91     TR_MAX_SOCKETS = 1024,
     89    TR_MAX_SOCKETS = 512,
    9290
    9391    TR_MAX_OPEN_FILES = 16, /* real files, not sockets */
     
    142140    /* open the file */
    143141    flags = write ? (O_RDWR | O_CREAT) : O_RDONLY;
     142#ifdef O_LARGEFILE
     143    flags |= O_LARGEFILE;
     144#endif
    144145#ifdef WIN32
    145146    flags |= O_BINARY;
  • trunk/libtransmission/inout.c

    r3760 r3765  
    7272        ret = TR_ERROR_IO_OTHER;
    7373    else if( func( fd, buf, buflen ) != buflen )
    74         ret = tr_ioErrorFromErrno ();
     74        ret = tr_ioErrorFromErrno( );
    7575    else
    7676        ret = TR_OK;
  • trunk/libtransmission/peer-io.c

    r3760 r3765  
    7272didWriteWrapper( struct bufferevent * e, void * userData )
    7373{
    74     tr_peerIo * c = (tr_peerIo *) userData;
     74    tr_peerIo * c = userData;
    7575    if( c->didWrite != NULL )
    7676        (*c->didWrite)( e, c->userData );
     
    8181{
    8282    int done = 0;
    83     tr_peerIo * c = (tr_peerIo *) userData;
     83    tr_peerIo * c = userData;
    8484    tr_handle * handle = c->handle;
    8585
     
    111111gotErrorWrapper( struct bufferevent * e, short what, void * userData )
    112112{
    113     tr_peerIo * c = (tr_peerIo *) userData;
     113    tr_peerIo * c = userData;
    114114    if( c->gotError != NULL )
    115115        (*c->gotError)( e, what, c->userData );
Note: See TracChangeset for help on using the changeset viewer.