Changeset 1750


Ignore:
Timestamp:
Apr 18, 2007, 4:39:10 PM (15 years ago)
Author:
joshe
Message:

Merge daemon branch to trunk.

Location:
trunk
Files:
8 edited
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/AUTHORS

    r1737 r1750  
    1111 + Back-end
    1212 + GTK+ interface
     13 + Daemon interface
    1314
    1415Mitchell Livingston <livings124@gmail.com>
  • trunk/cli/transmissioncli.1

    r1744 r1750  
    9393.An Mitchell Livingston Aq livings124@gmail.com .
    9494.Sh SEE ALSO
    95 .Xr transmission-gtk 1
     95.Xr transmission-daemon 1 ,
     96.Xr transmission-gtk 1 ,
     97.Xr transmission-proxy 1 ,
     98.Xr transmission-remote 1
    9699.Pp
    97100http://transmission.m0k.org
  • trunk/configure

    r1664 r1750  
    1313OPENSSL=
    1414GTK=
     15LIBEVENT=
    1516PREFIX=/usr/local
    1617CC="${CC-cc}"
     
    3132  --disable-openssl      Disable OpenSSL, use built-in SHA1 implementation
    3233  --disable-gtk          Don't build the GTK+ GUI
     34  --disable-daemon       Don't build the daemon
    3335  --prefix=PATH          Installation path
    3436  --verbose              Display additional information for debugging
     
    135137  then
    136138    CFLAGS="$CFLAGS -DHAVE_LRINTF"
     139  fi
     140  rm -f testconf*
     141}
     142
     143strlcpy_test()
     144{
     145  verbose strlcpy_test
     146  cat > testconf.c << EOF
     147#include <string.h>
     148int main()
     149{
     150  char buf[] = "1234:p";
     151  strlcpy( buf, "foo", sizeof buf );
     152  return ( 0 == memcmp( buf, "foo\0:p", 6 ) ? 0 : 1 );
     153}
     154EOF
     155  if runcmd $CC -o testconf testconf.c && runcmd ./testconf
     156  then
     157    CFLAGS="$CFLAGS -DHAVE_STRLCPY"
     158  fi
     159  rm -f testconf*
     160}
     161
     162strlcat_test()
     163{
     164  verbose strlcat_test
     165  cat > testconf.c << EOF
     166#include <string.h>
     167int main()
     168{
     169  char buf[] = "1234567:p";
     170  buf[0] = '\0';
     171  strlcat( buf, "foo", sizeof buf );
     172  strlcat( buf, "bar", sizeof buf );
     173  return ( 0 == memcmp( buf, "foobar\0:p", 6 ) ? 0 : 1 );
     174}
     175EOF
     176  if runcmd $CC -o testconf testconf.c && runcmd ./testconf
     177  then
     178    CFLAGS="$CFLAGS -DHAVE_STRLCAT"
    137179  fi
    138180  rm -f testconf*
     
    213255}
    214256
     257libevent_test()
     258{
     259  verbose libevent_test
     260  cat > testconf.c <<EOF
     261#include <sys/types.h>
     262#include <sys/time.h>
     263#include <event.h>
     264int main()
     265{
     266    event_init();
     267    return 0;
     268}
     269EOF
     270
     271  if runcmd $CC $CFLAGS -levent $LDFLAGS -o testconf testconf.c
     272  then
     273    LIBEVENT=yes
     274    LDFLAGS_EVENT="-levent"
     275    rm -f testconf*
     276    return 0
     277  fi
     278
     279  for event_testdir in $PREFIX /usr/local /usr/X11R6 /usr/pkg
     280  do
     281    if runcmd $CC $CFLAGS -I$event_testdir/include $LDFLAGS -levent \
     282        -L$event_testdir/lib -o testconf testconf.c
     283    then
     284      LIBEVENT=yes
     285      CFLAGS_EVENT="-I$event_testdir/include"
     286      LDFLAGS_EVENT="-levent -L$event_testdir/lib"
     287      rm -f testconf*
     288      return 0
     289    fi
     290  done
     291  LIBEVENT=no
     292  rm -f testconf*
     293  return 1
     294}
     295
    215296#
    216297# Parse options
     
    222303    x--disable-openssl|x--without-openssl)
    223304      OPENSSL=no
     305      ;;
     306    x--disable-daemon|x--without-daemon)
     307      LIBEVENT=no
    224308      ;;
    225309    x--disable-gtk|x--without-gtk)
     
    343427
    344428#
     429# libevent settings
     430#
     431echo -n "Daemon:  "
     432if [ "$LIBEVENT" = no ]; then
     433  echo "disabled"
     434else
     435  if libevent_test; then
     436      echo "yes"
     437  else
     438      echo "no (can't find libevent)"
     439  fi
     440fi
     441
     442#
    345443# Math functions
    346444#
    347445lm_test
    348446lrintf_test
     447
     448#
     449# String functions
     450#
     451strlcpy_test
     452strlcat_test
    349453
    350454#
     
    360464OPENSSL        = $OPENSSL
    361465GTK            = $GTK
     466DAEMON         = $LIBEVENT
    362467CC             = $CC
    363468CFLAGS         = $CFLAGS
     
    367472CFLAGS_GTK     = $CFLAGS_GTK
    368473LDFLAGS_GTK    = $LDFLAGS_GTK
     474CFLAGS_EVENT   = $CFLAGS_EVENT
     475LDFLAGS_EVENT  = $LDFLAGS_EVENT
    369476EOF
    370477
  • trunk/gtk/transmission-gtk.1

    r1744 r1750  
    8181.An Mitchell Livingston Aq livings124@gmail.com .
    8282.Sh SEE ALSO
    83 .Xr transmissioncli 1
     83.Xr transmissioncli 1 ,
     84.Xr transmission-daemon 1 ,
     85.Xr transmission-proxy 1 ,
     86.Xr transmission-remote 1
    8487.Pp
    8588http://transmission.m0k.org
  • trunk/libtransmission/internal.h

    r1685 r1750  
    132132typedef enum { TR_NET_OK, TR_NET_ERROR, TR_NET_WAIT } tr_tristate_t;
    133133
     134#include "trcompat.h"
    134135#include "bsdqueue.h"
    135136#include "bsdtree.h"
  • trunk/libtransmission/platform.c

    r1423 r1750  
    111111#elif defined( SYS_DARWIN )
    112112    snprintf( prefsDirectory, MAX_PATH_LENGTH,
    113               "%s/Library/Caches/Transmission", tr_getHomeDirectory() );
     113              "%s/Library/Application Support/Transmission",
     114              tr_getHomeDirectory() );
    114115#elif defined(__AMIGAOS4__)
    115116    snprintf( prefsDirectory, MAX_PATH_LENGTH, "PROGDIR:.transmission" );
     
    148149              tr_getPrefsDirectory() );
    149150#elif defined( SYS_DARWIN )
    150     snprintf( cacheDirectory, MAX_PATH_LENGTH, "%s",
    151               tr_getPrefsDirectory() );
     151    snprintf( cacheDirectory, MAX_PATH_LENGTH, "%s/Caches/Transmission",
     152              tr_getHomeDirectory() );
    152153#else
    153154    snprintf( cacheDirectory, MAX_PATH_LENGTH, "%s/cache",
     
    181182              tr_getPrefsDirectory() );
    182183#elif defined( SYS_DARWIN )
    183     snprintf( torrentsDirectory, MAX_PATH_LENGTH,
    184               "%s/Library/Application Support/Transmission/Torrents",
     184    snprintf( torrentsDirectory, MAX_PATH_LENGTH, "%s/Torrents",
    185185              tr_getHomeDirectory() );
    186186#else
  • trunk/mk/default.mk

    r1505 r1750  
    77ifeq ($(GTK),yes)
    88TARGETS += .gtk
     9endif
     10ifeq ($(DAEMON),yes)
     11TARGETS += .daemon
    912endif
    1013ifeq ($(SYSTEM),BeOS)
     
    2629        @$(MAKE) $(MAKEARGS) -C gtk -f ../mk/gtk.mk
    2730
     31.daemon: .lib
     32        @echo "* Building Transmission daemon client"
     33        @$(MAKE) $(MAKEARGS) -C daemon -f ../mk/daemon.mk
     34
    2835.beos: .lib
    2936        @echo "* Building Transmission BeOS client"
     
    4047        @$(MAKE) $(MAKEARGS) -C gtk -f ../mk/gtk.mk install
    4148
     49.install.daemon: .daemon
     50        @echo "* Installing Transmission daemon client"
     51        @$(MAKE) $(MAKEARGS) -C daemon -f ../mk/daemon.mk install
     52
    4253.install.beos:
    4354
     
    5364        @$(MAKE) $(MAKEARGS) -C gtk -f ../mk/gtk.mk clean
    5465endif
     66ifeq ($(DAEMON),yes)
     67        @$(MAKE) $(MAKEARGS) -C daemon -f ../mk/daemon.mk clean
     68endif
    5569ifeq ($(SYSTEM),BeOS)
    5670        @$(MAKE) $(MAKEARGS) -C beos -f ../mk/beos.mk clean
  • trunk/mk/lib.mk

    r1405 r1750  
    77       metainfo.c sha1.c utils.c fdlimit.c clients.c completion.c \
    88       platform.c ratecontrol.c choking.c natpmp.c upnp.c http.c xml.c \
    9        shared.c torrent.c
     9       shared.c torrent.c strlcpy.c strlcat.c
    1010
    1111OBJS = $(SRCS:%.c=%.o)
Note: See TracChangeset for help on using the changeset viewer.