Changes between Version 1 and Version 2 of BuildingTransmissionQtWindows/transmission-2.03-Qt-build.diff


Ignore:
Timestamp:
Jul 24, 2010, 11:21:38 PM (12 years ago)
Author:
rb07
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingTransmissionQtWindows/transmission-2.03-Qt-build.diff

    v1 v2  
    1 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/configure.ac transmission-2.03/configure.ac
     1diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/configure.ac transmission-2.03/configure.ac
    22--- transmission-2.03-orig/configure.ac 2010-07-20 23:13:51.000000000 -0500
    33+++ transmission-2.03/configure.ac      2010-07-21 17:08:45.000000000 -0500
     
    1111      if test -z "$host_alias"; then
    1212        hostaliaswindres=
    13 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/JSON_parser.h transmission-2.03/libtransmission/JSON_parser.h
     13diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/JSON_parser.h transmission-2.03/libtransmission/JSON_parser.h
    1414--- transmission-2.03-orig/libtransmission/JSON_parser.h        2010-07-20 23:13:41.000000000 -0500
    1515+++ transmission-2.03/libtransmission/JSON_parser.h     2010-07-21 17:03:08.000000000 -0500
     
    2323 #              define JSON_PARSER_DLL_API __declspec(dllexport)
    2424 #      else
    25 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/bencode.c transmission-2.03/libtransmission/bencode.c
     25diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/bencode.c transmission-2.03/libtransmission/bencode.c
    2626--- transmission-2.03-orig/libtransmission/bencode.c    2010-07-20 23:13:41.000000000 -0500
    2727+++ transmission-2.03/libtransmission/bencode.c 2010-07-21 18:58:21.000000000 -0500
     
    9494 
    9595             if( !unlink( filename ) || ( errno == ENOENT ) )
    96 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/blocklist.c transmission-2.03/libtransmission/blocklist.c
     96diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/blocklist.c transmission-2.03/libtransmission/blocklist.c
    9797--- transmission-2.03-orig/libtransmission/blocklist.c  2010-07-20 23:13:41.000000000 -0500
    9898+++ transmission-2.03/libtransmission/blocklist.c       2010-07-21 19:04:45.000000000 -0500
     
    138138     {
    139139         tr_err( err_fmt, filename, tr_strerror( errno ) );
    140 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/fdlimit.c transmission-2.03/libtransmission/fdlimit.c
     140diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/fdlimit.c transmission-2.03/libtransmission/fdlimit.c
    141141--- transmission-2.03-orig/libtransmission/fdlimit.c    2010-07-20 23:13:41.000000000 -0500
    142142+++ transmission-2.03/libtransmission/fdlimit.c 2010-07-21 19:06:47.000000000 -0500
     
    150150     {
    151151         LARGE_INTEGER li;
    152 @@ -394,18 +394,18 @@
    153      }
    154  #endif
    155  
    156 -#if defined( SYS_DARWIN ) 
    157 -    /**
    158 -     * 1. Enable readahead for reasons described above w/POSIX_FADV_SEQUENTIAL.
    159 -     * 2. Disable OS-level caching due to user reports of adverse effects of
    160 +#if defined( SYS_DARWIN )
    161 +    /**
    162 +     * 1. Enable readahead for reasons described above w/POSIX_FADV_SEQUENTIAL.
    163 +     * 2. Disable OS-level caching due to user reports of adverse effects of
    164       *    excessive inactive memory.
    165 -     * It's okay for this to fail silently, so don't let it affect errno
    166 -     */
    167 +     * It's okay for this to fail silently, so don't let it affect errno
    168 +     */
    169      {
    170 -        const int err = errno;
    171 -        fcntl( file->fd, F_NOCACHE, 1 ); 
    172 -        fcntl( file->fd, F_RDAHEAD, 1 ); 
    173 -        errno = err;
    174 +        const int err = errno;
    175 +        fcntl( file->fd, F_NOCACHE, 1 );
    176 +        fcntl( file->fd, F_RDAHEAD, 1 );
    177 +        errno = err;
    178      }
    179  #endif
    180  
    181 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/net.c transmission-2.03/libtransmission/net.c
     152diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/net.c transmission-2.03/libtransmission/net.c
    182153--- transmission-2.03-orig/libtransmission/net.c        2010-07-20 23:13:41.000000000 -0500
    183154+++ transmission-2.03/libtransmission/net.c     2010-07-21 19:28:31.000000000 -0500
     
    193164  #include <sys/socket.h>
    194165  #include <netinet/in.h>
    195 @@ -64,8 +64,8 @@
     166@@ -64,7 +64,7 @@
    196167 const tr_address tr_inaddr_any = { TR_AF_INET, { { { { INADDR_ANY, 0x00, 0x00, 0x00 } } } } };
    197168 
    198169 #ifdef WIN32
    199170-static const char *
    200 -inet_ntop( int af, const void *src, char *dst, socklen_t cnt )
    201171+const char *
    202 +inet_ntop( int af, const void * src, char * dst, socklen_t cnt )
     172 inet_ntop( int af, const void *src, char *dst, socklen_t cnt )
    203173 {
    204174     if (af == AF_INET)
    205      {
    206175@@ -90,29 +90,45 @@
    207176     return NULL;
     
    209178 
    210179-static int
    211 -inet_pton(int af, const char *src, void *dst)
    212180+int
    213 +inet_pton( int af, const char * src, void * dst )
     181 inet_pton(int af, const char *src, void *dst)
    214182 {
    215183-    struct addrinfo hints;
     
    220188+    struct sockaddr_in6 * s6;
    221189 
    222 -    memset(&hints, 0, sizeof(struct addrinfo));
    223 +    memset( &hints, 0, sizeof( struct addrinfo ));
     190     memset(&hints, 0, sizeof(struct addrinfo));
    224191     hints.ai_family = af;
    225192+    hints.ai_flags = AI_NUMERICHOST;
    226193 
    227194-    if (getaddrinfo(src, NULL, &hints, &res) != 0)
    228 -        return -1;
    229195+    if( getaddrinfo( src, NULL, &hints, &res ) ) {
    230196+        if( WSAGetLastError() == WSAHOST_NOT_FOUND )
     
    232198+        else {
    233199+            errno = EAFNOSUPPORT;
    234 +            return -1;
     200         return -1;
    235201+        }
    236202+    }
     
    282248 tr_ntop( const tr_address * src, char * dst, int size )
    283249 {
    284 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/net.h transmission-2.03/libtransmission/net.h
     250diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/net.h transmission-2.03/libtransmission/net.h
    285251--- transmission-2.03-orig/libtransmission/net.h        2010-07-20 23:13:41.000000000 -0500
    286252+++ transmission-2.03/libtransmission/net.h     2010-07-21 19:27:10.000000000 -0500
     
    326292 
    327293 #endif /* _TR_NET_H_ */
    328 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/peer-io.c transmission-2.03/libtransmission/peer-io.c
     294diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/peer-io.c transmission-2.03/libtransmission/peer-io.c
    329295--- transmission-2.03-orig/libtransmission/peer-io.c    2010-07-20 23:13:41.000000000 -0500
    330296+++ transmission-2.03/libtransmission/peer-io.c 2010-07-21 21:30:33.000000000 -0500
     
    475441             if( io->gotError != NULL )
    476442                 io->gotError( io, what, io->userData );
    477 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/peer-mgr.c transmission-2.03/libtransmission/peer-mgr.c
     443diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/peer-mgr.c transmission-2.03/libtransmission/peer-mgr.c
    478444--- transmission-2.03-orig/libtransmission/peer-mgr.c   2010-07-20 23:13:41.000000000 -0500
    479445+++ transmission-2.03/libtransmission/peer-mgr.c        2010-07-21 19:34:34.000000000 -0500
     
    486452 #include <string.h> /* memcpy, memcmp, strstr */
    487453 #include <stdlib.h> /* qsort */
    488 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/platform.c transmission-2.03/libtransmission/platform.c
     454diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/platform.c transmission-2.03/libtransmission/platform.c
    489455--- transmission-2.03-orig/libtransmission/platform.c   2010-07-20 23:13:41.000000000 -0500
    490456+++ transmission-2.03/libtransmission/platform.c        2010-07-21 19:36:08.000000000 -0500
     
    507473             s = tr_buildPath( appdata, appname, NULL );
    508474 #elif defined( __HAIKU__ )
    509 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/platform.h transmission-2.03/libtransmission/platform.h
     475diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/platform.h transmission-2.03/libtransmission/platform.h
    510476--- transmission-2.03-orig/libtransmission/platform.h   2010-07-20 23:13:41.000000000 -0500
    511477+++ transmission-2.03/libtransmission/platform.h        2010-07-21 19:37:11.000000000 -0500
     
    521487  #include <limits.h> /* PATH_MAX */
    522488  #ifdef PATH_MAX
    523 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/rpcimpl.c transmission-2.03/libtransmission/rpcimpl.c
     489diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/rpcimpl.c transmission-2.03/libtransmission/rpcimpl.c
    524490--- transmission-2.03-orig/libtransmission/rpcimpl.c    2010-07-20 23:13:41.000000000 -0500
    525491+++ transmission-2.03/libtransmission/rpcimpl.c 2010-07-21 19:40:12.000000000 -0500
     
    533499         if( fp == NULL )
    534500         {
    535 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/torrent.c transmission-2.03/libtransmission/torrent.c
     501diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/torrent.c transmission-2.03/libtransmission/torrent.c
    536502--- transmission-2.03-orig/libtransmission/torrent.c    2010-07-20 23:13:41.000000000 -0500
    537503+++ transmission-2.03/libtransmission/torrent.c 2010-07-21 19:43:56.000000000 -0500
     
    575541         system( script );
    576542     }
    577 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/tr-dht.c transmission-2.03/libtransmission/tr-dht.c
     543diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/tr-dht.c transmission-2.03/libtransmission/tr-dht.c
    578544--- transmission-2.03-orig/libtransmission/tr-dht.c     2010-07-20 23:13:41.000000000 -0500
    579545+++ transmission-2.03/libtransmission/tr-dht.c  2010-07-21 19:48:36.000000000 -0500
     
    585551 #include <signal.h> /* sig_atomic_t */
    586552 #include <sys/time.h>
    587 -#include <sys/types.h>
    588 -#include <sys/socket.h> /* socket(), bind() */
    589 -#include <netdb.h>
    590  #include <unistd.h> /* close() */
     553+#include <unistd.h> /* close() */
    591554+#ifdef WIN32
    592555+  #include <inttypes.h>
     
    594557+  #include <ws2tcpip.h>
    595558+#else
    596 +  #include <sys/types.h>
    597 +  #include <sys/socket.h> /* socket(), bind() */
    598 +  #include <netdb.h>
     559 #include <sys/types.h>
     560 #include <sys/socket.h> /* socket(), bind() */
     561 #include <netdb.h>
     562-#include <unistd.h> /* close() */
    599563+  #include <netinet/in.h> /* sockaddr_in */
    600564+#endif
     
    628592             tr_ninf("DHT", "Attempting manual bootstrap");
    629593             for(;;) {
    630 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/tr-lpd.c transmission-2.03/libtransmission/tr-lpd.c
     594diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/tr-lpd.c transmission-2.03/libtransmission/tr-lpd.c
    631595--- transmission-2.03-orig/libtransmission/tr-lpd.c     2010-07-20 23:13:41.000000000 -0500
    632596+++ transmission-2.03/libtransmission/tr-lpd.c  2010-07-21 19:52:40.000000000 -0500
     
    682646     return add;
    683647 }
    684 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/trevent.c transmission-2.03/libtransmission/trevent.c
     648diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/trevent.c transmission-2.03/libtransmission/trevent.c
    685649--- transmission-2.03-orig/libtransmission/trevent.c    2010-07-20 23:13:41.000000000 -0500
    686650+++ transmission-2.03/libtransmission/trevent.c 2010-07-21 19:57:12.000000000 -0500
    687 @@ -26,79 +26,94 @@
     651@@ -26,7 +26,8 @@
    688652 
    689653 #ifdef WIN32
     
    695659 static int
    696660 pgpipe( int handles[2] )
    697  {
    698 -        SOCKET s;
    699 -        struct sockaddr_in serv_addr;
    700 -        int len = sizeof( serv_addr );
    701 +    SOCKET s;
    702 +    struct sockaddr_in serv_addr;
    703 +    int len = sizeof( serv_addr );
    704  
    705 -        handles[0] = handles[1] = INVALID_SOCKET;
    706 +    handles[0] = handles[1] = INVALID_SOCKET;
    707  
    708 -        if ( ( s = socket( AF_INET, SOCK_STREAM, 0 ) ) == INVALID_SOCKET )
    709 -        {
     661@@ -39,7 +40,7 @@
     662 
     663         if ( ( s = socket( AF_INET, SOCK_STREAM, 0 ) ) == INVALID_SOCKET )
     664         {
    710665-/*              ereport(LOG, (errmsg_internal("pgpipe failed to create socket: %ui", WSAGetLastError()))); */
    711 -                return -1;
    712 -        }
    713 +    if ( ( s = socket( AF_INET, SOCK_STREAM, 0 ) ) == INVALID_SOCKET )
    714 +    {
    715666+        tr_dbg("pgpipe failed to create socket: %ui", WSAGetLastError());
    716 +        return -1;
    717 +    }
    718  
    719 -        memset( &serv_addr, 0, sizeof( serv_addr ) );
    720 -        serv_addr.sin_family = AF_INET;
    721 -        serv_addr.sin_port = htons(0);
    722 -        serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
    723 -        if (bind(s, (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR)
    724 -        {
     667                 return -1;
     668         }
     669 
     670@@ -49,38 +50,38 @@
     671         serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
     672         if (bind(s, (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR)
     673         {
    725674-/*              ereport(LOG, (errmsg_internal("pgpipe failed to bind: %ui", WSAGetLastError()))); */
    726 -                closesocket(s);
    727 -                return -1;
    728 -        }
    729 -        if (listen(s, 1) == SOCKET_ERROR)
    730 -        {
     675+        tr_dbg("pgpipe failed to bind: %ui", WSAGetLastError());
     676                 closesocket(s);
     677                 return -1;
     678         }
     679         if (listen(s, 1) == SOCKET_ERROR)
     680         {
    731681-/*              ereport(LOG, (errmsg_internal("pgpipe failed to listen: %ui", WSAGetLastError()))); */
    732 -                closesocket(s);
    733 -                return -1;
    734 -        }
    735 -        if (getsockname(s, (SOCKADDR *) & serv_addr, &len) == SOCKET_ERROR)
    736 -        {
     682+        tr_ndbg("event","pgpipe failed to listen: %ui", WSAGetLastError());
     683                 closesocket(s);
     684                 return -1;
     685         }
     686         if (getsockname(s, (SOCKADDR *) & serv_addr, &len) == SOCKET_ERROR)
     687         {
    737688-/*              ereport(LOG, (errmsg_internal("pgpipe failed to getsockname: %ui", WSAGetLastError()))); */
    738 -                closesocket(s);
    739 -                return -1;
    740 -        }
    741 -        if ((handles[1] = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
    742 -        {
     689+        tr_dbg("pgpipe failed to getsockname: %ui", WSAGetLastError());
     690                 closesocket(s);
     691                 return -1;
     692         }
     693         if ((handles[1] = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
     694         {
    743695-/*              ereport(LOG, (errmsg_internal("pgpipe failed to create socket 2: %ui", WSAGetLastError()))); */
    744 -                closesocket(s);
    745 -                return -1;
    746 -        }
    747 +    memset( &serv_addr, 0, sizeof( serv_addr ) );
    748 +    serv_addr.sin_family = AF_INET;
    749 +    serv_addr.sin_port = htons(0);
    750 +    serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
    751 +    if (bind(s, (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR)
    752 +    {
    753 +        tr_dbg("pgpipe failed to bind: %ui", WSAGetLastError());
    754 +        closesocket(s);
    755 +        return -1;
    756 +    }
    757 +    if (listen(s, 1) == SOCKET_ERROR)
    758 +    {
    759 +        tr_ndbg("event","pgpipe failed to listen: %ui", WSAGetLastError());
    760 +        closesocket(s);
    761 +        return -1;
    762 +    }
    763 +    if (getsockname(s, (SOCKADDR *) & serv_addr, &len) == SOCKET_ERROR)
    764 +    {
    765 +        tr_dbg("pgpipe failed to getsockname: %ui", WSAGetLastError());
    766 +        closesocket(s);
    767 +        return -1;
    768 +    }
    769 +    if ((handles[1] = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
    770 +    {
    771696+        tr_dbg("pgpipe failed to create socket 2: %ui", WSAGetLastError());
    772 +        closesocket(s);
    773 +        return -1;
    774 +    }
    775  
    776 -        if (connect(handles[1], (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR)
    777 -        {
     697                 closesocket(s);
     698                 return -1;
     699         }
     700 
     701         if (connect(handles[1], (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR)
     702         {
    778703-/*              ereport(LOG, (errmsg_internal("pgpipe failed to connect socket: %ui", WSAGetLastError()))); */
    779 -                closesocket(s);
    780 -                return -1;
    781 -        }
    782 -        if ((handles[0] = accept(s, (SOCKADDR *) & serv_addr, &len)) == INVALID_SOCKET)
    783 -        {
     704+        tr_dbg("pgpipe failed to connect socket: %ui", WSAGetLastError());
     705                 closesocket(s);
     706                 return -1;
     707         }
     708         if ((handles[0] = accept(s, (SOCKADDR *) & serv_addr, &len)) == INVALID_SOCKET)
     709         {
    784710-/*              ereport(LOG, (errmsg_internal("pgpipe failed to accept socket: %ui", WSAGetLastError()))); */
    785 -                closesocket(handles[1]);
    786 -                handles[1] = INVALID_SOCKET;
    787 -                closesocket(s);
    788 -                return -1;
    789 -        }
    790 +    if (connect(handles[1], (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR)
    791 +    {
    792 +        tr_dbg("pgpipe failed to connect socket: %ui", WSAGetLastError());
    793 +        closesocket(s);
    794 +        return -1;
    795 +    }
    796 +    if ((handles[0] = accept(s, (SOCKADDR *) & serv_addr, &len)) == INVALID_SOCKET)
    797 +    {
    798711+        tr_dbg("pgpipe failed to accept socket: %ui", WSAGetLastError());
    799 +        closesocket(handles[1]);
    800 +        handles[1] = INVALID_SOCKET;
    801          closesocket(s);
    802 -        return 0;
    803 +        return -1;
    804 +    }
    805 +    closesocket(s);
    806 +    return 0;
    807  }
    808  
    809  static int
    810  piperead( int s, char *buf, int len )
    811  {
    812 -        int ret = recv(s, buf, len, 0);
    813 +    int ret = recv(s, buf, len, 0);
     712                 closesocket(handles[1]);
     713                 handles[1] = INVALID_SOCKET;
     714                 closesocket(s);
     715@@ -95,9 +96,23 @@
     716 {
     717         int ret = recv(s, buf, len, 0);
    814718 
    815719-        if (ret < 0 && WSAGetLastError() == WSAECONNRESET)
    816 -                /* EOF on the pipe! (win32 socket based implementation) */
    817 -                ret = 0;
    818 -        return ret;
    819720+    if (ret < 0) {
    820721+        const int werror= WSAGetLastError();
     
    825726+                break;
    826727+           case WSAECONNRESET:
    827 +               /* EOF on the pipe! (win32 socket based implementation) */
    828 +               ret = 0;
     728                 /* EOF on the pipe! (win32 socket based implementation) */
     729                 ret = 0;
    829730+               /* fall through */
    830731+            default:
     
    834735+    } else
    835736+        errno = 0;
    836 +    return ret;
    837  }
    838  
    839  #define pipe(a) pgpipe(a)
    840 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/utils.c transmission-2.03/libtransmission/utils.c
     737         return ret;
     738 }
     739 
     740diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/utils.c transmission-2.03/libtransmission/utils.c
    841741--- transmission-2.03-orig/libtransmission/utils.c      2010-07-20 23:13:41.000000000 -0500
    842742+++ transmission-2.03/libtransmission/utils.c   2010-07-21 20:12:12.000000000 -0500
     
    884784+#endif
    885785+}
    886 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/utils.h transmission-2.03/libtransmission/utils.h
     786diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/utils.h transmission-2.03/libtransmission/utils.h
    887787--- transmission-2.03-orig/libtransmission/utils.h      2010-07-20 23:13:41.000000000 -0500
    888788+++ transmission-2.03/libtransmission/utils.h   2010-07-21 21:05:40.000000000 -0500
    889 @@ -98,8 +98,10 @@
     789@@ -98,9 +98,11 @@
    890790 #endif
    891791 
    892792 /* #define DISABLE_GETTEXT */
    893793-#if defined(TR_EMBEDDED) && !defined(DISABLE_GETTEXT)
    894 - #define DISABLE_GETTEXT
    895794+#ifndef DISABLE_GETTEXT
    896795+ #if defined(WIN32) || defined(TR_EMBEDDED)
    897 +   #define DISABLE_GETTEXT
    898 + #endif
     796  #define DISABLE_GETTEXT
    899797 #endif
     798+#endif
    900799 #ifdef DISABLE_GETTEXT
    901800  const char * tr_strip_positional_args( const char * fmt );
     801  #undef _
    902802@@ -545,9 +547,8 @@
    903803 /** @brief Private libtransmission function to update tr_time()'s counter */
     
    912812 #ifdef __cplusplus
    913813 }
    914 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/web.c transmission-2.03/libtransmission/web.c
     814diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/libtransmission/web.c transmission-2.03/libtransmission/web.c
    915815--- transmission-2.03-orig/libtransmission/web.c        2010-07-20 23:13:41.000000000 -0500
    916816+++ transmission-2.03/libtransmission/web.c     2010-07-21 20:22:21.000000000 -0500
     
    919819  */
    920820 
    921 -#include <sys/select.h>
    922821+#ifdef WIN32
    923822+  #include <ws2tcpip.h>
    924823+#else
    925 + #include <sys/select.h>
     824 #include <sys/select.h>
    926825+#endif
    927826 
     
    976875 
    977876         /* call curl_multi_perform() */
    978 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/qtr.pro transmission-2.03/qt/qtr.pro
     877diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/about.cc transmission-2.03/qt/about.cc
     878--- transmission-2.03-orig/qt/about.cc  2010-07-20 23:13:42.000000000 -0500
     879+++ transmission-2.03/qt/about.cc       2010-07-24 12:46:29.000000000 -0500
     880@@ -55,7 +55,7 @@
     881     l->setAlignment( Qt::AlignCenter );
     882     v->addWidget( l );
     883 
     884-    l = new QLabel( tr( "Copyright 2005-2009 The Transmission Project" ) );
     885+    l = new QLabel( tr( "Copyright 2005-2010 The Transmission Project" ) );
     886     l->setAlignment( Qt::AlignCenter );
     887     v->addWidget( l );
     888 
     889diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/dbus-adaptor.cc transmission-2.03/qt/dbus-adaptor.cc
     890--- transmission-2.03-orig/qt/dbus-adaptor.cc   2010-07-20 23:13:42.000000000 -0500
     891+++ transmission-2.03/qt/dbus-adaptor.cc        2010-07-24 12:35:00.000000000 -0500
     892@@ -28,8 +28,9 @@
     893 }
     894 
     895 bool
     896-TrDBusAdaptor :: AddMetainfo( const QString& payload, const QString& filename )
     897+TrDBusAdaptor :: AddMetainfo( const QString& filename )
     898 {
     899-    myApp->addTorrent( QFile(filename).exists() ? filename : payload );
     900+    if ( QFile(filename).exists() )
     901+        myApp->addTorrent( filename );
     902     return true;
     903 }
     904diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/dbus-adaptor.h transmission-2.03/qt/dbus-adaptor.h
     905--- transmission-2.03-orig/qt/dbus-adaptor.h    2010-07-20 23:13:42.000000000 -0500
     906+++ transmission-2.03/qt/dbus-adaptor.h 2010-07-24 11:40:11.000000000 -0500
     907@@ -31,7 +31,7 @@
     908 
     909   public slots:
     910     bool PresentWindow();
     911-    bool AddMetainfo( const QString& payload, const QString& filename );
     912+    bool AddMetainfo( const QString& );
     913 };
     914 
     915 #endif
     916diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/qtr.pro transmission-2.03/qt/qtr.pro
    979917--- transmission-2.03-orig/qt/qtr.pro   2010-07-20 23:13:42.000000000 -0500
    980918+++ transmission-2.03/qt/qtr.pro        2010-07-21 20:26:21.000000000 -0500
     
    1014952 
    1015953+win32:RC_FILE = qtr.rc
    1016 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/qtr.rc transmission-2.03/qt/qtr.rc
     954diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/qtr.rc transmission-2.03/qt/qtr.rc
    1017955--- transmission-2.03-orig/qt/qtr.rc    1969-12-31 18:00:00.000000000 -0600
    1018956+++ transmission-2.03/qt/qtr.rc 2010-07-21 20:27:10.000000000 -0500
    1019957@@ -0,0 +1 @@
    1020958+IDI_ICON1      ICON    DISCARDABLE "qtr.ico"
    1021 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/utils.cc transmission-2.03/qt/utils.cc
     959diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/qt/utils.cc transmission-2.03/qt/utils.cc
    1022960--- transmission-2.03-orig/qt/utils.cc  2010-07-20 23:13:42.000000000 -0500
    1023961+++ transmission-2.03/qt/utils.cc       2010-07-21 20:31:45.000000000 -0500
    1024 @@ -63,25 +63,25 @@
    1025      {
    1026          const int i = (int)size;
    1027          str = tr( "%Ln byte(s)", 0, i );
    1028 -    }
    1029 +}
    1030      else
    1031      {
    1032          double displayed_size;
    1033  
    1034          if( size < (int64_t)MEGABYTE_FACTOR )
    1035 -        {
    1036 +{
    1037              displayed_size = (double)size / KILOBYTE_FACTOR;
    1038              str = tr( "%L1 KiB" ).arg( displayed_size,  0, 'f', 1 );
    1039 -        }
    1040 +    }
     962@@ -76,12 +76,12 @@
    1041963         else if( size < (int64_t)GIGABYTE_FACTOR )
    1042964         {
    1043965             displayed_size = (double)size / MEGABYTE_FACTOR;
    1044966-            str = tr( "%L1 MiB" ).arg( displayed_size,  0, 'f', 1 );
    1045 -        }
    1046967+            str = tr( "%L1 MiB" ).arg( displayed_size,  0, 'f', 2 );
    1047 +}
     968         }
    1048969         else
    1049 -        {
    1050 +{
     970         {
    1051971             displayed_size = (double) size / GIGABYTE_FACTOR;
    1052972-            str = tr( "%L1 GiB" ).arg( displayed_size,  0, 'f', 1 );
     
    1055975     }
    1056976 
    1057 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/third-party/dht/dht.c transmission-2.03/third-party/dht/dht.c
     977diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/third-party/dht/dht.c transmission-2.03/third-party/dht/dht.c
    1058978--- transmission-2.03-orig/third-party/dht/dht.c        2010-07-20 23:13:48.000000000 -0500
    1059979+++ transmission-2.03/third-party/dht/dht.c     2010-07-21 16:49:36.000000000 -0500
     
    11511071             goto fail;
    11521072     }
    1153 diff -NaurX /home/rberber/diff-excludes.txt transmission-2.03-orig/third-party/miniupnp/miniupnpc.c transmission-2.03/third-party/miniupnp/miniupnpc.c
     1073diff -NaurwX /home/rberber/diff-excludes.txt transmission-2.03-orig/third-party/miniupnp/miniupnpc.c transmission-2.03/third-party/miniupnp/miniupnpc.c
    11541074--- transmission-2.03-orig/third-party/miniupnp/miniupnpc.c     2010-07-20 23:13:48.000000000 -0500
    11551075+++ transmission-2.03/third-party/miniupnp/miniupnpc.c  2010-07-21 20:34:19.000000000 -0500