about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-24 20:40:44 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-24 20:40:44 +0000
commit52cf7d345d34e59973a8cc04773bdc1f9ba39421 (patch)
tree1ef2f778718c17af739761798c357666308b1bc4
parentda1067a9154c3125a4274e1d039dd5b2d3aa953c (diff)
downloadglibc-52cf7d345d34e59973a8cc04773bdc1f9ba39421.tar.gz
glibc-52cf7d345d34e59973a8cc04773bdc1f9ba39421.tar.xz
glibc-52cf7d345d34e59973a8cc04773bdc1f9ba39421.zip
Update.
	* misc/libgen.h: Don't take basename macro as taking arguments.

	* sysdeps/arm/bits/huge_val.h: Use hexadecimal floating-point constants
	for gcc >= 2.95.
	* sysdeps/i386/bits/huge_val.h: Likewise.
	* sysdeps/i386/bits/huge_val.h: Likewise.
	* sysdeps/ieee754/bits/huge_val.h: Likewise.
	* sysdeps/m68k/bits/huge_val.h: Likewise.
	* sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Likewise.
	* sysdeps/sparc/sparc64/fpu/bits/huge_val.h: Likewise.
-rw-r--r--ChangeLog11
-rw-r--r--conform/conformtest.pl10
-rw-r--r--conform/data/assert.h-data2
-rw-r--r--conform/data/cpio.h-data3
-rw-r--r--conform/data/ctype.h-data4
-rw-r--r--conform/data/dirent.h-data3
-rw-r--r--conform/data/dlfcn.h-data2
-rw-r--r--conform/data/float.h-data2
-rw-r--r--conform/data/fmtmsg.h-data2
-rw-r--r--conform/data/fnmatch.h-data2
-rw-r--r--conform/data/ftw.h-data2
-rw-r--r--conform/data/glob.h-data5
-rw-r--r--conform/data/grp.h-data3
-rw-r--r--conform/data/iconv.h-data2
-rw-r--r--conform/data/inttypes.h-data1
-rw-r--r--conform/data/iso646.h-data2
-rw-r--r--conform/data/langinfo.h-data2
-rw-r--r--conform/data/libgen.h-data2
-rw-r--r--conform/data/locale.h-data5
-rw-r--r--conform/data/math.h-data7
-rw-r--r--misc/libgen.h4
-rw-r--r--sysdeps/arm/bits/huge_val.h22
-rw-r--r--sysdeps/i386/bits/huge_val.h57
-rw-r--r--sysdeps/ieee754/bits/huge_val.h22
-rw-r--r--sysdeps/m68k/bits/huge_val.h35
-rw-r--r--sysdeps/sparc/sparc32/fpu/bits/huge_val.h53
-rw-r--r--sysdeps/sparc/sparc64/fpu/bits/huge_val.h58
27 files changed, 235 insertions, 88 deletions
diff --git a/ChangeLog b/ChangeLog
index 31b42d87cd..2a91b4a8a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 1999-08-24  Ulrich Drepper  <drepper@cygnus.com>
 
+	* misc/libgen.h: Don't take basename macro as taking arguments.
+
+	* sysdeps/arm/bits/huge_val.h: Use hexadecimal floating-point constants
+	for gcc >= 2.95.
+	* sysdeps/i386/bits/huge_val.h: Likewise.
+	* sysdeps/i386/bits/huge_val.h: Likewise.
+	* sysdeps/ieee754/bits/huge_val.h: Likewise.
+	* sysdeps/m68k/bits/huge_val.h: Likewise.
+	* sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Likewise.
+	* sysdeps/sparc/sparc64/fpu/bits/huge_val.h: Likewise.
+
 	* conform/Makefile: New file.
 	* conform/conformtest.pl: New file.
 	* conform/data/aio.h-data: New file.
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index fc6eb761cf..1d83d0dcc8 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -1,10 +1,12 @@
 #! /usr/bin/perl
 
 $CC = "gcc";
-$CFLAGS = "-I. -D_XOPEN_SOURCE=500";
+$CFLAGS = "-I. '-D__attribute__(x)=' -D_XOPEN_SOURCE=500";
 
 # List of the headers we are testing.
-@headers = ("fmtmsg.h", "float.h", "fcntl.h", "errno.h", "dlfcn.h", "dirent.h",
+@headers = ("math.h", "locale.h", "libgen.h", "langinfo.h", "iso646.h",
+	    "inttypes.h", "iconv.h", "grp.h", "glob.h", "ftw.h", "fnmatch.h",
+	    "fmtmsg.h", "float.h", "fcntl.h", "errno.h", "dlfcn.h", "dirent.h",
 	    "ctype.h", "cpio.h", "assert.h", "aio.h");
 
 # These are the ISO C9x keywords.
@@ -341,7 +343,7 @@ while ($#headers >= 0) {
       # Generate a program to test for availability of this function.
       open (TESTFILE, ">$fnamebase.c");
       print TESTFILE "#include <$h>\n";
-      print TESTFILE "#undef $fname\n";
+      # print TESTFILE "#undef $fname\n";
       print TESTFILE "$rettype (*foobarbaz) $args = $fname;\n";
       close (TESTFILE);
 
@@ -351,7 +353,7 @@ while ($#headers >= 0) {
       # Generate a program to test for the type of this function.
       open (TESTFILE, ">$fnamebase.c");
       print TESTFILE "#include <$h>\n";
-      print TESTFILE "#undef $fname\n";
+      # print TESTFILE "#undef $fname\n";
       print TESTFILE "extern $rettype (*foobarbaz) $args;\n";
       print TESTFILE "extern __typeof__ (&$fname) foobarbaz;\n";
       close (TESTFILE);
diff --git a/conform/data/assert.h-data b/conform/data/assert.h-data
index 60a559cb8b..1b1180838a 100644
--- a/conform/data/assert.h-data
+++ b/conform/data/assert.h-data
@@ -1 +1,3 @@
 macro assert
+
+allow *_t
diff --git a/conform/data/cpio.h-data b/conform/data/cpio.h-data
index bccbc3057c..10df73a72b 100644
--- a/conform/data/cpio.h-data
+++ b/conform/data/cpio.h-data
@@ -19,5 +19,8 @@ constant C_ISCHR 0020000
 constant C_ISCTG 0110000
 constant C_ISLNK 0120000
 constant C_ISSOCK 0140000
+# XXX We should be able to test a constant string content here.
 constant MAGIC
+
+allow *_t
 #endif
diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data
index ac0dbb6367..190c5678c2 100644
--- a/conform/data/ctype.h-data
+++ b/conform/data/ctype.h-data
@@ -19,7 +19,9 @@ function int _toupper (int)
 function int _tolower (int)
 
 # The following is not entirely correct.  It should be is[a-z]* but the
-# replacement fnmatch implementation doesn't grok it.
+# replacement fnmatch implementation does not grok it.
 allow is*
 allow to*
+
+allow *_t
 #endif
diff --git a/conform/data/dirent.h-data b/conform/data/dirent.h-data
index 4dbe552c11..e496dab0dd 100644
--- a/conform/data/dirent.h-data
+++ b/conform/data/dirent.h-data
@@ -9,7 +9,7 @@ element {struct dirent} char d_name []
 type ino_t
 
 function int closedir (DIR*)
-function DIR* opendir (const char*)
+function {DIR*} opendir (const char*)
 function {struct dirent*} readdir (DIR*)
 function int readdir_r (DIR*, struct dirent*, struct dirent**)
 function void rewinddir (DIR*)
@@ -17,4 +17,5 @@ function void seekdir (DIR*, long int)
 function {long int} telldir (DIR*)
 
 allow d_*
+allow *_t
 #endif
diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data
index 17600da641..530feabf88 100644
--- a/conform/data/dlfcn.h-data
+++ b/conform/data/dlfcn.h-data
@@ -8,4 +8,6 @@ function {void*} dlopen (const char*, int)
 function {void*} dlsym (void *, const char*)
 function int dlclose (void*)
 function {char*} dlerror (void)
+
+allow *_t
 #endif
diff --git a/conform/data/float.h-data b/conform/data/float.h-data
index bdc28d12b3..71b7ed3c6c 100644
--- a/conform/data/float.h-data
+++ b/conform/data/float.h-data
@@ -37,3 +37,5 @@ macro LDBL_EPSILON
 macro FLT_MIN
 macro DBL_MIN
 macro LDBL_MIN
+
+allow *_t
diff --git a/conform/data/fmtmsg.h-data b/conform/data/fmtmsg.h-data
index 1b88372075..25be1ec509 100644
--- a/conform/data/fmtmsg.h-data
+++ b/conform/data/fmtmsg.h-data
@@ -57,4 +57,6 @@ macro MM_NOMSG
 macro MM_NOCON
 
 function int fmtmsg (long, const char*, int, const char*, const char*, const char*)
+
+allow *_t
 #endif
diff --git a/conform/data/fnmatch.h-data b/conform/data/fnmatch.h-data
index b00fa45e66..82a4136c56 100644
--- a/conform/data/fnmatch.h-data
+++ b/conform/data/fnmatch.h-data
@@ -6,4 +6,6 @@ constant FNM_NOESCAPE
 constant FNM_NOSYS
 
 function int fnmatch (const char*, const char*, int)
+
+allow *_t
 #endif
diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data
index b3fa283922..f5dec5cf79 100644
--- a/conform/data/ftw.h-data
+++ b/conform/data/ftw.h-data
@@ -18,4 +18,6 @@ macro FTW_CHDIR
 
 function int ftw (const char*, int (*) (const char *, const struct stat*, int), int)
 function int nftw (const char*, int (*) (const char *, const struct stat*, int, FTW *), int, int)
+
+allow *_t
 #endif
diff --git a/conform/data/glob.h-data b/conform/data/glob.h-data
index fd24e7fa79..221a3154cb 100644
--- a/conform/data/glob.h-data
+++ b/conform/data/glob.h-data
@@ -5,7 +5,7 @@ element glob_t {char**} gl_pathv
 element glob_t size_t gl_offs
 
 constant GLOB_APPEND
-constant GLOB_DOOFS
+constant GLOB_DOOFFS
 constant GLOB_ERR
 constant GLOB_MARK
 constant GLOB_NOCHECK
@@ -18,8 +18,9 @@ constant GLOB_NOSPACE
 constant GLOB_NOSYS
 
 function int glob (const char*, int, int (*) (const char*, int), glob_t*)
-function void globfree (glob_t)
+function void globfree (glob_t *)
 
 allow gl_*
 allow GLOB_*
+allow *_t
 #endif
diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data
index 664efb0274..91401b31d9 100644
--- a/conform/data/grp.h-data
+++ b/conform/data/grp.h-data
@@ -18,5 +18,6 @@ function void endgrent (void)
 function void setgrent (void)
 # endif
 
-allow gr_
+allow gr_*
+allow *_t
 #endif
diff --git a/conform/data/iconv.h-data b/conform/data/iconv.h-data
index 05523e1595..f1e2ea0527 100644
--- a/conform/data/iconv.h-data
+++ b/conform/data/iconv.h-data
@@ -4,4 +4,6 @@ type iconv_t
 function iconv_t iconv_open (const char*, const char*)
 function size_t iconv (iconv_t, char**, size_t*, char**, size_t*)
 function int iconv_close (iconv_t)
+
+allow *_t
 #endif
diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data
index 204a7cf64c..c67600b188 100644
--- a/conform/data/inttypes.h-data
+++ b/conform/data/inttypes.h-data
@@ -11,3 +11,4 @@ type uintptr_t
 
 allow PRI*
 allow SCN*
+allow *_t
diff --git a/conform/data/iso646.h-data b/conform/data/iso646.h-data
index 8339da3f1f..ffbf489f7a 100644
--- a/conform/data/iso646.h-data
+++ b/conform/data/iso646.h-data
@@ -9,3 +9,5 @@ macro or
 macro or_eq
 macro xor
 macro xor_eq
+
+allow *_t
diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data
index 0e313e38c8..2fe38a266d 100644
--- a/conform/data/langinfo.h-data
+++ b/conform/data/langinfo.h-data
@@ -58,4 +58,6 @@ constant CRNCYSTR
 function {char*} nl_langinfo (nl_item)
 
 allow-header nl_types.h
+
+allow *_t
 #endif
diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data
index 97980e9a53..ca0126fbb1 100644
--- a/conform/data/libgen.h-data
+++ b/conform/data/libgen.h-data
@@ -1,4 +1,6 @@
 #if !defined ISO && !defined POSIX
 function {char*} basename (char*)
 function {char*} dirname (char*)
+
+allow *_t
 #endif
diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data
index c1325e30e0..724b39a778 100644
--- a/conform/data/locale.h-data
+++ b/conform/data/locale.h-data
@@ -15,7 +15,7 @@ element {struct lconv} char n_sign_posn
 element {struct lconv} {char*} positive_sign
 element {struct lconv} char p_cs_precedes
 element {struct lconv} char p_sep_by_space
-element {struct lconv} char p_sign_pos
+element {struct lconv} char p_sign_posn
 element {struct lconv} {char*} thousands_sep
 
 constant NULL
@@ -28,7 +28,8 @@ macro LC_MONETARY
 macro LC_NUMERIC
 macro LC_TIME
 
-function {struct lconv*) localeconv (void)
+function {struct lconv*} localeconv (void)
 function {char*} setlocale (int, const char*)
 
 allow LC_*
+allow *_t
diff --git a/conform/data/math.h-data b/conform/data/math.h-data
index 13f617577e..466de7d687 100644
--- a/conform/data/math.h-data
+++ b/conform/data/math.h-data
@@ -15,6 +15,7 @@ constant M_SQRT1_2
 
 constant MAXFLOAT
 constant HUGE_VAL
+#endif
 
 function double acos (double)
 function double asin (double)
@@ -43,11 +44,11 @@ function double gamma (double)
 function double hypot (double, double)
 function double j0 (double)
 function double j1 (double)
-function double jn (double)
+function double jn (int, double)
 function double lgamma (double)
 function double y0 (double)
 function double y1 (double)
-function double yn (double)
+function double yn (int, double)
 function int isnan (double)
 function double acosh (double)
 function double asinh (double)
@@ -156,3 +157,5 @@ allow nextafterl
 allow remainderl
 allow rintl
 allow scalbl
+
+allow *_t
diff --git a/misc/libgen.h b/misc/libgen.h
index 87c9d3f967..b4ef9e5c77 100644
--- a/misc/libgen.h
+++ b/misc/libgen.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 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
@@ -33,7 +33,7 @@ extern char *dirname __P ((char *__path));
    <string.h>) and only if this header is included make the XPG
    version available under the real name.  */
 extern char *__xpg_basename __P ((char *__path));
-#define basename(path)	__xpg_basename (path)
+#define basename	__xpg_basename
 
 __END_DECLS
 
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 0e07bd56cc..1b236c425d 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -1,7 +1,7 @@
 /* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
    Used by <stdlib.h> and <math.h> functions for overflow.
    ARM version.
-   Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 95, 96, 97, 98, 99 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
@@ -29,11 +29,19 @@
 
 #ifdef	__GNUC__
 
-# define HUGE_VAL \
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VAL (0x1.0p2047)
+
+# else
+
+#  define HUGE_VAL \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
     { __l: 0x000000007ff00000ULL }).__d)
 
+# endif
+
 #else /* not GCC */
 
 # include <endian.h>
@@ -59,11 +67,19 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
 
 # ifdef __GNUC__
 
-#  define HUGE_VALF \
+#  if __GNUC_PREREQ(2,95)
+
+#   define HUGE_VALF (0x1.0p255f)
+
+#  else
+
+#   define HUGE_VALF \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
     { __l: 0x7f800000UL }).__d)
 
+#  endif
+
 # else /* not GCC */
 
 typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
diff --git a/sysdeps/i386/bits/huge_val.h b/sysdeps/i386/bits/huge_val.h
index 23127b4031..65e500b47d 100644
--- a/sysdeps/i386/bits/huge_val.h
+++ b/sysdeps/i386/bits/huge_val.h
@@ -1,6 +1,6 @@
 /* `HUGE_VAL' constants for ix86 (where it is infinity).
    Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999 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
@@ -26,43 +26,56 @@
 
 /* IEEE positive infinity (-HUGE_VAL is negative infinity).  */
 
-#define	__HUGE_VAL_bytes	{ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+#if __GNUC_PREREQ(2,95)
+# define HUGE_VAL	(0x1.0p2047)
+#else
+# define __HUGE_VAL_bytes	{ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
 
-#define __huge_val_t	union { unsigned char __c[8]; double __d; }
-#ifdef	__GNUC__
-# define HUGE_VAL	(__extension__ \
+# define __huge_val_t	union { unsigned char __c[8]; double __d; }
+# ifdef	__GNUC__
+#  define HUGE_VAL	(__extension__ \
 			 ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)
-#else	/* Not GCC.  */
+# else	/* Not GCC.  */
 static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
-# define HUGE_VAL	(__huge_val.__d)
-#endif	/* GCC.  */
+#  define HUGE_VAL	(__huge_val.__d)
+# endif	/* GCC.  */
+#endif /* GCC 2.95 */
 
 
 /* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL.  */
 
 #ifdef __USE_ISOC9X
 
-# define __HUGE_VALF_bytes	{ 0, 0, 0x80, 0x7f }
+# if __GNUC_PREREQ(2,95)
 
-# define __huge_valf_t	union { unsigned char __c[4]; float __f; }
-# ifdef	__GNUC__
-#  define HUGE_VALF	(__extension__ \
+#  define HUGE_VALF (0x1.0p255f)
+#  define HUGE_VALL (0x1.0p32767L)
+
+# else
+
+#  define __HUGE_VALF_bytes	{ 0, 0, 0x80, 0x7f }
+
+#  define __huge_valf_t	union { unsigned char __c[4]; float __f; }
+#  ifdef	__GNUC__
+#   define HUGE_VALF	(__extension__ \
 			 ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
-# else	/* Not GCC.  */
+#  else	/* Not GCC.  */
 static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#  define HUGE_VALF	(__huge_valf.__f)
-# endif	/* GCC.  */
+#   define HUGE_VALF	(__huge_valf.__f)
+#  endif	/* GCC.  */
 
 
-# define __HUGE_VALL_bytes	{ 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
+#  define __HUGE_VALL_bytes	{ 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
 
-# define __huge_vall_t	union { unsigned char __c[12]; long double __ld; }
-# ifdef	__GNUC__
-#  define HUGE_VALL	(__extension__ \
+#  define __huge_vall_t	union { unsigned char __c[12]; long double __ld; }
+#  ifdef __GNUC__
+#   define HUGE_VALL	(__extension__ \
 			 ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
-# else	/* Not GCC.  */
+#  else	/* Not GCC.  */
 static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-#  define HUGE_VALL	(__huge_vall.__ld)
-# endif	/* GCC.  */
+#   define HUGE_VALL	(__huge_vall.__ld)
+#  endif /* GCC.  */
+
+# endif /* GCC 2.95 */
 
 #endif	/* __USE_ISOC9X.  */
diff --git a/sysdeps/ieee754/bits/huge_val.h b/sysdeps/ieee754/bits/huge_val.h
index f49d65661a..f42cb662cc 100644
--- a/sysdeps/ieee754/bits/huge_val.h
+++ b/sysdeps/ieee754/bits/huge_val.h
@@ -1,6 +1,6 @@
 /* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
    Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999 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
@@ -28,11 +28,19 @@
 
 #ifdef	__GNUC__
 
-# define HUGE_VAL \
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VAL (0x1.0p2047)
+
+# else
+
+#  define HUGE_VAL \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
     { __l: 0x7ff0000000000000ULL }).__d)
 
+# endif
+
 #else /* not GCC */
 
 # include <endian.h>
@@ -58,11 +66,19 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
 
 # ifdef __GNUC__
 
-#  define HUGE_VALF \
+#  if __GNUC_PREREQ(2,95)
+
+#   define HUGE_VALF (0x1.0p255f)
+
+#  else
+
+#   define HUGE_VALF \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
     { __l: 0x7f800000UL }).__d)
 
+#  endif
+
 # else /* not GCC */
 
 typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
index 822b82930b..14c0855ab1 100644
--- a/sysdeps/m68k/bits/huge_val.h
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -1,6 +1,6 @@
 /* `HUGE_VAL' constants for m68k (where it is infinity).
    Used by <stdlib.h> and <math.h> functions for overflow.
-   Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1995, 1996, 1997, 1999 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
@@ -30,11 +30,19 @@
 
 #ifdef	__GNUC__
 
-# define HUGE_VAL					\
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VAL (0x1.0p2047)
+
+# else
+
+#  define HUGE_VAL					\
   (__extension__					\
    ((union { unsigned long long __l; double __d; })	\
     { __l: 0x7ff0000000000000ULL }).__d)
 
+# endif
+
 #else /* not GCC */
 
 static union { unsigned char __c[8]; double __d; } __huge_val =
@@ -48,28 +56,37 @@ static union { unsigned char __c[8]; double __d; } __huge_val =
 
 #ifdef __USE_ISOC9X
 
-# ifdef __GNUC__
+# if __GNUC_PREREQ(2,95)
 
-#  define HUGE_VALF					\
+#  define HUGE_VALF (0x1.0p255f)
+#  define HUGE_VALL (0x1.0p32767L)
+
+# else
+
+#  ifdef __GNUC__
+
+#   define HUGE_VALF					\
   (__extension__					\
    ((union { unsigned long __l; float __f; })		\
     { __l: 0x7f800000UL }).__f)
 
-#  define HUGE_VALL					\
+#   define HUGE_VALL					\
   (__extension__					\
    ((union { unsigned long __l[3]; long double __ld; })	\
     { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
 
-# else /* not GCC */
+#  else /* not GCC */
 
 static union { unsigned char __c[4]; float __f; } __huge_valf =
   { { 0x7f, 0x80, 0, 0 } };
-#  define HUGE_VALF	(__huge_valf.__f)
+#   define HUGE_VALF	(__huge_valf.__f)
 
 static union { unsigned char __c[12]; long double __ld; } __huge_vall =
   { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
-#  define HUGE_VALL	(__huge_vall.__ld)
+#   define HUGE_VALL	(__huge_vall.__ld)
+
+#  endif /* GCC.  */
 
-# endif	/* GCC.  */
+# endif /* GCC 2.95.  */
 
 #endif	/* __USE_ISOC9X.  */
diff --git a/sysdeps/sparc/sparc32/fpu/bits/huge_val.h b/sysdeps/sparc/sparc32/fpu/bits/huge_val.h
index 673d6f0532..40b03df047 100644
--- a/sysdeps/sparc/sparc32/fpu/bits/huge_val.h
+++ b/sysdeps/sparc/sparc32/fpu/bits/huge_val.h
@@ -29,11 +29,19 @@
 
 #ifdef	__GNUC__
 
-# define HUGE_VAL \
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VAL (0x1.0p2047)
+
+# else
+
+#  define HUGE_VAL \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
     { __l: 0x7ff0000000000000ULL }).__d)
 
+# endif
+
 #else /* not GCC */
 
 typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
@@ -50,51 +58,60 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
 
 #ifdef __USE_ISOC9X
 
-# ifdef __GNUC__
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VALF (0x1.0p255)
+#  define HUGE_VALL (0x1.0p32767)
+
+# else
+
+#  ifdef __GNUC__
 
-#  define HUGE_VALF \
+#   define HUGE_VALF \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
     { __l: 0x7f800000UL }).__d)
 
-# else /* not GCC */
+#  else /* not GCC */
 
 typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
 
-#  define __HUGE_VALF_bytes	{ 0x7f, 0x80, 0, 0 }
+#   define __HUGE_VALF_bytes	{ 0x7f, 0x80, 0, 0 }
 
 static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#  define HUGE_VALF	(__huge_valf.__f)
+#   define HUGE_VALF	(__huge_valf.__f)
 
-# endif	/* GCC.  */
+#  endif /* GCC.  */
 
-#if __WORDSIZE == 32
+#  if __WORDSIZE == 32
 
 /* Sparc32 has IEEE 754 64bit long double */
-# define HUGE_VALL HUGE_VAL
+#   define HUGE_VALL HUGE_VAL
 
-#else
+#  else
 
 /* Sparc64 uses IEEE 754 128bit long double */
 
-#ifdef	__GNUC__
+#   ifdef __GNUC__
 
-# define HUGE_VALL \
+#    define HUGE_VALL \
   (__extension__									\
    ((union { struct { unsigned long __h, __l; } __i; long double __d; })		\
     { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d)
-              
-#else /* not GCC */
+
+#   else /* not GCC */
 
 typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t;
 
-# define __HUGE_VALL_bytes	{ 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+#    define __HUGE_VALL_bytes	{ 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
 static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-# define HUGE_VALL	(__huge_vall.__d)
+#    define HUGE_VALL	(__huge_vall.__d)
 
-#endif	/* GCC.  */
+#   endif /* GCC.  */
 
-#endif
+#  endif
+
+# endif /* GCC 2.95.  */
 
 #endif /* __USE_ISOC9X.  */
diff --git a/sysdeps/sparc/sparc64/fpu/bits/huge_val.h b/sysdeps/sparc/sparc64/fpu/bits/huge_val.h
index 673d6f0532..788527477c 100644
--- a/sysdeps/sparc/sparc64/fpu/bits/huge_val.h
+++ b/sysdeps/sparc/sparc64/fpu/bits/huge_val.h
@@ -29,11 +29,19 @@
 
 #ifdef	__GNUC__
 
-# define HUGE_VAL \
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VAL (0x1.0p2047)
+
+# else
+
+#  define HUGE_VAL \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; })   \
     { __l: 0x7ff0000000000000ULL }).__d)
 
+# endif
+
 #else /* not GCC */
 
 typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
@@ -50,51 +58,65 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
 
 #ifdef __USE_ISOC9X
 
-# ifdef __GNUC__
+# if __GNUC_PREREQ(2,95)
+
+#  define HUGE_VALF (0x1.0p255f)
+#  if __WORDSIZE == 32
+#   define HUGE_VALL HUGE_VAL
+#  else
+/* Sparc64 uses IEEE 754 128bit long double */
+#   define HUGE_VALL (0x1.0p32767L)
+#  endif
+
+# else
 
-#  define HUGE_VALF \
+#  ifdef __GNUC__
+
+#   define HUGE_VALF \
   (__extension__							      \
    ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; })    \
     { __l: 0x7f800000UL }).__d)
 
-# else /* not GCC */
+#  else /* not GCC */
 
 typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
 
-#  define __HUGE_VALF_bytes	{ 0x7f, 0x80, 0, 0 }
+#   define __HUGE_VALF_bytes	{ 0x7f, 0x80, 0, 0 }
 
 static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#  define HUGE_VALF	(__huge_valf.__f)
+#   define HUGE_VALF	(__huge_valf.__f)
 
-# endif	/* GCC.  */
+#  endif /* GCC.  */
 
-#if __WORDSIZE == 32
+#  if __WORDSIZE == 32
 
 /* Sparc32 has IEEE 754 64bit long double */
-# define HUGE_VALL HUGE_VAL
+#   define HUGE_VALL HUGE_VAL
 
-#else
+#  else
 
 /* Sparc64 uses IEEE 754 128bit long double */
 
-#ifdef	__GNUC__
+#   ifdef __GNUC__
 
-# define HUGE_VALL \
+#    define HUGE_VALL \
   (__extension__									\
    ((union { struct { unsigned long __h, __l; } __i; long double __d; })		\
     { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d)
-              
-#else /* not GCC */
+
+#   else /* not GCC */
 
 typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t;
 
-# define __HUGE_VALL_bytes	{ 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+#    define __HUGE_VALL_bytes	{ 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
 static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-# define HUGE_VALL	(__huge_vall.__d)
+#    define HUGE_VALL	(__huge_vall.__d)
 
-#endif	/* GCC.  */
+#   endif /* GCC.  */
 
-#endif
+#  endif
+
+# endif /* GCC 2.95.  */
 
 #endif /* __USE_ISOC9X.  */