--- a/include/pqxx/compiler-internal.hxx +++ b/include/pqxx/compiler-internal.hxx @@ -76,7 +76,7 @@ namespace internal { /// Wrapper for std::distance; not all platforms have std::distance(). -template inline ptrdiff_t distance(T first, T last) +template inline PGSTD::ptrdiff_t distance(T first, T last) { #ifdef PQXX_HAVE_DISTANCE return PGSTD::distance(first, last); --- a/test/unit/test_escape.cxx +++ b/test/unit/test_escape.cxx @@ -54,8 +54,8 @@ PQXX_CHECK_EQUAL(t.quote("x"), "'x'", "Basic quote() fails."); PQXX_CHECK_EQUAL(t.quote(1), "'1'", "quote() not dealing with int properly."); PQXX_CHECK_EQUAL(t.quote(0), "'0'", "Quoting zero is a problem."); - const char *const nullptr = NULL; - PQXX_CHECK_EQUAL(t.quote(nullptr), "NULL", "Not quoting NULL correctly."); + const char *const null_ptr = NULL; + PQXX_CHECK_EQUAL(t.quote(null_ptr), "NULL", "Not quoting NULL correctly."); PQXX_CHECK_EQUAL(t.quote(string("'")), "''''", "Escaping quotes goes wrong."); PQXX_CHECK_EQUAL(t.quote("x"),