On Sat, 2 Aug 2008, Pierre-Alain Joye wrote:

> pajoye                Sat Aug  2 16:49:56 2008 UTC
> 
>   Modified files:              
>     /php-src/ext/date config.w32 
>     /php-src/ext/date/lib     parse_iso_intervals.re 
>   Log:
>   - improve previous fix for scan, disable optimizer only for scan() using 
> #pragma optimize

This is non-sense. The scan function in parse_iso_intervals.c is only 
750 lines long, while the scan function in parse_date.c is 21000 lines 
long. And there is no problem with the latter function. If you want to 
work around bugs in compilers, then stick that in the config.w32 file - 
I don't want silly windows only defines in the code.

>   
> http://cvs.php.net/viewvc.cgi/php-src/ext/date/config.w32?r1=1.8&r2=1.9&diff_format=u
> Index: php-src/ext/date/config.w32
> diff -u php-src/ext/date/config.w32:1.8 php-src/ext/date/config.w32:1.9
> --- php-src/ext/date/config.w32:1.8   Sat Aug  2 15:49:14 2008
> +++ php-src/ext/date/config.w32       Sat Aug  2 16:49:56 2008
> @@ -1,15 +1,10 @@
> -// $Id: config.w32,v 1.8 2008/08/02 15:49:14 pajoye Exp $
> +// $Id: config.w32,v 1.9 2008/08/02 16:49:56 pajoye Exp $
>  // vim:ft=javascript
>  
>  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();
> http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_iso_intervals.re?r1=1.4&r2=1.5&diff_format=u
> Index: php-src/ext/date/lib/parse_iso_intervals.re
> diff -u php-src/ext/date/lib/parse_iso_intervals.re:1.4 
> php-src/ext/date/lib/parse_iso_intervals.re:1.5
> --- php-src/ext/date/lib/parse_iso_intervals.re:1.4   Sat Aug  2 13:50:30 2008
> +++ php-src/ext/date/lib/parse_iso_intervals.re       Sat Aug  2 16:49:56 2008
> @@ -16,7 +16,7 @@
>     +----------------------------------------------------------------------+
>   */
>  
> -/* $Id: parse_iso_intervals.re,v 1.4 2008/08/02 13:50:30 derick Exp $ */
> +/* $Id: parse_iso_intervals.re,v 1.5 2008/08/02 16:49:56 pajoye Exp $ */
>  
>  #include "timelib.h"
>  
> @@ -268,6 +268,11 @@
>       }                              \
>  }
>  
> +/* 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 @@
>       }
>  */
>  }
> +#ifdef PHP_WIN32
> +#pragma optimize( "", on )
> +#endif
>  
>  /*!max:re2c */

regards,
Derick

-- 
HEAD before 5_3!: http://tinyurl.com/6d2esb
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to