r23792: convert Samba4 to GPLv3
[kai/samba.git] / source4 / lib / charset / charcnv.c
index 0df77f4effec9612fb09d427b9157d7ad56ecac8..0f6e53f52c8dfc5d0879bcc2bf4ee0fec0a0eea8 100644 (file)
@@ -7,7 +7,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 #include "includes.h"
@@ -630,11 +629,11 @@ _PUBLIC_ codepoint_t next_codepoint(const char *str, size_t *size)
        /* this looks a little strange, but it is needed to cope
           with codepoints above 64k */
        olen = 2;
-       outbuf = buf;
+       outbuf = (char *)buf;
        smb_iconv(descriptor,  &str, &ilen, &outbuf, &olen);
        if (olen == 2) {
                olen = 4;
-               outbuf = buf;
+               outbuf = (char *)buf;
                smb_iconv(descriptor,  &str, &ilen, &outbuf, &olen);
                if (olen == 4) {
                        /* we didn't convert any bytes */
@@ -692,7 +691,7 @@ _PUBLIC_ ssize_t push_codepoint(char *str, codepoint_t c)
        if (c < 0x10000) {
                ilen = 2;
                olen = 5;
-               inbuf = buf;
+               inbuf = (char *)buf;
                SSVAL(buf, 0, c);
                smb_iconv(descriptor, &inbuf, &ilen, &str, &olen);
                if (ilen != 0) {
@@ -710,7 +709,7 @@ _PUBLIC_ ssize_t push_codepoint(char *str, codepoint_t c)
 
        ilen = 4;
        olen = 5;
-       inbuf = buf;
+       inbuf = (char *)buf;
 
        smb_iconv(descriptor, &inbuf, &ilen, &str, &olen);
        if (ilen != 0) {