You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
763 B

1 year ago
  1. #pragma once
  2. #include "config.h"
  3. #include <memory>
  4. #include <assert.h>
  5. #if (defined(_MSC_VER) && _MSC_VER <= 1900)
  6. #define alignof(x) __alignof(x)
  7. #endif
  8. #define VLC_UNREACHABLE_CODE(msg) \
  9. assert(!(msg))
  10. #if defined(__clang__) || defined(__GNUC__)
  11. # define VLC_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
  12. #elif defined(_MSC_VER)
  13. # define VLC_DEPRECATED(msg) __declspec(deprecated(msg))
  14. #else
  15. # define VLC_DEPRECATED(msg)
  16. #endif
  17. #ifdef VLC_LIBRARY_SHARED
  18. #ifdef _MSC_VER
  19. #ifdef VLC_LIBRARY_EXPORT
  20. #define VLC_LIBRARY_API __declspec(dllexport)
  21. #else
  22. #define VLC_LIBRARY_API __declspec(dllimport)
  23. #endif
  24. #else
  25. #define VLC_LIBRARY_API __attribute__ ((visibility ("default")))
  26. #endif
  27. #else
  28. #define VLC_LIBRARY_API
  29. #endif