1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
$NetBSD: patch-ap,v 1.4 2006/08/10 13:44:22 abs Exp $
--- util/Transcoders/IconvGNU/IconvGNUTransService.cpp.orig 2005-09-07 16:55:44.000000000 +0100
+++ util/Transcoders/IconvGNU/IconvGNUTransService.cpp
@@ -26,7 +26,11 @@
#include <locale.h>
#include <iconv.h>
#include <errno.h>
+#ifdef __NetBSD__
+#include <machine/endian.h>
+#else
#include <endian.h>
+#endif
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
@@ -243,7 +247,7 @@ XMLCh IconvGNUWrapper::toUpper (const
xmlChToMbc (ch, wcbuf);
char tmpArr[4];
- char* ptr = wcbuf;
+ const char* ptr = wcbuf;
size_t len = fUChSize;
char *pTmpArr = tmpArr;
size_t bLen = 2;
@@ -275,7 +279,7 @@ XMLCh IconvGNUWrapper::toLower (const
xmlChToMbc (ch, wcbuf);
char tmpArr[4];
- char* ptr = wcbuf;
+ const char* ptr = wcbuf;
size_t len = fUChSize;
char *pTmpArr = tmpArr;
size_t bLen = 2;
@@ -307,7 +311,7 @@ bool IconvGNUWrapper::isSpace(const X
char tmpArr[4];
xmlChToMbc (toCheck, wcbuf);
- char* ptr = wcbuf;
+ const char* ptr = wcbuf;
size_t len = fUChSize;
char *pTmpArr = tmpArr;
size_t bLen = 2;
@@ -408,7 +412,7 @@ size_t IconvGNUWrapper::iconvFrom ( c
size_t toLen ) const
{
ICONV_LOCK;
- char ** tmpPtr = (char**)&fromPtr;
+ const char ** tmpPtr = &fromPtr;
return ::iconv (fCDFrom, tmpPtr, fromLen, toPtr, &toLen);
}
@@ -418,7 +422,7 @@ size_t IconvGNUWrapper::iconvTo ( con
size_t toLen ) const
{
ICONV_LOCK;
- char ** tmpPtr = (char**)&fromPtr;
+ const char ** tmpPtr = &fromPtr;
return ::iconv (fCDTo, tmpPtr, fromLen, toPtr, &toLen);
}
|