The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/EXTERNAL_HEADERS/machine/limits.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
    3  *
    4  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
    5  * 
    6  * This file contains Original Code and/or Modifications of Original Code
    7  * as defined in and that are subject to the Apple Public Source License
    8  * Version 2.0 (the 'License'). You may not use this file except in
    9  * compliance with the License. The rights granted to you under the License
   10  * may not be used to create, or enable the creation or redistribution of,
   11  * unlawful or unlicensed copies of an Apple operating system, or to
   12  * circumvent, violate, or enable the circumvention or violation of, any
   13  * terms of an Apple operating system software license agreement.
   14  * 
   15  * Please obtain a copy of the License at
   16  * http://www.opensource.apple.com/apsl/ and read it before using this file.
   17  * 
   18  * The Original Code and all software distributed under the License are
   19  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
   20  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
   21  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
   22  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
   23  * Please see the License for the specific language governing rights and
   24  * limitations under the License.
   25  * 
   26  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
   27  */
   28 #if !defined (_LIMITS_H___) && !defined (_MACH_MACHLIMITS_H_)
   29 #if defined (__ppc__)
   30 #include <ppc/limits.h>
   31 #elif defined (__i386__)
   32 #include <i386/limits.h>
   33 #elif defined (__arm__)
   34 #include <arm/limits.h>
   35 #else
   36 #error architecture not supported
   37 #endif
   38 #undef MB_LEN_MAX
   39 #endif
   40 #ifndef _LIMITS_H___
   41 #ifndef _MACH_MACHLIMITS_H_
   42 
   43 /* _MACH_MACHLIMITS_H_ is used on OSF/1.  */
   44 #define _LIMITS_H___
   45 #define _MACH_MACHLIMITS_H_
   46 
   47 /* Number of bits in a `char'.  */
   48 #undef CHAR_BIT
   49 #define CHAR_BIT 8
   50 
   51 /* Maximum length of a multibyte character.  */
   52 #ifndef MB_LEN_MAX
   53 #define MB_LEN_MAX 1
   54 #endif
   55 
   56 /* Minimum and maximum values a `signed char' can hold.  */
   57 #undef SCHAR_MIN
   58 #define SCHAR_MIN (-128)
   59 #undef SCHAR_MAX
   60 #define SCHAR_MAX 127
   61 
   62 /* Maximum value an `unsigned char' can hold.  (Minimum is 0).  */
   63 #undef UCHAR_MAX
   64 #define UCHAR_MAX 255
   65 
   66 /* Minimum and maximum values a `char' can hold.  */
   67 #ifdef __CHAR_UNSIGNED__
   68 #undef CHAR_MIN
   69 #define CHAR_MIN 0
   70 #undef CHAR_MAX
   71 #define CHAR_MAX 255
   72 #else
   73 #undef CHAR_MIN
   74 #define CHAR_MIN (-128)
   75 #undef CHAR_MAX
   76 #define CHAR_MAX 127
   77 #endif
   78 
   79 /* Minimum and maximum values a `signed short int' can hold.  */
   80 #undef SHRT_MIN
   81 #define SHRT_MIN (-32768)
   82 #undef SHRT_MAX
   83 #define SHRT_MAX 32767
   84 
   85 /* Maximum value an `unsigned short int' can hold.  (Minimum is 0).  */
   86 #undef USHRT_MAX
   87 #define USHRT_MAX 65535
   88 
   89 /* Minimum and maximum values a `signed int' can hold.  */
   90 #ifndef __INT_MAX__
   91 #define __INT_MAX__ 2147483647
   92 #endif
   93 #undef INT_MIN
   94 #define INT_MIN (-INT_MAX-1)
   95 #undef INT_MAX
   96 #define INT_MAX __INT_MAX__
   97 
   98 /* Maximum value an `unsigned int' can hold.  (Minimum is 0).  */
   99 #undef UINT_MAX
  100 #define UINT_MAX (INT_MAX * 2U + 1)
  101 
  102 /* Minimum and maximum values a `signed long int' can hold.
  103    (Same as `int').  */
  104 #ifndef __LONG_MAX__
  105 #define __LONG_MAX__ 2147483647L
  106 #endif
  107 #undef LONG_MIN
  108 #define LONG_MIN (-LONG_MAX-1)
  109 #undef LONG_MAX
  110 #define LONG_MAX __LONG_MAX__
  111 
  112 /* Maximum value an `unsigned long int' can hold.  (Minimum is 0).  */
  113 #undef ULONG_MAX
  114 #define ULONG_MAX (LONG_MAX * 2UL + 1)
  115 
  116 #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
  117 /* Minimum and maximum values a `signed long long int' can hold.  */
  118 #ifndef __LONG_LONG_MAX__
  119 #define __LONG_LONG_MAX__ 9223372036854775807LL
  120 #endif
  121 #undef LONG_LONG_MIN
  122 #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
  123 #undef LONG_LONG_MAX
  124 #define LONG_LONG_MAX __LONG_LONG_MAX__
  125 
  126 /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
  127 #undef ULONG_LONG_MAX
  128 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
  129 #endif
  130 
  131 #endif /* _MACH_MACHLIMITS_H_ */
  132 #endif /* _LIMITS_H___ */

Cache object: 67b9f1009eecc0823481daddac68631f


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.