fielding 01/01/28 01:50:01
Modified: i18n/unix xlate.c
include apr_xlate.h
Log:
Remove compiler warnings due to lack of string.h and bad const on
the second argument of iconv (the Linux man pages show an incorrect
prototype -- the header files and single Unix spec say that there
is no const).
Revision Changes Path
1.17 +6 -3 apr/i18n/unix/xlate.c
Index: xlate.c
===================================================================
RCS file: /home/cvs/apr/i18n/unix/xlate.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- xlate.c 2000/12/22 16:54:48 1.16
+++ xlate.c 2001/01/28 09:50:00 1.17
@@ -67,6 +67,9 @@
#ifdef HAVE_STDDEF_H
#include <stddef.h> /* for NULL */
#endif
+#if APR_HAVE_STRING_H
+#include <string.h>
+#endif
#if APR_HAVE_STRINGS_H
#include <strings.h>
#endif
@@ -180,7 +183,7 @@
static void check_sbcs(apr_xlate_t *convset)
{
char inbuf[256], outbuf[256];
- const char *inbufptr = inbuf;
+ char *inbufptr = inbuf;
char *outbufptr = outbuf;
size_t inbytes_left, outbytes_left;
int i;
@@ -273,7 +276,7 @@
return APR_SUCCESS;
}
-apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
+apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, char *inbuf,
apr_size_t *inbytes_left, char *outbuf,
apr_size_t *outbytes_left)
{
@@ -282,7 +285,7 @@
size_t translated;
if (convset->ich != (iconv_t)-1) {
- const char *inbufptr = inbuf;
+ char *inbufptr = inbuf;
char *outbufptr = outbuf;
translated = iconv(convset->ich, &inbufptr,
1.13 +2 -2 apr/include/apr_xlate.h
Index: apr_xlate.h
===================================================================
RCS file: /home/cvs/apr/include/apr_xlate.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- apr_xlate.h 2001/01/18 23:15:20 1.12
+++ apr_xlate.h 2001/01/28 09:50:01 1.13
@@ -126,10 +126,10 @@
* @param outbuf The address of the destination buffer
* @param outbytes_left Input: the size of the output buffer
* Output: the amount of the output buffer not yet used
- * @deffunc apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const
char *inbuf, apr_size_t *inbytes_left, char *outbuf, apr_size_t *outbytes_left)
+ * @deffunc apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, char
*inbuf, apr_size_t *inbytes_left, char *outbuf, apr_size_t *outbytes_left)
*/
APR_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
- const char *inbuf,
+ char *inbuf,
apr_size_t *inbytes_left,
char *outbuf,
apr_size_t *outbytes_left);