patch-LASzip_src_lasinterval_cpp 903 B

1234567891011121314151617181920212223242526272829303132
  1. $OpenBSD: patch-LASzip_src_lasinterval_cpp,v 1.1 2017/05/04 14:42:42 espie Exp $
  2. Index: LASzip/src/lasinterval.cpp
  3. --- LASzip/src/lasinterval.cpp.orig
  4. +++ LASzip/src/lasinterval.cpp
  5. @@ -43,13 +43,19 @@
  6. using namespace std;
  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. - #else
  12. - #include <tr1/unordered_map>
  13. + // Figure out whether <unordered_map> is in tr1
  14. +# ifdef __has_include
  15. +# if __has_include(<unordered_map>)
  16. +# include <unordered_map>
  17. + using namespace std;
  18. +# define UNORDERED_FOUND
  19. +# endif
  20. +# endif
  21. +# ifndef UNORDERED_FOUND
  22. +# include <tr1/unordered_map>
  23. + using namespace std;
  24. using namespace tr1;
  25. - #endif
  26. +# endif
  27. typedef unordered_map<I32, LASintervalStartCell*> my_cell_hash;
  28. #else
  29. #include <hash_map>