aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-31 16:30:27 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-31 16:30:27 +0000
commitbfce746a87e205a682b85e144e056029a8a30d07 (patch)
tree081313643ad086d15559161dc218d203b62f605d
parentac72fbb190675473855c33d79ccd75b0de68c0d1 (diff)
downloadglibc-bfce746a87e205a682b85e144e056029a8a30d07.zip
glibc-bfce746a87e205a682b85e144e056029a8a30d07.tar.gz
glibc-bfce746a87e205a682b85e144e056029a8a30d07.tar.bz2
Update.
1998-08-31 15:56 Ulrich Drepper <drepper@cygnus.com> * db2/db_int.h: Use <db.h> instead of "db.h" to find header in include. * include/stdio.h: Add __vsscanf. * libio/stdio.h: Make vfscanf, scanf, and vsscanf available if __USE_ISOC9X. Remove __vsscanf declaration. Always declare fgetpos and fsetpos. * math/math.h: Define isinf as macro. * math/bits/mathcalls.h: Change to declare __isinf all the time. Don't declare scalb for ISO C 9x. * math/tgmath.h: Define fma. Rewrite the underlying macros. * stdlib/stdlib.h: Declare strtof and strtold is __USE_ISOC9X. * sysdeps/unix/sysv/linux/bits/sigcontext.h: Allow inclusion from sys/ucontext.h. * sysdeps/wordsize-32/inttypes.h: Define missing PRI* and SCN* macros. 1998-08-31 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/standalone/bits/errno.h (ENOMSG): Remove duplicate. Reported by jreising@frequentis.com [PR libc/767]. 1998-08-31 Andreas Jaeger <aj@arthur.rhein-neckar.de> * io/lockf.c (lockf): Move initilisation of fl.l_whence and fl.l_start at beginning of function. Patch by Geoff. Dash <geoffd@zeta.org.au> [PR libc/769].
-rw-r--r--ChangeLog36
-rw-r--r--db2/db_int.h2
-rw-r--r--elf/Makefile2
-rw-r--r--include/stdio.h4
-rw-r--r--io/lockf.c11
-rw-r--r--libio/stdio.h46
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--math/bits/mathcalls.h12
-rw-r--r--math/math.h7
-rw-r--r--math/tgmath.h92
-rw-r--r--stdlib/stdlib.h4
-rw-r--r--sysdeps/standalone/bits/errno.h3
-rw-r--r--sysdeps/unix/sysv/linux/Dist2
-rw-r--r--sysdeps/unix/sysv/linux/bits/sigcontext.h11
-rw-r--r--sysdeps/wordsize-32/inttypes.h103
-rw-r--r--sysdeps/wordsize-64/inttypes.h117
16 files changed, 328 insertions, 129 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ff887a..b00f515 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+1998-08-31 15:56 Ulrich Drepper <drepper@cygnus.com>
+
+ * db2/db_int.h: Use <db.h> instead of "db.h" to find header in include.
+
+ * include/stdio.h: Add __vsscanf.
+
+ * libio/stdio.h: Make vfscanf, scanf, and vsscanf available if
+ __USE_ISOC9X.
+ Remove __vsscanf declaration.
+ Always declare fgetpos and fsetpos.
+
+ * math/math.h: Define isinf as macro.
+ * math/bits/mathcalls.h: Change to declare __isinf all the time.
+ Don't declare scalb for ISO C 9x.
+
+ * math/tgmath.h: Define fma. Rewrite the underlying macros.
+
+ * stdlib/stdlib.h: Declare strtof and strtold is __USE_ISOC9X.
+
+ * sysdeps/unix/sysv/linux/bits/sigcontext.h: Allow inclusion from
+ sys/ucontext.h.
+
+ * sysdeps/wordsize-32/inttypes.h: Define missing PRI* and SCN*
+ macros.
+
+1998-08-31 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * sysdeps/standalone/bits/errno.h (ENOMSG): Remove duplicate.
+ Reported by jreising@frequentis.com [PR libc/767].
+
+1998-08-31 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * io/lockf.c (lockf): Move initilisation of fl.l_whence and
+ fl.l_start at beginning of function.
+ Patch by Geoff. Dash <geoffd@zeta.org.au> [PR libc/769].
+
1998-08-31 Ulrich Drepper <drepper@cygnus.com>
* io/sys/stat.h (ALLPERMS): Fix type (S_ISTXT -> S_ISVTX).
diff --git a/db2/db_int.h b/db2/db_int.h
index b48b104..92a3817 100644
--- a/db2/db_int.h
+++ b/db2/db_int.h
@@ -10,7 +10,7 @@
#ifndef _DB_INTERNAL_H_
#define _DB_INTERNAL_H_
-#include "db.h" /* Standard DB include file. */
+#include <db.h> /* Standard DB include file. */
#include "queue.h"
/*******************************************************
diff --git a/elf/Makefile b/elf/Makefile
index 4fcb997..7f2201d 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -36,7 +36,7 @@ elide-routines.os = $(dl-routines) dl-support enbl-secure
# interpreter and operating independent of libc.
rtld-routines := rtld $(dl-routines) dl-sysdep dl-environ dl-minimal
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
- dl-hash.h soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c \
+ dl-hash.h soinit.c sofini.c ldd.bash.in eval.c \
genrtldtbl.awk atomicity.h dl-procinfo.h ldsodefs.h \
dl-librecon.h interp.c sln.c dl-origin.h
diff --git a/include/stdio.h b/include/stdio.h
index c0ca602..d09e29d 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -18,6 +18,10 @@ extern int __vscanf __P ((__const char *__restrict __format,
__attribute__ ((__format__ (__scanf__, 1, 0)));
extern _IO_ssize_t __getline __P ((char **__lineptr, size_t *__n,
FILE *__stream));
+extern int __vsscanf __P ((__const char *__restrict __s,
+ __const char *__restrict __format,
+ _G_va_list __arg))
+ __attribute__ ((__format__ (__scanf__, 2, 0)));
#endif
#else
diff --git a/io/lockf.c b/io/lockf.c
index 6d50490..6e8851b 100644
--- a/io/lockf.c
+++ b/io/lockf.c
@@ -31,6 +31,11 @@ lockf (int fd, int cmd, off_t len)
memset ((char *) &fl, '\0', sizeof (fl));
+ /* lockf is always relative to the current file position. */
+ fl.l_whence = SEEK_CUR;
+ fl.l_start = 0;
+ fl.l_len = len;
+
switch (cmd)
{
case F_TEST:
@@ -61,11 +66,5 @@ lockf (int fd, int cmd, off_t len)
return -1;
}
- /* lockf is always relative to the current file position. */
- fl.l_whence = SEEK_CUR;
- fl.l_start = 0;
-
- fl.l_len = len;
-
return __fcntl (fd, cmd, &fl);
}
diff --git a/libio/stdio.h b/libio/stdio.h
index 4d01061..774003b 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -334,7 +334,7 @@ extern int scanf __P ((__const char *__restrict __format, ...));
extern int sscanf __P ((__const char *__restrict __s,
__const char *__restrict __format, ...));
-#ifdef __USE_GNU
+#ifdef __USE_ISOC9X
/* Read formatted input from S into argument list ARG. */
extern int vfscanf __P ((FILE *__restrict __s,
__const char *__restrict __format,
@@ -346,10 +346,6 @@ extern int vscanf __P ((__const char *__restrict __format, _G_va_list __arg))
__attribute__ ((__format__ (__scanf__, 1, 0)));
/* Read formatted input from S into argument list ARG. */
-extern int __vsscanf __P ((__const char *__restrict __s,
- __const char *__restrict __format,
- _G_va_list __arg))
- __attribute__ ((__format__ (__scanf__, 2, 0)));
extern int vsscanf __P ((__const char *__restrict __s,
__const char *__restrict __format,
_G_va_list __arg))
@@ -541,64 +537,70 @@ extern long int ftell __P ((FILE *__stream));
/* Rewind to the beginning of STREAM. */
extern void rewind __P ((FILE *__stream));
-#if (defined __USE_LARGEFILE || defined __USE_LARGEFILE64 \
- || defined __USE_FILE_OFFSET64)
/* The Single Unix Specification, Version 2, specifies an alternative,
more adequate interface for the two functions above which deal with
file offset. `long int' is not the right type. These definitions
are originally defined in the Large File Support API. */
/* Types needed in these functions. */
-# ifndef off_t
-# ifndef __USE_FILE_OFFSET64
+#ifndef off_t
+# ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
-# else
+# else
typedef __off64_t off_t;
-# endif
-# define off_t off_t
# endif
+# define off_t off_t
+#endif
-# if defined __USE_LARGEFILE64 && !defined off64_t
+#if defined __USE_LARGEFILE64 && !defined off64_t
typedef __off64_t off64_t;
-# define off64_t off64_t
-# endif
+# define off64_t off64_t
+#endif
-# ifndef __USE_FILE_OFFSET64
+#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_UNIX98
/* Seek to a certain position on STREAM. */
extern int fseeko __P ((FILE *__stream, __off_t __off, int __whence));
/* Return the current position of STREAM. */
extern __off_t ftello __P ((FILE *__stream));
+#endif
+
/* Get STREAM's position. */
extern int fgetpos __P ((FILE *__restrict __stream,
fpos_t *__restrict __pos));
/* Set STREAM's position. */
extern int fsetpos __P ((FILE *__stream, __const fpos_t *__pos));
-# else
+#else
# ifdef __REDIRECT
+# ifndef __USE_UNIX98
extern int __REDIRECT (fseeko,
__P ((FILE *__stream, __off64_t __off, int __whence)),
fseeko64);
extern __off64_t __REDIRECT (ftello, __P ((FILE *__stream)), ftello64);
+# endif
extern int __REDIRECT (fgetpos, __P ((FILE *__restrict __stream,
fpos_t *__restrict __pos)), fgetpos64);
extern int __REDIRECT (fsetpos, __P ((FILE *__stream, __const fpos_t *__pos)),
fsetpos64);
-# else
+# else
+# ifndef __USE_UNIX98
# define fseeko fseeko64
# define ftello ftello64
-# define fgetpos fgetpos64
-# define fsetpos fsetpos64
# endif
+# define fgetpos fgetpos64
+# define fsetpos fsetpos64
# endif
+#endif
-# ifdef __USE_LARGEFILE64
+#ifdef __USE_LARGEFILE64
+# ifndef __USE_UNIX98
extern int fseeko64 __P ((FILE *__stream, __off64_t __off, int __whence));
extern __off64_t ftello64 __P ((FILE *__stream));
+# endif
extern int fgetpos64 __P ((FILE *__restrict __stream,
fpos64_t *__restrict __pos));
extern int fsetpos64 __P ((FILE *__stream, __const fpos64_t *__pos));
-# endif
#endif
/* Clear the error and EOF indicators for STREAM. */
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index b8cad4c..88cf853 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,8 @@
+1998-08-31 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/i386/pt-machine.h (testandset): Add memory clobber.
+ Suggested by Roland McGrath.
+
1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
* internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index a94707f..d23a013 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -171,10 +171,14 @@ __MATHCALL (floor,, (_Mdouble_ __x));
__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y));
+/* Return 0 if VALUE is finite or NaN, +1 if it
+ is +Infinity, -1 if it is -Infinity. */
+__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
+
#ifdef __USE_MISC
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
-__MATHDECLX (int,isinf,, (_Mdouble_ __value), (__const__));
+__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
/* Return nonzero if VALUE is finite and not NaN. */
__MATHDECLX (int,finite,, (_Mdouble_ __value), (__const__));
@@ -248,15 +252,17 @@ __MATHCALL (rint,, (_Mdouble_ __x));
/* Return X + epsilon if X < Y, X - epsilon if X > Y. */
__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-#ifdef __USE_ISOC9X
+# ifdef __USE_ISOC9X
__MATHCALLX (nextafterx,, (_Mdouble_ __x, long double __y), (__const__));
-#endif
+# endif
/* Return the remainder of integer divison X / Y with infinite precision. */
__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Return X times (2 to the Nth power). */
__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
+#endif
/* Return X times (2 to the Nth power). */
__MATHCALL (scalbn,, (_Mdouble_ __x, int __n));
diff --git a/math/math.h b/math/math.h
index 5381f29..d7487dd 100644
--- a/math/math.h
+++ b/math/math.h
@@ -196,6 +196,13 @@ enum
: sizeof (x) == sizeof (double) ? \
__isnan (x) : __isnanl (x))
+/* Return nonzero value is X is positive or negative infinity. */
+# define isinf(x) \
+ (sizeof (x) == sizeof (float) ? \
+ __isinff (x) \
+ : sizeof (x) == sizeof (double) ? \
+ __isinf (x) : __isinfl (x))
+
#endif /* Use ISO C 9X. */
#ifdef __USE_MISC
diff --git a/math/tgmath.h b/math/tgmath.h
index 5880e66..307a124 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
@@ -40,70 +40,83 @@
only defined on real valued parameters and those which are defined
for complex functions as well. */
# define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
- (__extension__ (sizeof (__real__ (Val)) == sizeof (double) \
+ (__extension__ (sizeof (Val) == sizeof (double) \
? Fct (Val) \
- : (sizeof (__real__ (Val)) == sizeof (long double) \
+ : (sizeof (Val) == sizeof (long double) \
? Fct##l (Val) \
: Fct##f (Val))))
# define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
- (__extension__ (sizeof (__real__ (Val1)) == sizeof (double) \
- ? Fct (Val1, Val2) \
- : (sizeof (__real__ (Val1)) == sizeof (long double) \
- ? Fct##l (Val1, Val2) \
+ (__extension__ (sizeof (Val1) > sizeof (double) \
+ ? Fct##l (Val1, Val2) \
+ : (sizeof (Val1) == sizeof (double) \
+ ? Fct (Val1, Val2) \
: Fct##f (Val1, Val2))))
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
- (__extension__ (sizeof (Val1) == sizeof (double) \
- || sizeof (Val2) == sizeof (double) \
- ? Fct (Val1, Val2) \
- : (sizeof (Val1) == sizeof (long double) \
- || sizeof (Val2) == sizeof (long double) \
- ? Fct##l (Val1, Val2) \
+ (__extension__ (sizeof (Val1) > sizeof (double) \
+ || sizeof (Val2) > sizeof (double) \
+ ? Fct##l (Val1, Val2) \
+ : (sizeof (Val1) == sizeof (double) \
+ || sizeof (Val2) == sizeof (double) \
+ ? Fct (Val1, Val2) \
: Fct##f (Val1, Val2))))
# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
- (__extension__ (sizeof (Val1) == sizeof (double) \
- || sizeof (Val2) == sizeof (double) \
- ? Fct (Val1, Val2, Val3) \
- : (sizeof (Val1) == sizeof (long double) \
- || sizeof (Val2) == sizeof (long double) \
- ? Fct##l (Val1, Val2, Val3) \
+ (__extension__ (sizeof (Val1) > sizeof (double) \
+ || sizeof (Val2) > sizeof (double) \
+ ? Fct##l (Val1, Val2, Val3) \
+ : (sizeof (Val1) == sizeof (double) \
+ || sizeof (Val2) == sizeof (double) \
+ ? Fct (Val1, Val2, Val3) \
+ : Fct##f (Val1, Val2, Val3))))
+
+# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
+ (__extension__ (sizeof (Val1) > sizeof (double) \
+ || sizeof (Val2) > sizeof (double) \
+ || sizeof (Val3) > sizeof (double) \
+ ? Fct##l (Val1, Val2, Val3) \
+ : (sizeof (Val1) == sizeof (double) \
+ || sizeof (Val2) == sizeof (double) \
+ || sizeof (Val3) == sizeof (double) \
+ ? Fct (Val1, Val2, Val3) \
: Fct##f (Val1, Val2, Val3))))
# define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
- (__extension__ (sizeof (__real__ (Val)) == sizeof (double) \
+ (__extension__ (sizeof (__real__ (val)) > sizeof (double) \
? (sizeof (__real__ (Val)) == sizeof (Val) \
- ? Fct (Val) \
- : Cfct (Val)) \
- : (sizeof (__real__ (Val)) == sizeof (long double) \
+ ? Fct##l (Val) \
+ : Cfct##l (Val)) \
+ : (sizeof (__real__ (val)) == sizeof (double) \
? (sizeof (__real__ (Val)) == sizeof (Val) \
- ? Fct##l (Val) \
- : Cfct##l (Val)) \
+ ? Fct (Val) \
+ : Cfct (Val)) \
: (sizeof (__real__ (Val)) == sizeof (Val) \
? Fct##f (Val) \
: Cfct##f (Val)))))
+/* XXX This definition has to be changed as soon as the compiler understands
+ the imaginary keyword. */
# define __TGMATH_UNARY_IMAG_ONLY(Val, Fct) \
- (__extension__ (sizeof (Val) == sizeof (__complex__ double) \
- ? Fct (Val) \
- : (sizeof (Val) == sizeof (__complex__ long double) \
- ? Fct##l (Val) \
+ (__extension__ (sizeof (Val) > sizeof (__complex__ double) \
+ ? Fct##l (Val) \
+ : (sizeof (Val) == sizeof (__complex__ double) \
+ ? Fct (Val) \
: Fct##f (Val))))
# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
- (__extension__ (sizeof (__real__ (Val1)) == sizeof (double) \
- || sizeof (__real__ (Val2)) == sizeof (double) \
+ (__extension__ (sizeof (__real__ (Val1)) > sizeof (double) \
+ || sizeof (__real__ (Val2)) > sizeof (double) \
? (sizeof (__real__ (Val1)) == sizeof (Val1) \
&& sizeof (__real__ (Val2)) == sizeof (Val2) \
- ? Fct (Val1, Val2) \
- : Cfct (Val1, Val2)) \
- : (sizeof (__real__ (Val1)) == sizeof (long double) \
- || sizeof (__real__ (Val2)) == sizeof (long double) \
+ ? Fct##l (Val1, Val2) \
+ : Cfct##l (Val1, Val2)) \
+ : (sizeof (__real__ (Val1)) == sizeof (double) \
+ || sizeof (__real__ (Val2)) == sizeof (double) \
? (sizeof (__real__ (Val1)) == sizeof (Val1) \
&& sizeof (__real__ (Val2)) == sizeof (Val2) \
- ? Fct##l (Val1, Val2) \
- : Cfct##l (Val1, Val2)) \
+ ? Fct (Val1, Val2) \
+ : Cfct (Val1, Val2)) \
: (sizeof (__real__ (Val1)) == sizeof (Val1) \
&& sizeof (__real__ (Val2)) == sizeof (Val2) \
? Fct##f (Val1, Val2) \
@@ -293,6 +306,11 @@
#define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin)
+/* Multiply-add function computed as a ternary operation. */
+#define fma(Vat1, Val2, Val3) \
+ __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma)
+
+
/* Absolute value, conjugates, and projection. */
/* Argument value of Z. */
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index a7488e0..49374bd 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -88,7 +88,7 @@ extern long long int atoll __P ((__const char *__nptr));
extern double strtod __P ((__const char *__restrict __nptr,
char **__restrict __endptr));
-#ifdef __USE_GNU
+#ifdef __USE_ISOC9X
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
extern float strtof __P ((__const char *__restrict __nptr,
char **__restrict __endptr));
@@ -241,7 +241,7 @@ strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
return __strtoul_internal (__nptr, __endptr, __base, 0);
}
-# ifdef __USE_GNU
+# ifdef __USE_ISOC9X
extern __inline float
strtof (__const char *__restrict __nptr, char **__restrict __endptr)
{
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
index d4030b7..d4f7879 100644
--- a/sysdeps/standalone/bits/errno.h
+++ b/sysdeps/standalone/bits/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996, 1997, 1998 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
@@ -39,7 +39,6 @@
# define ENOMSG 11
# define ENAMETOOLONG 12
# define ELOOP 13
-# define ENOMSG 14
# define E2BIG 15
# define EINTR 16
# define ENOEXEC 18
diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist
index dbe401d..e10e24a 100644
--- a/sysdeps/unix/sysv/linux/Dist
+++ b/sysdeps/unix/sysv/linux/Dist
@@ -77,3 +77,5 @@ xstatconv.c
getdents64.c
getresuid.c
getresgid.c
+umount.S
+umount2.S
diff --git a/sysdeps/unix/sysv/linux/bits/sigcontext.h b/sysdeps/unix/sysv/linux/bits/sigcontext.h
index 08960b6..97cbf4b 100644
--- a/sysdeps/unix/sysv/linux/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 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,13 +16,14 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
-
+#ifndef sigcontext_struct
/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
we need sigcontext. */
-#define sigcontext_struct sigcontext
+# define sigcontext_struct sigcontext
-#include <asm/sigcontext.h>
+# include <asm/sigcontext.h>
+#endif
diff --git a/sysdeps/wordsize-32/inttypes.h b/sysdeps/wordsize-32/inttypes.h
index 79d3eed..250cbe3 100644
--- a/sysdeps/wordsize-32/inttypes.h
+++ b/sysdeps/wordsize-32/inttypes.h
@@ -82,6 +82,22 @@
# define PRIoFAST32 "o"
# define PRIoFAST64 "llo"
+/* Unsigned integers. */
+# define PRIu8 "u"
+# define PRIu16 "u"
+# define PRIu32 "u"
+# define PRIu64 "llu"
+
+# define PRIuLEAST8 "u"
+# define PRIuLEAST16 "u"
+# define PRIuLEAST32 "u"
+# define PRIuLEAST64 "llu"
+
+# define PRIuFAST8 "u"
+# define PRIuFAST16 "u"
+# define PRIuFAST32 "u"
+# define PRIuFAST64 "llu"
+
/* lowercase hexadecimal notation. */
# define PRIx8 "x"
# define PRIx16 "x"
@@ -115,72 +131,119 @@
# define PRIXFAST64 "llX"
-/* Unsigned integers. */
-# define PRIu8 "u"
-# define PRIu16 "u"
-# define PRIu32 "u"
-# define PRIu64 "llu"
-
-# define PRIuLEAST8 "u"
-# define PRIuLEAST16 "u"
-# define PRIuLEAST32 "u"
-# define PRIuLEAST64 "llu"
-
-# define PRIuFAST8 "u"
-# define PRIuFAST16 "u"
-# define PRIuFAST32 "u"
-# define PRIuFAST64 "llu"
-
-
/* Macros for printing `intmax_t' and `uintmax_t'. */
# define PRIdMAX "lld"
+# define PRIiMAX "lli"
# define PRIoMAX "llo"
-# define PRIxMAX "llx"
# define PRIuMAX "llu"
+# define PRIxMAX "llx"
+# define PRIXMAX "llX"
/* Macros for printing `intptr_t' and `uintptr_t'. */
# define PRIdPTR "d"
+# define PRIiPTR "i"
# define PRIoPTR "o"
-# define PRIxPTR "x"
# define PRIuPTR "u"
+# define PRIxPTR "x"
+# define PRIXPTR "X"
/* Macros for scanning format specifiers. */
-/* Decimal notation. */
+/* Signed decimal notation. */
# define SCNd8 "hhd"
# define SCNd16 "hd"
# define SCNd32 "d"
# define SCNd64 "lld"
+# define SCNdLEAST8 "hhd"
+# define SCNdLEAST16 "hd"
+# define SCNdLEAST32 "d"
+# define SCNdLEAST64 "lld"
+
+# define SCNdFAST8 "hhd"
+# define SCNdFAST16 "d"
+# define SCNdFAST32 "d"
+# define SCNdFAST64 "lld"
+
+/* Signed decimal notation. */
# define SCNi8 "hhi"
# define SCNi16 "hi"
# define SCNi32 "i"
# define SCNi64 "lli"
+# define SCNiLEAST8 "hhi"
+# define SCNiLEAST16 "hi"
+# define SCNiLEAST32 "i"
+# define SCNiLEAST64 "lli"
+
+# define SCNiFAST8 "hhi"
+# define SCNiFAST16 "i"
+# define SCNiFAST32 "i"
+# define SCNiFAST64 "lli"
+
+/* Unsigned decimal notation. */
# define SCNu8 "hhu"
# define SCNu16 "hu"
# define SCNu32 "u"
# define SCNu64 "llu"
+# define SCNuLEAST8 "hhu"
+# define SCNuLEAST16 "hu"
+# define SCNuLEAST32 "u"
+# define SCNuLEAST64 "llu"
+
+# define SCNuFAST8 "hhu"
+# define SCNuFAST16 "u"
+# define SCNuFAST32 "u"
+# define SCNuFAST64 "llu"
+
/* Octal notation. */
# define SCNo8 "hho"
# define SCNo16 "ho"
# define SCNo32 "o"
# define SCNo64 "llo"
+# define SCNoLEAST8 "hho"
+# define SCNoLEAST16 "ho"
+# define SCNoLEAST32 "o"
+# define SCNoLEAST64 "llo"
+
+# define SCNoFAST8 "hho"
+# define SCNoFAST16 "o"
+# define SCNoFAST32 "o"
+# define SCNoFAST64 "llo"
+
/* Hexadecimal notation. */
# define SCNx8 "hhx"
# define SCNx16 "hx"
# define SCNx32 "x"
# define SCNx64 "llx"
+# define SCNxLEAST8 "hhx"
+# define SCNxLEAST16 "hx"
+# define SCNxLEAST32 "x"
+# define SCNxLEAST64 "llx"
+
+# define SCNxFAST8 "hhx"
+# define SCNxFAST16 "x"
+# define SCNxFAST32 "x"
+# define SCNxFAST64 "llx"
+
+
+/* Macros for scanning `intmax_t' and `uintmax_t'. */
+# define SCNdMAX "lld"
+# define SCNiMAX "lli"
+# define SCNoMAX "llo"
+# define SCNuMAX "llu"
+# define SCNxMAX "llx"
/* Macros for scaning `intptr_t' and `uintptr_t'. */
# define SCNdPTR "d"
# define SCNiPTR "i"
# define SCNoPTR "o"
+# define SCNuPTR "u"
# define SCNxPTR "x"
#endif /* C++ && format macros */
diff --git a/sysdeps/wordsize-64/inttypes.h b/sysdeps/wordsize-64/inttypes.h
index c76d2c8..61730bb 100644
--- a/sysdeps/wordsize-64/inttypes.h
+++ b/sysdeps/wordsize-64/inttypes.h
@@ -82,6 +82,22 @@
# define PRIoFAST32 "o"
# define PRIoFAST64 "lo"
+ /* Unsigned integers. */
+# define PRIu8 "u"
+# define PRIu16 "u"
+# define PRIu32 "u"
+# define PRIu64 "lu"
+
+# define PRIuLEAST8 "u"
+# define PRIuLEAST16 "u"
+# define PRIuLEAST32 "u"
+# define PRIuLEAST64 "lu"
+
+# define PRIuFAST8 "u"
+# define PRIuFAST16 "u"
+# define PRIuFAST32 "u"
+# define PRIuFAST64 "lu"
+
/* lowercase hexadecimal notation. */
# define PRIx8 "x"
# define PRIx16 "x"
@@ -115,54 +131,57 @@
# define PRIXFAST64 "lX"
-/* Unsigned integers. */
-# define PRIu8 "u"
-# define PRIu16 "u"
-# define PRIu32 "u"
-# define PRIu64 "lu"
-
-# define PRIuLEAST8 "u"
-# define PRIuLEAST16 "u"
-# define PRIuLEAST32 "u"
-# define PRIuLEAST64 "lu"
-
-# define PRIuFAST8 "u"
-# define PRIuFAST16 "u"
-# define PRIuFAST32 "u"
-# define PRIuFAST64 "lu"
-
-
/* Macros for printing `intmax_t' and `uintmax_t'. */
# define PRIdMAX "ld"
+# define PRIiMAX "li"
# define PRIoMAX "lo"
-# define PRIxMAX "lx"
# define PRIuMAX "lu"
+# define PRIxMAX "lx"
+# define PRIXMAX "lX"
/* Macros for printing `intptr_t' and `uintptr_t'. */
# define PRIdPTR "ld"
+# define PRIiPTR "li"
# define PRIoPTR "lo"
-# define PRIxPTR "lx"
# define PRIuPTR "lu"
+# define PRIxPTR "lx"
+# define PRIXPTR "lX"
/* Macros for printing format specifiers. */
-/* Decimal notation. */
+/* Signed decimal notation. */
# define SCNd8 "hhd"
# define SCNd16 "hd"
# define SCNd32 "d"
# define SCNd64 "ld"
+# define SCNdLEAST8 "hhd"
+# define SCNdLEAST16 "hd"
+# define SCNdLEAST32 "d"
+# define SCNdLEAST64 "ld"
+
+# define SCNdFAST8 "hhd"
+# define SCNdFAST16 "ld"
+# define SCNdFAST32 "ld"
+# define SCNdFAST64 "ld"
+
+/* Signed decimal notation. */
# define SCNi8 "hhi"
# define SCNi16 "hi"
# define SCNi32 "i"
# define SCNi64 "li"
-# define SCNu8 "hhu"
-# define SCNu16 "hu"
-# define SCNu32 "u"
-# define SCNu64 "lu"
+# define SCNiLEAST8 "hhi"
+# define SCNiLEAST16 "hi"
+# define SCNiLEAST32 "i"
+# define SCNiLEAST64 "li"
+
+# define SCNiFAST8 "hhi"
+# define SCNiFAST16 "li"
+# define SCNiFAST32 "li"
+# define SCNiFAST64 "li"
/* Octal notation. */
# define SCNo8 "hho"
@@ -170,23 +189,61 @@
# define SCNo32 "o"
# define SCNo64 "lo"
+# define SCNoLEAST8 "hho"
+# define SCNoLEAST16 "ho"
+# define SCNoLEAST32 "o"
+# define SCNoLEAST64 "lo"
+
+# define SCNoFAST8 "hho"
+# define SCNoFAST16 "lo"
+# define SCNoFAST32 "lo"
+# define SCNoFAST64 "lo"
+
+/* Unsigned decimal notation. */
+# define SCNu8 "hhu"
+# define SCNu16 "hu"
+# define SCNu32 "u"
+# define SCNu64 "lu"
+
+# define SCNuLEAST8 "hhu"
+# define SCNuLEAST16 "hu"
+# define SCNuLEAST32 "u"
+# define SCNuLEAST64 "lu"
+
+# define SCNuFAST8 "hhu"
+# define SCNuFAST16 "lu"
+# define SCNuFAST32 "lu"
+# define SCNuFAST64 "lu"
+
/* Hexadecimal notation. */
# define SCNx8 "hhx"
# define SCNx16 "hx"
# define SCNx32 "x"
# define SCNx64 "lx"
+# define SCNxLEAST8 "hhx"
+# define SCNxLEAST16 "hx"
+# define SCNxLEAST32 "x"
+# define SCNxLEAST64 "lx"
+
+# define SCNxFAST8 "hhx"
+# define SCNxFAST16 "lx"
+# define SCNxFAST32 "lx"
+# define SCNxFAST64 "lx"
+
-/* Macros for scaning `intfast_t' and `uintfast_t'. */
-# define SCNdFAST "ld"
-# define SCNiFAST "li"
-# define SCNoFAST "lo"
-# define SCNxFAST "lx"
+/* Macros for scanning `intmax_t' and `uintmax_t'. */
+# define SCNdMAX "ld"
+# define SCNiMAX "li"
+# define SCNoMAX "lo"
+# define SCNuMAX "lu"
+# define SCNxMAX "lx"
-/* Macros for scaning `intptr_t' and `uintptr_t'. */
+/* Macros for scanning `intptr_t' and `uintptr_t'. */
# define SCNdPTR "ld"
# define SCNiPTR "li"
# define SCNoPTR "lo"
+# define SCNuPTR "lu"
# define SCNxPTR "lx"
#endif /* C++ && format macros */