diff options
-rwxr-xr-x | agbcc/include/float.h | 96 | ||||
-rwxr-xr-x | agbcc/include/iso646.h | 15 | ||||
-rwxr-xr-x | agbcc/include/limits.h | 79 | ||||
-rwxr-xr-x | agbcc/include/stdarg.h | 33 | ||||
-rwxr-xr-x | agbcc/include/stdbool.h | 20 | ||||
-rwxr-xr-x | agbcc/include/stddef.h | 27 | ||||
-rwxr-xr-x | agbcc/include/stdint.h | 191 |
7 files changed, 461 insertions, 0 deletions
diff --git a/agbcc/include/float.h b/agbcc/include/float.h new file mode 100755 index 0000000..7dbe4e9 --- /dev/null +++ b/agbcc/include/float.h @@ -0,0 +1,96 @@ +/* float.h for target with IEEE 32 bit and 64 bit floating point formats */ +#ifndef _FLOAT_H_ +#define _FLOAT_H_ +/* Produced by enquire version 4.3, CWI, Amsterdam */ + + /* Radix of exponent representation */ +#undef FLT_RADIX +#define FLT_RADIX 2 + /* Number of base-FLT_RADIX digits in the significand of a float */ +#undef FLT_MANT_DIG +#define FLT_MANT_DIG 24 + /* Number of decimal digits of precision in a float */ +#undef FLT_DIG +#define FLT_DIG 6 + /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */ +#undef FLT_ROUNDS +#define FLT_ROUNDS 1 + /* Difference between 1.0 and the minimum float greater than 1.0 */ +#undef FLT_EPSILON +#define FLT_EPSILON 1.19209290e-07F + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */ +#undef FLT_MIN_EXP +#define FLT_MIN_EXP (-125) + /* Minimum normalised float */ +#undef FLT_MIN +#define FLT_MIN 1.17549435e-38F + /* Minimum int x such that 10**x is a normalised float */ +#undef FLT_MIN_10_EXP +#define FLT_MIN_10_EXP (-37) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */ +#undef FLT_MAX_EXP +#define FLT_MAX_EXP 128 + /* Maximum float */ +#undef FLT_MAX +#define FLT_MAX 3.40282347e+38F + /* Maximum int x such that 10**x is a representable float */ +#undef FLT_MAX_10_EXP +#define FLT_MAX_10_EXP 38 + + /* Number of base-FLT_RADIX digits in the significand of a double */ +#undef DBL_MANT_DIG +#define DBL_MANT_DIG 53 + /* Number of decimal digits of precision in a double */ +#undef DBL_DIG +#define DBL_DIG 15 + /* Difference between 1.0 and the minimum double greater than 1.0 */ +#undef DBL_EPSILON +#define DBL_EPSILON 2.2204460492503131e-16 + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised double */ +#undef DBL_MIN_EXP +#define DBL_MIN_EXP (-1021) + /* Minimum normalised double */ +#undef DBL_MIN +#define DBL_MIN 2.2250738585072014e-308 + /* Minimum int x such that 10**x is a normalised double */ +#undef DBL_MIN_10_EXP +#define DBL_MIN_10_EXP (-307) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable double */ +#undef DBL_MAX_EXP +#define DBL_MAX_EXP 1024 + /* Maximum double */ +#undef DBL_MAX +#define DBL_MAX 1.7976931348623157e+308 + /* Maximum int x such that 10**x is a representable double */ +#undef DBL_MAX_10_EXP +#define DBL_MAX_10_EXP 308 + + /* Number of base-FLT_RADIX digits in the significand of a long double */ +#undef LDBL_MANT_DIG +#define LDBL_MANT_DIG 53 + /* Number of decimal digits of precision in a long double */ +#undef LDBL_DIG +#define LDBL_DIG 15 + /* Difference between 1.0 and the minimum long double greater than 1.0 */ +#undef LDBL_EPSILON +#define LDBL_EPSILON 2.2204460492503131e-16L + /* Minimum int x such that FLT_RADIX**(x-1) is a normalised long double */ +#undef LDBL_MIN_EXP +#define LDBL_MIN_EXP (-1021) + /* Minimum normalised long double */ +#undef LDBL_MIN +#define LDBL_MIN 2.2250738585072014e-308L + /* Minimum int x such that 10**x is a normalised long double */ +#undef LDBL_MIN_10_EXP +#define LDBL_MIN_10_EXP (-307) + /* Maximum int x such that FLT_RADIX**(x-1) is a representable long double */ +#undef LDBL_MAX_EXP +#define LDBL_MAX_EXP 1024 + /* Maximum long double */ +#undef LDBL_MAX +#define LDBL_MAX 1.7976931348623157e+308L + /* Maximum int x such that 10**x is a representable long double */ +#undef LDBL_MAX_10_EXP +#define LDBL_MAX_10_EXP 308 + +#endif /* _FLOAT_H_ */ diff --git a/agbcc/include/iso646.h b/agbcc/include/iso646.h new file mode 100755 index 0000000..77ebdd3 --- /dev/null +++ b/agbcc/include/iso646.h @@ -0,0 +1,15 @@ +/* Macros for C programs written in national variants of ISO 646. */ + +#ifndef __cplusplus +#define and && +#define and_eq &= +#define bitand & +#define bitor | +#define compl ~ +#define not ! +#define not_eq != +#define or || +#define or_eq |= +#define xor ^ +#define xor_eq ^= +#endif diff --git a/agbcc/include/limits.h b/agbcc/include/limits.h new file mode 100755 index 0000000..3d74de0 --- /dev/null +++ b/agbcc/include/limits.h @@ -0,0 +1,79 @@ +#ifndef _LIMITS_H___ +#define _LIMITS_H___ + +/* Number of bits in a `char'. */ +#undef CHAR_BIT +#define CHAR_BIT 8 + +/* Maximum length of a multibyte character. */ +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 1 +#endif + +/* Minimum and maximum values a `signed char' can hold. */ +#undef SCHAR_MIN +#define SCHAR_MIN (-128) +#undef SCHAR_MAX +#define SCHAR_MAX 127 + +/* Maximum value an `unsigned char' can hold. (Minimum is 0). */ +#undef UCHAR_MAX +#define UCHAR_MAX 255 + +/* Minimum and maximum values a `char' can hold. */ +#undef CHAR_MIN +#define CHAR_MIN 0 +#undef CHAR_MAX +#define CHAR_MAX 255 + +/* Minimum and maximum values a `signed short int' can hold. */ +#undef SHRT_MIN +#define SHRT_MIN -32768 +#undef SHRT_MAX +#define SHRT_MAX 32767 + +/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ +#undef USHRT_MAX +#define USHRT_MAX 65535 + +/* Minimum and maximum values a `signed int' can hold. */ +#ifndef __INT_MAX__ +#define __INT_MAX__ 2147483647 +#endif +#undef INT_MIN +#define INT_MIN (-INT_MAX-1) +#undef INT_MAX +#define INT_MAX __INT_MAX__ + +/* Maximum value an `unsigned int' can hold. (Minimum is 0). */ +#undef UINT_MAX +#define UINT_MAX (INT_MAX * 2U + 1) + +/* Minimum and maximum values a `signed long int' can hold. + (Same as `int'). */ +#ifndef __LONG_MAX__ +#define __LONG_MAX__ 2147483647L +#endif +#undef LONG_MIN +#define LONG_MIN (-LONG_MAX-1) +#undef LONG_MAX +#define LONG_MAX __LONG_MAX__ + +/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ +#undef ULONG_MAX +#define ULONG_MAX (LONG_MAX * 2UL + 1) + +/* Minimum and maximum values a `signed long long int' can hold. */ +#ifndef __LONG_LONG_MAX__ +#define __LONG_LONG_MAX__ 9223372036854775807LL +#endif +#undef LONG_LONG_MIN +#define LONG_LONG_MIN (-LONG_LONG_MAX-1) +#undef LONG_LONG_MAX +#define LONG_LONG_MAX __LONG_LONG_MAX__ + +/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */ +#undef ULONG_LONG_MAX +#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1) + +#endif /* _LIMITS_H___ */ diff --git a/agbcc/include/stdarg.h b/agbcc/include/stdarg.h new file mode 100755 index 0000000..fe80744 --- /dev/null +++ b/agbcc/include/stdarg.h @@ -0,0 +1,33 @@ +/* stdarg.h for GNU. + Note that the type used in va_arg is supposed to match the + actual type **after default promotions**. + Thus, va_arg (..., short) is not valid. */ + +#ifndef _STDARG_H +#define _STDARG_H + +typedef void *__gnuc_va_list; + +/* Amount of space required in an argument list for an arg of type TYPE. + TYPE may alternatively be an expression whose type is used. */ +#define __va_rounded_size(TYPE) \ + (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) + +#define va_start(AP, LASTARG) \ + (AP = ((__gnuc_va_list) __builtin_next_arg(LASTARG))) + +#define va_end(AP) ((void)0) + +/* We cast to void * and then to TYPE * because this avoids + a warning about increasing the alignment requirement. + This is for little-endian machines; small args are padded upward. */ +#define va_arg(AP, TYPE) \ + (AP = (__gnuc_va_list)((char *)(AP) + __va_rounded_size(TYPE)), \ + *((TYPE *)(void *)((char *)(AP) - __va_rounded_size(TYPE)))) + +/* Copy __gnuc_va_list into another variable of this type. */ +#define __va_copy(dest, src) (dest) = (src) + +typedef __gnuc_va_list va_list; + +#endif /* not _STDARG_H */ diff --git a/agbcc/include/stdbool.h b/agbcc/include/stdbool.h new file mode 100755 index 0000000..0baf9ce --- /dev/null +++ b/agbcc/include/stdbool.h @@ -0,0 +1,20 @@ +/* stdbool.h for GNU. */ +#ifndef __STDBOOL_H__ +#define __STDBOOL_H__ 1 + +/* The type `bool' must promote to `int' or `unsigned int'. The constants + `true' and `false' must have the value 0 and 1 respectively. */ +typedef enum + { + false = 0, + true = 1 + } bool; + +/* The names `true' and `false' must also be made available as macros. */ +#define false false +#define true true + +/* Signal that all the definitions are present. */ +#define __bool_true_false_are_defined 1 + +#endif /* stdbool.h */ diff --git a/agbcc/include/stddef.h b/agbcc/include/stddef.h new file mode 100755 index 0000000..6c60d76 --- /dev/null +++ b/agbcc/include/stddef.h @@ -0,0 +1,27 @@ +#ifndef _STDDEF_H +#define _STDDEF_H + +/* Signed type of difference of two pointers. */ + +typedef long int ptrdiff_t; + +/* Unsigned type of `sizeof' something. */ + +typedef unsigned long int size_t; + +/* Wide character type. + Locale-writers should change this as necessary to + be big enough to hold unique values not between 0 and 127, + and not (wchar_t) -1, for each defined multibyte character. */ + +typedef int wchar_t; + +/* A null pointer constant. */ + +#define NULL ((void *)0) + +/* Offset of member MEMBER in a struct of type TYPE. */ + +#define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) + +#endif /* _STDDEF_H */ diff --git a/agbcc/include/stdint.h b/agbcc/include/stdint.h new file mode 100755 index 0000000..be26218 --- /dev/null +++ b/agbcc/include/stdint.h @@ -0,0 +1,191 @@ +/* Copyright (C) 2008-2016 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + +/* + * ISO C Standard: 7.18 Integer types <stdint.h> + */ + +#ifndef _STDINT_H +#define _STDINT_H + +#include "limits.h" + +/* 7.8.1.1 Exact-width integer types */ + +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef long long int64_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long long uint64_t; + +/* 7.8.1.2 Minimum-width integer types */ + +typedef signed char int_least8_t; +typedef short int_least16_t; +typedef int int_least32_t; +typedef long long int_least64_t; +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long long uint_least64_t; + +/* 7.8.1.3 Fastest minimum-width integer types */ + +typedef int int_fast8_t; +typedef int int_fast16_t; +typedef int int_fast32_t; +typedef long long int_fast64_t; +typedef unsigned int uint_fast8_t; +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +typedef unsigned long long uint_fast64_t; + +/* 7.8.1.4 Integer types capable of holding object pointers */ + +typedef int intptr_t; +typedef unsigned int uintptr_t; + +/* 7.8.1.5 Greatest-width integer types */ + +typedef long long intmax_t; +typedef unsigned long long uintmax_t; + +/* 7.18.2 Limits of specified-width integer types */ + +#undef INT8_MIN +#define INT8_MIN SCHAR_MIN +#undef INT8_MAX +#define INT8_MAX SCHAR_MAX +#undef UINT8_MAX +#define UINT8_MAX UCHAR_MAX + +#undef INT16_MIN +#define INT16_MIN SHRT_MIN +#undef INT16_MAX +#define INT16_MAX SHRT_MAX +#undef UINT16_MAX +#define UINT16_MAX USHRT_MAX + +#undef INT32_MIN +#define INT32_MIN INT_MIN +#undef INT32_MAX +#define INT32_MAX INT_MAX +#undef UINT32_MAX +#define UINT32_MAX UINT_MAX + +#undef INT64_MIN +#define INT64_MIN LONG_LONG_MIN +#undef INT64_MAX +#define INT64_MAX LONG_LONG_MAX +#undef UINT64_MAX +#define UINT64_MAX ULONG_LONG_MAX + +#undef INT_LEAST8_MIN +#define INT_LEAST8_MIN SCHAR_MIN +#undef INT_LEAST8_MAX +#define INT_LEAST8_MAX SCHAR_MAX +#undef UINT_LEAST8_MAX +#define UINT_LEAST8_MAX UCHAR_MAX + +#undef INT_LEAST16_MIN +#define INT_LEAST16_MIN SHRT_MIN +#undef INT_LEAST16_MAX +#define INT_LEAST16_MAX SHRT_MAX +#undef UINT_LEAST16_MAX +#define UINT_LEAST16_MAX USHRT_MAX + +#undef INT_LEAST32_MIN +#define INT_LEAST32_MIN INT_MIN +#undef INT_LEAST32_MAX +#define INT_LEAST32_MAX INT_MAX +#undef UINT_LEAST32_MAX +#define UINT_LEAST32_MAX UINT_MAX + +#undef INT_LEAST64_MIN +#define INT_LEAST64_MIN LONG_LONG_MIN +#undef INT_LEAST64_MAX +#define INT_LEAST64_MAX LONG_LONG_MAX +#undef UINT_LEAST64_MAX +#define UINT_LEAST64_MAX ULONG_LONG_MAX + +#undef INT_FAST8_MIN +#define INT_FAST8_MIN INT_MIN +#undef INT_FAST8_MAX +#define INT_FAST8_MAX INT_MAX +#undef UINT_FAST8_MAX +#define UINT_FAST8_MAX UINT_MAX + +#undef INT_FAST16_MIN +#define INT_FAST16_MIN INT_MIN +#undef INT_FAST16_MAX +#define INT_FAST16_MAX INT_MAX +#undef UINT_FAST16_MAX +#define UINT_FAST16_MAX UINT_MAX + +#undef INT_FAST32_MIN +#define INT_FAST32_MIN INT_MIN +#undef INT_FAST32_MAX +#define INT_FAST32_MAX INT_MAX +#undef UINT_FAST32_MAX +#define UINT_FAST32_MAX UINT_MAX + +#undef INT_FAST64_MIN +#define INT_FAST64_MIN LONG_LONG_MIN +#undef INT_FAST64_MAX +#define INT_FAST64_MAX LONG_LONG_MAX +#undef UINT_FAST64_MAX +#define UINT_FAST64_MAX ULONG_LONG_MAX + +#undef INTPTR_MIN +#define INTPTR_MIN INT_MIN +#undef INTPTR_MAX +#define INTPTR_MAX INT_MAX +#undef UINTPTR_MAX +#define UINTPTR_MAX UINT_MAX + +#undef INTMAX_MIN +#define INTMAX_MIN LONG_LONG_MIN +#undef INTMAX_MAX +#define INTMAX_MAX LONG_LONG_MAX +#undef UINTMAX_MAX +#define UINTMAX_MAX ULONG_LONG_MAX + +/* 7.18.3 Limits of other integer types */ + +#undef PTRDIFF_MIN +#define PTRDIFF_MIN INT_MIN +#undef PTRDIFF_MAX +#define PTRDIFF_MAX INT_MAX + +#undef SIZE_MAX +#define SIZE_MAX UINT_MAX + +#undef WCHAR_MIN +#define WCHAR_MIN INT_MIN +#undef WCHAR_MAX +#define WCHAR_MAX INT_MAX + +#endif /* _STDINT_H */ |