]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - ubuntu/vbox/include/iprt/nocrt/limits.h
2 * IPRT / No-CRT - Our own limits header.
6 * Copyright (C) 2006-2016 Oracle Corporation
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
26 #ifndef ___iprt_nocrt_limits_h
27 #define ___iprt_nocrt_limits_h
29 #include <iprt/types.h>
32 #define SCHAR_MAX 0x7f
33 #define SCHAR_MIN (-0x7f - 1)
34 #define UCHAR_MAX 0xff
35 #if 1 /* ASSUMES: signed char */
36 # define CHAR_MAX SCHAR_MAX
37 # define CHAR_MIN SCHAR_MIN
39 # define CHAR_MAX UCHAR_MAX
44 #define USHRT_MAX 0xffff
45 #define SHRT_MAX 0x7fff
46 #define SHRT_MIN (-0x7fff - 1)
48 /* ASSUMES 32-bit int */
49 #define UINT_MAX 0xffffffffU
50 #define INT_MAX 0x7fffffff
51 #define INT_MIN (-0x7fffffff - 1)
53 #if defined(RT_ARCH_X86) || defined(RT_OS_WINDOWS) || defined(RT_ARCH_SPARC)
55 # define ULONG_MAX 0xffffffffU
56 # define LONG_MAX 0x7fffffff
57 # define LONG_MIN (-0x7fffffff - 1)
58 #elif defined(RT_ARCH_AMD64) || defined(RT_ARCH_SPARC64)
60 # define ULONG_MAX UINT64_C(0xffffffffffffffff)
61 # define LONG_MAX INT64_C(0x7fffffffffffffff)
62 # define LONG_MIN (INT64_C(-0x7fffffffffffffff) - 1)
68 #define ULLONG_MAX UINT64_C(0xffffffffffffffff)
69 #define LLONG_MAX INT64_C(0x7fffffffffffffff)
70 #define LLONG_MIN (INT64_C(-0x7fffffffffffffff) - 1)
73 # define SIZE_T_MAX 0xffffffffU
74 # define SSIZE_MAX 0x7fffffff
76 # define SIZE_T_MAX UINT64_C(0xffffffffffffffff)
77 # define SSIZE_MAX INT64_C(0x7fffffffffffffff)
82 /*#define OFF_MAX __OFF_MAX
83 #define OFF_MIN __OFF_MIN*/