ua_config.h.in 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef UA_CONFIG_H_
  2. #define UA_CONFIG_H_
  3. /* Build options and configuration (set by cmake) */
  4. #define UA_LOGLEVEL ${UA_LOGLEVEL}
  5. #cmakedefine UA_MULTITHREADING
  6. /* Function Export */
  7. #ifdef _WIN32
  8. # ifdef UA_DYNAMIC_LINKING
  9. # ifdef __GNUC__
  10. # define UA_EXPORT __attribute__ ((dllexport))
  11. # else
  12. # define UA_EXPORT __declspec(dllexport)
  13. # endif
  14. # else
  15. # ifdef __GNUC__
  16. # define UA_EXPORT __attribute__ ((dllexport))
  17. # else
  18. # define UA_EXPORT __declspec(dllimport)
  19. # endif
  20. # endif
  21. #else
  22. # if __GNUC__ || __clang__
  23. # define UA_EXPORT __attribute__ ((visibility ("default")))
  24. # else
  25. # define UA_EXPORT
  26. # endif
  27. #endif
  28. /* Define your own htoleXX and leXXtoh here if needed.
  29. Otherwise the ones defined in endian.h are used */
  30. // #define htole16(x) {...}(x)
  31. // #define htole32(x) {...}(x)
  32. // #define htole64(x) {...}(x)
  33. // #define le16toh(x) {...}(x)
  34. // #define le32toh(x) {...}(x)
  35. // #define le64toh(x) {...}(x)
  36. #if defined(htole16) || defined(htole32) || defined(htole64) || \
  37. defined(le16toh) || defined(le32toh) || defined(le64toh)
  38. #define UA_NON_LITTLEENDIAN_ARCHITECTURE
  39. #endif
  40. #endif /* UA_CONFIG_H_ */