Modified: hadoop/avro/trunk/lang/c++/configure.in URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/configure.in?rev=899495&r1=899494&r2=899495&view=diff ============================================================================== --- hadoop/avro/trunk/lang/c++/configure.in (original) +++ hadoop/avro/trunk/lang/c++/configure.in Fri Jan 15 00:19:40 2010 @@ -2,14 +2,15 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([avro], [1.0], [[email protected]]) +AC_INIT([avro], [1.2], [[email protected]]) +AC_CONFIG_AUX_DIR([config]) +AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([api/AvroParse.hh]) AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_PROG_CXX -AC_PROG_CC -AC_PROG_RANLIB +AC_PROG_LIBTOOL AC_PROG_LEX AC_PROG_YACC
Copied: hadoop/avro/trunk/lang/c++/parser/AvroLex.ll (from r899492, hadoop/avro/trunk/lang/c++/parser/avro.l) URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/parser/AvroLex.ll?p2=hadoop/avro/trunk/lang/c%2B%2B/parser/AvroLex.ll&p1=hadoop/avro/trunk/lang/c%2B%2B/parser/avro.l&r1=899492&r2=899495&rev=899495&view=diff ============================================================================== --- hadoop/avro/trunk/lang/c++/parser/avro.l (original) +++ hadoop/avro/trunk/lang/c++/parser/AvroLex.ll Fri Jan 15 00:19:40 2010 @@ -17,7 +17,7 @@ limitations under the License. */ -#include "avro.tab.h" +#include "AvroYacc.h" // this undef is a hack for my mac implementation #undef yyFlexLexer Modified: hadoop/avro/trunk/lang/c++/test/testgen.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/test/testgen.cc?rev=899495&r1=899494&r2=899495&view=diff ============================================================================== --- hadoop/avro/trunk/lang/c++/test/testgen.cc (original) +++ hadoop/avro/trunk/lang/c++/test/testgen.cc Fri Jan 15 00:19:40 2010 @@ -17,6 +17,7 @@ */ #include <string.h> +#include <stdlib.h> #include <fstream> #include <sstream> #include <boost/test/included/unit_test_framework.hpp> @@ -166,7 +167,7 @@ { using namespace testgen; - uint8_t fixed[] = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; + uint8_t fixed[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; myRecord.mylong = 212; myRecord.nestedrecord.inval1 = std::numeric_limits<double>::min(); @@ -540,14 +541,23 @@ { using namespace boost::unit_test; - if(argc > 1) { - gWriter = argv[1]; + const char *srcPath = getenv("top_srcdir"); + + if(srcPath) { + std::string srcPathStr(srcPath); + gWriter = srcPathStr + '/' + gWriter; + gReader = srcPathStr + '/' + gReader; } - std::cout << "Using writer schema " << gWriter << std::endl; + else { + if(argc > 1) { + gWriter = argv[1]; + } - if(argc > 2) { - gReader = argv[2]; + if(argc > 2) { + gReader = argv[2]; + } } + std::cout << "Using writer schema " << gWriter << std::endl; std::cout << "Using reader schema " << gReader << std::endl; test_suite* test= BOOST_TEST_SUITE( "Avro C++ unit test suite" ); Modified: hadoop/avro/trunk/lang/c++/test/unittest.cc URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/test/unittest.cc?rev=899495&r1=899494&r2=899495&view=diff ============================================================================== --- hadoop/avro/trunk/lang/c++/test/unittest.cc (original) +++ hadoop/avro/trunk/lang/c++/test/unittest.cc Fri Jan 15 00:19:40 2010 @@ -421,7 +421,6 @@ struct TestEncoding { - void compare(int32_t val) { uint32_t encoded = encodeZigzag32(val); BOOST_CHECK_EQUAL(decodeZigzag32(encoded), val); @@ -440,7 +439,7 @@ IntType diff = stop - start + 1; for(IntType i = 0; i < diff; ++i) { - compare(val++); + compare(val+i); } }
