Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/libxslt/libxslt/extra.c

Issue 1193533007: Upgrade to libxml 2.9.2 and libxslt 1.1.28 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no iconv Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxslt/libxslt/extra.h ('k') | third_party/libxslt/libxslt/functions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxslt/libxslt/extra.c
diff --git a/third_party/libxslt/libxslt/extra.c b/third_party/libxslt/libxslt/extra.c
index 3a0f547c05d5af77ea5d89869bacb8c3c25b7eab..17df4baef7739082fe8c113a2369ab486fc2fb40 100644
--- a/third_party/libxslt/libxslt/extra.c
+++ b/third_party/libxslt/libxslt/extra.c
@@ -40,9 +40,9 @@
#endif
/************************************************************************
- * *
- * Handling of XSLT debugging *
- * *
+ * *
+ * Handling of XSLT debugging *
+ * *
************************************************************************/
/**
@@ -112,9 +112,9 @@ xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
}
/************************************************************************
- * *
- * Classic extensions as described by M. Kay *
- * *
+ * *
+ * Classic extensions as described by M. Kay *
+ * *
************************************************************************/
/**
@@ -178,14 +178,14 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
time_t gmt, lmt;
struct tm gmt_tm;
struct tm *local_tm;
-
+
if (nargs != 1) {
xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
"localTime() : invalid number of args %d\n", nargs);
ctxt->error = XPATH_INVALID_ARITY;
return;
}
-
+
obj = valuePop(ctxt);
if (obj->type != XPATH_STRING) {
@@ -195,7 +195,7 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
valuePush(ctxt, xmlXPathNewString((const xmlChar *)""));
return;
}
-
+
str = (char *) obj->stringval;
/* str = "$Date$" */
@@ -243,8 +243,11 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
* Calling localtime() has the side-effect of setting timezone.
* After we know the timezone, we can adjust for it
*/
+#if !defined(__FreeBSD__)
lmt = gmt - timezone;
-
+#else /* FreeBSD DOESN'T have such side-ffect */
+ lmt = gmt - local_tm->tm_gmtoff;
+#endif
/*
* FIXME: it's been too long since I did manual memory management.
* (I swore never to do it again.) Does this introduce a memory leak?
« no previous file with comments | « third_party/libxslt/libxslt/extra.h ('k') | third_party/libxslt/libxslt/functions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698