-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e2b792
commit 8ecd2fd
Showing
44 changed files
with
7,679 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*- | ||
* Copyright (c) 2001 David E. O'Brien | ||
* Copyright (c) 1990 The Regents of the University of California. | ||
* All rights reserved. | ||
* | ||
* This code is derived from software contributed to Berkeley by | ||
* William Jolitz. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 3. All advertising materials mentioning features or use of this software | ||
* must display the following acknowledgement: | ||
* This product includes software developed by the University of | ||
* California, Berkeley and its contributors. | ||
* 4. Neither the name of the University nor the names of its contributors | ||
* may be used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
* SUCH DAMAGE. | ||
* | ||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91 | ||
* $FreeBSD: releng/11.1/sys/x86/include/_align.h 301037 2016-05-31 13:31:19Z ed $ | ||
*/ | ||
|
||
#ifndef _X86_INCLUDE__ALIGN_H_ | ||
#define _X86_INCLUDE__ALIGN_H_ | ||
|
||
/* | ||
* Round p (pointer or byte index) up to a correctly-aligned value | ||
* for all data types (int, long, ...). The result is unsigned int | ||
* and must be cast to any desired pointer type. | ||
*/ | ||
#define _ALIGNBYTES (sizeof(__register_t) - 1) | ||
#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) | ||
|
||
#endif /* !_X86_INCLUDE__ALIGN_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
/*- | ||
* Copyright (c) 2001 The NetBSD Foundation, Inc. | ||
* All rights reserved. | ||
* | ||
* This code is derived from software contributed to The NetBSD Foundation | ||
* by Klaus Klein. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | ||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | ||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
* From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $ | ||
* $FreeBSD: releng/11.1/sys/x86/include/_inttypes.h 217157 2011-01-08 18:09:48Z tijl $ | ||
*/ | ||
|
||
#ifndef _MACHINE_INTTYPES_H_ | ||
#define _MACHINE_INTTYPES_H_ | ||
|
||
/* | ||
* Macros for format specifiers. | ||
*/ | ||
|
||
#ifdef __LP64__ | ||
#define __PRI64 "l" | ||
#define __PRIptr "l" | ||
#else | ||
#define __PRI64 "ll" | ||
#define __PRIptr | ||
#endif | ||
|
||
/* fprintf(3) macros for signed integers. */ | ||
|
||
#define PRId8 "d" /* int8_t */ | ||
#define PRId16 "d" /* int16_t */ | ||
#define PRId32 "d" /* int32_t */ | ||
#define PRId64 __PRI64"d" /* int64_t */ | ||
#define PRIdLEAST8 "d" /* int_least8_t */ | ||
#define PRIdLEAST16 "d" /* int_least16_t */ | ||
#define PRIdLEAST32 "d" /* int_least32_t */ | ||
#define PRIdLEAST64 __PRI64"d" /* int_least64_t */ | ||
#define PRIdFAST8 "d" /* int_fast8_t */ | ||
#define PRIdFAST16 "d" /* int_fast16_t */ | ||
#define PRIdFAST32 "d" /* int_fast32_t */ | ||
#define PRIdFAST64 __PRI64"d" /* int_fast64_t */ | ||
#define PRIdMAX "jd" /* intmax_t */ | ||
#define PRIdPTR __PRIptr"d" /* intptr_t */ | ||
|
||
#define PRIi8 "i" /* int8_t */ | ||
#define PRIi16 "i" /* int16_t */ | ||
#define PRIi32 "i" /* int32_t */ | ||
#define PRIi64 __PRI64"i" /* int64_t */ | ||
#define PRIiLEAST8 "i" /* int_least8_t */ | ||
#define PRIiLEAST16 "i" /* int_least16_t */ | ||
#define PRIiLEAST32 "i" /* int_least32_t */ | ||
#define PRIiLEAST64 __PRI64"i" /* int_least64_t */ | ||
#define PRIiFAST8 "i" /* int_fast8_t */ | ||
#define PRIiFAST16 "i" /* int_fast16_t */ | ||
#define PRIiFAST32 "i" /* int_fast32_t */ | ||
#define PRIiFAST64 __PRI64"i" /* int_fast64_t */ | ||
#define PRIiMAX "ji" /* intmax_t */ | ||
#define PRIiPTR __PRIptr"i" /* intptr_t */ | ||
|
||
/* fprintf(3) macros for unsigned integers. */ | ||
|
||
#define PRIo8 "o" /* uint8_t */ | ||
#define PRIo16 "o" /* uint16_t */ | ||
#define PRIo32 "o" /* uint32_t */ | ||
#define PRIo64 __PRI64"o" /* uint64_t */ | ||
#define PRIoLEAST8 "o" /* uint_least8_t */ | ||
#define PRIoLEAST16 "o" /* uint_least16_t */ | ||
#define PRIoLEAST32 "o" /* uint_least32_t */ | ||
#define PRIoLEAST64 __PRI64"o" /* uint_least64_t */ | ||
#define PRIoFAST8 "o" /* uint_fast8_t */ | ||
#define PRIoFAST16 "o" /* uint_fast16_t */ | ||
#define PRIoFAST32 "o" /* uint_fast32_t */ | ||
#define PRIoFAST64 __PRI64"o" /* uint_fast64_t */ | ||
#define PRIoMAX "jo" /* uintmax_t */ | ||
#define PRIoPTR __PRIptr"o" /* uintptr_t */ | ||
|
||
#define PRIu8 "u" /* uint8_t */ | ||
#define PRIu16 "u" /* uint16_t */ | ||
#define PRIu32 "u" /* uint32_t */ | ||
#define PRIu64 __PRI64"u" /* uint64_t */ | ||
#define PRIuLEAST8 "u" /* uint_least8_t */ | ||
#define PRIuLEAST16 "u" /* uint_least16_t */ | ||
#define PRIuLEAST32 "u" /* uint_least32_t */ | ||
#define PRIuLEAST64 __PRI64"u" /* uint_least64_t */ | ||
#define PRIuFAST8 "u" /* uint_fast8_t */ | ||
#define PRIuFAST16 "u" /* uint_fast16_t */ | ||
#define PRIuFAST32 "u" /* uint_fast32_t */ | ||
#define PRIuFAST64 __PRI64"u" /* uint_fast64_t */ | ||
#define PRIuMAX "ju" /* uintmax_t */ | ||
#define PRIuPTR __PRIptr"u" /* uintptr_t */ | ||
|
||
#define PRIx8 "x" /* uint8_t */ | ||
#define PRIx16 "x" /* uint16_t */ | ||
#define PRIx32 "x" /* uint32_t */ | ||
#define PRIx64 __PRI64"x" /* uint64_t */ | ||
#define PRIxLEAST8 "x" /* uint_least8_t */ | ||
#define PRIxLEAST16 "x" /* uint_least16_t */ | ||
#define PRIxLEAST32 "x" /* uint_least32_t */ | ||
#define PRIxLEAST64 __PRI64"x" /* uint_least64_t */ | ||
#define PRIxFAST8 "x" /* uint_fast8_t */ | ||
#define PRIxFAST16 "x" /* uint_fast16_t */ | ||
#define PRIxFAST32 "x" /* uint_fast32_t */ | ||
#define PRIxFAST64 __PRI64"x" /* uint_fast64_t */ | ||
#define PRIxMAX "jx" /* uintmax_t */ | ||
#define PRIxPTR __PRIptr"x" /* uintptr_t */ | ||
|
||
#define PRIX8 "X" /* uint8_t */ | ||
#define PRIX16 "X" /* uint16_t */ | ||
#define PRIX32 "X" /* uint32_t */ | ||
#define PRIX64 __PRI64"X" /* uint64_t */ | ||
#define PRIXLEAST8 "X" /* uint_least8_t */ | ||
#define PRIXLEAST16 "X" /* uint_least16_t */ | ||
#define PRIXLEAST32 "X" /* uint_least32_t */ | ||
#define PRIXLEAST64 __PRI64"X" /* uint_least64_t */ | ||
#define PRIXFAST8 "X" /* uint_fast8_t */ | ||
#define PRIXFAST16 "X" /* uint_fast16_t */ | ||
#define PRIXFAST32 "X" /* uint_fast32_t */ | ||
#define PRIXFAST64 __PRI64"X" /* uint_fast64_t */ | ||
#define PRIXMAX "jX" /* uintmax_t */ | ||
#define PRIXPTR __PRIptr"X" /* uintptr_t */ | ||
|
||
/* fscanf(3) macros for signed integers. */ | ||
|
||
#define SCNd8 "hhd" /* int8_t */ | ||
#define SCNd16 "hd" /* int16_t */ | ||
#define SCNd32 "d" /* int32_t */ | ||
#define SCNd64 __PRI64"d" /* int64_t */ | ||
#define SCNdLEAST8 "hhd" /* int_least8_t */ | ||
#define SCNdLEAST16 "hd" /* int_least16_t */ | ||
#define SCNdLEAST32 "d" /* int_least32_t */ | ||
#define SCNdLEAST64 __PRI64"d" /* int_least64_t */ | ||
#define SCNdFAST8 "d" /* int_fast8_t */ | ||
#define SCNdFAST16 "d" /* int_fast16_t */ | ||
#define SCNdFAST32 "d" /* int_fast32_t */ | ||
#define SCNdFAST64 __PRI64"d" /* int_fast64_t */ | ||
#define SCNdMAX "jd" /* intmax_t */ | ||
#define SCNdPTR __PRIptr"d" /* intptr_t */ | ||
|
||
#define SCNi8 "hhi" /* int8_t */ | ||
#define SCNi16 "hi" /* int16_t */ | ||
#define SCNi32 "i" /* int32_t */ | ||
#define SCNi64 __PRI64"i" /* int64_t */ | ||
#define SCNiLEAST8 "hhi" /* int_least8_t */ | ||
#define SCNiLEAST16 "hi" /* int_least16_t */ | ||
#define SCNiLEAST32 "i" /* int_least32_t */ | ||
#define SCNiLEAST64 __PRI64"i" /* int_least64_t */ | ||
#define SCNiFAST8 "i" /* int_fast8_t */ | ||
#define SCNiFAST16 "i" /* int_fast16_t */ | ||
#define SCNiFAST32 "i" /* int_fast32_t */ | ||
#define SCNiFAST64 __PRI64"i" /* int_fast64_t */ | ||
#define SCNiMAX "ji" /* intmax_t */ | ||
#define SCNiPTR __PRIptr"i" /* intptr_t */ | ||
|
||
/* fscanf(3) macros for unsigned integers. */ | ||
|
||
#define SCNo8 "hho" /* uint8_t */ | ||
#define SCNo16 "ho" /* uint16_t */ | ||
#define SCNo32 "o" /* uint32_t */ | ||
#define SCNo64 __PRI64"o" /* uint64_t */ | ||
#define SCNoLEAST8 "hho" /* uint_least8_t */ | ||
#define SCNoLEAST16 "ho" /* uint_least16_t */ | ||
#define SCNoLEAST32 "o" /* uint_least32_t */ | ||
#define SCNoLEAST64 __PRI64"o" /* uint_least64_t */ | ||
#define SCNoFAST8 "o" /* uint_fast8_t */ | ||
#define SCNoFAST16 "o" /* uint_fast16_t */ | ||
#define SCNoFAST32 "o" /* uint_fast32_t */ | ||
#define SCNoFAST64 __PRI64"o" /* uint_fast64_t */ | ||
#define SCNoMAX "jo" /* uintmax_t */ | ||
#define SCNoPTR __PRIptr"o" /* uintptr_t */ | ||
|
||
#define SCNu8 "hhu" /* uint8_t */ | ||
#define SCNu16 "hu" /* uint16_t */ | ||
#define SCNu32 "u" /* uint32_t */ | ||
#define SCNu64 __PRI64"u" /* uint64_t */ | ||
#define SCNuLEAST8 "hhu" /* uint_least8_t */ | ||
#define SCNuLEAST16 "hu" /* uint_least16_t */ | ||
#define SCNuLEAST32 "u" /* uint_least32_t */ | ||
#define SCNuLEAST64 __PRI64"u" /* uint_least64_t */ | ||
#define SCNuFAST8 "u" /* uint_fast8_t */ | ||
#define SCNuFAST16 "u" /* uint_fast16_t */ | ||
#define SCNuFAST32 "u" /* uint_fast32_t */ | ||
#define SCNuFAST64 __PRI64"u" /* uint_fast64_t */ | ||
#define SCNuMAX "ju" /* uintmax_t */ | ||
#define SCNuPTR __PRIptr"u" /* uintptr_t */ | ||
|
||
#define SCNx8 "hhx" /* uint8_t */ | ||
#define SCNx16 "hx" /* uint16_t */ | ||
#define SCNx32 "x" /* uint32_t */ | ||
#define SCNx64 __PRI64"x" /* uint64_t */ | ||
#define SCNxLEAST8 "hhx" /* uint_least8_t */ | ||
#define SCNxLEAST16 "hx" /* uint_least16_t */ | ||
#define SCNxLEAST32 "x" /* uint_least32_t */ | ||
#define SCNxLEAST64 __PRI64"x" /* uint_least64_t */ | ||
#define SCNxFAST8 "x" /* uint_fast8_t */ | ||
#define SCNxFAST16 "x" /* uint_fast16_t */ | ||
#define SCNxFAST32 "x" /* uint_fast32_t */ | ||
#define SCNxFAST64 __PRI64"x" /* uint_fast64_t */ | ||
#define SCNxMAX "jx" /* uintmax_t */ | ||
#define SCNxPTR __PRIptr"x" /* uintptr_t */ | ||
|
||
#endif /* !_MACHINE_INTTYPES_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/*- | ||
* Copyright (c) 1988, 1993 | ||
* The Regents of the University of California. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* 4. Neither the name of the University nor the names of its contributors | ||
* may be used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
* SUCH DAMAGE. | ||
* | ||
* @(#)limits.h 8.3 (Berkeley) 1/4/94 | ||
* $FreeBSD: releng/11.1/sys/x86/include/_limits.h 235939 2012-05-24 21:44:46Z obrien $ | ||
*/ | ||
|
||
#ifndef _MACHINE__LIMITS_H_ | ||
#define _MACHINE__LIMITS_H_ | ||
|
||
/* | ||
* According to ANSI (section 2.2.4.2), the values below must be usable by | ||
* #if preprocessing directives. Additionally, the expression must have the | ||
* same type as would an expression that is an object of the corresponding | ||
* type converted according to the integral promotions. The subtraction for | ||
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an | ||
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). | ||
*/ | ||
|
||
#define __CHAR_BIT 8 /* number of bits in a char */ | ||
|
||
#define __SCHAR_MAX 0x7f /* max value for a signed char */ | ||
#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ | ||
|
||
#define __UCHAR_MAX 0xff /* max value for an unsigned char */ | ||
|
||
#define __USHRT_MAX 0xffff /* max value for an unsigned short */ | ||
#define __SHRT_MAX 0x7fff /* max value for a short */ | ||
#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ | ||
|
||
#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ | ||
#define __INT_MAX 0x7fffffff /* max value for an int */ | ||
#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ | ||
|
||
#ifdef __LP64__ | ||
#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ | ||
#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ | ||
#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ | ||
#else | ||
#define __ULONG_MAX 0xffffffffUL | ||
#define __LONG_MAX 0x7fffffffL | ||
#define __LONG_MIN (-0x7fffffffL - 1) | ||
#endif | ||
|
||
/* max value for an unsigned long long */ | ||
#define __ULLONG_MAX 0xffffffffffffffffULL | ||
#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ | ||
#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ | ||
|
||
#ifdef __LP64__ | ||
#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ | ||
#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ | ||
#define __OFF_MAX __LONG_MAX /* max value for an off_t */ | ||
#define __OFF_MIN __LONG_MIN /* min value for an off_t */ | ||
/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ | ||
#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ | ||
#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ | ||
#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ | ||
#define __LONG_BIT 64 | ||
#else | ||
#define __SSIZE_MAX __INT_MAX | ||
#define __SIZE_T_MAX __UINT_MAX | ||
#define __OFF_MAX __LLONG_MAX | ||
#define __OFF_MIN __LLONG_MIN | ||
#define __UQUAD_MAX __ULLONG_MAX | ||
#define __QUAD_MAX __LLONG_MAX | ||
#define __QUAD_MIN __LLONG_MIN | ||
#define __LONG_BIT 32 | ||
#endif | ||
|
||
#define __WORD_BIT 32 | ||
|
||
/* Minimum signal stack size. */ | ||
#define __MINSIGSTKSZ (512 * 4) | ||
|
||
#endif /* !_MACHINE__LIMITS_H_ */ |
Oops, something went wrong.