summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-01-06 22:18:46 +0000
committerJakub Jelinek <jakub@redhat.com>2005-01-06 22:18:46 +0000
commite7cbcee4982d8caa809a91c9cfef5fda67445f0a (patch)
treef3bd1fe9ebe4f9bc6e776d531cd1d8852a7b5bae
parentf19db0eaff4a01856f67d58e2a07dbf63f8d132f (diff)
Updated to fedora-glibc-20050106T2203cvs/fedora-glibc-2_3_4-5
-rw-r--r--ChangeLog12
-rw-r--r--WUR-REPORT45
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in14
-rw-r--r--libio/stdio.h49
-rw-r--r--misc/sys/cdefs.h8
-rw-r--r--posix/regex_internal.c1
-rw-r--r--posix/unistd.h116
-rw-r--r--stdlib/stdlib.h138
9 files changed, 238 insertions, 149 deletions
diff --git a/ChangeLog b/ChangeLog
index bab27fa5d2..ab874d8fed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-06 Ulrich Drepper <drepper@redhat.com>
+
+ * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640]
+
2004-12-22 Steven Munroe <sjmunroe@us.ibm.com>
* math/libm-test.inc (rint_test_tonearest): New test.
@@ -46,6 +50,13 @@
alignment. Fix -0.0 case. Remove redundant const values.
Use float const.
+2005-01-06 Ulrich Drepper <drepper@redhat.com>
+
+ * misc/sys/cdefs.h: Define __wur.
+ * libio/stdio.h: Use __wur for a number of interfaces.
+ * posix/unistd.h: Likewise.
+ * stdlib/stdlib.h: Likewise.
+
2004-12-29 Jakub Jelinek <jakub@redhat.com>
* sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Use
@@ -390,6 +401,7 @@
(transit_state): Expect state->trtable to be a 256-item
transition table. Reorganize code to have less tests in
the common case, and to save an indentation level.
+ * posix/regex_internal.c (free_state): Free word_trtable.
2004-12-21 Jakub Jelinek <jakub@redhat.com>
diff --git a/WUR-REPORT b/WUR-REPORT
new file mode 100644
index 0000000000..52c4a812d9
--- /dev/null
+++ b/WUR-REPORT
@@ -0,0 +1,45 @@
+<unistd.h>:
+
+lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
+ the descriptor is fine.
+lseek64: same
+
+setuid: will always succeed given correct privileges, so there might
+ be places which don't check for it.
+setreuid: same
+seteuid: same
+setgid: same
+setregid: same
+setegid: same
+setresuid: same
+setresgid: same
+
+
+<stdio.h>:
+
+setvbuf: if stream and buffer are fine and other parameters constant,
+ it cannot really fail.
+fseek: see lseek
+fseeko: likewise
+fgetpos: similarly
+fsetpos: likewise
+
+
+<stdlib.h>:
+
+atext: it is guaranteed that a certain number of handlers can be
+ registered, so some calls might need not be checked
+on_exit: same
+random functions: one might want to discard a number of results. In any
+ case, no security problem
+
+
+putenv: probably SHOULD be marked, but we'll wait a bit.
+setenv: likewise
+unsetenv: likewise
+clearenv: likewise
+
+mbstowcs: probably SHOULD be marked
+wcstombs: likewise
+
+ptsname_r: probably SHOULD be marked
diff --git a/fedora/branch.mk b/fedora/branch.mk
index da12880aec..4c1e1f0f5c 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -1,5 +1,5 @@
# This file is updated automatically by Makefile.
glibc-branch := fedora
glibc-base := HEAD
-fedora-sync-date := 2005-01-06 14:43 UTC
-fedora-sync-tag := fedora-glibc-20050106T1443
+fedora-sync-date := 2005-01-06 22:03 UTC
+fedora-sync-tag := fedora-glibc-20050106T2203
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index 4c7dc698c3..d063010b1f 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 4
+%define glibcrelease 5
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define prelinkarches noarch
%define nptlarches i386 i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64
@@ -1057,11 +1057,11 @@ for f in `find $RPM_BUILD_ROOT/%{_lib} -type l`; do
done
echo Sorting source file lists. Might take a while...
-xargs -0 -n 1 echo < $sf | LANG=C sort -u > $sf.sorted
-xargs -0 -n 1 echo < $csf | LANG=C sort -u > $csf.sorted
+xargs -0 -n 1 echo < $sf | LC_ALL=C grep -v '/<internal>$' | LC_ALL=C sort -u > $sf.sorted
+xargs -0 -n 1 echo < $csf | LC_ALL=C grep -v '/<internal>$' | LC_ALL=C sort -u > $csf.sorted
mkdir -p $RPM_BUILD_ROOT/usr/src/debug
cat $sf.sorted $csf.sorted \
- | (cd $RPM_BUILD_DIR; LANG=C sort -u | cpio -pdm ${RPM_BUILD_ROOT}/usr/src/debug)
+ | (cd $RPM_BUILD_DIR; LC_ALL=C sort -u | cpio -pdm ${RPM_BUILD_ROOT}/usr/src/debug)
# stupid cpio creates new directories in mode 0700, fixup
find $RPM_BUILD_ROOT/usr/src/debug -type d -print | xargs chmod a+rx
@@ -1270,6 +1270,12 @@ rm -f *.filelist*
%endif
%changelog
+* Thu Jan 6 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-5
+- update from CVS
+ - add some warn_unused_result marking
+ - make ftruncate available even for just -D_POSIX_C_SOURCE=200112L
+ (BZ#640)
+
* Thu Jan 6 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-4
- update from CVS
- fix IA-32 stack alignment for LinuxThreads thread functions
diff --git a/libio/stdio.h b/libio/stdio.h
index 941a2afc74..9b529dd839 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -1,5 +1,5 @@
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991,1994-2002,2003,2004 Free Software Foundation, Inc.
+ Copyright (C) 1991,1994-2004, 2005 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
@@ -151,9 +151,9 @@ extern struct _IO_FILE *stderr; /* Standard error output stream. */
__BEGIN_NAMESPACE_STD
/* Remove file FILENAME. */
-extern int remove (__const char *__filename) __THROW;
+extern int remove (__const char *__filename) __THROW __wur;
/* Rename file OLD to NEW. */
-extern int rename (__const char *__old, __const char *__new) __THROW;
+extern int rename (__const char *__old, __const char *__new) __THROW __wur;
__END_NAMESPACE_STD
@@ -393,15 +393,15 @@ __BEGIN_NAMESPACE_STD
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fscanf (FILE *__restrict __stream,
- __const char *__restrict __format, ...);
+ __const char *__restrict __format, ...) __wur;
/* Read formatted input from stdin.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern int scanf (__const char *__restrict __format, ...);
+extern int scanf (__const char *__restrict __format, ...) __wur;
/* Read formatted input from S. */
extern int sscanf (__const char *__restrict __s,
- __const char *__restrict __format, ...) __THROW;
+ __const char *__restrict __format, ...) __THROW __wur;
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
@@ -412,19 +412,19 @@ __BEGIN_NAMESPACE_C99
marked with __THROW. */
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
_G_va_list __arg)
- __attribute__ ((__format__ (__scanf__, 2, 0)));
+ __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
/* Read formatted input from stdin into argument list ARG.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int vscanf (__const char *__restrict __format, _G_va_list __arg)
- __attribute__ ((__format__ (__scanf__, 1, 0)));
+ __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
/* Read formatted input from S into argument list ARG. */
extern int vsscanf (__const char *__restrict __s,
__const char *__restrict __format, _G_va_list __arg)
- __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
+ __THROW __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
__END_NAMESPACE_C99
#endif /* Use ISO C9x. */
@@ -525,14 +525,15 @@ __BEGIN_NAMESPACE_STD
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+ __wur;
/* Get a newline-terminated string from stdin, removing the newline.
DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern char *gets (char *__s);
+extern char *gets (char *__s) __wur;
__END_NAMESPACE_STD
#ifdef __USE_GNU
@@ -543,7 +544,7 @@ __END_NAMESPACE_STD
or due to the implementation it is a cancellation point and
therefore not marked with __THROW. */
extern char *fgets_unlocked (char *__restrict __s, int __n,
- FILE *__restrict __stream);
+ FILE *__restrict __stream) __wur;
#endif
@@ -560,10 +561,10 @@ extern char *fgets_unlocked (char *__restrict __s, int __n,
therefore not marked with __THROW. */
extern _IO_ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
- FILE *__restrict __stream);
+ FILE *__restrict __stream) __wur;
extern _IO_ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
- FILE *__restrict __stream);
+ FILE *__restrict __stream) __wur;
/* Like `getdelim', but reads up to a newline.
@@ -573,7 +574,7 @@ extern _IO_ssize_t getdelim (char **__restrict __lineptr,
therefore not marked with __THROW. */
extern _IO_ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
- FILE *__restrict __stream);
+ FILE *__restrict __stream) __wur;
#endif
@@ -595,7 +596,7 @@ extern int puts (__const char *__s);
This function is a possible cancellation points and therefore not
marked with __THROW. */
-extern int ungetc (int __c, FILE *__stream);
+extern int ungetc (int __c, FILE *__stream) __wur;
/* Read chunks of generic data from STREAM.
@@ -603,13 +604,13 @@ extern int ungetc (int __c, FILE *__stream);
This function is a possible cancellation points and therefore not
marked with __THROW. */
extern size_t fread (void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream);
+ size_t __n, FILE *__restrict __stream) __wur;
/* Write chunks of generic data to STREAM.
This function is a possible cancellation points and therefore not
marked with __THROW. */
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __s);
+ size_t __n, FILE *__restrict __s) __wur;
__END_NAMESPACE_STD
#ifdef __USE_GNU
@@ -631,9 +632,9 @@ extern int fputs_unlocked (__const char *__restrict __s,
or due to the implementation they are cancellation points and
therefore not marked with __THROW. */
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream);
+ size_t __n, FILE *__restrict __stream) __wur;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream);
+ size_t __n, FILE *__restrict __stream) __wur;
#endif
@@ -647,7 +648,7 @@ extern int fseek (FILE *__stream, long int __off, int __whence);
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern long int ftell (FILE *__stream);
+extern long int ftell (FILE *__stream) __wur;
/* Rewind to the beginning of STREAM.
This function is a possible cancellation point and therefore not
@@ -671,7 +672,7 @@ extern int fseeko (FILE *__stream, __off_t __off, int __whence);
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern __off_t ftello (FILE *__stream);
+extern __off_t ftello (FILE *__stream) __wur;
# else
# ifdef __REDIRECT
extern int __REDIRECT (fseeko,
@@ -712,7 +713,7 @@ __END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
-extern __off64_t ftello64 (FILE *__stream);
+extern __off64_t ftello64 (FILE *__stream) __wur;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
#endif
@@ -810,7 +811,7 @@ extern void flockfile (FILE *__stream) __THROW;
/* Try to acquire ownership of STREAM but do not block if it is not
possible. */
-extern int ftrylockfile (FILE *__stream) __THROW;
+extern int ftrylockfile (FILE *__stream) __THROW __wur;
/* Relinquish the ownership granted for STREAM. */
extern void funlockfile (FILE *__stream) __THROW;
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 475cf62961..6ac21013cc 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -255,6 +255,14 @@
# define __nonnull(params)
#endif
+/* If fortification mode, we warn about unused results of certain
+ function calls which can lead to problems. */
+#if __GNUC_PREREQ (3,4) && __USE_FORTIFY_LEVEL > 0
+# define __wur __attribute__ ((__warn_unused_result__))
+#else
+# define __wur /* Ignore */
+#endif
+
/* It is possible to compile containing GCC extensions even if GCC is
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index 001b50b134..f15cb575eb 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -1668,6 +1668,7 @@ free_state (state)
re_free (state->entrance_nodes);
}
re_node_set_free (&state->nodes);
+ re_free (state->word_trtable);
re_free (state->trtable);
re_free (state);
}
diff --git a/posix/unistd.h b/posix/unistd.h
index 5d42169e82..06c8ca7c21 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2003, 2004, 2005 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
@@ -295,7 +295,8 @@ extern __off64_t __REDIRECT_NTH (lseek,
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW;
+extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
+ __THROW;
#endif
/* Close the file descriptor FD.
@@ -309,13 +310,13 @@ extern int close (int __fd);
This function is a cancellation point and therefore not marked with
__THROW. */
-extern ssize_t read (int __fd, void *__buf, size_t __nbytes);
+extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur;
/* Write N bytes of BUF to FD. Return the number written, or -1.
This function is a cancellation point and therefore not marked with
__THROW. */
-extern ssize_t write (int __fd, __const void *__buf, size_t __n);
+extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur;
#ifdef __USE_UNIX98
# ifndef __USE_FILE_OFFSET64
@@ -326,7 +327,7 @@ extern ssize_t write (int __fd, __const void *__buf, size_t __n);
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
- __off_t __offset);
+ __off_t __offset) __wur;
/* Write N bytes of BUF to FD at the given position OFFSET without
changing the file pointer. Return the number written, or -1.
@@ -334,15 +335,15 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
- __off_t __offset);
+ __off_t __offset) __wur;
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset),
- pread64);
+ pread64) __wur;
extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
size_t __nbytes, __off64_t __offset),
- pwrite64);
+ pwrite64) __wur;
# else
# define pread pread64
# define pwrite pwrite64
@@ -354,11 +355,11 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
changing the file pointer. Return the number read, -1 for errors
or 0 for EOF. */
extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
- __off64_t __offset);
+ __off64_t __offset) __wur;
/* Write N bytes of BUF to FD at the given position OFFSET without
changing the file pointer. Return the number written, or -1. */
extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
- __off64_t __offset);
+ __off64_t __offset) __wur;
# endif
#endif
@@ -366,7 +367,7 @@ extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
If successful, two file descriptors are stored in PIPEDES;
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
-extern int pipe (int __pipedes[2]) __THROW;
+extern int pipe (int __pipedes[2]) __THROW __wur;
/* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM.
If SECONDS is zero, any currently scheduled alarm will be cancelled.
@@ -416,26 +417,26 @@ extern int pause (void);
/* Change the owner and group of FILE. */
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Change the owner and group of the file that FD is open on. */
-extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW;
+extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur;
/* Change owner and group of FILE, if it is a symbolic
link the ownership of the symbolic link is changed. */
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
#endif /* Use BSD || X/Open Unix. */
/* Change the process's working directory to PATH. */
-extern int chdir (__const char *__path) __THROW __nonnull ((1));
+extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Change the process's working directory to the one FD is open on. */
-extern int fchdir (int __fd) __THROW;
+extern int fchdir (int __fd) __THROW __wur;
#endif
/* Get the pathname of the current working directory,
@@ -445,7 +446,7 @@ extern int fchdir (int __fd) __THROW;
an array is allocated with `malloc'; the array is SIZE
bytes long, unless SIZE == 0, in which case it is as
big as necessary. */
-extern char *getcwd (char *__buf, size_t __size) __THROW;
+extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
#ifdef __USE_GNU
/* Return a malloc'd string containing the current directory name.
@@ -458,15 +459,16 @@ extern char *get_current_dir_name (void) __THROW;
/* Put the absolute pathname of the current working directory in BUF.
If successful, return BUF. If not, put an error message in
BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
-extern char *getwd (char *__buf) __THROW __nonnull ((1));
+extern char *getwd (char *__buf)
+ __THROW __nonnull ((1)) __attribute_deprecated__ __wur;
#endif
/* Duplicate FD, returning a new file descriptor on the same file. */
-extern int dup (int __fd) __THROW;
+extern int dup (int __fd) __THROW __wur;
/* Duplicate FD to FD2, closing FD2 and making it open on the same file. */
-extern int dup2 (int __fd, int __fd2) __THROW;
+extern int dup2 (int __fd, int __fd2) __THROW __wur;
/* NULL-terminated array of "NAME=VALUE" environment variables. */
extern char **__environ;
@@ -516,7 +518,7 @@ extern int execlp (__const char *__file, __const char *__arg, ...)
#if defined __USE_MISC || defined __USE_XOPEN
/* Add INC to priority of the current process. */
-extern int nice (int __inc) __THROW;
+extern int nice (int __inc) __THROW __wur;
#endif
@@ -629,7 +631,7 @@ extern __gid_t getegid (void) __THROW;
/* If SIZE is zero, return the number of supplementary groups
the calling process is in. Otherwise, fill in the group IDs
of its supplementary groups in LIST and return the number written. */
-extern int getgroups (int __size, __gid_t __list[]) __THROW;
+extern int getgroups (int __size, __gid_t __list[]) __THROW __wur;
#ifdef __USE_GNU
/* Return nonzero iff the calling process is in group GID. */
@@ -673,19 +675,23 @@ extern int setegid (__gid_t __gid) __THROW;
#ifdef __USE_GNU
/* Fetch the effective user ID, real user ID, and saved-set user ID,
of the calling process. */
-extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
+extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid)
+ __THROW;
/* Fetch the effective group ID, real group ID, and saved-set group ID,
of the calling process. */
-extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
+extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid)
+ __THROW;
/* Set the effective user ID, real user ID, and saved-set user ID,
of the calling process to EUID, RUID, and SUID, respectively. */
-extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
+extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid)
+ __THROW;
/* Set the effective group ID, real group ID, and saved-set group ID,
of the calling process to EGID, RGID, and SGID, respectively. */
-extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
+extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid)
+ __THROW;
#endif
@@ -710,7 +716,7 @@ extern char *ttyname (int __fd) __THROW;
/* Store at most BUFLEN characters of the pathname of the terminal FD is
open on in BUF. Return 0 on success, otherwise an error number. */
extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
- __THROW __nonnull ((2));
+ __THROW __nonnull ((2)) __wur;
/* Return 1 if FD is a valid descriptor associated
with a terminal, zero if not. */
@@ -726,18 +732,18 @@ extern int ttyslot (void) __THROW;
/* Make a link to FROM named TO. */
extern int link (__const char *__from, __const char *__to)
- __THROW __nonnull ((1, 2));
+ __THROW __nonnull ((1, 2)) __wur;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Make a symbolic link to FROM named TO. */
extern int symlink (__const char *__from, __const char *__to)
- __THROW __nonnull ((1, 2));
+ __THROW __nonnull ((1, 2)) __wur;
/* Read the contents of the symbolic link PATH into no more than
LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
extern int readlink (__const char *__restrict __path, char *__restrict __buf,
- size_t __len) __THROW __nonnull ((1, 2));
+ size_t __len) __THROW __nonnull ((1, 2)) __wur;
#endif /* Use BSD. */
/* Remove the link NAME. */
@@ -796,20 +802,20 @@ extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));
/* Set the name of the current host to NAME, which is LEN bytes long.
This call is restricted to the super-user. */
extern int sethostname (__const char *__name, size_t __len)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
/* Set the current machine's Internet number to ID.
This call is restricted to the super-user. */
-extern int sethostid (long int __id) __THROW;
+extern int sethostid (long int __id) __THROW __wur;
/* Get and set the NIS (aka YP) domain name, if any.
Called just like `gethostname' and `sethostname'.
The NIS domain name is usually the empty string when not using NIS. */
extern int getdomainname (char *__name, size_t __len)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
extern int setdomainname (__const char *__name, size_t __len)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
/* Revoke access permissions to all processes currently communicating
@@ -818,7 +824,7 @@ extern int setdomainname (__const char *__name, size_t __len)
extern int vhangup (void) __THROW;
/* Revoke the access of all descriptors currently open on FILE. */
-extern int revoke (__const char *__file) __THROW __nonnull ((1));
+extern int revoke (__const char *__file) __THROW __nonnull ((1)) __wur;
/* Enable statistical profiling, writing samples of the PC into at most
@@ -846,14 +852,14 @@ extern void setusershell (void) __THROW; /* Rewind and re-read the file. */
/* Put the program in the background, and dissociate from the controlling
terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero,
redirects stdin, stdout, and stderr to /dev/null. */
-extern int daemon (int __nochdir, int __noclose) __THROW;
+extern int daemon (int __nochdir, int __noclose) __THROW __wur;
#endif /* Use BSD || X/Open. */
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
/* Make PATH be the root directory (the starting point for absolute paths).
This call is restricted to the super-user. */
-extern int chroot (__const char *__path) __THROW __nonnull ((1));
+extern int chroot (__const char *__path) __THROW __nonnull ((1)) __wur;
/* Prompt with PROMPT and read a string from the terminal without echoing.
Uses /dev/tty if possible; otherwise stderr and stdin. */
@@ -884,52 +890,56 @@ extern void sync (void) __THROW;
extern int getpagesize (void) __THROW __attribute__ ((__const__));
+/* Return the maximum number of file descriptors
+ the current process could possibly have. */
+extern int getdtablesize (void) __THROW;
+
+
/* Truncate FILE to LENGTH bytes. */
# ifndef __USE_FILE_OFFSET64
extern int truncate (__const char *__file, __off_t __length)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (truncate,
(__const char *__file, __off64_t __length),
- truncate64) __nonnull ((1));
+ truncate64) __nonnull ((1)) __wur;
# else
# define truncate truncate64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int truncate64 (__const char *__file, __off64_t __length)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
# endif
+#endif /* Use BSD || X/Open Unix. */
+
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
+
/* Truncate the file FD is open on to LENGTH bytes. */
# ifndef __USE_FILE_OFFSET64
-extern int ftruncate (int __fd, __off_t __length) __THROW;
+extern int ftruncate (int __fd, __off_t __length) __THROW __wur;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length),
- ftruncate64);
+ ftruncate64) __wur;
# else
# define ftruncate ftruncate64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int ftruncate64 (int __fd, __off64_t __length) __THROW;
+extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur;
# endif
-
-/* Return the maximum number of file descriptors
- the current process could possibly have. */
-extern int getdtablesize (void) __THROW;
-
-#endif /* Use BSD || X/Open Unix. */
+#endif /* Use BSD || X/Open Unix || POSIX 2003. */
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Set the end of accessible data space (aka "the break") to ADDR.
Returns zero on success and -1 for errors (with errno set). */
-extern int brk (void *__addr) __THROW;
+extern int brk (void *__addr) __THROW __wur;
/* Increase or decrease the end of accessible data space by DELTA bytes.
If successful, returns the address the previous end of data space
@@ -973,17 +983,17 @@ extern long int syscall (long int __sysno, ...) __THROW;
# define F_TEST 3 /* Test a region for other processes locks. */
# ifndef __USE_FILE_OFFSET64
-extern int lockf (int __fd, int __cmd, __off_t __len);
+extern int lockf (int __fd, int __cmd, __off_t __len) __wur;
# else
# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
- lockf64);
+ lockf64) __wur;
# else
# define lockf lockf64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int lockf64 (int __fd, int __cmd, __off64_t __len);
+extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur;
# endif
#endif /* Use misc and F_LOCK not already defined. */
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 1bda32262b..e1d60d7619 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2003, 2004, 2005 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
@@ -137,44 +137,45 @@ __END_NAMESPACE_C99
/* Maximum length of a multibyte character in the current locale. */
#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
-extern size_t __ctype_get_mb_cur_max (void) __THROW;
+extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
__BEGIN_NAMESPACE_STD
/* Convert a string to a floating-point number. */
extern double atof (__const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1));
+ __THROW __attribute_pure__ __nonnull ((1)) __wur;
/* Convert a string to an integer. */
extern int atoi (__const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1));
+ __THROW __attribute_pure__ __nonnull ((1)) __wur;
/* Convert a string to a long integer. */
extern long int atol (__const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1));
+ __THROW __attribute_pure__ __nonnull ((1)) __wur;
__END_NAMESPACE_STD
#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
__BEGIN_NAMESPACE_C99
/* Convert a string to a long long integer. */
__extension__ extern long long int atoll (__const char *__nptr)
- __THROW __attribute_pure__ __nonnull ((1));
+ __THROW __attribute_pure__ __nonnull ((1)) __wur;
__END_NAMESPACE_C99
#endif
__BEGIN_NAMESPACE_STD
/* Convert a string to a floating-point number. */
extern double strtod (__const char *__restrict __nptr,
- char **__restrict __endptr) __THROW __nonnull ((1));
+ char **__restrict __endptr)
+ __THROW __nonnull ((1)) __wur;
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
extern float strtof (__const char *__restrict __nptr,
- char **__restrict __endptr) __THROW __nonnull ((1));
+ char **__restrict __endptr) __THROW __nonnull ((1)) __wur;
extern long double strtold (__const char *__restrict __nptr,
char **__restrict __endptr)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
__END_NAMESPACE_C99
#endif
@@ -182,11 +183,11 @@ __BEGIN_NAMESPACE_STD
/* Convert a string to a long integer. */
extern long int strtol (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
/* Convert a string to an unsigned long integer. */
extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
__END_NAMESPACE_C99
#if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD
@@ -194,12 +195,12 @@ __END_NAMESPACE_C99
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
/* Convert a string to an unsigned quadword integer. */
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
#endif /* GCC and use BSD. */
#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
@@ -208,12 +209,12 @@ __BEGIN_NAMESPACE_C99
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
/* Convert a string to an unsigned quadword integer. */
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
__END_NAMESPACE_C99
#endif /* ISO C99 or GCC and use MISC. */
@@ -238,36 +239,37 @@ __END_NAMESPACE_C99
use as an additional parameter. */
extern long int strtol_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
- __locale_t __loc) __THROW __nonnull ((1, 4));
+ __locale_t __loc) __THROW __nonnull ((1, 4)) __wur;
extern unsigned long int strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
- __THROW __nonnull ((1, 4));
+ __THROW __nonnull ((1, 4)) __wur;
__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc)
- __THROW __nonnull ((1, 4));
+ __THROW __nonnull ((1, 4)) __wur;
__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
- __THROW __nonnull ((1, 4));
+ __THROW __nonnull ((1, 4)) __wur;
extern double strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
- __THROW __nonnull ((1, 3));
+ __THROW __nonnull ((1, 3)) __wur;
extern float strtof_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
- __THROW __nonnull ((1, 3));
+ __THROW __nonnull ((1, 3)) __wur;
extern long double strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
- __locale_t __loc) __THROW __nonnull ((1, 3));
+ __locale_t __loc)
+ __THROW __nonnull ((1, 3)) __wur;
#endif /* GNU */
@@ -276,25 +278,26 @@ extern long double strtold_l (__const char *__restrict __nptr,
extern double __strtod_internal (__const char *__restrict __nptr,
char **__restrict __endptr, int __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
extern float __strtof_internal (__const char *__restrict __nptr,
char **__restrict __endptr, int __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
extern long double __strtold_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
- int __group) __THROW __nonnull ((1));
+ int __group)
+ __THROW __nonnull ((1)) __wur;
#ifndef __strtol_internal_defined
extern long int __strtol_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, int __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
# define __strtol_internal_defined 1
#endif
#ifndef __strtoul_internal_defined
extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, int __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
# define __strtoul_internal_defined 1
#endif
#if defined __GNUC__ || defined __USE_ISOC99
@@ -303,7 +306,7 @@ __extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, int __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
# define __strtoll_internal_defined 1
# endif
# ifndef __strtoull_internal_defined
@@ -312,7 +315,7 @@ extern unsigned long long int __strtoull_internal (__const char *
__restrict __nptr,
char **__restrict __endptr,
int __base, int __group)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
# define __strtoull_internal_defined 1
# endif
#endif /* GCC */
@@ -421,11 +424,11 @@ __END_NAMESPACE_C99
/* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant
digit first. Returns a pointer to static storage overwritten by the
next call. */
-extern char *l64a (long int __n) __THROW;
+extern char *l64a (long int __n) __THROW __wur;
/* Read a number from a string S in base 64 as above. */
extern long int a64l (__const char *__s)
- __THROW __attribute_pure__ __nonnull ((1));
+ __THROW __attribute_pure__ __nonnull ((1)) __wur;
#endif /* Use SVID || extended X/Open. */
@@ -581,10 +584,10 @@ extern int lcong48_r (unsigned short int __param[7],
# define __malloc_and_calloc_defined
__BEGIN_NAMESPACE_STD
/* Allocate SIZE bytes of memory. */
-extern void *malloc (size_t __size) __THROW __attribute_malloc__;
+extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
extern void *calloc (size_t __nmemb, size_t __size)
- __THROW __attribute_malloc__;
+ __THROW __attribute_malloc__ __wur;
__END_NAMESPACE_STD
#endif
@@ -592,7 +595,8 @@ __END_NAMESPACE_STD
__BEGIN_NAMESPACE_STD
/* Re-allocate the previously allocated block
in PTR, making the new block SIZE bytes long. */
-extern void *realloc (void *__ptr, size_t __size) __THROW __attribute_malloc__;
+extern void *realloc (void *__ptr, size_t __size)
+ __THROW __attribute_malloc__ __wur;
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free (void *__ptr) __THROW;
__END_NAMESPACE_STD
@@ -608,13 +612,13 @@ extern void cfree (void *__ptr) __THROW;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */
-extern void *valloc (size_t __size) __THROW __attribute_malloc__;
+extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
#endif
#ifdef __USE_XOPEN2K
/* Allocate memory of SIZE bytes with an alignment of ALIGNMENT. */
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
- __THROW __attribute_malloc__ __nonnull ((1));
+ __THROW __attribute_malloc__ __nonnull ((1)) __wur;
#endif
__BEGIN_NAMESPACE_STD
@@ -651,12 +655,13 @@ __END_NAMESPACE_C99
__BEGIN_NAMESPACE_STD
/* Return the value of envariable NAME, or NULL if it doesn't exist. */
-extern char *getenv (__const char *__name) __THROW __nonnull ((1));
+extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur;
__END_NAMESPACE_STD
/* This function is similar to the above but returns NULL if the
programs is running with SUID or SGID enabled. */
-extern char *__secure_getenv (__const char *__name) __THROW __nonnull ((1));
+extern char *__secure_getenv (__const char *__name)
+ __THROW __nonnull ((1)) __wur;
#if defined __USE_SVID || defined __USE_XOPEN
/* The SVID says this is in <stdio.h>, but this seems a better place. */
@@ -688,7 +693,7 @@ extern int clearenv (void) __THROW;
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the file name unique.
Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */
-extern char *mktemp (char *__template) __THROW __nonnull ((1));
+extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur;
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
@@ -699,16 +704,17 @@ extern char *mktemp (char *__template) __THROW __nonnull ((1));
This function is a possible cancellation points and therefore not
marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
-extern int mkstemp (char *__template) __nonnull ((1));
+extern int mkstemp (char *__template) __nonnull ((1)) __wur;
# else
# ifdef __REDIRECT
-extern int __REDIRECT (mkstemp, (char *__template), mkstemp64) __nonnull ((1));
+extern int __REDIRECT (mkstemp, (char *__template), mkstemp64)
+ __nonnull ((1)) __wur;
# else
# define mkstemp mkstemp64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int mkstemp64 (char *__template) __nonnull ((1));
+extern int mkstemp64 (char *__template) __nonnull ((1)) __wur;
# endif
#endif
@@ -718,7 +724,7 @@ extern int mkstemp64 (char *__template) __nonnull ((1));
they are replaced with a string that makes the directory name unique.
Returns TEMPLATE, or a null pointer if it cannot get a unique name.
The directory is created mode 700. */
-extern char *mkdtemp (char *__template) __THROW __nonnull ((1));
+extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur;
#endif
@@ -727,7 +733,7 @@ __BEGIN_NAMESPACE_STD
This function is a cancellation point and therefore not marked with
__THROW. */
-extern int system (__const char *__command);
+extern int system (__const char *__command) __wur;
__END_NAMESPACE_STD
@@ -736,7 +742,7 @@ __END_NAMESPACE_STD
named file. The last file name component need not exist, and may be a
symlink to a nonexistent file. */
extern char *canonicalize_file_name (__const char *__name)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1)) __wur;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -747,7 +753,7 @@ extern char *canonicalize_file_name (__const char *__name)
ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the
name in RESOLVED. */
extern char *realpath (__const char *__restrict __name,
- char *__restrict __resolved) __THROW;
+ char *__restrict __resolved) __THROW __wur;
#endif
@@ -766,7 +772,7 @@ __BEGIN_NAMESPACE_STD
of SIZE bytes each, using COMPAR to perform the comparisons. */
extern void *bsearch (__const void *__key, __const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar)
- __nonnull ((1, 2, 5));
+ __nonnull ((1, 2, 5)) __wur;
/* Sort NMEMB elements of BASE, of SIZE bytes each,
using COMPAR to perform the comparisons. */
@@ -775,13 +781,13 @@ extern void qsort (void *__base, size_t __nmemb, size_t __size,
/* Return the absolute value of X. */
-extern int abs (int __x) __THROW __attribute__ ((__const__));
-extern long int labs (long int __x) __THROW __attribute__ ((__const__));
+extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
+extern long int labs (long int __x) __THROW __attribute__ ((__const__)) __wur;
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
__extension__ extern long long int llabs (long long int __x)
- __THROW __attribute__ ((__const__));
+ __THROW __attribute__ ((__const__)) __wur;
#endif
@@ -790,16 +796,16 @@ __BEGIN_NAMESPACE_STD
of the value of NUMER over DENOM. */
/* GCC may have built-ins for these someday. */
extern div_t div (int __numer, int __denom)
- __THROW __attribute__ ((__const__));
+ __THROW __attribute__ ((__const__)) __wur;
extern ldiv_t ldiv (long int __numer, long int __denom)
- __THROW __attribute__ ((__const__));
+ __THROW __attribute__ ((__const__)) __wur;
__END_NAMESPACE_STD
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
- __THROW __attribute__ ((__const__));
+ __THROW __attribute__ ((__const__)) __wur;
__END_NAMESPACE_C99
#endif
@@ -812,31 +818,31 @@ __END_NAMESPACE_C99
this. Set *DECPT with the position of the decimal character and *SIGN
with the sign of the number. */
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign) __THROW __nonnull ((3, 4));
+ int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur;
/* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT
with the position of the decimal character and *SIGN with the sign of
the number. */
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
- int *__restrict __sign) __THROW __nonnull ((3, 4));
+ int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur;
/* If possible convert VALUE to a string with NDIGIT significant digits.
Otherwise use exponential representation. The resulting string will
be written to BUF. */
extern char *gcvt (double __value, int __ndigit, char *__buf)
- __THROW __nonnull ((3));
+ __THROW __nonnull ((3)) __wur;
# ifdef __USE_MISC
/* Long double versions of above functions. */
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
- __THROW __nonnull ((3, 4));
+ __THROW __nonnull ((3, 4)) __wur;
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
- __THROW __nonnull ((3, 4));
+ __THROW __nonnull ((3, 4)) __wur;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
- __THROW __nonnull ((3));
+ __THROW __nonnull ((3)) __wur;
/* Reentrant version of the functions above which provide their own
@@ -863,14 +869,14 @@ extern int qfcvt_r (long double __value, int __ndigit,
__BEGIN_NAMESPACE_STD
/* Return the length of the multibyte character
in S, which is no longer than N. */
-extern int mblen (__const char *__s, size_t __n) __THROW;
+extern int mblen (__const char *__s, size_t __n) __THROW __wur;
/* Return the length of the given multibyte character,
putting its `wchar_t' representation in *PWC. */
extern int mbtowc (wchar_t *__restrict __pwc,
- __const char *__restrict __s, size_t __n) __THROW;
+ __const char *__restrict __s, size_t __n) __THROW __wur;
/* Put the multibyte character represented
by WCHAR in S, returning its length. */
-extern int wctomb (char *__s, wchar_t __wchar) __THROW;
+extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
/* Convert a multibyte string to a wide char string. */
@@ -888,7 +894,7 @@ __END_NAMESPACE_STD
or negative response expression as specified by the LC_MESSAGES category
in the program's current locale. Returns 1 if affirmative, 0 if
negative, and -1 if not matching. */
-extern int rpmatch (__const char *__response) __THROW __nonnull ((1));
+extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur;
#endif
@@ -902,7 +908,7 @@ extern int rpmatch (__const char *__response) __THROW __nonnull ((1));
extern int getsubopt (char **__restrict __optionp,
char *__const *__restrict __tokens,
char **__restrict __valuep)
- __THROW __nonnull ((1, 2, 3));
+ __THROW __nonnull ((1, 2, 3)) __wur;
#endif
@@ -916,7 +922,7 @@ extern void setkey (__const char *__key) __THROW __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Return a master pseudo-terminal handle. */
-extern int posix_openpt (int __oflag);
+extern int posix_openpt (int __oflag) __wur;
#endif
#ifdef __USE_XOPEN
@@ -933,7 +939,7 @@ extern int unlockpt (int __fd) __THROW;
/* Return the pathname of the pseudo terminal slave assoicated with
the master FD is open on, or NULL on errors.
The returned storage is good until the next call to this function. */
-extern char *ptsname (int __fd) __THROW;
+extern char *ptsname (int __fd) __THROW __wur;
#endif
#ifdef __USE_GNU