diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/bits/fenv.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/bits/mathdef.h | 6 | ||||
-rw-r--r-- | sysdeps/generic/bits/wchar.h | 26 | ||||
-rw-r--r-- | sysdeps/generic/inttypes.h | 67 | ||||
-rw-r--r-- | sysdeps/generic/stdint.h | 19 |
5 files changed, 45 insertions, 77 deletions
diff --git a/sysdeps/generic/bits/fenv.h b/sysdeps/generic/bits/fenv.h index b192d94336..a389ad7c58 100644 --- a/sysdeps/generic/bits/fenv.h +++ b/sysdeps/generic/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -58,4 +58,4 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1l) +#define FE_DFL_ENV ((__const fenv_t *) -1l) diff --git a/sysdeps/generic/bits/mathdef.h b/sysdeps/generic/bits/mathdef.h index 0c30b01f52..ad465a9081 100644 --- a/sysdeps/generic/bits/mathdef.h +++ b/sysdeps/generic/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,8 +38,8 @@ typedef double double_t; /* `double' expressions are evaluated as /* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000001 -# define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 (-2147483647) +# define FP_ILOGBNAN 2147483647 /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 diff --git a/sysdeps/generic/bits/wchar.h b/sysdeps/generic/bits/wchar.h new file mode 100644 index 0000000000..33cb52656e --- /dev/null +++ b/sysdeps/generic/bits/wchar.h @@ -0,0 +1,26 @@ +/* wchar_t type related definitions. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_WCHAR_H +#define _BITS_WCHAR_H 1 + +#define __WCHAR_MIN (-127) +#define __WCHAR_MAX (2147483647) + +#endif /* bits/wchar.h */ diff --git a/sysdeps/generic/inttypes.h b/sysdeps/generic/inttypes.h index 1ac9114fc4..16a698b4b5 100644 --- a/sysdeps/generic/inttypes.h +++ b/sysdeps/generic/inttypes.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -262,34 +262,20 @@ __BEGIN_DECLS #if __WORDSIZE == 64 /* We have to define the `uintmax_t' type using `ldiv_t'. */ -# ifndef __ldiv_t_defined -/* Returned by `ldiv'. */ typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ - } ldiv_t; -# define __ldiv_t_defined 1 -# endif - -/* Returned by `imaxdiv'. */ -typedef ldiv_t imaxdiv_t; + } imaxdiv_t; #else /* We have to define the `uintmax_t' type using `lldiv_t'. */ -# ifndef __lldiv_t_defined -/* Returned by `lldiv'. */ -__extension__ typedef struct +typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ - } lldiv_t; -# define __lldiv_t_defined 1 -# endif - -/* Returned by `imaxdiv'. */ -typedef lldiv_t imaxdiv_t; + } imaxdiv_t; #endif @@ -321,28 +307,6 @@ extern uintmax_t wcstoumax (__const wchar_t * __restrict __nptr, # if __WORDSIZE == 64 -/* We ant to use the appropriate functions from <stdlib.h> but cannot - assume the header is read already. */ -__extension__ extern long int labs (long int __x) - __THROW __attribute__ ((__const__)); -__extension__ extern ldiv_t ldiv (long int __numer, long int __denom) - __THROW __attribute__ ((__const__)); - - -/* Compute absolute value of N. */ -extern __inline intmax_t -imaxabs (intmax_t __n) __THROW -{ - return labs (__n); -} - -/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */ -extern __inline imaxdiv_t -imaxdiv (intmax_t __numer, intmax_t __denom) __THROW -{ - return ldiv (__numer, __denom); -} - /* Like `strtol' but convert to `intmax_t'. */ # ifndef __strtol_internal_defined extern long int __strtol_internal (__const char *__restrict __nptr, @@ -405,29 +369,6 @@ wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, # else /* __WORDSIZE == 32 */ -/* We want to use the appropriate functions from <stdlib.h> but cannot - assume the header is read already. */ -__extension__ extern long long int llabs (long long int __x) - __THROW __attribute__ ((__const__)); -__extension__ extern lldiv_t lldiv (long long int __numer, - long long int __denom) - __THROW __attribute__ ((__const__)); - - -/* Compute absolute value of N. */ -extern __inline intmax_t -imaxabs (intmax_t __n) __THROW -{ - return llabs (__n); -} - -/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */ -extern __inline imaxdiv_t -imaxdiv (intmax_t __numer, intmax_t __denom) __THROW -{ - return lldiv (__numer, __denom); -} - /* Like `strtol' but convert to `intmax_t'. */ # ifndef __strtoll_internal_defined __extension__ diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 73f3108a42..cf4f34e823 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -26,6 +26,7 @@ #include <features.h> #define __need_wchar_t #include <stddef.h> +#include <bits/wchar.h> #include <bits/wordsize.h> /* Exact integral types. */ @@ -169,8 +170,8 @@ typedef unsigned long long int uintmax_t; # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ -# define UINT8_MAX (255U) -# define UINT16_MAX (65535U) +# define UINT8_MAX (255) +# define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) @@ -187,8 +188,8 @@ typedef unsigned long long int uintmax_t; # define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types having a minimum size. */ -# define UINT_LEAST8_MAX (255U) -# define UINT_LEAST16_MAX (65535U) +# define UINT_LEAST8_MAX (255) +# define UINT_LEAST16_MAX (65535) # define UINT_LEAST32_MAX (4294967295U) # define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) @@ -215,7 +216,7 @@ typedef unsigned long long int uintmax_t; # define INT_FAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of fast unsigned integral types having a minimum size. */ -# define UINT_FAST8_MAX (255U) +# define UINT_FAST8_MAX (255) # if __WORDSIZE == 64 # define UINT_FAST16_MAX (18446744073709551615UL) # define UINT_FAST32_MAX (18446744073709551615UL) @@ -272,13 +273,13 @@ typedef unsigned long long int uintmax_t; /* Limits of `wchar_t'. */ # ifndef WCHAR_MIN /* These constants might also be defined in <wchar.h>. */ -# define WCHAR_MIN (0) -# define WCHAR_MAX (2147483647) +# define WCHAR_MIN __WCHAR_MIN +# define WCHAR_MAX __WCHAR_MAX # endif /* Limits of `wint_t'. */ -# define WINT_MIN (0) -# define WINT_MAX (2147483647) +# define WINT_MIN (0u) +# define WINT_MAX (2147483647u) #endif /* C++ && limit macros */ |