Modify tests to compile on AIX with xlC compiler.

- `int64` typedef collision with `sys/inttypes.h`
- `xlC` complains about `int` and pointer comparisons without casts
pull/69/head
Andrew Paprocki 10 years ago
parent 1ddf6937ee
commit af88ccb5fc
  1. 4
      src/google/protobuf/repeated_field.h
  2. 3
      src/google/protobuf/stubs/type_traits_unittest.cc

@ -1307,11 +1307,11 @@ class RepeatedPtrIterator
it_ += d;
return *this;
}
friend iterator operator+(iterator it, difference_type d) {
friend iterator operator+(iterator it, const difference_type d) {
it += d;
return it;
}
friend iterator operator+(difference_type d, iterator it) {
friend iterator operator+(const difference_type d, iterator it) {
it += d;
return it;
}

@ -41,7 +41,10 @@
#include <gtest/gtest.h>
typedef int int32;
// IBM AIX typedefs `int64` in `sys/inttypes.h`, included transitively above.
#ifndef _AIX
typedef long int64;
#endif
using std::string;
using std::vector;

Loading…
Cancel
Save