Hi!
>>>>> "Stephen" == Stephen Beynon <[EMAIL PROTECTED]> writes:
Stephen> On Mon, 9 Apr 2001, Sinisa Milivojevic wrote:
Stephen> The problem still exists on gcc 2.95.3 (I was part way through installing
Stephen> this when I recieved your mail - I can try 2.95.2 if you think that would
Stephen> be usefull)
<cut>
>> [EMAIL PROTECTED] writes:
>> > >Description:
>> > When transfering a database application to use an Alpha Linux server
>> > rather than intel Linux previously working regular expressions fail to work.
>> > It appears to be due to a length limit. This effects both binary downloads
>> > and home compiled distributions.
>> > >How-To-Repeat:
>> > Simple test case (with results)
<cut>
Thanks for the clear test case; This enabled me to find a cast bug
for 64 bit machines in the regex library.
Here is a patch for this:
===== regex/regexec.c 1.3 vs edited =====
*** /tmp/regexec.c-1.3-19792 Wed Aug 30 22:42:05 2000
--- edited/regex/regexec.c Tue Apr 10 20:49:52 2001
***************
*** 22,45 ****
#define states long
#define states1 states /* for later use in regexec() decision */
#define CLEAR(v) ((v) = 0)
! #define SET0(v, n) ((v) &= ~(1 << (n)))
! #define SET1(v, n) ((v) |= 1 << (n))
! #define ISSET(v, n) ((v) & (1 << (n)))
#define ASSIGN(d, s) ((d) = (s))
#define EQ(a, b) ((a) == (b))
#define STATEVARS int dummy /* dummy version */
#define STATESETUP(m, n) /* nothing */
#define STATETEARDOWN(m) /* nothing */
#define SETUP(v) ((v) = 0)
! #define onestate int
! #define INIT(o, n) ((o) = (unsigned)1 << (n))
#define INC(o) ((o) <<= 1)
#define ISSTATEIN(v, o) ((v) & (o))
/* some abbreviations; note that some of these know variable names! */
/* do "if I'm here, I can also be there" etc without branches */
! #define FWD(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) << (n))
! #define BACK(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) >> (n))
! #define ISSETBACK(v, n) ((v) & ((unsigned)here >> (n)))
/* function names */
#define SNAMES /* engine.c looks after details */
--- 22,45 ----
#define states long
#define states1 states /* for later use in regexec() decision */
#define CLEAR(v) ((v) = 0)
! #define SET0(v, n) ((v) &= ~((states) 1 << (n)))
! #define SET1(v, n) ((v) |= (states) 1 << (n))
! #define ISSET(v, n) ((v) & ((states) 1 << (n)))
#define ASSIGN(d, s) ((d) = (s))
#define EQ(a, b) ((a) == (b))
#define STATEVARS int dummy /* dummy version */
#define STATESETUP(m, n) /* nothing */
#define STATETEARDOWN(m) /* nothing */
#define SETUP(v) ((v) = 0)
! #define onestate long /* Changed from int by Monty */
! #define INIT(o, n) ((o) = (unsigned states)1 << (n))
#define INC(o) ((o) <<= 1)
#define ISSTATEIN(v, o) ((v) & (o))
/* some abbreviations; note that some of these know variable names! */
/* do "if I'm here, I can also be there" etc without branches */
! #define FWD(dst, src, n) ((dst) |= ((unsigned states)(src)&(here)) <<
(n))
! #define BACK(dst, src, n) ((dst) |= ((unsigned states)(src)&(here)) >>
(n))
! #define ISSETBACK(v, n) ((v) & ((unsigned states)here >> (n)))
/* function names */
#define SNAMES /* engine.c looks after details */
Regards,
Monty
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php