Changeset 810a36f in mainline for abi/include/_bits/limits.h


Ignore:
Timestamp:
2017-10-24T05:29:08Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1eb7ef
Parents:
c8fbbe7 (diff), 673ea28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'types'.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • abi/include/_bits/limits.h

    rc8fbbe7 r810a36f  
    11/*
    2  * Copyright (c) 2006 Ondrej Palkovsky
     2 * Copyright (c) 2017 CZ.NIC, z.s.p.o.
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libcarm32
     29/* Authors:
     30 *      Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com>
     31 */
     32
     33/** @addtogroup bits
    3034 * @{
    3135 */
     
    3337 */
    3438
    35 #ifndef LIBC_arm32_STDINT_H_
    36 #define LIBC_arm32_STDINT_H_
     39#ifndef _BITS_LIMITS_H_
     40#define _BITS_LIMITS_H_
    3741
    38 #include <libarch/common.h>
     42#include <_bits/macros.h>
    3943
    40 #define SIZE_MIN  UINT32_MIN
    41 #define SIZE_MAX  UINT32_MAX
     44/* _MIN macros for unsigned types are non-standard (and of course, always 0),
     45 * but we already have them for some reason, so whatever.
     46 */
    4247
    43 #define UINTPTR_MAX UINT32_MAX
    44 typedef uint32_t uintptr_t;
     48#define CHAR_BIT  __CHAR_BIT__
    4549
    46 #define INTPTR_MIN INT32_MIN
    47 #define INTPTR_MAX INT32_MAX
    48 typedef int32_t intptr_t;
     50#define SCHAR_MIN  __SCHAR_MIN__
     51#define SCHAR_MAX  __SCHAR_MAX__
    4952
    50 #define UINTMAX_MAX UINT64_MAX
    51 typedef uint64_t uintmax_t;
     53#define UCHAR_MIN  0
     54#define UCHAR_MAX  __UCHAR_MAX__
    5255
    53 #define INTMAX_MAX INT64_MAX
    54 typedef int64_t intmax_t;
     56#define CHAR_MIN  __CHAR_MIN__
     57#define CHAR_MAX  __CHAR_MAX__
     58
     59#define MB_LEN_MAX  16
     60
     61#define SHRT_MIN  __SHRT_MIN__
     62#define SHRT_MAX  __SHRT_MAX__
     63
     64#define USHRT_MIN  0
     65#define USHRT_MAX  __USHRT_MAX__
     66
     67#define INT_MIN  __INT_MIN__
     68#define INT_MAX  __INT_MAX__
     69
     70#define UINT_MIN  0U
     71#define UINT_MAX  __UINT_MAX__
     72
     73#define LONG_MIN  __LONG_MIN__
     74#define LONG_MAX  __LONG_MAX__
     75
     76#define ULONG_MIN  0UL
     77#define ULONG_MAX  __ULONG_MAX__
     78
     79#define LLONG_MIN  __LLONG_MIN__
     80#define LLONG_MAX  __LLONG_MAX__
     81
     82#define ULLONG_MIN  0ULL
     83#define ULLONG_MAX  __ULLONG_MAX__
    5584
    5685#endif
Note: See TracChangeset for help on using the changeset viewer.