File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -1574,17 +1574,7 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
1574
1574
long timestamp = 0 ;
1575
1575
struct tm ta ;
1576
1576
int max_reallocs = 5 ;
1577
- #ifdef PHP_WIN32
1578
- /* VS2012 has a bug where strftime crash with %z and %Z format when the
1579
- initial buffer is too small. Increasing the buffer size helps in a
1580
- workaround to fixs longer format strings for this VS version.
1581
- http://connect.microsoft.com/VisualStudio/feedback/details/759720/vs2012-strftime-crash-with-z-formatting-code
1582
- */
1583
- size_t buf_len = 256 ;
1584
- #else
1585
- size_t buf_len = 64 ;
1586
- #endif
1587
- size_t real_len ;
1577
+ size_t buf_len = 256 , real_len ;
1588
1578
timelib_time * ts ;
1589
1579
timelib_tzinfo * tzi ;
1590
1580
timelib_time_offset * offset = NULL ;
@@ -1637,6 +1627,9 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
1637
1627
#endif
1638
1628
}
1639
1629
1630
+ /* VS2012 crt has a bug where strftime crash with %z and %Z format when the
1631
+ initial buffer is too small. See
1632
+ http://connect.microsoft.com/VisualStudio/feedback/details/759720/vs2012-strftime-crash-with-z-formatting-code */
1640
1633
buf = (char * ) emalloc (buf_len );
1641
1634
while ((real_len = strftime (buf , buf_len , format , & ta ))== buf_len || real_len == 0 ) {
1642
1635
buf_len *= 2 ;
You can’t perform that action at this time.
0 commit comments