gnuc.h 568 B

1234567891011121314
  1. /*
  2. * Copyright (C) 2023 Amazon.com, Inc. or its affiliates. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #if !defined(__GNUC_PREREQ) && (defined(__GNUC__) || defined(__GNUG__)) \
  6. && !defined(__clang__) && defined(__GNUC_MINOR__)
  7. /* Depending on the platform the macro is defined in sys/features.h or
  8. features.h Given the macro is simple, we re-implement it here instead of
  9. dealing with two different paths.
  10. */
  11. #define __GNUC_PREREQ(maj, min) \
  12. ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
  13. #endif