mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* trunk/configure.in (AC_CHECK_HEADERS): stdint.h is not needed to check.
* trunk/configure.in (rb_cv_type_uint32_t): unqouted. [ruby-dev:34030] * trunk/string.c (hash): use inttypes.h instead of stdint.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4514a6bee6
commit
fab87736fd
3 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Thu Mar 13 14:14:19 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* trunk/configure.in (AC_CHECK_HEADERS): stdint.h is not needed to check.
|
||||||
|
|
||||||
|
* trunk/configure.in (rb_cv_type_uint32_t): unqouted. [ruby-dev:34030]
|
||||||
|
|
||||||
|
* trunk/string.c (hash): use inttypes.h instead of stdint.h.
|
||||||
|
|
||||||
Thu Mar 13 03:12:48 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Mar 13 03:12:48 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/irb/cmd/help.rb: should be updated for new ri structure.
|
* lib/irb/cmd/help.rb: should be updated for new ri structure.
|
||||||
|
|
|
@ -582,7 +582,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h sys/
|
||||||
fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
|
fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
|
||||||
syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \
|
syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \
|
||||||
sys/mkdev.h sys/utime.h xti.h netinet/in_systm.h float.h ieeefp.h pthread.h \
|
sys/mkdev.h sys/utime.h xti.h netinet/in_systm.h float.h ieeefp.h pthread.h \
|
||||||
ucontext.h intrinsics.h langinfo.h locale.h stdint.h)
|
ucontext.h intrinsics.h langinfo.h locale.h)
|
||||||
|
|
||||||
dnl Check additional types.
|
dnl Check additional types.
|
||||||
AC_CHECK_SIZEOF(rlim_t, 0, [
|
AC_CHECK_SIZEOF(rlim_t, 0, [
|
||||||
|
@ -626,10 +626,11 @@ if test ${ac_cv_type_uint32_t} != yes; then
|
||||||
AC_CACHE_CHECK([unsigned 32bit int],
|
AC_CACHE_CHECK([unsigned 32bit int],
|
||||||
rb_cv_type_uint32_t,
|
rb_cv_type_uint32_t,
|
||||||
[for type in short int long; do
|
[for type in short int long; do
|
||||||
|
type="unsigned $type"
|
||||||
AC_COMPILE_IFELSE(AC_LANG_BOOL_COMPILE_TRY([], [sizeof($type) == 4]),
|
AC_COMPILE_IFELSE(AC_LANG_BOOL_COMPILE_TRY([], [sizeof($type) == 4]),
|
||||||
[rb_cv_type_uint32_t=$type; break], [])
|
[rb_cv_type_uint32_t=$type; break], [])
|
||||||
done])
|
done])
|
||||||
AC_DEFINE(uint32_t, $rb_cv_type_uint32_t)
|
AC_DEFINE_UNQUOTED(uint32_t, $rb_cv_type_uint32_t)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK(for stack end address, rb_cv_stack_end_address,
|
AC_CACHE_CHECK(for stack end address, rb_cv_stack_end_address,
|
||||||
|
|
8
string.c
8
string.c
|
@ -25,8 +25,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_STDINT_H
|
#if HAVE_INTTYPES_H
|
||||||
#include <stdint.h>
|
#include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VALUE rb_cString;
|
VALUE rb_cString;
|
||||||
|
@ -761,7 +761,7 @@ rb_enc_strlen_cr(const char *p, const char *e, rb_encoding *enc, int *cr)
|
||||||
|
|
||||||
#ifdef NONASCII_MASK
|
#ifdef NONASCII_MASK
|
||||||
#define is_utf8_lead_byte(c) (((c)&0xC0) != 0x80)
|
#define is_utf8_lead_byte(c) (((c)&0xC0) != 0x80)
|
||||||
static inline const VALUE
|
static inline VALUE
|
||||||
count_utf8_lead_bytes_with_word(const VALUE *s)
|
count_utf8_lead_bytes_with_word(const VALUE *s)
|
||||||
{
|
{
|
||||||
VALUE d = *s;
|
VALUE d = *s;
|
||||||
|
@ -1807,7 +1807,7 @@ hash(const unsigned char * data, int len, unsigned int h)
|
||||||
#endif
|
#endif
|
||||||
h *= m;
|
h *= m;
|
||||||
h ^= h >> r;
|
h ^= h >> r;
|
||||||
};
|
}
|
||||||
|
|
||||||
h *= m;
|
h *= m;
|
||||||
h ^= h >> 10;
|
h ^= h >> 10;
|
||||||
|
|
Loading…
Add table
Reference in a new issue