diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-09 07:45:54 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-09 07:45:54 +0000 |
| commit | 278c898aae78aaefc5151c9a97ace96517f4345b (patch) | |
| tree | d0674ddfaca042b5aafb56cc4c897599066653d7 | |
| parent | 1f90139a838b56b34f6b3b4ee126c4e30a30faa1 (diff) | |
| download | ruby-278c898aae78aaefc5151c9a97ace96517f4345b.tar.gz ruby-278c898aae78aaefc5151c9a97ace96517f4345b.tar.xz ruby-278c898aae78aaefc5151c9a97ace96517f4345b.zip | |
* ext/iconv/iconv.c (iconv_try), ext/iconv/extconf.rb: get rid of meta
characters in command line option. fixed: [ruby-talk:155369]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/iconv/extconf.rb | 4 | ||||
| -rw-r--r-- | ext/iconv/iconv.c | 5 |
3 files changed, 10 insertions, 4 deletions
@@ -1,8 +1,11 @@ -Fri Sep 9 16:35:04 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> +Fri Sep 9 16:45:25 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (rb_str_times): make empty strings to keep taintness, and a little improvement. [ruby-dev:26900] + * ext/iconv/iconv.c (iconv_try), ext/iconv/extconf.rb: get rid of meta + characters in command line option. fixed: [ruby-talk:155369] + Thu Sep 8 14:58:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org> * merged a patch from Takahiro Kambe <taca@back-street.net> to diff --git a/ext/iconv/extconf.rb b/ext/iconv/extconf.rb index 65ea32795..62adb7a6b 100644 --- a/ext/iconv/extconf.rb +++ b/ext/iconv/extconf.rb @@ -21,9 +21,7 @@ if have_func("iconv", "iconv.h") or /\bconst\b/ =~ second end end - $defs.push('-DICONV_INPTR_CAST=""') - else - $defs.push('-DICONV_INPTR_CAST="(char **)"') + $defs.push('-DICONV_INPTR_CONST') end if conf prefix = '$(srcdir)' diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 65dd07f7d..5715b8fbd 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -243,6 +243,11 @@ iconv_try size_t *outlen; #endif /* HAVE_PROTOTYPES */ { +#ifdef ICONV_INPTR_CONST +#define ICONV_INPTR_CAST +#else +#define ICONV_INPTR_CAST (char **) +#endif size_t ret = iconv(cd, ICONV_INPTR_CAST inptr, inlen, outptr, outlen); if (ret == (size_t)-1) { if (!*inlen) |
