Home | History | Annotate | Line # | Download | only in import
      1 /* This file is automatically generated.  DO NOT EDIT! */
      2 /* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp  */
      3 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
      4 
      5 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
      6 /* A GNU-like <limits.h>.
      7 
      8    Copyright 2016-2022 Free Software Foundation, Inc.
      9 
     10    This file is free software: you can redistribute it and/or modify
     11    it under the terms of the GNU Lesser General Public License as
     12    published by the Free Software Foundation; either version 2.1 of the
     13    License, or (at your option) any later version.
     14 
     15    This file is distributed in the hope that it will be useful,
     16    but WITHOUT ANY WARRANTY; without even the implied warranty of
     17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     18    GNU Lesser General Public License for more details.
     19 
     20    You should have received a copy of the GNU Lesser General Public License
     21    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
     22 
     23 #if __GNUC__ >= 3
     24 #pragma GCC system_header
     25 #endif
     26 
     27 
     28 #if defined _GL_ALREADY_INCLUDING_LIMITS_H
     29 /* Special invocation convention:
     30    On Haiku/x86_64, we have a sequence of nested includes
     31    <limits.h> -> <syslimits.h> -> <limits.h>.
     32    In this situation, LONG_MAX and INT_MAX are not yet defined,
     33    therefore we should not attempt to define LONG_BIT.  */
     34 
     35 #include_next <limits.h>
     36 
     37 #else
     38 /* Normal invocation convention.  */
     39 
     40 #ifndef _GL_LIMITS_H
     41 
     42 # define _GL_ALREADY_INCLUDING_LIMITS_H
     43 
     44 /* The include_next requires a split double-inclusion guard.  */
     45 # include_next <limits.h>
     46 
     47 # undef _GL_ALREADY_INCLUDING_LIMITS_H
     48 
     49 #ifndef _GL_LIMITS_H
     50 #define _GL_LIMITS_H
     51 
     52 #ifndef LLONG_MIN
     53 # if defined LONG_LONG_MIN /* HP-UX 11.31 */
     54 #  define LLONG_MIN LONG_LONG_MIN
     55 # elif defined LONGLONG_MIN /* IRIX 6.5 */
     56 #  define LLONG_MIN LONGLONG_MIN
     57 # elif defined __GNUC__
     58 #  define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL)
     59 # endif
     60 #endif
     61 #ifndef LLONG_MAX
     62 # if defined LONG_LONG_MAX /* HP-UX 11.31 */
     63 #  define LLONG_MAX LONG_LONG_MAX
     64 # elif defined LONGLONG_MAX /* IRIX 6.5 */
     65 #  define LLONG_MAX LONGLONG_MAX
     66 # elif defined __GNUC__
     67 #  define LLONG_MAX __LONG_LONG_MAX__
     68 # endif
     69 #endif
     70 #ifndef ULLONG_MAX
     71 # if defined ULONG_LONG_MAX /* HP-UX 11.31 */
     72 #  define ULLONG_MAX ULONG_LONG_MAX
     73 # elif defined ULONGLONG_MAX /* IRIX 6.5 */
     74 #  define ULLONG_MAX ULONGLONG_MAX
     75 # elif defined __GNUC__
     76 #  define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
     77 # endif
     78 #endif
     79 
     80 /* The number of usable bits in an unsigned or signed integer type
     81    with minimum value MIN and maximum value MAX, as an int expression
     82    suitable in #if.  Cover all known practical hosts.  This
     83    implementation exploits the fact that MAX is 1 less than a power of
     84    2, and merely counts the number of 1 bits in MAX; "COBn" means
     85    "count the number of 1 bits in the low-order n bits").  */
     86 #define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
     87 #define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
     88 #define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
     89 #define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
     90 #define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
     91 #define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
     92 #define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
     93 
     94 #ifndef WORD_BIT
     95 /* Assume 'int' is 32 bits wide.  */
     96 # define WORD_BIT 32
     97 #endif
     98 #ifndef LONG_BIT
     99 /* Assume 'long' is 32 or 64 bits wide.  */
    100 # if LONG_MAX == INT_MAX
    101 #  define LONG_BIT 32
    102 # else
    103 #  define LONG_BIT 64
    104 # endif
    105 #endif
    106 
    107 /* Macros specified by C2x and by ISO/IEC TS 18661-1:2014.  */
    108 
    109 #if (! defined ULLONG_WIDTH                                             \
    110      && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \
    111          || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)))
    112 # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
    113 # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
    114 # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
    115 # define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
    116 # define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
    117 # define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
    118 # define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
    119 # define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
    120 # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
    121 # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
    122 # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
    123 #endif
    124 
    125 /* Macros specified by C2x.  */
    126 
    127 #if (! defined BOOL_WIDTH \
    128      && (defined _GNU_SOURCE \
    129          || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)))
    130 # define BOOL_MAX 1
    131 # define BOOL_WIDTH 1
    132 #endif
    133 
    134 #endif /* _GL_LIMITS_H */
    135 #endif /* _GL_LIMITS_H */
    136 #endif
    137