[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trousers-tech
Subject:    [TrouSerS-tech] trousers.c patch
From:       Wyllys Ingersoll <wyllys.ingersoll () sun ! com>
Date:       2008-12-09 14:25:51
Message-ID: 493E7FEF.4020501 () sun ! com
[Download RAW message or body]


Changes:
* iconv(3C) on Solaris is picky about type casts.


*** src/trspi/trousers.c.old    Fri Oct 26 16:34:31 2007
--- src/trspi/trousers.c        Mon Oct 27 12:13:18 2008
***************
*** 1538,1544 ****
                ptr = (char *)string;
                errno = 0;

!               rc = iconv(cd, &ptr, &inbytesleft, &outbuf, &outbytesleft);
        } while (rc == (size_t)-1 && errno == E2BIG);

        if (len > MAX_BUF_SIZE) {
--- 1538,1544 ----
                ptr = (char *)string;
                errno = 0;

!               rc = iconv(cd, (const char **)&ptr, &inbytesleft, 
&outbuf, &outbytesleft);
        } while (rc == (size_t)-1 && errno == E2BIG);

        if (len > MAX_BUF_SIZE) {
***************
*** 1599,1605 ****
                ptr = (char *)string;
                errno = 0;

!               rc = iconv(cd, &ptr, &inbytesleft, &outbuf, &outbytesleft);
        } while (rc == (size_t)-1 && errno == E2BIG);

        /* add terminating bytes of the correct width */
--- 1599,1605 ----
                ptr = (char *)string;
                errno = 0;

!               rc = iconv(cd, (const char **)&ptr, &inbytesleft, 
&outbuf, &outbytesleft);
        } while (rc == (size_t)-1 && errno == E2BIG);

        /* add terminating bytes of the correct width */


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
TrouSerS-tech mailing list
TrouSerS-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/trousers-tech
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic