android.cxx 831 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include "android.h"
  2. #ifndef STL_NONE
  3. #include <cmath>
  4. #include <cstdio>
  5. #ifndef STL_SYSTEM
  6. #include <exception>
  7. #include <typeinfo>
  8. #ifndef STL_STLPORT
  9. #include <cxxabi.h>
  10. #endif
  11. #ifndef STL_GABI
  12. #include <iostream>
  13. #include <string>
  14. #endif
  15. #endif
  16. #endif
  17. int main()
  18. {
  19. #if !defined(STL_NONE)
  20. // Require -lm implied by linking as C++.
  21. std::printf("%p\n", static_cast<double (*)(double)>(&std::sin));
  22. #endif
  23. #if defined(STL_NONE)
  24. return 0;
  25. #elif defined(STL_SYSTEM)
  26. return 0;
  27. #else
  28. try {
  29. delete (new int);
  30. } catch (std::exception const& e) {
  31. #if defined(STL_GABI)
  32. e.what();
  33. typeid(e).name();
  34. #else
  35. std::cerr << e.what() << std::endl;
  36. std::cerr << typeid(e).name() << std::endl;
  37. #endif
  38. }
  39. #if defined(STL_GABI)
  40. return 0;
  41. #else
  42. std::string s;
  43. return static_cast<int>(s.size());
  44. #endif
  45. #endif
  46. }