pgRouting / osm2pgrouting

Import tool for OpenStreetMap data to pgRouting database
https://pgrouting.org
GNU General Public License v2.0
288 stars 112 forks source link

error: use of undeclared identifier 'NULL' #217

Open yurivict opened 6 years ago

yurivict commented 6 years ago

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.
smellman commented 6 years ago

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

yurivict commented 6 years ago

Thanks!

I've just had FreeBSD update libpqxx to 6.0.0.

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

landryb commented 3 years ago

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