Changeset 7103


Ignore:
Timestamp:
Nov 12, 2008, 4:40:04 AM (12 years ago)
Author:
charles
Message:

1.4x: backport the fixes for #1447 (tracker request failed, status code 0), #1450 (warnings during build), and #1458 (--disable-wx)

Location:
branches/1.4x
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/configure.ac

    r7096 r7103  
    44dnl         "0" for stable, supported releases
    55dnl these should be the only two lines you need to change
    6 m4_define([user_agent_prefix],1.40)
    7 m4_define([peer_id_prefix],-TR1400-)
     6m4_define([user_agent_prefix],1.40+)
     7m4_define([peer_id_prefix],-TR140Z-)
    88
    99AC_INIT([transmission],[user_agent_prefix],[http://trac.transmissionbt.com/newticket])
     
    5050AC_HEADER_STDC
    5151AC_HEADER_TIME
    52 AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename daemon strcasecmp localtime_r fallocate posix_fallocate])
     52
     53AC_MSG_CHECKING([for fallocate])
     54AC_TRY_LINK([#include <linux/falloc.h>],
     55            [return fallocate(-1,0,0,0);],
     56            [AC_DEFINE([HAVE_FALLOCATE],[1],[Defined if fallocate() exists])
     57             AC_MSG_RESULT([yes])],
     58            [AC_MSG_RESULT([no])])
     59AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename daemon strcasecmp localtime_r posix_fallocate])
    5360AC_PROG_INSTALL
    5461AC_PROG_MAKE_SET
     
    181188dnl  wxWidgets detection for the wxWidgets client
    182189
    183 AM_OPTIONS_WXCONFIG
    184 AM_PATH_WXCONFIG($WX_MINIMUM,[have_wx=yes],[have_wx=no])
     190build_wx=no
    185191AC_ARG_ENABLE([wx],
    186192              AC_HELP_STRING([--enable-wx],[build wxWidgets client]),
    187193              [want_wx=${enableval}],
    188               [want_wx=no])
    189 build_wx=no
    190 if test "x$want_wx" = "xyes" ; then
     194              [want_wx=maybe])
     195if test "x$want_wx" != "xno"; then
     196    AM_OPTIONS_WXCONFIG
     197    AM_PATH_WXCONFIG($WX_MINIMUM,[have_wx=yes],[have_wx=no])
    191198    if test "x$have_wx" = "xyes"; then
    192       build_wx=yes
    193     else
    194       AC_MSG_ERROR("wxWidgets not found!")
     199        build_wx=yes
     200    elif test "x$want_wx" = "xyes"; then
     201        AC_MSG_ERROR("wxWidgets not found!")
    195202    fi
    196203fi
  • branches/1.4x/libtransmission/Makefile.am

    r7087 r7103  
    113113noinst_PROGRAMS = $(TESTS)
    114114
    115 APPS_LDFLAGS = \
     115apps_ldflags = \
    116116    $(ZLIB_LDFLAGS)
    117117
    118 APPS_LDADD = \
     118apps_ldadd = \
    119119    ./libtransmission.a  \
    120120    $(top_builddir)/third-party/miniupnp/libminiupnp.a \
     
    129129
    130130bencode_test_SOURCES = bencode-test.c
    131 bencode_test_LDADD = $(APPS_LDADD)
     131bencode_test_LDADD = ${apps_ldadd}
     132bencode_test_LDFLAGS = ${apps_ldflags}
     133
    132134blocklist_test_SOURCES = blocklist-test.c
    133 blocklist_test_LDADD = $(APPS_LDADD)
     135blocklist_test_LDADD = ${apps_ldadd}
     136blocklist_test_LDFLAGS = ${apps_ldflags}
     137
    134138clients_test_SOURCES = clients-test.c
    135 clients_test_LDADD = $(APPS_LDADD)
     139clients_test_LDADD = ${apps_ldadd}
     140clients_test_LDFLAGS = ${apps_ldflags}
     141
    136142json_test_SOURCES = json-test.c
    137 json_test_LDADD = $(APPS_LDADD)
     143json_test_LDADD = ${apps_ldadd}
     144json_test_LDFLAGS = ${apps_ldflags}
     145
    138146rpc_test_SOURCES = rpc-test.c
    139 rpc_test_LDADD = $(APPS_LDADD)
     147rpc_test_LDADD = ${apps_ldadd}
     148rpc_test_LDFLAGS = ${apps_ldflags}
     149
    140150test_fastset_SOURCES = test-fastset.c
    141 test_fastset_LDADD = $(APPS_LDADD)
     151test_fastset_LDADD = ${apps_ldadd}
     152test_fastset_LDFLAGS = ${apps_ldflags}
     153
    142154test_peer_id_SOURCES = test-peer-id.c
    143 test_peer_id_LDADD = $(APPS_LDADD)
     155test_peer_id_LDADD = ${apps_ldadd}
     156test_peer_id_LDFLAGS = ${apps_ldflags}
     157
    144158utils_test_SOURCES = utils-test.c
    145 utils_test_LDADD = $(APPS_LDADD)
     159utils_test_LDADD = ${apps_ldadd}
     160utils_test_LDFLAGS = ${apps_ldflags}
     161
    146162
    147163
  • branches/1.4x/libtransmission/fdlimit.c

    r7051 r7103  
    2323 *****************************************************************************/
    2424
    25 #ifndef WIN32
    26  #define HAVE_GETRLIMIT
    27 #endif
    28 
    2925#include <assert.h>
    3026#include <errno.h>
     
    3733#endif
    3834
     35#ifdef HAVE_FALLOCATE
     36 #include <linux/falloc.h>
     37#endif
     38
    3939#include <sys/types.h>
    4040#include <sys/stat.h>
    41 #ifdef HAVE_GETRLIMIT
    42  #include <sys/time.h> /* getrlimit */
    43  #include <sys/resource.h> /* getrlimit */
    44 #endif
    4541#include <unistd.h>
    4642#include <fcntl.h> /* O_LARGEFILE */
     
    105101#ifdef HAVE_FALLOCATE
    106102
    107     return fallocate( fd, 0, offset, length );
     103    return fallocate( fd, FALLOC_FL_KEEP_SIZE, 0, length );
    108104
    109105#elif defined(HAVE_POSIX_FALLOCATE)
     
    505501    gFd = tr_new0( struct tr_fd_s, 1 );
    506502    gFd->lock = tr_lockNew( );
    507 
    508 #ifdef HAVE_GETRLIMIT
    509     {
    510         struct rlimit rlim;
    511         getrlimit( RLIMIT_NOFILE, &rlim );
    512         rlim.rlim_cur = MIN( rlim.rlim_max,
    513                             (rlim_t)( globalPeerLimit + NOFILE_BUFFER ) );
    514         setrlimit( RLIMIT_NOFILE, &rlim );
    515         gFd->socketMax = rlim.rlim_cur - NOFILE_BUFFER;
    516         tr_dbg( "setrlimit( RLIMIT_NOFILE, %d )", (int)rlim.rlim_cur );
    517     }
    518 #else
    519503    gFd->socketMax = globalPeerLimit;
    520 #endif
    521504    tr_dbg( "%d usable file descriptors", globalPeerLimit );
    522505
Note: See TracChangeset for help on using the changeset viewer.