mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
- MFH: improve previous fix for scan, disable optimizer only for scan() using #pragma optimize
This commit is contained in:
parent
b6d64cde15
commit
20e75d80a7
2 changed files with 8 additions and 5 deletions
|
@ -5,11 +5,6 @@ EXTENSION("date", "php_date.c", false, "-Iext/date/lib");
|
||||||
ADD_SOURCES("ext/date/lib", "astro.c timelib.c dow.c parse_date.c parse_tz.c tm2unixtime.c unixtime2tm.c parse_iso_intervals.c interval.c", "date");
|
ADD_SOURCES("ext/date/lib", "astro.c timelib.c dow.c parse_date.c parse_tz.c tm2unixtime.c unixtime2tm.c parse_iso_intervals.c interval.c", "date");
|
||||||
AC_DEFINE('HAVE_DATE', 1, 'Have date/time support');
|
AC_DEFINE('HAVE_DATE', 1, 'Have date/time support');
|
||||||
|
|
||||||
// date parser's scan function too large for VC6 - VC7.x, drop the optimization solves the problem
|
|
||||||
if (VCVERS<1400) {
|
|
||||||
ADD_FLAG('CFLAGS_DATE', ' /O1 ');
|
|
||||||
}
|
|
||||||
|
|
||||||
var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
|
var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
|
||||||
tl_config.WriteLine("#include \"config.w32.h\"");
|
tl_config.WriteLine("#include \"config.w32.h\"");
|
||||||
tl_config.Close();
|
tl_config.Close();
|
||||||
|
|
|
@ -268,6 +268,11 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* date parser's scan function too large for VC6 - VC7.x
|
||||||
|
drop the optimization solves the problem */
|
||||||
|
#ifdef PHP_WIN32
|
||||||
|
#pragma optimize( "", off )
|
||||||
|
#endif
|
||||||
static int scan(Scanner *s)
|
static int scan(Scanner *s)
|
||||||
{
|
{
|
||||||
uchar *cursor = s->cur;
|
uchar *cursor = s->cur;
|
||||||
|
@ -422,6 +427,9 @@ isoweek = year4 "-"? "W" weekofyear;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
#ifdef PHP_WIN32
|
||||||
|
#pragma optimize( "", on )
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!max:re2c */
|
/*!max:re2c */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue