patch-LASzip_src_lasindex_cpp 911 B

123456789101112131415161718192021222324252627282930313233
  1. $OpenBSD: patch-LASzip_src_lasindex_cpp,v 1.1 2017/05/04 14:42:42 espie Exp $
  2. Index: LASzip/src/lasindex.cpp
  3. --- LASzip/src/lasindex.cpp.orig
  4. +++ LASzip/src/lasindex.cpp
  5. @@ -45,15 +45,19 @@
  6. #include "bytestreamout_file.hpp"
  7. #ifdef UNORDERED
  8. - // Check if on OS X and using cland (unordered map isn't part of tr1 namespace)
  9. - #if defined(__APPLE__) && defined(__clang__)
  10. - #include <unordered_map>
  11. + // Figure out whether <unordered_map> is in tr1
  12. +# ifdef __has_include
  13. +# if __has_include(<unordered_map>)
  14. +# include <unordered_map>
  15. + using namespace std;
  16. +# define UNORDERED_FOUND
  17. +# endif
  18. +# endif
  19. +# ifndef UNORDERED_FOUND
  20. +# include <tr1/unordered_map>
  21. using namespace std;
  22. - #else
  23. - #include <tr1/unordered_map>
  24. - using namespace std;
  25. using namespace tr1;
  26. - #endif
  27. +# endif
  28. typedef unordered_map<I32,U32> my_cell_hash;
  29. #else
  30. #include <hash_map>