mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
[ruby-core:06721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
67673f6b47
commit
7ff5d02f8b
3 changed files with 16 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Nov 23 03:40:49 2005 Guy Decoux <ts@moulon.inra.fr>
|
||||
|
||||
* re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
|
||||
[ruby-core:06721]
|
||||
|
||||
Wed Nov 23 07:26:44 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.
|
||||
|
|
|
@ -111,6 +111,13 @@
|
|||
#endif /* People who don't like const sys_error */
|
||||
|
||||
#include <stddef.h>
|
||||
#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
|
@ -194,6 +201,9 @@ typedef struct __sFILE {
|
|||
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
|
||||
#define __sfileno(p) ((p)->_file)
|
||||
|
||||
#undef feof
|
||||
#undef ferror
|
||||
#undef clearerr
|
||||
#define feof(p) __sfeof(p)
|
||||
#define ferror(p) __sferror(p)
|
||||
#define clearerr(p) __sclearerr(p)
|
||||
|
@ -203,10 +213,6 @@ typedef struct __sFILE {
|
|||
#endif
|
||||
|
||||
|
||||
#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* I/O descriptors for __sfvwrite().
|
||||
*/
|
||||
|
@ -303,10 +309,6 @@ static int BSD__sfvwrite(fp, uio)
|
|||
* This code is large and complicated...
|
||||
*/
|
||||
|
||||
#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Flush out all the vectors defined by the given uio,
|
||||
* then reset it so that it can be reused.
|
||||
|
|
2
re.c
2
re.c
|
@ -105,7 +105,7 @@ rb_memsearch(char *x0, long m, char *y0, long n)
|
|||
int d;
|
||||
unsigned long hx, hy;
|
||||
|
||||
#define KR_REHASH(a, b, h) (((h) << 1) - ((long)(a)<<d) + (b))
|
||||
#define KR_REHASH(a, b, h) (((h) << 1) - (((unsigned long)(a))<<d) + (b))
|
||||
|
||||
if (m > n) return -1;
|
||||
s = y; e = s + n - m;
|
||||
|
|
Loading…
Reference in a new issue