net/poco time_t fix

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

net/poco time_t fix

Christian Weisgerber
Here's a fix so net/poco will build on LP64 archs.

The underlying problem is that Poco's type system assumes that
64-bit quantities are type long on LP64 archs and that long long
only exists on 32-bit archs.

ok?

Index: patches/patch-Foundation_src_PatternFormatter_cpp
===================================================================
RCS file: patches/patch-Foundation_src_PatternFormatter_cpp
diff -N patches/patch-Foundation_src_PatternFormatter_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Foundation_src_PatternFormatter_cpp 17 Aug 2013 17:04:58 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix for long long time_t on LP64 archs.
+
+--- Foundation/src/PatternFormatter.cpp.orig Sat Aug 17 16:38:20 2013
++++ Foundation/src/PatternFormatter.cpp Sat Aug 17 16:38:55 2013
+@@ -123,7 +123,7 @@ void PatternFormatter::format(const Message& msg, std:
+ case 'F': NumberFormatter::append0(text, dateTime.millisecond()*1000 + dateTime.microsecond(), 6); break;
+ case 'z': text.append(DateTimeFormatter::tzdISO(_localTime ? Timezone::tzd() : DateTimeFormatter::UTC)); break;
+ case 'Z': text.append(DateTimeFormatter::tzdRFC(_localTime ? Timezone::tzd() : DateTimeFormatter::UTC)); break;
+- case 'E': NumberFormatter::append(text, msg.getTime().epochTime()); break;
++ case 'E': NumberFormatter::append(text, (Int64)msg.getTime().epochTime()); break;
+ case '[':
+ {
+ ++it;
--
Christian "naddy" Weisgerber                          [hidden email]