carnold 2005/06/08 08:53:50
Modified: src date.cpp timebasedrollingpolicy.cpp
tests/src/rolling timebasedrollingtest.cpp
Log:
INT64_C fixes for new code
Revision Changes Path
1.4 +21 -14 logging-log4cxx/src/date.cpp
Index: date.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/date.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- date.cpp 2 Jun 2005 03:46:23 -0000 1.3
+++ date.cpp 8 Jun 2005 15:53:50 -0000 1.4
@@ -14,7 +14,14 @@
* limitations under the License.
*/
- #include <log4cxx/helpers/date.h>
+#include <log4cxx/helpers/date.h>
+
+
+#ifndef INT64_C
+#define INT64_C(x) x ## LL
+#endif
+
+
#include <apr_time.h>
using namespace log4cxx;
using namespace log4cxx::helpers;
@@ -29,17 +36,17 @@
}
Date::~Date() {
-}
-
-log4cxx_time_t Date::getMicrosecondsPerDay() {
- return APR_INT64_C(86400000000);
-}
-
-log4cxx_time_t Date::getMicrosecondsPerSecond() {
- return APR_USEC_PER_SEC;
-}
-
-
-log4cxx_time_t Date::getNextSecond() const {
- return ((time / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC;
+}
+
+log4cxx_time_t Date::getMicrosecondsPerDay() {
+ return APR_INT64_C(86400000000);
+}
+
+log4cxx_time_t Date::getMicrosecondsPerSecond() {
+ return APR_USEC_PER_SEC;
+}
+
+
+log4cxx_time_t Date::getNextSecond() const {
+ return ((time / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC;
}
\ No newline at end of file
1.3 +7 -1 logging-log4cxx/src/timebasedrollingpolicy.cpp
Index: timebasedrollingpolicy.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/timebasedrollingpolicy.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- timebasedrollingpolicy.cpp 1 Jun 2005 20:40:26 -0000 1.2
+++ timebasedrollingpolicy.cpp 8 Jun 2005 15:53:50 -0000 1.3
@@ -16,12 +16,18 @@
#include <log4cxx/rolling/timebasedrollingpolicy.h>
#include <log4cxx/pattern/filedatepatternconverter.h>
-#include <apr_time.h>
#include <log4cxx/helpers/date.h>
#include <log4cxx/rolling/filerenameaction.h>
#include <log4cxx/helpers/loglog.h>
#include <log4cxx/helpers/exception.h>
+#ifndef INT64_C
+#define INT64_C(x) x ## LL
+#endif
+
+#include <apr_time.h>
+
+
using namespace log4cxx;
using namespace log4cxx::rolling;
using namespace log4cxx::helpers;
1.5 +8 -1
logging-log4cxx/tests/src/rolling/timebasedrollingtest.cpp
Index: timebasedrollingtest.cpp
===================================================================
RCS file:
/home/cvs/logging-log4cxx/tests/src/rolling/timebasedrollingtest.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- timebasedrollingtest.cpp 1 Jun 2005 18:40:27 -0000 1.4
+++ timebasedrollingtest.cpp 8 Jun 2005 15:53:50 -0000 1.5
@@ -23,12 +23,19 @@
#include <log4cxx/patternlayout.h>
#include <log4cxx/rolling/timebasedrollingpolicy.h>
#include <log4cxx/helpers/simpledateformat.h>
-#include <apr_time.h>
#include <iostream>
#include <log4cxx/helpers/stringhelper.h>
#include "../util/compare.h"
+#ifndef INT64_C
+#define INT64_C(x) x ## LL
+#endif
+#include <apr_time.h>
+
+
+
+
using namespace log4cxx;
using namespace log4cxx::helpers;
using namespace log4cxx::rolling;