// -*- C++ -*-
//===--------------------------- climits ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCUDACXX_CLIMITS
#define _LIBCUDACXX_CLIMITS

/*
    climits synopsis

Macros:

    CHAR_BIT
    SCHAR_MIN
    SCHAR_MAX
    UCHAR_MAX
    CHAR_MIN
    CHAR_MAX
    MB_LEN_MAX
    SHRT_MIN
    SHRT_MAX
    USHRT_MAX
    INT_MIN
    INT_MAX
    UINT_MAX
    LONG_MIN
    LONG_MAX
    ULONG_MAX
    LLONG_MIN   // C99
    LLONG_MAX   // C99
    ULLONG_MAX  // C99

*/

#include <cuda/std/detail/__config>

#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC)
#  pragma GCC system_header
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG)
#  pragma clang system_header
#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC)
#  pragma system_header
#endif // no system header

#include <cuda/std/__cuda/climits_prelude.h>

_CCCL_PUSH_MACROS

#if defined(_CCCL_COMPILER_MSVC)
#  include <cuda/std/detail/libcxx/include/support/win32/limits_msvc_win32.h>
#endif // _LIBCUDACXX_MSVCRT

#if defined(_CCCL_COMPILER_IBM)
#  include <cuda/std/detail/libcxx/include/support/ibm/limits.h>
#endif // _CCCL_COMPILER_IBM

// ICC defines __CHAR_BIT__ by default
// accept that, but assert it is what we expect
#ifdef __CHAR_BIT__
static_assert(__CHAR_BIT__ == 8, "");
#else
#  define __CHAR_BIT__ 8
#endif

_CCCL_POP_MACROS

#endif // _LIBCUDACXX_CLIMITS
