Ignore:
Timestamp:
Dec 8, 2010, 2:57:34 PM (11 years ago)
Author:
charles
Message:

(trunk libT) #3813 "libtransmission doesn't build on Solaris 10 because of strsep call()" -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r11398 r11490  
    773773****/
    774774
     775/* https://bugs.launchpad.net/percona-patches/+bug/526863/+attachment/1160199/+files/solaris_10_fix.patch */
     776char*
     777tr_strsep( char ** str, const char * delims )
     778{
     779#ifdef HAVE_STRSEP
     780    return strsep( str, delims );
     781#else
     782    char *token;
     783
     784    if (*str == NULL) {
     785        /* No more tokens */
     786        return NULL;
     787    }
     788
     789    token = *str;
     790    while (**str != '\0') {
     791        if (strchr(delims, **str) != NULL) {
     792            **str = '\0';
     793            (*str)++;
     794            return token;
     795        }
     796        (*str)++;
     797    }
     798
     799    /* There is not another token */
     800    *str = NULL;
     801
     802    return token;
     803#endif
     804}
     805
    775806char*
    776807tr_strstrip( char * str )
Note: See TracChangeset for help on using the changeset viewer.