Files
media_cas_client/wvutil/include/util_common.h
Lu Chen 5f209e6980 V18.4.0 CAS plugin
Note that this version does not have Widevine Provisioning 4.0 support.
It is only suitable for device upgrades. A new patch with provisioning
4.0 support will be made later.
2024-02-22 13:45:32 -08:00

46 lines
1.2 KiB
C++

// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#ifndef WVCDM_UTIL_UTIL_COMMON_H_
#define WVCDM_UTIL_UTIL_COMMON_H_
// This section deals with defines that are platform-specific.
#ifdef _WIN32
# define CORE_UTIL_IGNORE_DEPRECATED
# define CORE_UTIL_RESTORE_WARNINGS
#else
# ifdef __GNUC__
# define CORE_UTIL_IGNORE_DEPRECATED \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
# define CORE_UTIL_RESTORE_WARNINGS _Pragma("GCC diagnostic pop")
# else
# define CORE_UTIL_IGNORE_DEPRECATED
# define CORE_UTIL_RESTORE_WARNINGS
# endif
#endif
// This section deals with attribute-detection and is platform-agnostic.
#if !defined(__has_cpp_attribute)
# define __has_cpp_attribute(x) 0
#endif
#if __has_cpp_attribute(fallthrough)
# define CORE_UTIL_FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
# define CORE_UTIL_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
# define CORE_UTIL_FALLTHROUGH [[gnu::fallthrough]]
#else
# define CORE_UTIL_FALLTHROUGH
#endif
#endif // WVCDM_UTIL_UTIL_COMMON_H_