Changeset 7103
- Timestamp:
- Nov 12, 2008, 4:40:04 AM (12 years ago)
- Location:
- branches/1.4x
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4x/configure.ac
r7096 r7103 4 4 dnl "0" for stable, supported releases 5 5 dnl 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],-TR140 0-)6 m4_define([user_agent_prefix],1.40+) 7 m4_define([peer_id_prefix],-TR140Z-) 8 8 9 9 AC_INIT([transmission],[user_agent_prefix],[http://trac.transmissionbt.com/newticket]) … … 50 50 AC_HEADER_STDC 51 51 AC_HEADER_TIME 52 AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename daemon strcasecmp localtime_r fallocate posix_fallocate]) 52 53 AC_MSG_CHECKING([for fallocate]) 54 AC_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])]) 59 AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename daemon strcasecmp localtime_r posix_fallocate]) 53 60 AC_PROG_INSTALL 54 61 AC_PROG_MAKE_SET … … 181 188 dnl wxWidgets detection for the wxWidgets client 182 189 183 AM_OPTIONS_WXCONFIG 184 AM_PATH_WXCONFIG($WX_MINIMUM,[have_wx=yes],[have_wx=no]) 190 build_wx=no 185 191 AC_ARG_ENABLE([wx], 186 192 AC_HELP_STRING([--enable-wx],[build wxWidgets client]), 187 193 [want_wx=${enableval}], 188 [want_wx=no]) 189 build_wx=no 190 if test "x$want_wx" = "xyes" ; then 194 [want_wx=maybe]) 195 if test "x$want_wx" != "xno"; then 196 AM_OPTIONS_WXCONFIG 197 AM_PATH_WXCONFIG($WX_MINIMUM,[have_wx=yes],[have_wx=no]) 191 198 if test "x$have_wx" = "xyes"; then 192 build_wx=yes193 el se194 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!") 195 202 fi 196 203 fi -
branches/1.4x/libtransmission/Makefile.am
r7087 r7103 113 113 noinst_PROGRAMS = $(TESTS) 114 114 115 APPS_LDFLAGS= \115 apps_ldflags = \ 116 116 $(ZLIB_LDFLAGS) 117 117 118 APPS_LDADD= \118 apps_ldadd = \ 119 119 ./libtransmission.a \ 120 120 $(top_builddir)/third-party/miniupnp/libminiupnp.a \ … … 129 129 130 130 bencode_test_SOURCES = bencode-test.c 131 bencode_test_LDADD = $(APPS_LDADD) 131 bencode_test_LDADD = ${apps_ldadd} 132 bencode_test_LDFLAGS = ${apps_ldflags} 133 132 134 blocklist_test_SOURCES = blocklist-test.c 133 blocklist_test_LDADD = $(APPS_LDADD) 135 blocklist_test_LDADD = ${apps_ldadd} 136 blocklist_test_LDFLAGS = ${apps_ldflags} 137 134 138 clients_test_SOURCES = clients-test.c 135 clients_test_LDADD = $(APPS_LDADD) 139 clients_test_LDADD = ${apps_ldadd} 140 clients_test_LDFLAGS = ${apps_ldflags} 141 136 142 json_test_SOURCES = json-test.c 137 json_test_LDADD = $(APPS_LDADD) 143 json_test_LDADD = ${apps_ldadd} 144 json_test_LDFLAGS = ${apps_ldflags} 145 138 146 rpc_test_SOURCES = rpc-test.c 139 rpc_test_LDADD = $(APPS_LDADD) 147 rpc_test_LDADD = ${apps_ldadd} 148 rpc_test_LDFLAGS = ${apps_ldflags} 149 140 150 test_fastset_SOURCES = test-fastset.c 141 test_fastset_LDADD = $(APPS_LDADD) 151 test_fastset_LDADD = ${apps_ldadd} 152 test_fastset_LDFLAGS = ${apps_ldflags} 153 142 154 test_peer_id_SOURCES = test-peer-id.c 143 test_peer_id_LDADD = $(APPS_LDADD) 155 test_peer_id_LDADD = ${apps_ldadd} 156 test_peer_id_LDFLAGS = ${apps_ldflags} 157 144 158 utils_test_SOURCES = utils-test.c 145 utils_test_LDADD = $(APPS_LDADD) 159 utils_test_LDADD = ${apps_ldadd} 160 utils_test_LDFLAGS = ${apps_ldflags} 161 146 162 147 163 -
branches/1.4x/libtransmission/fdlimit.c
r7051 r7103 23 23 *****************************************************************************/ 24 24 25 #ifndef WIN3226 #define HAVE_GETRLIMIT27 #endif28 29 25 #include <assert.h> 30 26 #include <errno.h> … … 37 33 #endif 38 34 35 #ifdef HAVE_FALLOCATE 36 #include <linux/falloc.h> 37 #endif 38 39 39 #include <sys/types.h> 40 40 #include <sys/stat.h> 41 #ifdef HAVE_GETRLIMIT42 #include <sys/time.h> /* getrlimit */43 #include <sys/resource.h> /* getrlimit */44 #endif45 41 #include <unistd.h> 46 42 #include <fcntl.h> /* O_LARGEFILE */ … … 105 101 #ifdef HAVE_FALLOCATE 106 102 107 return fallocate( fd, 0, offset, length );103 return fallocate( fd, FALLOC_FL_KEEP_SIZE, 0, length ); 108 104 109 105 #elif defined(HAVE_POSIX_FALLOCATE) … … 505 501 gFd = tr_new0( struct tr_fd_s, 1 ); 506 502 gFd->lock = tr_lockNew( ); 507 508 #ifdef HAVE_GETRLIMIT509 {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 #else519 503 gFd->socketMax = globalPeerLimit; 520 #endif521 504 tr_dbg( "%d usable file descriptors", globalPeerLimit ); 522 505
Note: See TracChangeset
for help on using the changeset viewer.