Changeset 10634


Ignore:
Timestamp:
May 6, 2010, 5:02:31 PM (11 years ago)
Author:
charles
Message:

re-tweak the previous commit based on feedback from kklimonda

Location:
trunk/libtransmission
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r10633 r10634  
    3232#include "json.h"
    3333#include "list.h"
    34 #include "platform.h" /* MAX_PATH_LEN */
     34#include "platform.h" /* TR_PATH_MAX */
    3535#include "ptrarray.h"
    3636#include "utils.h" /* tr_new(), tr_free() */
     
    16221622    int fd;
    16231623    int err = 0;
    1624     char buf[TR_MAX_PATH];
     1624    char buf[TR_PATH_MAX];
    16251625
    16261626    /* follow symlinks to find the "real" file, to make sure the temporary
  • trunk/libtransmission/fdlimit.c

    r10633 r10634  
    6868#include "fdlimit.h"
    6969#include "net.h"
    70 #include "platform.h" /* TR_MAX_PATH, TR_PATH_DELIMITER */
     70#include "platform.h" /* TR_PATH_MAX, TR_PATH_DELIMITER */
    7171#include "session.h"
    7272#include "torrent.h" /* tr_isTorrent() */
     
    8888    int              torrentId;
    8989    tr_file_index_t  fileNum;
    90     char             filename[TR_MAX_PATH];
     90    char             filename[TR_PATH_MAX];
    9191    int              fd;
    9292    uint64_t         date;
  • trunk/libtransmission/makemeta.c

    r10633 r10634  
    316316    for( prev = pch = file->filename + topLen; ; ++pch )
    317317    {
    318         char buf[TR_MAX_PATH];
     318        char buf[TR_PATH_MAX];
    319319
    320320        if( *pch && *pch != TR_PATH_DELIMITER )
  • trunk/libtransmission/platform.c

    r10633 r10634  
    441441            s = tr_buildPath( appdata, appname, NULL );
    442442#elif defined( __HAIKU__ )
    443             char buf[TR_MAX_PATH];
     443            char buf[TR_PATH_MAX];
    444444            find_directory( B_USER_SETTINGS_DIRECTORY, -1, true, buf, sizeof(buf) );
    445445            s = tr_buildPath( buf, appname, NULL );
  • trunk/libtransmission/platform.h

    r10633 r10634  
    2828#ifdef WIN32
    2929 #include <windows.h> /* MAX_PATH */
     30 #define TR_PATH_MAX MAX_PATH
    3031#else
    31  #include <limits.h> /* MAX_PATH */
    32 #endif
    33 #ifdef MAX_PATH
    34  #define TR_MAX_PATH MAX_PATH
    35 #else
    36  #define TR_MAX_PATH 4096
     32 #include <limits.h> /* PATH_MAX */
     33 #ifdef PATH_MAX
     34  #define TR_PATH_MAX PATH_MAX
     35 #else
     36  #define TR_PATH_MAX 4096
     37 #endif
    3738#endif
    3839
Note: See TracChangeset for help on using the changeset viewer.