summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-24 12:52:26 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-24 12:52:26 +0000
commit4ddce7a68bf974c124ed15cf364e0ea0eb1a5f15 (patch)
tree6afb45eafdcbdfdea31f131e87df500deecc3424
parent2265bdfac32d4551d76ab1da4fc2c891057c9916 (diff)
downloadruby-4ddce7a68bf974c124ed15cf364e0ea0eb1a5f15.tar.gz
* configure.in: Check mblen().
* eval_intern.h (CharNext): Don't use mblen() is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--configure.in2
-rw-r--r--eval_intern.h6
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7cfa5c2322..92d747dd21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Apr 24 21:51:13 2013 Tanaka Akira <akr@fsij.org>
+
+ * configure.in: Check mblen().
+
+ * eval_intern.h (CharNext): Don't use mblen() is not available.
+
Wed Apr 24 15:55:06 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* io.c (rb_fd_fix_cloexec): use rb_update_max_fd().
diff --git a/configure.in b/configure.in
index 8fba7aa545..e0beb83a93 100644
--- a/configure.in
+++ b/configure.in
@@ -1701,7 +1701,7 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot ge
setuid setgid daemon select_large_fdset setenv unsetenv\
mktime timegm gmtime_r clock_gettime gettimeofday poll ppoll\
pread sendfile shutdown sigaltstack dl_iterate_phdr\
- dup dup3 pipe2 posix_memalign memalign ioctl)
+ dup dup3 pipe2 posix_memalign memalign ioctl mblen)
AC_CACHE_CHECK(for sigsetjmp as a macro or function, ac_cv_func_sigsetjmp,
[AC_TRY_COMPILE([
diff --git a/eval_intern.h b/eval_intern.h
index 334b8d439a..190ef9195c 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -195,7 +195,11 @@ VALUE rb_vm_top_self();
VALUE rb_vm_cbase(void);
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
-#define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
+# ifdef HAVE_MBLEN
+# define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
+# else
+# define CharNext(p) ((p) + 1)
+# endif
#endif
#if defined DOSISH || defined __CYGWIN__