osm2pgrouting icon indicating copy to clipboard operation
osm2pgrouting copied to clipboard

error: use of undeclared identifier 'NULL'

Open yurivict opened this issue 7 years ago • 3 comments

On FreeBSD, with clang-40, I am getting such errors: You shouldn't need to use NULL.

/usr/local/include/pqxx/strconv.hxx:133:38: error: use of undeclared identifier 'NULL'
  static const char *null() { return NULL; }
                                     ^
/usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^
include/parser/OSMDocumentParserCallback.h:29:17: note: expanded from macro 'nullptr'
#define nullptr NULL
                ^
10 errors generated.

yurivict avatar Jan 12 '18 08:01 yurivict

It is not osm2pgrouting issue. libpqxx upstream fixed this issue in following commit: https://github.com/jtv/libpqxx/commit/da99354a2a1e9f373cda268147b7a27ac014f7b7#diff-987d68205fedd1c78d8d4bffcba2c49a

smellman avatar Jan 12 '18 08:01 smellman

Thanks!

I've just had FreeBSD update libpqxx to 6.0.0.

So, is this #if for people with outdated libpqxx?

yurivict avatar Jan 12 '18 17:01 yurivict

i think this issue has been fixed by 8dc4e046 - experienced it on OpenBSD with LLVM 10.

landryb avatar Oct 09 '20 16:10 landryb