aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-01 06:39:10 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-01 06:39:10 +0000
commit417bafec1e0be945a745cb5f1ba95ac30524af21 (patch)
treefe5862a93c403c604880c59e714bfb42ffe7be7c
parent7921bb7220e9d70610d27af59c6af68fecedbdcf (diff)
downloadglibc-417bafec1e0be945a745cb5f1ba95ac30524af21.zip
glibc-417bafec1e0be945a745cb5f1ba95ac30524af21.tar.gz
glibc-417bafec1e0be945a745cb5f1ba95ac30524af21.tar.bz2
Update.
* stdlib/Makefile (headers): Add bits/wchar.h. * sysdeps/unix/sysv/linux/i386/bits/wchar.h: New file. * sysdeps/generic/bits/wchar.h: New file. * sysdeps/generic/stdint.h: Include <bits/wchar.h>. Use values in this file to define WCHAR_MIN and WCHAR_MAX. Change UINT*8_MAX and UIN*16_MAX value to type int. * wcsmbs/wchar.h: Include <bits/wchar.h>. Use values in this file to define WCHAR_MIN and WCHAR_MAX. * sysdeps/alpha/fpu/bits/mathdef.h: Make FP_ILOGB0 and FP_ILOGBNAN int values. * sysdeps/arm/fpu/bits/mathdef.h: Likewise. * sysdeps/generic/bits/mathdef.h: Likewise. * sysdeps/i386/fpu/bits/mathdef.h: Likewise. * sysdeps/m68k/fpu/bits/mathdef.h: Likewise. * sysdeps/powerpc/fpu/bits/mathdef.h: Likewise. * sysdeps/sparc/fpu/bits/mathdef.h: Likewise. * locale/locale.h (struct lconv): Add __ prefix to the new members if not C99. * sysdeps/generic/inttypes.h: Remove unnecessary imaxabs and imaxdiv optimizations. * sysdeps/wordsize-32/lldiv.c: Add hack to make alias work. * sysdeps/wordsize-64/ldiv.c: Likewise. * sysdeps/alpha/fpu/bits/fenv.h: Change type of FE_*_ENV macros to const fenv_t*. * sysdeps/generic/bits/fenv.h: Likewise. * sysdeps/i386/fpu/bits/fenv.h: Likewise. * sysdeps/ia64/bits/fenv.h: Likewise. * sysdeps/m68k/fpu/bits/fenv.h: Likewise. * sysdeps/mips/bits/fenv.h: Likewise. * sysdeps/s390/fpu/bits/fenv.h: Likewise. * sysdeps/sparc/fpu/bits/fenv.h: Likewise. Reported by Joseph S. Myers <jsm28@cam.ac.uk>. * catgets/open_catalog.c: Likewise.
-rw-r--r--ChangeLog34
-rw-r--r--bits/fenv.h4
-rw-r--r--bits/mathdef.h6
-rw-r--r--bits/wchar.h26
-rw-r--r--catgets/open_catalog.c4
-rw-r--r--locale/locale.h9
-rw-r--r--stdlib/Makefile2
-rw-r--r--sysdeps/alpha/fpu/bits/fenv.h6
-rw-r--r--sysdeps/alpha/fpu/bits/mathdef.h6
-rw-r--r--sysdeps/arm/fpu/bits/mathdef.h4
-rw-r--r--sysdeps/generic/bits/fenv.h4
-rw-r--r--sysdeps/generic/bits/mathdef.h6
-rw-r--r--sysdeps/generic/bits/wchar.h26
-rw-r--r--sysdeps/generic/inttypes.h67
-rw-r--r--sysdeps/generic/stdint.h19
-rw-r--r--sysdeps/i386/fpu/bits/fenv.h6
-rw-r--r--sysdeps/i386/fpu/bits/mathdef.h6
-rw-r--r--sysdeps/ia64/bits/fenv.h4
-rw-r--r--sysdeps/m68k/fpu/bits/fenv.h6
-rw-r--r--sysdeps/m68k/fpu/bits/mathdef.h6
-rw-r--r--sysdeps/mips/bits/fenv.h4
-rw-r--r--sysdeps/powerpc/fpu/bits/mathdef.h6
-rw-r--r--sysdeps/s390/fpu/bits/fenv.h21
-rw-r--r--sysdeps/sparc/fpu/bits/fenv.h6
-rw-r--r--sysdeps/sparc/fpu/bits/mathdef.h6
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/wchar.h26
-rw-r--r--sysdeps/wordsize-32/lldiv.c6
-rw-r--r--sysdeps/wordsize-64/ldiv.c6
-rw-r--r--wcsmbs/wchar.h6
29 files changed, 205 insertions, 133 deletions
diff --git a/ChangeLog b/ChangeLog
index c13ce18..9243186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,41 @@
2000-08-31 Ulrich Drepper <drepper@redhat.com>
+ * stdlib/Makefile (headers): Add bits/wchar.h.
+ * sysdeps/unix/sysv/linux/i386/bits/wchar.h: New file.
+ * sysdeps/generic/bits/wchar.h: New file.
+ * sysdeps/generic/stdint.h: Include <bits/wchar.h>. Use values in this
+ file to define WCHAR_MIN and WCHAR_MAX.
+ Change UINT*8_MAX and UIN*16_MAX value to type int.
+ * wcsmbs/wchar.h: Include <bits/wchar.h>. Use values in this
+ file to define WCHAR_MIN and WCHAR_MAX.
+ * sysdeps/alpha/fpu/bits/mathdef.h: Make FP_ILOGB0 and FP_ILOGBNAN
+ int values.
+ * sysdeps/arm/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/generic/bits/mathdef.h: Likewise.
+ * sysdeps/i386/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/m68k/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/powerpc/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/sparc/fpu/bits/mathdef.h: Likewise.
+ * locale/locale.h (struct lconv): Add __ prefix to the new members
+ if not C99.
+ * sysdeps/generic/inttypes.h: Remove unnecessary imaxabs and
+ imaxdiv optimizations.
+ * sysdeps/wordsize-32/lldiv.c: Add hack to make alias work.
+ * sysdeps/wordsize-64/ldiv.c: Likewise.
+ * sysdeps/alpha/fpu/bits/fenv.h: Change type of FE_*_ENV macros to
+ const fenv_t*.
+ * sysdeps/generic/bits/fenv.h: Likewise.
+ * sysdeps/i386/fpu/bits/fenv.h: Likewise.
+ * sysdeps/ia64/bits/fenv.h: Likewise.
+ * sysdeps/m68k/fpu/bits/fenv.h: Likewise.
+ * sysdeps/mips/bits/fenv.h: Likewise.
+ * sysdeps/s390/fpu/bits/fenv.h: Likewise.
+ * sysdeps/sparc/fpu/bits/fenv.h: Likewise.
+ Reported by Joseph S. Myers <jsm28@cam.ac.uk>.
+
* inet/rcmd.c: Use *stat64 instead of *stat internally.
* inet/ruserpass.c: Likewise.
+ * catgets/open_catalog.c: Likewise.
* intl/loadmsgcat.c: Likewise.
* io/getdirname.c: Likewise.
* locale/loadlocale.c: Likewise.
diff --git a/bits/fenv.h b/bits/fenv.h
index b192d94..a389ad7 100644
--- a/bits/fenv.h
+++ b/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/bits/mathdef.h b/bits/mathdef.h
index 0c30b01..ad465a9 100644
--- a/bits/mathdef.h
+++ b/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/bits/wchar.h b/bits/wchar.h
new file mode 100644
index 0000000..33cb526
--- /dev/null
+++ b/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/catgets/open_catalog.c b/catgets/open_catalog.c
index d778255..8e01767 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -39,7 +39,7 @@ void
__open_catalog (__nl_catd catalog)
{
int fd = -1;
- struct stat st;
+ struct stat64 st;
int swapping;
size_t cnt;
size_t max_offset;
@@ -199,7 +199,7 @@ __open_catalog (__nl_catd catalog)
goto unlock_return;
}
- if (__builtin_expect (__fxstat (_STAT_VER, fd, &st), 0) < 0)
+ if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
{
catalog->status = nonexisting;
goto close_unlock_return;
diff --git a/locale/locale.h b/locale/locale.h
index 768d2b6..0fabedc 100644
--- a/locale/locale.h
+++ b/locale/locale.h
@@ -90,6 +90,7 @@ struct lconv
4 The sign string immediately follows the currency_symbol. */
char p_sign_posn;
char n_sign_posn;
+#ifdef __USE_ISOC99
/* 1 if int_curr_symbol precedes a positive value, 0 if succeeds. */
char int_p_cs_precedes;
/* 1 iff a space separates int_curr_symbol from a positive value. */
@@ -106,6 +107,14 @@ struct lconv
4 The sign string immediately follows the int_curr_symbol. */
char int_p_sign_posn;
char int_n_sign_posn;
+#else
+ char __int_p_cs_precedes;
+ char __int_p_sep_by_space;
+ char __int_n_cs_precedes;
+ char __int_n_sep_by_space;
+ char __int_p_sign_posn;
+ char __int_n_sign_posn;
+#endif
};
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 65df53d..6a0d39b 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@
subdir := stdlib
headers := stdlib.h alloca.h monetary.h fmtmsg.h ucontext.h sys/ucontext.h \
- inttypes.h stdint.h bits/wordsize.h
+ inttypes.h stdint.h bits/wordsize.h bits/wchar.h
routines := \
atof atoi atol atoll \
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index b6d9b98..fe6c253 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -107,15 +107,15 @@ typedef unsigned long int fenv_t;
/* If the default argument is used we use this value. Note that due to
architecture-specified page mappings, no user-space pointer will ever
have its two high bits set. Co-opt one. */
-#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL)
+#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL)
#ifdef __USE_GNU
/* Floating-point environment where none of the exceptions are masked. */
-# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL)
+# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL)
/* Floating-point environment with (processor-dependent) non-IEEE floating
point. In this case, mapping denormals to zero. */
-# define FE_NONIEEE_ENV ((fenv_t *) 0x8800000000003000UL)
+# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL)
#endif
/* The system calls to talk to the kernel's FP code. */
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 30f93dd..3b80e82 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/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
@@ -67,8 +67,8 @@ typedef double double_t;
# endif
/* 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/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h
index cb0c348..374ad67 100644
--- a/sysdeps/arm/fpu/bits/mathdef.h
+++ b/sysdeps/arm/fpu/bits/mathdef.h
@@ -37,8 +37,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/fenv.h b/sysdeps/generic/bits/fenv.h
index b192d94..a389ad7 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 0c30b01..ad465a9 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 0000000..33cb526
--- /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 1ac9114..16a698b 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 73f3108..cf4f34e 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 */
diff --git a/sysdeps/i386/fpu/bits/fenv.h b/sysdeps/i386/fpu/bits/fenv.h
index 08bf676..01ae50c 100644
--- a/sysdeps/i386/fpu/bits/fenv.h
+++ b/sysdeps/i386/fpu/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
@@ -82,9 +82,9 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
#ifdef __USE_GNU
/* Floating-point environment where none of the exception is masked. */
-# define FE_NOMASK_ENV ((fenv_t *) -2)
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
diff --git a/sysdeps/i386/fpu/bits/mathdef.h b/sysdeps/i386/fpu/bits/mathdef.h
index 9436877..70429ff 100644
--- a/sysdeps/i386/fpu/bits/mathdef.h
+++ b/sysdeps/i386/fpu/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 long double double_t; /* `double' expressions are evaluated as
# define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
-# define FP_ILOGB0 0x80000000
-# define FP_ILOGBNAN 0x80000000
+# define FP_ILOGB0 (-2147483648)
+# define FP_ILOGBNAN (-2147483648)
/* Number of decimal digits for the `long double' type. */
# define DECIMAL_DIG 18
diff --git a/sysdeps/ia64/bits/fenv.h b/sysdeps/ia64/bits/fenv.h
index 46e53ae..9c3bd47 100644
--- a/sysdeps/ia64/bits/fenv.h
+++ b/sysdeps/ia64/bits/fenv.h
@@ -73,10 +73,10 @@ typedef unsigned long fexcept_t;
typedef unsigned long fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) 0xc009804c0270033fUL)
+#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL)
#ifdef __USE_GNU
/* Floating-point environment where only FE_UNNORMAL is masked since this
exception is not generally supported by glibc. */
-# define FE_NOMASK_ENV ((fenv_t *) 0xc009804c02700302UL)
+# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL)
#endif
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index 3138fef..7d489b3 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/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
@@ -71,9 +71,9 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
#ifdef __USE_GNU
/* Floating-point environment where none of the exceptions are masked. */
-# define FE_NOMASK_ENV ((fenv_t *) -2)
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index c80dad3..7b09882 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/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 long double double_t; /* `double' expressions are evaluated as
# define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
-# define FP_ILOGB0 0x80000000
-# define FP_ILOGBNAN 0x7fffffff
+# define FP_ILOGB0 (-2147483648)
+# define FP_ILOGBNAN (2147483647)
/* Number of decimal digits for the `long double' type. */
# define DECIMAL_DIG 18
diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h
index efa90b6..72dd281 100644
--- a/sysdeps/mips/bits/fenv.h
+++ b/sysdeps/mips/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -69,4 +69,4 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
diff --git a/sysdeps/powerpc/fpu/bits/mathdef.h b/sysdeps/powerpc/fpu/bits/mathdef.h
index 577a596..4c61fbe 100644
--- a/sysdeps/powerpc/fpu/bits/mathdef.h
+++ b/sysdeps/powerpc/fpu/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
@@ -75,8 +75,8 @@ typedef double double_t;
# endif
/* 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/s390/fpu/bits/fenv.h b/sysdeps/s390/fpu/bits/fenv.h
index 8a963aa..e36a83d 100644
--- a/sysdeps/s390/fpu/bits/fenv.h
+++ b/sysdeps/s390/fpu/bits/fenv.h
@@ -37,12 +37,11 @@ enum
#define FE_INEXACT FE_INEXACT
};
/* We dont use the y bit of the DXC in the floating point control register
- * as glibc has no FE encoding for fe inexact incremented
- * or fe inexact truncated.
- * We currently use the flag bits in the fpc
- * as these are sticky for feholdenv & feupdatenv as it is defined
- * in the HP Manpages.
- */
+ as glibc has no FE encoding for fe inexact incremented
+ or fe inexact truncated.
+ We currently use the flag bits in the fpc
+ as these are sticky for feholdenv & feupdatenv as it is defined
+ in the HP Manpages. */
#define FE_ALL_EXCEPT \
@@ -69,15 +68,15 @@ typedef unsigned int fexcept_t; /* size of fpc */
to the layout of the block written by the `fstenv'. */
typedef struct
{
- fexcept_t fpc;
- void *ieee_instruction_pointer;
- /* failing instruction for ieee exceptions */
+ fexcept_t fpc;
+ void *ieee_instruction_pointer;
+ /* failing instruction for ieee exceptions */
} fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
#ifdef __USE_GNU
/* Floating-point environment where none of the exceptions are masked. */
-#define FE_NOMASK_ENV ((fenv_t *) -2)
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
diff --git a/sysdeps/sparc/fpu/bits/fenv.h b/sysdeps/sparc/fpu/bits/fenv.h
index d30fe22..50aab84 100644
--- a/sysdeps/sparc/fpu/bits/fenv.h
+++ b/sysdeps/sparc/fpu/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
@@ -68,11 +68,11 @@ typedef unsigned long int fexcept_t;
typedef unsigned long int fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
#ifdef __USE_GNU
/* Floating-point environment where none of the exception is masked. */
-# define FE_NOMASK_ENV ((fenv_t *) -2)
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
/* For internal use only: access the fp state register. */
diff --git a/sysdeps/sparc/fpu/bits/mathdef.h b/sysdeps/sparc/fpu/bits/mathdef.h
index 9477790..0f73b29 100644
--- a/sysdeps/sparc/fpu/bits/mathdef.h
+++ b/sysdeps/sparc/fpu/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
@@ -69,8 +69,8 @@ typedef double double_t;
# endif
/* 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/unix/sysv/linux/i386/bits/wchar.h b/sysdeps/unix/sysv/linux/i386/bits/wchar.h
new file mode 100644
index 0000000..c8d22c7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/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 (-127l)
+#define __WCHAR_MAX (2147483647l)
+
+#endif /* bits/wchar.h */
diff --git a/sysdeps/wordsize-32/lldiv.c b/sysdeps/wordsize-32/lldiv.c
index f666ad8..5a2dd1c 100644
--- a/sysdeps/wordsize-32/lldiv.c
+++ b/sysdeps/wordsize-32/lldiv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -16,8 +16,12 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* Ugly trick ahead to make the alias work. */
+#define imaxdiv __libc_imaxdiv
+
#include <inttypes.h>
#include <sysdeps/generic/lldiv.c>
+#undef imaxdiv
weak_alias (lldiv, imaxdiv)
diff --git a/sysdeps/wordsize-64/ldiv.c b/sysdeps/wordsize-64/ldiv.c
index f42f327..4b9ee6e 100644
--- a/sysdeps/wordsize-64/ldiv.c
+++ b/sysdeps/wordsize-64/ldiv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -16,8 +16,12 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* Ugly trick ahead to make the alias work. */
+#define imaxdiv __libc_imaxdiv
+
#include <inttypes.h>
#include <sysdeps/generic/ldiv.c>
+#undef imaxdiv
weak_alias (ldiv, imaxdiv)
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index d33b0ea..9cbc001 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -44,6 +44,8 @@
#define __need_wint_t
#include <stddef.h>
+#include <bits/wchar.h>
+
/* We try to get wint_t from <stddef.h>, but not all GCC versions define it
there. So define it ourselves if it remains undefined. */
#ifndef _WINT_T
@@ -81,8 +83,8 @@ typedef __mbstate_t mbstate_t;
#ifndef WCHAR_MIN
/* These constants might also be defined in <inttypes.h>. */
-# define WCHAR_MIN (0)
-# define WCHAR_MAX (0x7fffffff)
+# define WCHAR_MIN __WCHAR_MIN
+# define WCHAR_MAX __WCHAR_MAX
#endif
#ifndef WEOF