Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2009-08-22 00:27:10 +0400
committerEric Blake <eblake@redhat.com>2009-08-22 00:27:10 +0400
commit3584ff9cb2e12429e8fdaef59a6c04205b35e6ab (patch)
treee085fc8164aa5c80fde4404352bbba03bcb262fd
parentc11ba63d52f86470878b8ab9c22bfc6676f1dd12 (diff)
iconv: match SUSv3 prototype
* libc/include/iconv.h (iconv): Match POSIX prototype. * libc/iconv/lib/iconv.c (iconv): Likewise.
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/iconv/lib/iconv.c9
-rw-r--r--newlib/libc/include/iconv.h6
3 files changed, 13 insertions, 7 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 415be6aa3..9a2647d86 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-21 Eric Blake <ebb9@byu.net>
+
+ * libc/include/iconv.h (iconv): Match POSIX prototype.
+ * libc/iconv/lib/iconv.c (iconv): Likewise.
+
2009-08-21 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|.
diff --git a/newlib/libc/iconv/lib/iconv.c b/newlib/libc/iconv/lib/iconv.c
index ee7124b41..8bbcae192 100644
--- a/newlib/libc/iconv/lib/iconv.c
+++ b/newlib/libc/iconv/lib/iconv.c
@@ -45,7 +45,7 @@ ANSI_SYNOPSIS
#include <iconv.h>
iconv_t iconv_open (const char *<[to]>, const char *<[from]>);
int iconv_close (iconv_t <[cd]>);
- size_t iconv (iconv_t <[cd]>, const char **<[inbuf]>,
+ size_t iconv (iconv_t <[cd]>, char **<[inbuf]>,
size_t *<[inbytesleft]>,
char **<[outbuf]>, size_t *<[outbytesleft]>),
@@ -61,7 +61,7 @@ TRAD_SYNOPSIS
#include <iconv.h>
size_t iconv (<[cd]>, <[in]>, <[inleft]>, <[out]>, <[outleft]>)
iconv_t <[cd]>;
- const char **<[in]>;
+ char **<[in]>;
size_t *<[inleft]>;
char **<[out]>;
size_t *<[outleft]>);
@@ -168,12 +168,13 @@ _DEFUN(iconv_open, (to, from),
size_t
_DEFUN(iconv, (cd, inbuf, inbytesleft, outbuf, outbytesleft),
iconv_t cd _AND
- _CONST char **inbuf _AND
+ char **inbuf _AND
size_t *inbytesleft _AND
char **outbuf _AND
size_t *outbytesleft)
{
- return _iconv_r (_REENT, cd, inbuf, inbytesleft, outbuf, outbytesleft);
+ return _iconv_r (_REENT, cd, (_CONST char **) inbuf, inbytesleft,
+ outbuf, outbytesleft);
}
diff --git a/newlib/libc/include/iconv.h b/newlib/libc/include/iconv.h
index 5b8fcecff..c4a283afa 100644
--- a/newlib/libc/include/iconv.h
+++ b/newlib/libc/include/iconv.h
@@ -37,11 +37,11 @@ typedef _iconv_t iconv_t;
_BEGIN_STD_C
#ifndef _REENT_ONLY
-iconv_t
+iconv_t
_EXFUN(iconv_open, (_CONST char *, _CONST char *));
size_t
-_EXFUN(iconv, (iconv_t, _CONST char **, size_t *, char **, size_t *));
+_EXFUN(iconv, (iconv_t, char **, size_t *, char **, size_t *));
int
_EXFUN(iconv_close, (iconv_t));
@@ -51,7 +51,7 @@ iconv_t
_EXFUN(_iconv_open_r, (struct _reent *, _CONST char *, _CONST char *));
size_t
-_EXFUN(_iconv_r, (struct _reent *, iconv_t, _CONST char **,
+_EXFUN(_iconv_r, (struct _reent *, iconv_t, _CONST char **,
size_t *, char **, size_t *));
int