summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--ext/date/lib/parse_date.c158
-rw-r--r--ext/date/lib/parse_date.re10
-rw-r--r--ext/date/lib/resource/parse_date.re10
-rw-r--r--ext/date/lib/timelib.m42
5 files changed, 101 insertions, 80 deletions
diff --git a/NEWS b/NEWS
index 594010c0d5..6947bca1a0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PHP NEWS
- Fixed bug #33491 (crash after extending MySQLi internal class). (Tony)
- Fixed bug #33475 (cURL handle is not closed on curl_close(). (Ilia)
- Fixed bug #33469 (Compile error undefined reference to ifx_checkAPI). (Jani)
+- Fixed bug #33433 (strtoll not available on Tru64). (Jani, Derick)
- Fixed bug #32660 (Assignment by reference causes crash when field access is
overloaded (__get)). (Dmitry)
- Fixed bug #31358 (Older GCC versions do not provide portable va_copy()).
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index dc250ed84a..ceb0d07d36 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.9.8.dev on Tue Jun 28 19:53:13 2005 */
+/* Generated by re2c 0.9.8.dev on Tue Jun 28 20:03:29 2005 */
#line 1 "parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -36,8 +36,14 @@
#include "timelib.h"
#if defined(_MSC_VER)
-#define strcasecmp stricmp
-#define strtoll(s, f, b) _atoi64(s)
+# define strcasecmp stricmp
+# define strtoll(s, f, b) _atoi64(s)
+#elif !defined(HAVE_STRTOLL)
+# if defined(HAVE_ATOLL)
+# define strtoll(s, f, b) atoll(s)
+# else
+# define strtoll(s, f, b) strtol(s, f, b)
+# endif
#endif
#define TIMELIB_SECOND 1
@@ -765,7 +771,7 @@ static int scan(Scanner *s)
std:
s->tok = cursor;
s->len = 0;
-#line 869 "parse_date.re"
+#line 875 "parse_date.re"
{
@@ -804,7 +810,7 @@ std:
0, 0, 0, 0, 0, 0, 0, 0,
};
-#line 808 "<stdout>"
+#line 814 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -882,14 +888,14 @@ yy2:
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1307 "parse_date.re"
+#line 1313 "parse_date.re"
{
TIMELIB_INIT;
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time);
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 886 "<stdout>"
+#line 892 "<stdout>"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -958,12 +964,12 @@ yy6:
yy7:
YYDEBUG(7, *YYCURSOR);
-#line 1367 "parse_date.re"
+#line 1373 "parse_date.re"
{
/* printf("unexpected character: #%d, %c\n", *s->tok, *s->tok); */
goto std;
}
-#line 952 "<stdout>"
+#line 958 "<stdout>"
yy8:
YYDEBUG(8, *YYCURSOR);
yyaccept = 0;
@@ -1698,11 +1704,11 @@ yy43:
yy44:
YYDEBUG(44, *YYCURSOR);
-#line 1356 "parse_date.re"
+#line 1362 "parse_date.re"
{
goto std;
}
-#line 1612 "<stdout>"
+#line 1618 "<stdout>"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
@@ -1710,12 +1716,12 @@ yy45:
yy46:
YYDEBUG(46, *YYCURSOR);
-#line 1361 "parse_date.re"
+#line 1367 "parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 1621 "<stdout>"
+#line 1627 "<stdout>"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2068,7 +2074,7 @@ yy80:
yy81:
YYDEBUG(81, *YYCURSOR);
-#line 1340 "parse_date.re"
+#line 1346 "parse_date.re"
{
timelib_ull i;
@@ -2083,7 +2089,7 @@ yy81:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 1918 "<stdout>"
+#line 1924 "<stdout>"
yy82:
YYDEBUG(82, *YYCURSOR);
++YYCURSOR;
@@ -2706,11 +2712,11 @@ yy147:
yy148:
YYDEBUG(148, *YYCURSOR);
-#line 1302 "parse_date.re"
+#line 1308 "parse_date.re"
{
goto std;
}
-#line 2411 "<stdout>"
+#line 2417 "<stdout>"
yy149:
YYDEBUG(149, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2752,7 +2758,7 @@ yy154:
yy155:
YYDEBUG(155, *YYCURSOR);
-#line 1286 "parse_date.re"
+#line 1292 "parse_date.re"
{
const timelib_relunit* relunit;
@@ -2767,7 +2773,7 @@ yy155:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2454 "<stdout>"
+#line 2460 "<stdout>"
yy156:
YYDEBUG(156, *YYCURSOR);
yyaccept = 1;
@@ -3151,7 +3157,7 @@ yy187:
yy188:
YYDEBUG(188, *YYCURSOR);
-#line 1270 "parse_date.re"
+#line 1276 "parse_date.re"
{
timelib_sll i;
@@ -3166,7 +3172,7 @@ yy188:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2785 "<stdout>"
+#line 2791 "<stdout>"
yy189:
YYDEBUG(189, *YYCURSOR);
++YYCURSOR;
@@ -5339,7 +5345,7 @@ yy390:
yy391:
YYDEBUG(391, *YYCURSOR);
-#line 1100 "parse_date.re"
+#line 1106 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -5350,7 +5356,7 @@ yy391:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 4559 "<stdout>"
+#line 4565 "<stdout>"
yy392:
YYDEBUG(392, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5401,7 +5407,7 @@ yy396:
yy397:
YYDEBUG(397, *YYCURSOR);
-#line 1124 "parse_date.re"
+#line 1130 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -5412,7 +5418,7 @@ yy397:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4609 "<stdout>"
+#line 4615 "<stdout>"
yy398:
YYDEBUG(398, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5501,7 +5507,7 @@ yy408:
yy409:
YYDEBUG(409, *YYCURSOR);
-#line 1315 "parse_date.re"
+#line 1321 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -5525,7 +5531,7 @@ yy409:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4698 "<stdout>"
+#line 4704 "<stdout>"
yy410:
YYDEBUG(410, *YYCURSOR);
yyaccept = 7;
@@ -5851,7 +5857,7 @@ yy449:
yy450:
YYDEBUG(450, *YYCURSOR);
-#line 1216 "parse_date.re"
+#line 1222 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -5862,7 +5868,7 @@ yy450:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 4953 "<stdout>"
+#line 4959 "<stdout>"
yy451:
YYDEBUG(451, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7309,7 +7315,7 @@ yy557:
yy558:
YYDEBUG(558, *YYCURSOR);
-#line 1256 "parse_date.re"
+#line 1262 "parse_date.re"
{
TIMELIB_INIT;
s->time->relative.y = 0 - s->time->relative.y;
@@ -7322,7 +7328,7 @@ yy558:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 6197 "<stdout>"
+#line 6203 "<stdout>"
yy559:
YYDEBUG(559, *YYCURSOR);
yyaccept = 1;
@@ -8967,7 +8973,7 @@ yy667:
yy668:
YYDEBUG(668, *YYCURSOR);
-#line 956 "parse_date.re"
+#line 962 "parse_date.re"
{
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
TIMELIB_INIT;
@@ -8988,7 +8994,7 @@ yy668:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 7639 "<stdout>"
+#line 7645 "<stdout>"
yy669:
YYDEBUG(669, *YYCURSOR);
yyaccept = 10;
@@ -9115,7 +9121,7 @@ yy682:
yy683:
YYDEBUG(683, *YYCURSOR);
-#line 941 "parse_date.re"
+#line 947 "parse_date.re"
{
DEBUG_OUTPUT("timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9129,7 +9135,7 @@ yy683:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 7750 "<stdout>"
+#line 7756 "<stdout>"
yy684:
YYDEBUG(684, *YYCURSOR);
yych = *++YYCURSOR;
@@ -9239,7 +9245,7 @@ yy695:
yy696:
YYDEBUG(696, *YYCURSOR);
-#line 1076 "parse_date.re"
+#line 1082 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -9250,7 +9256,7 @@ yy696:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 7845 "<stdout>"
+#line 7851 "<stdout>"
yy697:
YYDEBUG(697, *YYCURSOR);
yych = *++YYCURSOR;
@@ -9617,7 +9623,7 @@ yy754:
yy755:
YYDEBUG(755, *YYCURSOR);
-#line 1088 "parse_date.re"
+#line 1094 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -9628,7 +9634,7 @@ yy755:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 8105 "<stdout>"
+#line 8111 "<stdout>"
yy756:
YYDEBUG(756, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10000,7 +10006,7 @@ yy799:
yy800:
YYDEBUG(800, *YYCURSOR);
-#line 1064 "parse_date.re"
+#line 1070 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -10011,7 +10017,7 @@ yy800:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 8398 "<stdout>"
+#line 8404 "<stdout>"
yy801:
YYDEBUG(801, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10033,7 +10039,7 @@ yy803:
yy804:
YYDEBUG(804, *YYCURSOR);
-#line 1039 "parse_date.re"
+#line 1045 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -10046,7 +10052,7 @@ yy804:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 8425 "<stdout>"
+#line 8431 "<stdout>"
yy805:
YYDEBUG(805, *YYCURSOR);
yyaccept = 11;
@@ -10268,7 +10274,7 @@ yy836:
yy837:
YYDEBUG(837, *YYCURSOR);
-#line 1240 "parse_date.re"
+#line 1246 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_TIME();
@@ -10283,7 +10289,7 @@ yy837:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 8596 "<stdout>"
+#line 8602 "<stdout>"
yy838:
YYDEBUG(838, *YYCURSOR);
yyaccept = 12;
@@ -10595,7 +10601,7 @@ yy876:
yy877:
YYDEBUG(877, *YYCURSOR);
-#line 1228 "parse_date.re"
+#line 1234 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -10606,7 +10612,7 @@ yy877:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 8838 "<stdout>"
+#line 8844 "<stdout>"
yy878:
YYDEBUG(878, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10852,7 +10858,7 @@ yy896:
yy897:
YYDEBUG(897, *YYCURSOR);
-#line 1112 "parse_date.re"
+#line 1118 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -10863,7 +10869,7 @@ yy897:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 9051 "<stdout>"
+#line 9057 "<stdout>"
yy898:
YYDEBUG(898, *YYCURSOR);
yych = *++YYCURSOR;
@@ -11017,7 +11023,7 @@ yy916:
yy917:
YYDEBUG(917, *YYCURSOR);
-#line 1197 "parse_date.re"
+#line 1203 "parse_date.re"
{
timelib_sll w, d;
@@ -11035,7 +11041,7 @@ yy917:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 9183 "<stdout>"
+#line 9189 "<stdout>"
yy918:
YYDEBUG(918, *YYCURSOR);
++YYCURSOR;
@@ -11043,7 +11049,7 @@ yy918:
yy919:
YYDEBUG(919, *YYCURSOR);
-#line 1178 "parse_date.re"
+#line 1184 "parse_date.re"
{
timelib_sll w, d;
@@ -11061,7 +11067,7 @@ yy919:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 9205 "<stdout>"
+#line 9211 "<stdout>"
yy920:
YYDEBUG(920, *YYCURSOR);
yych = *++YYCURSOR;
@@ -11094,7 +11100,7 @@ yy922:
yy923:
YYDEBUG(923, *YYCURSOR);
-#line 1166 "parse_date.re"
+#line 1172 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -11105,7 +11111,7 @@ yy923:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 9241 "<stdout>"
+#line 9247 "<stdout>"
yy924:
YYDEBUG(924, *YYCURSOR);
yych = *++YYCURSOR;
@@ -11181,7 +11187,7 @@ yy929:
yy930:
YYDEBUG(930, *YYCURSOR);
-#line 1136 "parse_date.re"
+#line 1142 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -11191,7 +11197,7 @@ yy930:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 9313 "<stdout>"
+#line 9319 "<stdout>"
yy931:
YYDEBUG(931, *YYCURSOR);
yych = *++YYCURSOR;
@@ -11259,7 +11265,7 @@ yy940:
yy941:
YYDEBUG(941, *YYCURSOR);
-#line 1147 "parse_date.re"
+#line 1153 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_TIME();
@@ -11277,7 +11283,7 @@ yy941:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 9377 "<stdout>"
+#line 9383 "<stdout>"
yy942:
YYDEBUG(942, *YYCURSOR);
yych = *++YYCURSOR;
@@ -11958,7 +11964,7 @@ yy1034:
yy1035:
YYDEBUG(1035, *YYCURSOR);
-#line 1053 "parse_date.re"
+#line 1059 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@@ -11968,7 +11974,7 @@ yy1035:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 9880 "<stdout>"
+#line 9886 "<stdout>"
yy1036:
YYDEBUG(1036, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12751,7 +12757,7 @@ yy1115:
yy1116:
YYDEBUG(1116, *YYCURSOR);
-#line 978 "parse_date.re"
+#line 984 "parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -12772,7 +12778,7 @@ yy1116:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 10518 "<stdout>"
+#line 10524 "<stdout>"
yy1117:
YYDEBUG(1117, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12845,7 +12851,7 @@ yy1123:
yy1124:
YYDEBUG(1124, *YYCURSOR);
-#line 1023 "parse_date.re"
+#line 1029 "parse_date.re"
{
DEBUG_OUTPUT("iso8601nocolon");
TIMELIB_INIT;
@@ -12860,7 +12866,7 @@ yy1124:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 10590 "<stdout>"
+#line 10596 "<stdout>"
yy1125:
YYDEBUG(1125, *YYCURSOR);
yyaccept = 19;
@@ -13038,7 +13044,7 @@ yy1139:
yy1140:
YYDEBUG(1140, *YYCURSOR);
-#line 917 "parse_date.re"
+#line 923 "parse_date.re"
{
timelib_ull i;
@@ -13061,7 +13067,7 @@ yy1140:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 10757 "<stdout>"
+#line 10763 "<stdout>"
yy1141:
YYDEBUG(1141, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13109,7 +13115,7 @@ yy1148:
yy1149:
YYDEBUG(1149, *YYCURSOR);
-#line 905 "parse_date.re"
+#line 911 "parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -13120,7 +13126,7 @@ yy1149:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 10798 "<stdout>"
+#line 10804 "<stdout>"
yy1150:
YYDEBUG(1150, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13137,7 +13143,7 @@ yy1151:
yy1152:
YYDEBUG(1152, *YYCURSOR);
-#line 895 "parse_date.re"
+#line 901 "parse_date.re"
{
DEBUG_OUTPUT("today");
TIMELIB_INIT;
@@ -13146,7 +13152,7 @@ yy1152:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 10818 "<stdout>"
+#line 10824 "<stdout>"
yy1153:
YYDEBUG(1153, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13169,7 +13175,7 @@ yy1154:
yy1155:
YYDEBUG(1155, *YYCURSOR);
-#line 886 "parse_date.re"
+#line 892 "parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -13177,7 +13183,7 @@ yy1155:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 10843 "<stdout>"
+#line 10849 "<stdout>"
yy1156:
YYDEBUG(1156, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13224,7 +13230,7 @@ yy1163:
yy1164:
YYDEBUG(1164, *YYCURSOR);
-#line 874 "parse_date.re"
+#line 880 "parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -13235,10 +13241,10 @@ yy1164:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 10883 "<stdout>"
+#line 10889 "<stdout>"
}
}
-#line 1371 "parse_date.re"
+#line 1377 "parse_date.re"
}
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index e98f405fd8..7d033381e1 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -34,8 +34,14 @@
#include "timelib.h"
#if defined(_MSC_VER)
-#define strcasecmp stricmp
-#define strtoll(s, f, b) _atoi64(s)
+# define strcasecmp stricmp
+# define strtoll(s, f, b) _atoi64(s)
+#elif !defined(HAVE_STRTOLL)
+# if defined(HAVE_ATOLL)
+# define strtoll(s, f, b) atoll(s)
+# else
+# define strtoll(s, f, b) strtol(s, f, b)
+# endif
#endif
#define TIMELIB_SECOND 1
diff --git a/ext/date/lib/resource/parse_date.re b/ext/date/lib/resource/parse_date.re
index e98f405fd8..7d033381e1 100644
--- a/ext/date/lib/resource/parse_date.re
+++ b/ext/date/lib/resource/parse_date.re
@@ -34,8 +34,14 @@
#include "timelib.h"
#if defined(_MSC_VER)
-#define strcasecmp stricmp
-#define strtoll(s, f, b) _atoi64(s)
+# define strcasecmp stricmp
+# define strtoll(s, f, b) _atoi64(s)
+#elif !defined(HAVE_STRTOLL)
+# if defined(HAVE_ATOLL)
+# define strtoll(s, f, b) atoll(s)
+# else
+# define strtoll(s, f, b) strtol(s, f, b)
+# endif
#endif
#define TIMELIB_SECOND 1
diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4
index 6fd8504efe..e0a01ae030 100644
--- a/ext/date/lib/timelib.m4
+++ b/ext/date/lib/timelib.m4
@@ -76,3 +76,5 @@ string.h \
stdlib.h
])
+dnl Check for strtoll, atoll
+AC_CHECK_FUNCS(strtoll atoll)