Mod Cplusplus CVS committal
Author : johnksterling
Project : apr_cplusplus
Module : test
Dir : apr_cplusplus/test
Modified Files:
Makefile.am test_time.cpp
Log Message:
make the tests build on darwin. currently more than half pass - i think they are pst vs est issues. working on them now.
===================================================================
RCS file: /cvsroot/modcplusplus/apr_cplusplus/test/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- Makefile.am 23 Feb 2002 21:14:50 -0000 1.7
+++ Makefile.am 15 Nov 2003 16:00:01 -0000 1.8
@@ -2,14 +2,14 @@
LIB_PTHREAD=@LIB_PTHREAD@
LIB_DL=@LIB_DL@
-LDFLAGS += -export-dynamic
+LDFLAGS=-export-dynamic
STANDARD_LDADDS = $(top_srcdir)/src/tables/libcpp_tables.la \
$(top_srcdir)/src/times/libcpp_times.la \
$(top_srcdir)/src/exceptions/libcpp_exceptions.la \
$(top_srcdir)/src/files/libcpp_files.la \
- $(LIB_PTHREAD) $(LIB_DL) -lcrypt \
- $(APR_DIR)/libapr.la
+ $(LIB_PTHREAD) $(LIB_DL) \
+ $(APR_DIR)/lib/libapr-0.la
noinst_PROGRAMS = \
test_hash \
===================================================================
RCS file: /cvsroot/modcplusplus/apr_cplusplus/test/test_time.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- test_time.cpp 19 Feb 2002 04:15:17 -0000 1.1
+++ test_time.cpp 15 Nov 2003 16:00:01 -0000 1.2
@@ -1,9 +1,14 @@
#include <string.h>
#include <stdio.h>
+// since this is a cplusplus program you ne3ed the constants macros explicitly set
+#define __STDC_CONSTANT_MACROS 1
+#include <stdint.h>
+#include <time.h>
#include "apr_general.h"
#include "apr.h"
#include "cpp_time.h"
+
/* this is Thu Jul 22 09:13:20 1976 Pacific */
#define TEST_TIME 206900000
#define RFC822_DATE "Thu, 22 Jul 1976 16:13:20 GMT"
@@ -125,9 +130,9 @@
int res = 0;
APRTime *pTime = new APRTime(pool, (time_t)TEST_TIME);
APRTime *implodedTime;
- apr_exploded_time_t *xTime;
- apr_exploded_time_t *xGMTTime;
- apr_exploded_time_t *xLocalTime;
+ apr_time_exp_t *xTime;
+ apr_time_exp_t *xGMTTime;
+ apr_time_exp_t *xLocalTime;
xTime = pTime->ExplodedTime(0);
xGMTTime = pTime->ExplodedGMTTime();
|