* 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.
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.
#! /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.
# 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);
# 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);
macro assert
+
+allow *_t
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
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
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*)
function {long int} telldir (DIR*)
allow d_*
+allow *_t
#endif
function {void*} dlsym (void *, const char*)
function int dlclose (void*)
function {char*} dlerror (void)
+
+allow *_t
#endif
macro FLT_MIN
macro DBL_MIN
macro LDBL_MIN
+
+allow *_t
macro MM_NOCON
function int fmtmsg (long, const char*, int, const char*, const char*, const char*)
+
+allow *_t
#endif
constant FNM_NOSYS
function int fnmatch (const char*, const char*, int)
+
+allow *_t
#endif
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
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
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
function void setgrent (void)
# endif
-allow gr_
+allow gr_*
+allow *_t
#endif
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
allow PRI*
allow SCN*
+allow *_t
macro or_eq
macro xor
macro xor_eq
+
+allow *_t
function {char*} nl_langinfo (nl_item)
allow-header nl_types.h
+
+allow *_t
#endif
#if !defined ISO && !defined POSIX
function {char*} basename (char*)
function {char*} dirname (char*)
+
+allow *_t
#endif
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
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
constant MAXFLOAT
constant HUGE_VAL
+#endif
function double acos (double)
function double asin (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)
allow remainderl
allow rintl
allow scalbl
+
+allow *_t
-/* 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
<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
/* `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
#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>
# 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;
/* `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
/* 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. */
/* `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
#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>
# 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;
/* `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
#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 =
#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. */
#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;
#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. */
#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;
#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. */