summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-08-02 16:50:35 +0000
committerPierre Joye <pajoye@php.net>2008-08-02 16:50:35 +0000
commit20e75d80a7458d231e8b8eb432828754e9215cc9 (patch)
tree82390615528f8f5e7057fa9bcddadb8c2d268492
parentb6d64cde1598545deafed8ae8b64b77e6b8f6f5b (diff)
downloadphp-git-20e75d80a7458d231e8b8eb432828754e9215cc9.tar.gz
- MFH: improve previous fix for scan, disable optimizer only for scan() using #pragma optimize
-rwxr-xr-xext/date/config.w325
-rw-r--r--ext/date/lib/parse_iso_intervals.re8
2 files changed, 8 insertions, 5 deletions
diff --git a/ext/date/config.w32 b/ext/date/config.w32
index aa0bfe4858..483770d4a0 100755
--- a/ext/date/config.w32
+++ b/ext/date/config.w32
@@ -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");
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);
tl_config.WriteLine("#include \"config.w32.h\"");
tl_config.Close();
diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re
index 401225411b..8fc741a5fc 100644
--- a/ext/date/lib/parse_iso_intervals.re
+++ b/ext/date/lib/parse_iso_intervals.re
@@ -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)
{
uchar *cursor = s->cur;
@@ -422,6 +427,9 @@ isoweek = year4 "-"? "W" weekofyear;
}
*/
}
+#ifdef PHP_WIN32
+#pragma optimize( "", on )
+#endif
/*!max:re2c */