[prev in list] [next in list] [prev in thread] [next in thread]
List: trousers-tech
Subject: [TrouSerS-tech] trousers.c fix
From: Wyllys Ingersoll <wyllys.ingersoll () sun ! com>
Date: 2009-04-21 20:13:38
Message-ID: 49EE28F2.8010308 () sun ! com
[Download RAW message or body]
The fix below adds a typecast to the iconv function calls in the UNICODE
conversion functions. Some compilers complain about it otherwise.
---
Trousers' Developer's Certificate of Origin 1.0
By making a contribution to the Trousers project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
Signed-off-by: Wyllys Ingersoll <wyllys.ingersoll@sun.com>
---
diff --git a/src/trspi/trousers.c b/src/trspi/trousers.c
index abb1723..a184647 100644
--- a/src/trspi/trousers.c
+++ b/src/trspi/trousers.c
@@ -1539,7 +1539,7 @@ Trspi_Native_To_UNICODE(BYTE *string, unsigned *size)
ptr = (char *)string;
errno = 0;
- rc = iconv(cd, &ptr, &inbytesleft, &outbuf, &outbytesleft);
+ rc = iconv(cd, (const char **)&ptr, &inbytesleft,
&outbuf, &outbytesleft);
} while (rc == (size_t)-1 && errno == E2BIG);
if (len > MAX_BUF_SIZE) {
@@ -1601,7 +1601,7 @@ Trspi_UNICODE_To_Native(BYTE *string, unsigned *size)
ptr = (char *)string;
errno = 0;
- rc = iconv(cd, &ptr, &inbytesleft, &outbuf, &outbytesleft);
+ rc = iconv(cd, (const char **)&ptr, &inbytesleft,
&outbuf, &outbytesleft);
} while (rc == (size_t)-1 && errno == E2BIG);
/* add terminating bytes of the correct width */
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
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