summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-04 22:52:26 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-04 22:52:26 +0000
commit005d20f04dff3665c9533417bdad06d7d208bf9a (patch)
treebfe0aa8c46149f67794cd45a4fdb259c57b521cf /include
parentd8059900ddf188607828b12a174b83decade3d61 (diff)
Sync up w/ glibc
Diffstat (limited to 'include')
-rw-r--r--include/arpa/nameser.h100
-rw-r--r--include/cpio.h1
-rw-r--r--include/err.h18
-rw-r--r--include/error.h13
-rw-r--r--include/ftw.h42
-rw-r--r--include/grp.h111
-rw-r--r--include/iconv.h20
-rw-r--r--include/libintl.h4
-rw-r--r--include/link.h16
-rw-r--r--include/math.h18
-rw-r--r--include/net/if_ppp.h2
-rw-r--r--include/netdb.h4
-rw-r--r--include/nl_types.h13
-rw-r--r--include/paths.h18
-rw-r--r--include/pwd.h85
-rw-r--r--include/regexp.h5
-rw-r--r--include/rpc/auth.h20
-rw-r--r--include/rpc/clnt.h6
-rw-r--r--include/shadow.h84
-rw-r--r--include/signal.h106
-rw-r--r--include/stdio_ext.h20
-rw-r--r--include/stdlib.h257
-rw-r--r--include/string.h8
-rw-r--r--include/sys/epoll.h2
-rw-r--r--include/sys/kd.h6
-rw-r--r--include/sys/mman.h27
-rw-r--r--include/sys/msg.h16
-rw-r--r--include/sys/poll.h4
-rw-r--r--include/sys/sendfile.h11
-rw-r--r--include/sys/socket.h69
-rw-r--r--include/sys/stat.h83
-rw-r--r--include/sys/statvfs.h24
-rw-r--r--include/sys/syslog.h31
-rw-r--r--include/sys/uio.h22
-rw-r--r--include/sys/wait.h3
-rw-r--r--include/termios.h9
-rw-r--r--include/utime.h7
-rw-r--r--include/utmp.h13
-rw-r--r--include/wordexp.h4
39 files changed, 865 insertions, 437 deletions
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 6ae1bc61e..496c8dbe8 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -1,7 +1,7 @@
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -13,7 +13,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -499,53 +499,55 @@ typedef enum __ns_cert_types {
#define ns_samename __ns_samename
__BEGIN_DECLS
-u_int ns_get16 __P((const u_char *));
-u_long ns_get32 __P((const u_char *));
-void ns_put16 __P((u_int, u_char *));
-void ns_put32 __P((u_long, u_char *));
-int ns_initparse __P((const u_char *, int, ns_msg *));
-int ns_skiprr __P((const u_char *, const u_char *, ns_sect, int));
-int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
-int ns_sprintrr __P((const ns_msg *, const ns_rr *,
- const char *, const char *, char *, size_t));
-int ns_sprintrrf __P((const u_char *, size_t, const char *,
- ns_class, ns_type, u_long, const u_char *,
- size_t, const char *, const char *,
- char *, size_t));
-int ns_format_ttl __P((u_long, char *, size_t));
-int ns_parse_ttl __P((const char *, u_long *));
-u_int32_t ns_datetosecs __P((const char *cp, int *errp));
-int ns_name_ntol __P((const u_char *, u_char *, size_t));
-int ns_name_ntop __P((const u_char *, char *, size_t));
-int ns_name_pton __P((const char *, u_char *, size_t));
-int ns_name_unpack __P((const u_char *, const u_char *,
- const u_char *, u_char *, size_t));
-int ns_name_pack __P((const u_char *, u_char *, int,
- const u_char **, const u_char **));
-int ns_name_uncompress __P((const u_char *, const u_char *,
- const u_char *, char *, size_t));
-int ns_name_compress __P((const char *, u_char *, size_t,
- const u_char **, const u_char **));
-int ns_name_skip __P((const u_char **, const u_char *));
-void ns_name_rollback __P((const u_char *, const u_char **,
- const u_char **));
-int ns_sign __P((u_char *, int *, int, int, void *,
- const u_char *, int, u_char *, int *, time_t));
-int ns_sign_tcp __P((u_char *, int *, int, int,
- ns_tcp_tsig_state *, int));
-int ns_sign_tcp_init __P((void *, const u_char *, int,
- ns_tcp_tsig_state *));
-u_char *ns_find_tsig __P((u_char *, u_char *));
-int ns_verify __P((u_char *, int *, void *,
- const u_char *, int, u_char *, int *,
- time_t *, int));
-int ns_verify_tcp __P((u_char *, int *, ns_tcp_tsig_state *, int));
-int ns_verify_tcp_init __P((void *, const u_char *, int,
- ns_tcp_tsig_state *));
-int ns_samedomain __P((const char *, const char *));
-int ns_subdomain __P((const char *, const char *));
-int ns_makecanon __P((const char *, char *, size_t));
-int ns_samename __P((const char *, const char *));
+u_int ns_get16 (const u_char *) __THROW;
+u_long ns_get32 (const u_char *) __THROW;
+void ns_put16 (u_int, u_char *) __THROW;
+void ns_put32 (u_long, u_char *) __THROW;
+int ns_initparse (const u_char *, int, ns_msg *) __THROW;
+int ns_skiprr (const u_char *, const u_char *, ns_sect, int)
+ __THROW;
+int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
+int ns_sprintrr (const ns_msg *, const ns_rr *,
+ const char *, const char *, char *, size_t)
+ __THROW;
+int ns_sprintrrf (const u_char *, size_t, const char *,
+ ns_class, ns_type, u_long, const u_char *,
+ size_t, const char *, const char *,
+ char *, size_t) __THROW;
+int ns_format_ttl (u_long, char *, size_t) __THROW;
+int ns_parse_ttl (const char *, u_long *) __THROW;
+u_int32_t ns_datetosecs (const char *cp, int *errp) __THROW;
+int ns_name_ntol (const u_char *, u_char *, size_t) __THROW;
+int ns_name_ntop (const u_char *, char *, size_t) __THROW;
+int ns_name_pton (const char *, u_char *, size_t) __THROW;
+int ns_name_unpack (const u_char *, const u_char *,
+ const u_char *, u_char *, size_t) __THROW;
+int ns_name_pack (const u_char *, u_char *, int,
+ const u_char **, const u_char **) __THROW;
+int ns_name_uncompress (const u_char *, const u_char *,
+ const u_char *, char *, size_t) __THROW;
+int ns_name_compress (const char *, u_char *, size_t,
+ const u_char **, const u_char **) __THROW;
+int ns_name_skip (const u_char **, const u_char *) __THROW;
+void ns_name_rollback (const u_char *, const u_char **,
+ const u_char **) __THROW;
+int ns_sign (u_char *, int *, int, int, void *,
+ const u_char *, int, u_char *, int *, time_t) __THROW;
+int ns_sign_tcp (u_char *, int *, int, int,
+ ns_tcp_tsig_state *, int) __THROW;
+int ns_sign_tcp_init (void *, const u_char *, int,
+ ns_tcp_tsig_state *) __THROW;
+u_char *ns_find_tsig (u_char *, u_char *) __THROW;
+int ns_verify (u_char *, int *, void *, const u_char *, int,
+ u_char *, int *, time_t *, int) __THROW;
+int ns_verify_tcp (u_char *, int *, ns_tcp_tsig_state *, int)
+ __THROW;
+int ns_verify_tcp_init (void *, const u_char *, int,
+ ns_tcp_tsig_state *) __THROW;
+int ns_samedomain (const char *, const char *) __THROW;
+int ns_subdomain (const char *, const char *) __THROW;
+int ns_makecanon (const char *, char *, size_t) __THROW;
+int ns_samename (const char *, const char *) __THROW;
__END_DECLS
#ifdef BIND_4_COMPAT
diff --git a/include/cpio.h b/include/cpio.h
index a2fefab51..fae32752a 100644
--- a/include/cpio.h
+++ b/include/cpio.h
@@ -2,7 +2,6 @@
This file is part of the GNU C Library.
Copyright (C) 1992, 1998 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU cpio.
- Bugs can be reported to bug-glibc@gnu.org.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/include/err.h b/include/err.h
index 9791a659c..7ff3553ab 100644
--- a/include/err.h
+++ b/include/err.h
@@ -1,5 +1,5 @@
/* 4.4BSD utility functions for error messages.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,1999,2003 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,25 +33,25 @@ __BEGIN_DECLS
/* Print "program: ", FORMAT, ": ", the standard error string for errno,
and a newline, on stderr. */
extern void warn (__const char *__format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 1, 2)));
+ __attribute__ ((__format__ (__printf__, 1, 2)));
extern void vwarn (__const char *__format, __gnuc_va_list)
- __THROW __attribute__ ((__format__ (__printf__, 1, 0)));
+ __attribute__ ((__format__ (__printf__, 1, 0)));
/* Likewise, but without ": " and the standard error string. */
extern void warnx (__const char *__format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 1, 2)));
+ __attribute__ ((__format__ (__printf__, 1, 2)));
extern void vwarnx (__const char *__format, __gnuc_va_list)
- __THROW __attribute__ ((__format__ (__printf__, 1, 0)));
+ __attribute__ ((__format__ (__printf__, 1, 0)));
/* Likewise, and then exit with STATUS. */
extern void err (int __status, __const char *__format, ...)
- __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
+ __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
extern void verr (int __status, __const char *__format, __gnuc_va_list)
- __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
+ __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
extern void errx (int __status, __const char *__format, ...)
- __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
+ __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
extern void verrx (int __status, __const char *, __gnuc_va_list)
- __THROW __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
+ __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
__END_DECLS
diff --git a/include/error.h b/include/error.h
index da5cf2f16..3638bc6e9 100644
--- a/include/error.h
+++ b/include/error.h
@@ -1,7 +1,6 @@
/* Declaration for error-reporting function
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
+ Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -38,17 +37,17 @@
extern "C" {
#endif
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
/* Print a message with `fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
-extern void error (int status, int errnum, const char *format, ...)
+extern void error (int __status, int __errnum, const char *__format, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
-extern void error_at_line (int status, int errnum, const char *fname,
- unsigned int lineno, const char *format, ...)
+extern void error_at_line (int __status, int __errnum, const char *__fname,
+ unsigned int __lineno, const char *__format, ...)
__attribute__ ((__format__ (__printf__, 5, 6)));
/* If NULL, error will flush stdout, then print on stderr the program
diff --git a/include/ftw.h b/include/ftw.h
index 4939297b3..b1f7e09cb 100644
--- a/include/ftw.h
+++ b/include/ftw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1996-1999,2003,2004 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
@@ -74,7 +74,33 @@ enum
# define FTW_CHDIR FTW_CHDIR
FTW_DEPTH = 8 /* Report files in directory before directory itself.*/
# define FTW_DEPTH FTW_DEPTH
+# if 0 /* def __USE_GNU */
+ ,
+ FTW_ACTIONRETVAL = 16 /* Assume callback to return FTW_* values instead of
+ zero to continue and non-zero to terminate. */
+# define FTW_ACTIONRETVAL FTW_ACTIONRETVAL
+# endif
+};
+
+#if 0 /* def __USE_GNU */
+/* Return values from callback functions. */
+enum
+{
+ FTW_CONTINUE = 0, /* Continue with next sibling or for FTW_D with the
+ first child. */
+# define FTW_CONTINUE FTW_CONTINUE
+ FTW_STOP = 1, /* Return from `ftw' or `nftw' with FTW_STOP as return
+ value. */
+# define FTW_STOP FTW_STOP
+ FTW_SKIP_SUBTREE = 2, /* Only meaningful for FTW_D: Don't walk through the
+ subtree, instead just continue with its next
+ sibling. */
+# define FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE
+ FTW_SKIP_SIBLINGS = 3,/* Continue with FTW_DP callback for current directory
+ (if FTW_DEPTH) and then its siblings. */
+# define FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS
};
+#endif
/* Structure used for fourth argument to callback function for `nftw'. */
struct FTW
@@ -108,18 +134,19 @@ typedef int (*__nftw64_func_t) (__const char *__filename,
This function is a possible cancellation point and therefore not
marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors);
+extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors)
+ __nonnull ((1, 2));
#else
# ifdef __REDIRECT
extern int __REDIRECT (ftw, (__const char *__dir, __ftw_func_t __func,
- int __descriptors), ftw64);
+ int __descriptors), ftw64) __nonnull ((1, 2));
# else
# define ftw ftw64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int ftw64 (__const char *__dir, __ftw64_func_t __func,
- int __descriptors);
+ int __descriptors) __nonnull ((1, 2));
#endif
#ifdef __USE_XOPEN_EXTENDED
@@ -130,18 +157,19 @@ extern int ftw64 (__const char *__dir, __ftw64_func_t __func,
marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int nftw (__const char *__dir, __nftw_func_t __func, int __descriptors,
- int __flag);
+ int __flag) __nonnull ((1, 2));
# else
# ifdef __REDIRECT
extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func,
- int __descriptors, int __flag), nftw64);
+ int __descriptors, int __flag), nftw64)
+ __nonnull ((1, 2));
# else
# define nftw nftw64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int nftw64 (__const char *__dir, __nftw64_func_t __func,
- int __descriptors, int __flag);
+ int __descriptors, int __flag) __nonnull ((1, 2));
# endif
#endif
diff --git a/include/grp.h b/include/grp.h
index 48cce31e3..6ad8be1dd 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,95,96,97,98,99,2000,01 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-2001,2003,2004 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
@@ -34,7 +34,7 @@ __BEGIN_DECLS
/* For the Single Unix specification we must define this type here. */
-#if defined __USE_XOPEN && !defined __gid_t_defined
+#if (defined __USE_XOPEN || defined __USE_XOPEN2K) && !defined __gid_t_defined
typedef __gid_t gid_t;
# define __gid_t_defined
#endif
@@ -56,32 +56,57 @@ struct group
#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-/* Rewind the group-file stream. */
-extern void setgrent (void) __THROW;
+/* Rewind the group-file stream.
-/* Close the group-file stream. */
-extern void endgrent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void setgrent (void);
-/* Read an entry from the group-file stream, opening it if necessary. */
-extern struct group *getgrent (void) __THROW;
+/* Close the group-file stream.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endgrent (void);
+
+/* Read an entry from the group-file stream, opening it if necessary.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct group *getgrent (void);
#endif
#ifdef __USE_SVID
-/* Read a group entry from STREAM. */
-extern struct group *fgetgrent (FILE *__stream) __THROW;
+/* Read a group entry from STREAM.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern struct group *fgetgrent (FILE *__stream);
#endif
#ifdef __USE_GNU
-/* Write the given entry onto the given stream. */
+/* Write the given entry onto the given stream.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
extern int putgrent (__const struct group *__restrict __p,
- FILE *__restrict __f) __THROW;
+ FILE *__restrict __f);
#endif
-/* Search for an entry with a matching group ID. */
-extern struct group *getgrgid (__gid_t __gid) __THROW;
+/* Search for an entry with a matching group ID.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct group *getgrgid (__gid_t __gid);
+
+/* Search for an entry with a matching group name.
-/* Search for an entry with a matching group name. */
-extern struct group *getgrnam (__const char *__name) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct group *getgrnam (__const char *__name);
#if defined __USE_POSIX || defined __USE_MISC
@@ -97,32 +122,48 @@ extern struct group *getgrnam (__const char *__name) __THROW;
The interface may change in later versions of this library. But
the interface is designed following the principals used for the
other reentrant functions so the chances are good this is what the
- POSIX people would choose. */
+ POSIX people would choose.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
# ifdef __USE_GNU
extern int getgrent_r (struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result) __THROW;
+ struct group **__restrict __result);
# endif
-/* Search for an entry with a matching group ID. */
+/* Search for an entry with a matching group ID.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result) __THROW;
+ struct group **__restrict __result);
-/* Search for an entry with a matching group name. */
+/* Search for an entry with a matching group name.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int getgrnam_r (__const char *__restrict __name,
struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result) __THROW;
+ struct group **__restrict __result);
# ifdef __USE_SVID
/* Read a group entry from STREAM. This function is not standardized
- an probably never will. */
+ an probably never will.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
extern int fgetgrent_r (FILE *__restrict __stream,
struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result) __THROW;
+ struct group **__restrict __result);
# endif
#endif /* POSIX or reentrant */
@@ -136,10 +177,28 @@ extern int fgetgrent_r (FILE *__restrict __stream,
/* Set the group set for the current user to GROUPS (N of them). */
extern int setgroups (size_t __n, __const __gid_t *__groups) __THROW;
+#if 0
+/* Store at most *NGROUPS members of the group set for USER into
+ *GROUPS. Also include GROUP. The actual number of groups found is
+ returned in *NGROUPS. Return -1 if the if *NGROUPS is too small.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern int getgrouplist (__const char *__user, __gid_t __group,
+ __gid_t *__groups, int *__ngroups);
+#endif
+
/* Initialize the group set for the current user
by reading the group database and using all groups
- of which USER is a member. Also include GROUP. */
-extern int initgroups (__const char *__user, __gid_t __group) __THROW;
+ of which USER is a member. Also include GROUP.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern int initgroups (__const char *__user, __gid_t __group);
#endif /* Use BSD. */
diff --git a/include/iconv.h b/include/iconv.h
index e17360335..0a19c049d 100644
--- a/include/iconv.h
+++ b/include/iconv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2003 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
@@ -24,9 +24,10 @@
#include <stddef.h>
#ifndef __UCLIBC_HAS_LOCALE__
-#error Attempted to include iconv.h when uClibc built without locale support.
+#error Attempted to include iconv.h when uClibc was built without locale support.
#endif
+
__BEGIN_DECLS
/* Identifier for conversion method from one codeset to another. */
@@ -34,9 +35,11 @@ typedef void *iconv_t;
/* Allocate descriptor for code conversion from codeset FROMCODE to
- codeset TOCODE. */
-extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode)
- __THROW;
+ codeset TOCODE.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
/* Convert at most *INBYTESLEFT bytes from *INBUF according to the
code conversion algorithm specified by CD and place up to
@@ -46,8 +49,11 @@ extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
char **__restrict __outbuf,
size_t *__restrict __outbytesleft);
-/* Free resources allocated for descriptor CD for code conversion. */
-extern int iconv_close (iconv_t __cd) __THROW;
+/* Free resources allocated for descriptor CD for code conversion.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern int iconv_close (iconv_t __cd);
__END_DECLS
diff --git a/include/libintl.h b/include/libintl.h
index 1ba9d0d8c..fd009c3d6 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
- Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000-2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is derived from the file libgettext.h in the GNU gettext package.
@@ -97,7 +97,7 @@ extern char *bind_textdomain_codeset (__const char *__domainname,
/* Optimized version of the function above. */
-#if defined __OPTIMIZE__
+#if defined __OPTIMIZE__ && !defined __cplusplus
/* We need NULL for `gettext'. */
# define __need_NULL
diff --git a/include/link.h b/include/link.h
index f8e7f629d..6fa4d0fc0 100644
--- a/include/link.h
+++ b/include/link.h
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001, 2004 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
@@ -100,13 +100,25 @@ struct dl_phdr_info
const char *dlpi_name;
const ElfW(Phdr) *dlpi_phdr;
ElfW(Half) dlpi_phnum;
+
+#if 0
+ /* Note: the next two members were introduced after the first
+ version of this structure was available. Check the SIZE
+ argument passed to the dl_iterate_phdr() callback to determine
+ whether or not they are provided. */
+
+ /* Incremented when a new object may have been added. */
+ unsigned long long int dlpi_adds;
+ /* Incremented when an object may have been removed. */
+ unsigned long long int dlpi_subs;
+#endif
};
__BEGIN_DECLS
extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data),
- void *data) __THROW;
+ void *data);
__END_DECLS
diff --git a/include/math.h b/include/math.h
index 8a2e86c2f..8c11b5a76 100644
--- a/include/math.h
+++ b/include/math.h
@@ -32,8 +32,8 @@ __BEGIN_DECLS
On all IEEE754 machines, this is +Infinity. */
#include <bits/huge_val.h>
-/* Get machine-dependent NAN value (returned for some domain errors). */
#ifdef __USE_ISOC99
+/* Get machine-dependent NAN value (returned for some domain errors). */
# include <bits/nan.h>
#endif
/* Get general and ISO C99 specific information. */
@@ -115,7 +115,7 @@ extern int signgam;
/* ISO C99 defines some generic macros which work on any data type. */
-#if __USE_ISOC99
+#ifdef __USE_ISOC99
/* Get the architecture specific values describing the floating-point
evaluation. The following symbols will get defined:
@@ -323,7 +323,7 @@ extern int matherr (struct exception *__exc);
GNU extension. Provide enough digits for the 128-bit IEEE quad. */
#ifdef __USE_GNU
# define M_El 2.7182818284590452353602874713526625L /* e */
-# define M_LOG2El 1.4426950408889634073599246810018922L /* log_2 e */
+# define M_LOG2El 1.4426950408889634073599246810018921L /* log_2 e */
# define M_LOG10El 0.4342944819032518276511289189166051L /* log_10 e */
# define M_LN2l 0.6931471805599453094172321214581766L /* log_e 2 */
# define M_LN10l 2.3025850929940456840179914546843642L /* log_e 10 */
@@ -351,12 +351,12 @@ extern int matherr (struct exception *__exc);
#endif
-#if __USE_ISOC99
-/* ISO C99 defines some macros to compare number while taking care
- for unordered numbers. Since many FPUs provide special
- instructions to support these operations and these tests are
- defined in <bits/mathinline.h>, we define the generic macros at
- this late point and only if they are not defined yet. */
+#ifdef __USE_ISOC99
+/* ISO C99 defines some macros to compare number while taking care for
+ unordered numbers. Many FPUs provide special instructions to support
+ these operations and these tests are defined in <bits/mathinline.h>,
+ we define the generic macros at this late point and only if they are
+ not defined yet. */
/* Return nonzero value if X is greater than Y. */
# ifndef isgreater
diff --git a/include/net/if_ppp.h b/include/net/if_ppp.h
index 1b1c3ea6e..bf5ec8387 100644
--- a/include/net/if_ppp.h
+++ b/include/net/if_ppp.h
@@ -3,7 +3,7 @@
/*
* if_ppp.h - Point-to-Point Protocol definitions.
*
- * Copyright (c) 1989 Carnegie Mellon University.
+ * Copyright (c) 1989 Carnegie Mellon University.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/include/netdb.h b/include/netdb.h
index 9ed963d87..fe3da8239 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -58,7 +58,7 @@ __BEGIN_DECLS
We always need the extern int here in case internal libc code undefines
the macro because it needs access to the underlying storage. */
extern int h_errno;
-#if defined(__UCLIBC_HAS_THREADS__)
+#ifdef __UCLIBC_HAS_THREADS__
# define h_errno (*__h_errno_location ())
#endif
@@ -392,7 +392,7 @@ extern int getprotobynumber_r (int __proto,
struct protoent **__restrict __result);
-#if defined(__UCLIBC_HAS_NETGROUP__)
+#ifdef __UCLIBC_HAS_NETGROUP__
/* Establish network group NETGROUP for enumeration.
This function is not part of POSIX and therefore no official
diff --git a/include/nl_types.h b/include/nl_types.h
index 65b7d9e47..74e762113 100644
--- a/include/nl_types.h
+++ b/include/nl_types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2003, 2004 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,16 +40,19 @@ typedef void *nl_catd;
/* Type used by `nl_langinfo'. */
typedef int nl_item;
-/* Open message catalog for later use, returning descriptor. */
-extern nl_catd catopen (__const char *__cat_name, int __flag) __THROW;
+/* Open message catalog for later use, returning descriptor.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern nl_catd catopen (__const char *__cat_name, int __flag) __nonnull ((1));
/* Return translation with NUMBER in SET of CATALOG; if not found
return STRING. */
extern char *catgets (nl_catd __catalog, int __set, int __number,
- __const char *__string) __THROW;
+ __const char *__string) __THROW __nonnull ((1));
/* Close message CATALOG. */
-extern int catclose (nl_catd __catalog) __THROW;
+extern int catclose (nl_catd __catalog) __THROW __nonnull ((1));
__END_DECLS
diff --git a/include/paths.h b/include/paths.h
index 90edcf8fd..ae892c4cf 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -56,22 +56,24 @@
#define _PATH_PRESERVE "/var/lib"
#define _PATH_RWHODIR "/var/spool/rwho"
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
+#define _PATH_SHADOW "/etc/shadow"
#define _PATH_SHELLS "/etc/shells"
#define _PATH_TTY "/dev/tty"
#define _PATH_UNIX "/boot/vmlinux"
-#define _PATH_UTMP "/var/run/utmp"
+#define _PATH_UTMP "/var/run/utmp"
#define _PATH_VI "/usr/bin/vi"
-#define _PATH_WTMP "/var/log/wtmp"
-#define _PATH_LOCALE "/usr/lib/locale"
-#define _PATH_LASTLOG "/var/log/lastlog"
-#define _PATH_SHADOW "/etc/shadow"
-#define _PATH_PASSWD "/etc/passwd"
-#define _PATH_GROUP "/etc/group"
+#define _PATH_WTMP "/var/log/wtmp"
+
+/* uClibc */
+#ifdef _LIBC
+#define _PATH_PASSWD "/etc/passwd"
+#define _PATH_GROUP "/etc/group"
+#endif
/* Provide trailing slash, since mostly used for building pathnames. */
#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/lib/misc/"
+#define _PATH_VARDB "/var/db/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"
diff --git a/include/pwd.h b/include/pwd.h
index 8a54578b8..e87413304 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,95,96,97,98,99,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-2001,2003,2004 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
@@ -32,7 +32,7 @@ __BEGIN_DECLS
#define __need_size_t
#include <stddef.h>
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K
/* The Single Unix specification says that some more types are
available here. */
# ifndef __gid_t_defined
@@ -66,30 +66,55 @@ struct passwd
#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN_EXTENDED
-/* Rewind the password-file stream. */
-extern void setpwent (void) __THROW;
+/* Rewind the password-file stream.
-/* Close the password-file stream. */
-extern void endpwent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void setpwent (void);
-/* Read an entry from the password-file stream, opening it if necessary. */
-extern struct passwd *getpwent (void) __THROW;
+/* Close the password-file stream.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endpwent (void);
+
+/* Read an entry from the password-file stream, opening it if necessary.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct passwd *getpwent (void);
#endif
#ifdef __USE_SVID
-/* Read an entry from STREAM. */
-extern struct passwd *fgetpwent (FILE *__stream) __THROW;
+/* Read an entry from STREAM.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern struct passwd *fgetpwent (FILE *__stream);
+
+/* Write the given entry onto the given stream.
-/* Write the given entry onto the given stream. */
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
extern int putpwent (__const struct passwd *__restrict __p,
- FILE *__restrict __f) __THROW;
+ FILE *__restrict __f);
#endif
-/* Search for an entry with a matching user ID. */
-extern struct passwd *getpwuid (__uid_t __uid) __THROW;
+/* Search for an entry with a matching user ID.
-/* Search for an entry with a matching username. */
-extern struct passwd *getpwnam (__const char *__name) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct passwd *getpwuid (__uid_t __uid);
+
+/* Search for an entry with a matching username.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct passwd *getpwnam (__const char *__name);
#if defined __USE_POSIX || defined __USE_MISC
@@ -108,29 +133,38 @@ extern struct passwd *getpwnam (__const char *__name) __THROW;
POSIX people would choose. */
# if defined __USE_SVID || defined __USE_MISC
+/* This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
extern int getpwent_r (struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result) __THROW;
+ struct passwd **__restrict __result);
# endif
extern int getpwuid_r (__uid_t __uid,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result) __THROW;
+ struct passwd **__restrict __result);
extern int getpwnam_r (__const char *__restrict __name,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result) __THROW;
+ struct passwd **__restrict __result);
# ifdef __USE_SVID
/* Read an entry from STREAM. This function is not standardized and
- probably never will. */
+ probably never will.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
extern int fgetpwent_r (FILE *__restrict __stream,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct passwd **__restrict __result) __THROW;
+ struct passwd **__restrict __result);
# endif
#endif /* POSIX or reentrant */
@@ -138,8 +172,13 @@ extern int fgetpwent_r (FILE *__restrict __stream,
#ifdef __USE_GNU
/* Re-construct the password-file line for the given uid
in the given buffer. This knows the format that the caller
- will expect, but this need not be the format of the password file. */
-extern int getpw (__uid_t __uid, char *__buffer) __THROW;
+ will expect, but this need not be the format of the password file.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern int getpw (__uid_t __uid, char *__buffer);
#endif
__END_DECLS
diff --git a/include/regexp.h b/include/regexp.h
index bb1c4017f..b7b50b710 100644
--- a/include/regexp.h
+++ b/include/regexp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -22,7 +22,8 @@
/* The contents of this header file was first standardized in X/Open
System Interface and Headers Issue 2, originally coming from SysV.
- In issue 4, version 2, it is marked as TO BE WITDRAWN.
+ In issue 4, version 2, it is marked as TO BE WITDRAWN, and it has
+ been withdrawn in SUSv3.
This code shouldn't be used in any newly written code. It is
included only for compatibility reasons. Use the POSIX definition
diff --git a/include/rpc/auth.h b/include/rpc/auth.h
index b0ff4d5de..17eb59f70 100644
--- a/include/rpc/auth.h
+++ b/include/rpc/auth.h
@@ -170,8 +170,8 @@ extern struct opaque_auth _null_auth;
* int *aup_gids;
*/
extern AUTH *authunix_create (char *__machname, __uid_t __uid, __gid_t __gid,
- int __len, __gid_t *__aup_gids) __THROW;
-extern AUTH *authunix_create_default (void) __THROW;
+ int __len, __gid_t *__aup_gids);
+extern AUTH *authunix_create_default (void);
extern AUTH *authnone_create (void) __THROW;
extern AUTH *authdes_create (const char *__servername, u_int __window,
struct sockaddr *__syncaddr, des_block *__ckey)
@@ -205,14 +205,14 @@ extern int netname2host (__const char *, char *, __const int) __THROW;
* These routines interface to the keyserv daemon
*
*/
-extern int key_decryptsession (char *, des_block *) __THROW;
-extern int key_decryptsession_pk (char *, netobj *, des_block *) __THROW;
-extern int key_encryptsession (char *, des_block *) __THROW;
-extern int key_encryptsession_pk (char *, netobj *, des_block *) __THROW;
-extern int key_gendes (des_block *) __THROW;
-extern int key_setsecret (char *) __THROW;
-extern int key_secretkey_is_set (void) __THROW;
-extern int key_get_conv (char *, des_block *) __THROW;
+extern int key_decryptsession (char *, des_block *);
+extern int key_decryptsession_pk (char *, netobj *, des_block *);
+extern int key_encryptsession (char *, des_block *);
+extern int key_encryptsession_pk (char *, netobj *, des_block *);
+extern int key_gendes (des_block *);
+extern int key_setsecret (char *);
+extern int key_secretkey_is_set (void);
+extern int key_get_conv (char *, des_block *);
/*
* XDR an opaque authentication struct.
diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h
index a19fc773b..cf271c5c1 100644
--- a/include/rpc/clnt.h
+++ b/include/rpc/clnt.h
@@ -368,18 +368,18 @@ extern int _rpc_dtablesize (void) __THROW;
/*
* Print why creation failed
*/
-extern void clnt_pcreateerror (__const char *__msg) __THROW; /* stderr */
+extern void clnt_pcreateerror (__const char *__msg); /* stderr */
extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */
/*
* Like clnt_perror(), but is more verbose in its output
*/
-extern void clnt_perrno (enum clnt_stat __num) __THROW; /* stderr */
+extern void clnt_perrno (enum clnt_stat __num); /* stderr */
/*
* Print an English error message, given the client error code
*/
-extern void clnt_perror (CLIENT *__clnt, __const char *__msg) __THROW;
+extern void clnt_perror (CLIENT *__clnt, __const char *__msg);
/* stderr */
extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW;
/* string */
diff --git a/include/shadow.h b/include/shadow.h
index 81ddc71f1..778df52b9 100644
--- a/include/shadow.h
+++ b/include/shadow.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2003 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
@@ -54,46 +54,90 @@ struct spwd
};
-/* Open database for reading. */
-extern void setspent (void) __THROW;
+/* Open database for reading.
-/* Close database. */
-extern void endspent (void) __THROW;
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern void setspent (void);
-/* Get next entry from database, perhaps after opening the file. */
-extern struct spwd *getspent (void) __THROW;
+/* Close database.
-/* Get shadow entry matching NAME. */
-extern struct spwd *getspnam (__const char *__name) __THROW;
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern void endspent (void);
-/* Read shadow entry from STRING. */
-extern struct spwd *sgetspent (__const char *__string) __THROW;
+/* Get next entry from database, perhaps after opening the file.
-/* Read next shadow entry from STREAM. */
-extern struct spwd *fgetspent (FILE *__stream) __THROW;
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern struct spwd *getspent (void);
-/* Write line containing shadow password entry to stream. */
-extern int putspent (__const struct spwd *__p, FILE *__stream) __THROW;
+/* Get shadow entry matching NAME.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern struct spwd *getspnam (__const char *__name);
+
+/* Read shadow entry from STRING.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern struct spwd *sgetspent (__const char *__string);
+
+/* Read next shadow entry from STREAM.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern struct spwd *fgetspent (FILE *__stream);
+
+/* Write line containing shadow password entry to stream.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern int putspent (__const struct spwd *__p, FILE *__stream);
#ifdef __USE_MISC
-/* Reentrant versions of some of the functions above. */
+/* Reentrant versions of some of the functions above.
+
+ These functions are not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation they are cancellation points and
+ therefore not marked with __THROW. */
extern int getspent_r (struct spwd *__result_buf, char *__buffer,
- size_t __buflen, struct spwd **__result) __THROW;
+ size_t __buflen, struct spwd **__result);
extern int getspnam_r (__const char *__name, struct spwd *__result_buf,
char *__buffer, size_t __buflen,
- struct spwd **__result)__THROW;
+ struct spwd **__result);
extern int sgetspent_r (__const char *__string, struct spwd *__result_buf,
char *__buffer, size_t __buflen,
- struct spwd **__result) __THROW;
+ struct spwd **__result);
extern int fgetspent_r (FILE *__stream, struct spwd *__result_buf,
char *__buffer, size_t __buflen,
- struct spwd **__result) __THROW;
+ struct spwd **__result);
#endif /* misc */
+
+/* The simple locking functionality provided here is not suitable for
+ multi-threaded applications. */
+
/* Protect password file against multi writers. */
extern int lckpwdf (void) __THROW;
diff --git a/include/signal.h b/include/signal.h
index c22b4372c..1be2dbb84 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2003, 2004 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
@@ -37,7 +37,9 @@ __BEGIN_DECLS
#if defined __need_sig_atomic_t || defined _SIGNAL_H
# ifndef __sig_atomic_t_defined
# define __sig_atomic_t_defined
+__BEGIN_NAMESPACE_STD
typedef __sig_atomic_t sig_atomic_t;
+__END_NAMESPACE_STD
# endif
# undef __need_sig_atomic_t
#endif
@@ -55,10 +57,12 @@ typedef __sigset_t sigset_t;
#include <bits/types.h>
#include <bits/signum.h>
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
+#endif
+#ifdef __USE_XOPEN
# endif
# ifndef __uid_t_defined
typedef __uid_t uid_t;
@@ -83,24 +87,27 @@ extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
/* Set the handler for the signal SIG to HANDLER, returning the old
handler, or SIG_ERR on error.
By default `signal' has the BSD semantic. */
+__BEGIN_NAMESPACE_STD
#ifdef __USE_BSD
-extern __sighandler_t signal (int __sig, __sighandler_t __handler) __THROW;
+extern __sighandler_t signal (int __sig, __sighandler_t __handler)
+ __THROW;
#else
/* Make sure the used `signal' implementation is the SVID version. */
# ifdef __REDIRECT
extern __sighandler_t __REDIRECT (signal,
- (int __sig,
- __sighandler_t __handler) __THROW,
- __sysv_signal);
+ (int __sig, __sighandler_t __handler),
+ __sysv_signal);
# else
# define signal __sysv_signal
# endif
#endif
+__END_NAMESPACE_STD
#ifdef __USE_XOPEN
/* The X/Open definition of `signal' conflicts with the BSD version.
So they defined another function `bsd_signal'. */
-extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) __THROW;
+extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
+ __THROW;
#endif
/* Send signal SIG to process number PID. If PID is zero,
@@ -117,18 +124,21 @@ extern int kill (__pid_t __pid, int __sig) __THROW;
extern int killpg (__pid_t __pgrp, int __sig) __THROW;
#endif /* Use BSD || X/Open Unix. */
+__BEGIN_NAMESPACE_STD
/* Raise signal SIG, i.e., send SIG to yourself. */
extern int raise (int __sig) __THROW;
+__END_NAMESPACE_STD
#ifdef __USE_SVID
/* SVID names for the same things. */
-extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __THROW;
+extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
+ __THROW;
extern int gsignal (int __sig) __THROW;
#endif /* Use SVID. */
#ifdef __USE_MISC
/* Print a message describing the meaning of the given signal number. */
-extern void psignal (int __sig, __const char *__s) __THROW;
+extern void psignal (int __sig, __const char *__s);
#endif /* Use misc. */
@@ -136,21 +146,25 @@ extern void psignal (int __sig, __const char *__s) __THROW;
BSD definition defines the argument as a mask of the signal, while
the more modern interface in X/Open defines it as the signal
number. We go with the BSD version unless the user explicitly
- selects the X/Open version. */
-extern int __sigpause (int __sig_or_mask, int __is_sig) __THROW;
+ selects the X/Open version.
-#ifdef __USE_BSD
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int __sigpause (int __sig_or_mask, int __is_sig);
+
+#ifdef __FAVOR_BSD
/* Set the mask of blocked signals to MASK,
wait for a signal to arrive, and then restore the mask. */
-extern int sigpause (int __mask) __THROW;
# define sigpause(mask) __sigpause ((mask), 0)
+extern int sigpause (int __mask) __THROW __attribute_deprecated__;
#else
# ifdef __USE_XOPEN
# ifdef __GNUC__
-extern int sigpause (int __sig) __THROW __asm__ ("__xpg_sigpause");
-# endif
+extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
+# else
/* Remove a signal from the signal mask and suspend the process. */
-# define sigpause(sig) __sigpause ((sig), 1)
+# define sigpause(sig) __sigpause ((sig), 1)
+# endif
# endif
#endif
@@ -165,13 +179,13 @@ extern int sigpause (int __sig) __THROW __asm__ ("__xpg_sigpause");
# define sigmask(sig) __sigmask(sig)
/* Block signals in MASK, returning the old mask. */
-extern int sigblock (int __mask) __THROW;
+extern int sigblock (int __mask) __THROW __attribute_deprecated__;
/* Set the mask of blocked signals to MASK, returning the old mask. */
-extern int sigsetmask (int __mask) __THROW;
+extern int sigsetmask (int __mask) __THROW __attribute_deprecated__;
/* Return currently selected signal mask. */
-extern int siggetmask (void) __THROW;
+extern int siggetmask (void) __THROW __attribute_deprecated__;
#endif /* Use BSD. */
@@ -200,31 +214,32 @@ typedef __sighandler_t sig_t;
# endif
/* Clear all signals from SET. */
-extern int sigemptyset (sigset_t *__set) __THROW;
+extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
/* Set all signals in SET. */
-extern int sigfillset (sigset_t *__set) __THROW;
+extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
/* Add SIGNO to SET. */
-extern int sigaddset (sigset_t *__set, int __signo) __THROW;
+extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
/* Remove SIGNO from SET. */
-extern int sigdelset (sigset_t *__set, int __signo) __THROW;
+extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
/* Return 1 if SIGNO is in SET, 0 if not. */
-extern int sigismember (__const sigset_t *__set, int __signo) __THROW;
+extern int sigismember (__const sigset_t *__set, int __signo)
+ __THROW __nonnull ((1));
# ifdef __USE_GNU
/* Return non-empty value is SET is not empty. */
-extern int sigisemptyset (__const sigset_t *__set) __THROW;
+extern int sigisemptyset (__const sigset_t *__set) __THROW __nonnull ((1));
/* Build new signal set by combining the two inputs set using logical AND. */
extern int sigandset (sigset_t *__set, __const sigset_t *__left,
- __const sigset_t *__right) __THROW;
+ __const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
/* Build new signal set by combining the two inputs set using logical OR. */
extern int sigorset (sigset_t *__set, __const sigset_t *__left,
- __const sigset_t *__right) __THROW;
+ __const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
# endif /* GNU */
/* Get the system-specific definitions of `struct sigaction'
@@ -236,32 +251,44 @@ extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
sigset_t *__restrict __oset) __THROW;
/* Change the set of blocked signals to SET,
- wait until a signal arrives, and restore the set of blocked signals. */
-extern int sigsuspend (__const sigset_t *__set) __THROW;
+ wait until a signal arrives, and restore the set of blocked signals.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int sigsuspend (__const sigset_t *__set) __nonnull ((1));
/* Get and/or set the action for signal SIG. */
extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__restrict __oact) __THROW;
/* Put in SET all signals that are blocked and waiting to be delivered. */
-extern int sigpending (sigset_t *__set) __THROW;
+extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
-/* Select any of pending signals from SET or wait for any to arrive. */
+/* Select any of pending signals from SET or wait for any to arrive.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
- __THROW;
+ __nonnull ((1, 2));
# ifdef __USE_POSIX199309
-/* Select any of pending signals from SET and place information in INFO. */
+/* Select any of pending signals from SET and place information in INFO.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int sigwaitinfo (__const sigset_t *__restrict __set,
- siginfo_t *__restrict __info) __THROW;
+ siginfo_t *__restrict __info) __nonnull ((1));
/* Select any of pending signals from SET and place information in INFO.
- Wait the imte specified by TIMEOUT if no signal is pending. */
+ Wait the time specified by TIMEOUT if no signal is pending.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int sigtimedwait (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info,
__const struct timespec *__restrict __timeout)
- __THROW;
+ __nonnull ((1));
/* Send signal SIG to the process PID. Associate data in VAL with the
signal. */
@@ -323,13 +350,15 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW;
# include <bits/sigstack.h>
# ifdef __USE_XOPEN
+/* This will define `ucontext_t' and `mcontext_t'. */
# include <ucontext.h>
# endif
/* Run signals handlers on the stack specified by SS (if not NULL).
If OSS is not NULL, it is filled in with the old signal stack status.
This interface is obsolete and on many platform not implemented. */
-extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW;
+extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
+ __THROW __attribute_deprecated__;
/* Alternate signal handler stack interface.
This interface should always be preferred over `sigstack'. */
@@ -338,7 +367,7 @@ extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
#endif /* use BSD or X/Open Unix. */
-#ifdef __USE_UNIX98
+#ifdef __USE_XOPEN_EXTENDED
/* Simplified interface for signal management. */
/* Add SIG to the calling process' signal mask. */
@@ -357,6 +386,7 @@ extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
#if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98)
/* Some of the functions for handling signals in threaded programs must
be defined here. */
+# include <bits/pthreadtypes.h>
# include <bits/sigthread.h>
#endif /* use Unix98 */
diff --git a/include/stdio_ext.h b/include/stdio_ext.h
index 55586ea84..23d12e092 100644
--- a/include/stdio_ext.h
+++ b/include/stdio_ext.h
@@ -1,5 +1,5 @@
/* Functions to access FILE structure internals.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003 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
@@ -44,43 +44,43 @@ __BEGIN_DECLS
/* Return the size of the buffer of FP in bytes currently in use by
the given stream. */
-extern size_t __fbufsize (FILE *__fp);
+extern size_t __fbufsize (FILE *__fp) __THROW;
/* Return non-zero value iff the stream FP is opened readonly, or if the
last operation on the stream was a read operation. */
-extern int __freading (FILE *__fp);
+extern int __freading (FILE *__fp) __THROW;
/* Return non-zero value iff the stream FP is opened write-only or
append-only, or if the last operation on the stream was a write
operation. */
-extern int __fwriting (FILE *__fp);
+extern int __fwriting (FILE *__fp) __THROW;
/* Return non-zero value iff stream FP is not opened write-only or
append-only. */
-extern int __freadable (FILE *__fp);
+extern int __freadable (FILE *__fp) __THROW;
/* Return non-zero value iff stream FP is not opened read-only. */
-extern int __fwritable (FILE *__fp);
+extern int __fwritable (FILE *__fp) __THROW;
/* Return non-zero value iff the stream FP is line-buffered. */
-extern int __flbf (FILE *__fp);
+extern int __flbf (FILE *__fp) __THROW;
/* Discard all pending buffered I/O on the stream FP. */
-extern void __fpurge (FILE *__fp);
+extern void __fpurge (FILE *__fp) __THROW;
/* Return amount of output in bytes pending on a stream FP. */
-extern size_t __fpending (FILE *__fp);
+extern size_t __fpending (FILE *__fp) __THROW;
/* Flush all line-buffered files. */
extern void _flushlbf (void);
/* Set locking status of stream FP to TYPE. */
-extern int __fsetlocking (FILE *__fp, int __type);
+extern int __fsetlocking (FILE *__fp, int __type) __THROW;
__END_DECLS
diff --git a/include/stdlib.h b/include/stdlib.h
index cb84675d5..069363e87 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002, 2003, 2004 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
@@ -27,9 +27,9 @@
/* Get size_t, wchar_t and NULL from <stddef.h>. */
#define __need_size_t
#ifndef __need_malloc_and_calloc
-#ifdef __UCLIBC_HAS_WCHAR__
-# define __need_wchar_t
-#endif
+# ifdef __UCLIBC_HAS_WCHAR__
+# define __need_wchar_t
+# endif
# define __need_NULL
#endif
#include <stddef.h>
@@ -90,6 +90,9 @@ typedef union
# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
+# if 0 /* def __WIFCONTINUED */
+# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status))
+# endif
#endif /* X/Open and <sys/wait.h> not included. */
__BEGIN_NAMESPACE_STD
@@ -135,10 +138,11 @@ __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; */
+#if 0
+#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
+extern size_t __ctype_get_mb_cur_max (void) __THROW;
+#endif
#ifdef __UCLIBC_HAS_WCHAR__
-/* Maximum length of a multibyte character in the current locale. */
#define MB_CUR_MAX (_stdlib_mb_cur_max ())
extern size_t _stdlib_mb_cur_max (void) __THROW;
#endif
@@ -147,19 +151,22 @@ extern size_t _stdlib_mb_cur_max (void) __THROW;
__BEGIN_NAMESPACE_STD
#ifdef __UCLIBC_HAS_FLOATS__
/* Convert a string to a floating-point number. */
-extern double atof (__const char *__nptr) __THROW __attribute_pure__;
+extern double atof (__const char *__nptr)
+ __THROW __attribute_pure__ __nonnull ((1));
#endif /* __UCLIBC_HAS_FLOATS__ */
/* Convert a string to an integer. */
-extern int atoi (__const char *__nptr) __THROW __attribute_pure__;
+extern int atoi (__const char *__nptr)
+ __THROW __attribute_pure__ __nonnull ((1));
/* Convert a string to a long integer. */
-extern long int atol (__const char *__nptr) __THROW __attribute_pure__;
+extern long int atol (__const char *__nptr)
+ __THROW __attribute_pure__ __nonnull ((1));
__END_NAMESPACE_STD
#if defined __USE_ISOC99 || 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__;
+ __THROW __attribute_pure__ __nonnull ((1));
__END_NAMESPACE_C99
#endif
@@ -167,17 +174,18 @@ __END_NAMESPACE_C99
__BEGIN_NAMESPACE_STD
/* Convert a string to a floating-point number. */
extern double strtod (__const char *__restrict __nptr,
- char **__restrict __endptr) __THROW;
+ char **__restrict __endptr) __THROW __nonnull ((1));
__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;
+ char **__restrict __endptr) __THROW __nonnull ((1));
extern long double strtold (__const char *__restrict __nptr,
- char **__restrict __endptr) __THROW;
+ char **__restrict __endptr)
+ __THROW __nonnull ((1));
__END_NAMESPACE_C99
#endif
#endif /* __UCLIBC_HAS_FLOATS__ */
@@ -185,23 +193,25 @@ __END_NAMESPACE_C99
__BEGIN_NAMESPACE_STD
/* Convert a string to a long integer. */
extern long int strtol (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base) __THROW;
+ char **__restrict __endptr, int __base)
+ __THROW __nonnull ((1));
/* Convert a string to an unsigned long integer. */
extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
- __THROW;
-__END_NAMESPACE_C99
+ __THROW __nonnull ((1));
+__END_NAMESPACE_STD
-#if defined __USE_BSD
+#ifdef __USE_BSD
/* Convert a string to a quadword integer. */
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base) __THROW;
+ char **__restrict __endptr, int __base)
+ __THROW __nonnull ((1));
/* 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;
+ __THROW __nonnull ((1));
#endif /* GCC and use BSD. */
#if defined __USE_ISOC99 || defined __USE_MISC
@@ -209,12 +219,13 @@ __BEGIN_NAMESPACE_C99
/* Convert a string to a quadword integer. */
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base) __THROW;
+ char **__restrict __endptr, int __base)
+ __THROW __nonnull ((1));
/* 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;
+ __THROW __nonnull ((1));
__END_NAMESPACE_C99
#endif /* ISO C99 or GCC and use MISC. */
@@ -240,64 +251,70 @@ __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;
+ __locale_t __loc) __THROW __nonnull ((1, 4));
extern unsigned long int strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
+ int __base, __locale_t __loc)
+ __THROW __nonnull ((1, 4));
__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
- __locale_t __loc) __THROW;
+ __locale_t __loc)
+ __THROW __nonnull ((1, 4));
__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
- __THROW;
+ __THROW __nonnull ((1, 4));
extern double strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
- __THROW;
+ __THROW __nonnull ((1, 3));
extern float strtof_l (__const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc) __THROW;
+ char **__restrict __endptr, __locale_t __loc)
+ __THROW __nonnull ((1, 3));
extern long double strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
- __locale_t __loc) __THROW;
+ __locale_t __loc) __THROW __nonnull ((1, 3));
/* Internal names to support libstd++. */
extern long int __strtol_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
- __locale_t __loc) __THROW;
+ __locale_t __loc) __THROW __nonnull ((1, 4));
extern unsigned long int __strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
+ int __base, __locale_t __loc)
+ __THROW __nonnull ((1, 4));
__extension__
extern long long int __strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
- __locale_t __loc) __THROW;
+ __locale_t __loc)
+ __THROW __nonnull ((1, 4));
__extension__
extern unsigned long long int __strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
- __THROW;
+ __THROW __nonnull ((1, 4));
extern double __strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
- __THROW;
+ __THROW __nonnull ((1, 3));
extern float __strtof_l (__const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc) __THROW;
+ char **__restrict __endptr, __locale_t __loc)
+ __THROW __nonnull ((1, 3));
extern long double __strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
- __locale_t __loc) __THROW;
+ __locale_t __loc) __THROW __nonnull ((1, 3));
#endif /* GNU */
#endif /* __UCLIBC_HAS_XLOCALE__ */
@@ -309,7 +326,8 @@ extern long double __strtold_l (__const char *__restrict __nptr,
extern char *l64a (long int __n) __THROW;
/* Read a number from a string S in base 64 as above. */
-extern long int a64l (__const char *__s) __THROW __attribute_pure__;
+extern long int a64l (__const char *__s)
+ __THROW __attribute_pure__ __nonnull ((1));
#endif /* Use SVID || extended X/Open. */
@@ -331,11 +349,11 @@ extern void srandom (unsigned int __seed) __THROW;
32, 64, 128 and 256, the bigger the better; values less than 8 will
cause an error and values greater than 256 will be rounded down. */
extern char *initstate (unsigned int __seed, char *__statebuf,
- size_t __statelen) __THROW;
+ size_t __statelen) __THROW __nonnull ((2));
/* Switch the random number generator to state buffer STATEBUF,
which should have been previously initialized by `initstate'. */
-extern char *setstate (char *__statebuf) __THROW;
+extern char *setstate (char *__statebuf) __THROW __nonnull ((1));
# ifdef __USE_MISC
@@ -355,16 +373,19 @@ struct random_data
};
extern int random_r (struct random_data *__restrict __buf,
- int32_t *__restrict __result) __THROW;
+ int32_t *__restrict __result) __THROW __nonnull ((1, 2));
-extern int srandom_r (unsigned int __seed, struct random_data *__buf) __THROW;
+extern int srandom_r (unsigned int __seed, struct random_data *__buf)
+ __THROW __nonnull ((2));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
- struct random_data *__restrict __buf) __THROW;
+ struct random_data *__restrict __buf)
+ __THROW __nonnull ((2, 4));
extern int setstate_r (char *__restrict __statebuf,
- struct random_data *__restrict __buf) __THROW;
+ struct random_data *__restrict __buf)
+ __THROW __nonnull ((1, 2));
# endif /* Use misc. */
#endif /* Use SVID || extended X/Open || BSD. */
@@ -388,21 +409,24 @@ extern int rand_r (unsigned int *__seed) __THROW;
#ifdef __UCLIBC_HAS_FLOATS__
/* Return non-negative, double-precision floating-point value in [0.0,1.0). */
extern double drand48 (void) __THROW;
-extern double erand48 (unsigned short int __xsubi[3]) __THROW;
+extern double erand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1));
#endif /* __UCLIBC_HAS_FLOATS__ */
/* Return non-negative, long integer in [0,2^31). */
extern long int lrand48 (void) __THROW;
-extern long int nrand48 (unsigned short int __xsubi[3]) __THROW;
+extern long int nrand48 (unsigned short int __xsubi[3])
+ __THROW __nonnull ((1));
/* Return signed, long integers in [-2^31,2^31). */
extern long int mrand48 (void) __THROW;
-extern long int jrand48 (unsigned short int __xsubi[3]) __THROW;
+extern long int jrand48 (unsigned short int __xsubi[3])
+ __THROW __nonnull ((1));
/* Seed random number generator. */
extern void srand48 (long int __seedval) __THROW;
-extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __THROW;
-extern void lcong48 (unsigned short int __param[7]) __THROW;
+extern unsigned short int *seed48 (unsigned short int __seed16v[3])
+ __THROW __nonnull ((1));
+extern void lcong48 (unsigned short int __param[7]) __THROW __nonnull ((1));
# ifdef __USE_MISC
/* Data structure for communication with thread safe versions. This
@@ -420,35 +444,40 @@ struct drand48_data
#ifdef __UCLIBC_HAS_FLOATS__
/* Return non-negative, double-precision floating-point value in [0.0,1.0). */
extern int drand48_r (struct drand48_data *__restrict __buffer,
- double *__restrict __result) __THROW;
+ double *__restrict __result) __THROW __nonnull ((1, 2));
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
- double *__restrict __result) __THROW;
+ double *__restrict __result) __THROW __nonnull ((1, 2));
#endif /* __UCLIBC_HAS_FLOATS__ */
/* Return non-negative, long integer in [0,2^31). */
extern int lrand48_r (struct drand48_data *__restrict __buffer,
- long int *__restrict __result) __THROW;
+ long int *__restrict __result)
+ __THROW __nonnull ((1, 2));
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
- long int *__restrict __result) __THROW;
+ long int *__restrict __result)
+ __THROW __nonnull ((1, 2));
/* Return signed, long integers in [-2^31,2^31). */
extern int mrand48_r (struct drand48_data *__restrict __buffer,
- long int *__restrict __result) __THROW;
+ long int *__restrict __result)
+ __THROW __nonnull ((1, 2));
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
- long int *__restrict __result) __THROW;
+ long int *__restrict __result)
+ __THROW __nonnull ((1, 2));
/* Seed random number generator. */
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
- __THROW;
+ __THROW __nonnull ((2));
extern int seed48_r (unsigned short int __seed16v[3],
- struct drand48_data *__buffer) __THROW;
+ struct drand48_data *__buffer) __THROW __nonnull ((1, 2));
extern int lcong48_r (unsigned short int __param[7],
- struct drand48_data *__buffer) __THROW;
+ struct drand48_data *__buffer)
+ __THROW __nonnull ((1, 2));
# endif /* Use misc. */
#endif /* Use SVID or X/Open. */
@@ -491,7 +520,7 @@ extern void *valloc (size_t __size) __THROW __attribute_malloc__;
#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__;
+ __THROW __attribute_malloc__ __nonnull ((1));
#endif
__BEGIN_NAMESPACE_STD
@@ -500,14 +529,14 @@ extern void abort (void) __THROW __attribute__ ((__noreturn__));
/* Register a function to be called when `exit' is called. */
-extern int atexit (void (*__func) (void)) __THROW;
+extern int atexit (void (*__func) (void)) __THROW __nonnull ((1));
__END_NAMESPACE_STD
#ifdef __USE_MISC
/* Register a function to be called with the status
given to `exit' and the given argument. */
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
- __THROW;
+ __THROW __nonnull ((1));
#endif
__BEGIN_NAMESPACE_STD
@@ -528,25 +557,25 @@ __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;
+extern char *getenv (__const char *__name) __THROW __nonnull ((1));
__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;
+extern char *__secure_getenv (__const char *__name) __THROW __nonnull ((1));
#if defined __USE_SVID || defined __USE_XOPEN
/* The SVID says this is in <stdio.h>, but this seems a better place. */
/* Put STRING, which is of the form "NAME=VALUE", in the environment.
If there is no `=', remove NAME from the environment. */
-extern int putenv (char *__string) __THROW;
+extern int putenv (char *__string) __THROW __nonnull ((1));
#endif
#if defined __USE_BSD || defined __USE_XOPEN2K
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
extern int setenv (__const char *__name, __const char *__value, int __replace)
- __THROW;
+ __THROW __nonnull ((2));
/* Remove the variable NAME from the environment. */
extern int unsetenv (__const char *__name) __THROW;
@@ -574,7 +603,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;
+extern char *mktemp (char *__template) __THROW __nonnull ((1));
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
@@ -585,16 +614,16 @@ extern char *mktemp (char *__template) __THROW;
This function is a possible cancellation points and therefore not
marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
-extern int mkstemp (char *__template);
+extern int mkstemp (char *__template) __nonnull ((1));
# else
# ifdef __REDIRECT
-extern int __REDIRECT (mkstemp, (char *__template), mkstemp64);
+extern int __REDIRECT (mkstemp, (char *__template), mkstemp64) __nonnull ((1));
# else
# define mkstemp mkstemp64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int mkstemp64 (char *__template);
+extern int mkstemp64 (char *__template) __nonnull ((1));
# endif
#endif
@@ -604,7 +633,7 @@ extern int mkstemp64 (char *__template);
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;
+extern char *mkdtemp (char *__template) __THROW __nonnull ((1));
#endif
@@ -617,6 +646,14 @@ extern int system (__const char *__command);
__END_NAMESPACE_STD
+#if 0 /* def __USE_GNU */
+/* Return a malloc'd string containing the canonical absolute name of the
+ 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));
+#endif
+
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Return the canonical absolute name of file NAME. The last file name
component need not exist, and may be a symlink to a nonexistent file.
@@ -643,12 +680,13 @@ __BEGIN_NAMESPACE_STD
/* Do a binary search for KEY in BASE, which consists of NMEMB elements
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);
+ size_t __nmemb, size_t __size, __compar_fn_t __compar)
+ __nonnull ((1, 2, 5));
/* Sort NMEMB elements of BASE, of SIZE bytes each,
using COMPAR to perform the comparisons. */
extern void qsort (void *__base, size_t __nmemb, size_t __size,
- __compar_fn_t __compar);
+ __compar_fn_t __compar) __nonnull ((1, 4));
/* Return the absolute value of X. */
@@ -681,6 +719,61 @@ __END_NAMESPACE_C99
#endif
+#if 0 /* defined __USE_SVID || defined __USE_XOPEN_EXTENDED */
+/* Convert floating point numbers to strings. The returned values are
+ valid only until another call to the same function. */
+
+/* Convert VALUE to a string with NDIGIT digits and return a pointer to
+ 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));
+
+/* 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));
+
+/* 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));
+
+
+# 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));
+extern char *qfcvt (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign)
+ __THROW __nonnull ((3, 4));
+extern char *qgcvt (long double __value, int __ndigit, char *__buf)
+ __THROW __nonnull ((3));
+
+
+/* Reentrant version of the functions above which provide their own
+ buffers. */
+extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign, char *__restrict __buf,
+ size_t __len) __THROW __nonnull ((3, 4, 5));
+extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign, char *__restrict __buf,
+ size_t __len) __THROW __nonnull ((3, 4, 5));
+
+extern int qecvt_r (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign,
+ char *__restrict __buf, size_t __len)
+ __THROW __nonnull ((3, 4, 5));
+extern int qfcvt_r (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign,
+ char *__restrict __buf, size_t __len)
+ __THROW __nonnull ((3, 4, 5));
+# endif /* misc */
+#endif /* use MISC || use X/Open Unix */
+
#ifdef __UCLIBC_HAS_WCHAR__
__BEGIN_NAMESPACE_STD
/* Return the length of the multibyte character
@@ -711,7 +804,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;
+extern int rpmatch (__const char *__response) __THROW __nonnull ((1));
#endif
@@ -724,13 +817,14 @@ extern int rpmatch (__const char *__response) __THROW;
token or at the terminating NUL character. */
extern int getsubopt (char **__restrict __optionp,
char *__const *__restrict __tokens,
- char **__restrict __valuep) __THROW;
+ char **__restrict __valuep)
+ __THROW __nonnull ((1, 2, 3));
#endif
#ifdef __USE_XOPEN
/* Setup DES tables according KEY. */
-extern void setkey (__const char *__key) __THROW;
+extern void setkey (__const char *__key) __THROW __nonnull ((1));
#endif
@@ -738,7 +832,7 @@ extern void setkey (__const char *__key) __THROW;
#ifdef __USE_XOPEN2K
/* Return a master pseudo-terminal handle. */
-extern int posix_openpt (int __oflag) __THROW;
+extern int posix_openpt (int __oflag);
#endif
#ifdef __USE_XOPEN
@@ -762,10 +856,19 @@ extern char *ptsname (int __fd) __THROW;
/* Store at most BUFLEN characters of the pathname of the slave pseudo
terminal associated with the master FD is open on in BUF.
Return 0 on success, otherwise an error number. */
-extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW;
+extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
+ __THROW __nonnull ((2));
/* Open a master pseudo terminal and return its file descriptor. */
-extern int getpt (void) __THROW;
+extern int getpt (void);
+#endif
+
+#if 0 /* def __USE_BSD */
+/* Put the 1 minute, 5 minute and 15 minute load averages into the first
+ NELEM elements of LOADAVG. Return the number written (never more than
+ three, but may be less than NELEM), or -1 if an error occurred. */
+extern int getloadavg (double __loadavg[], int __nelem)
+ __THROW __nonnull ((1));
#endif
#endif /* don't just need malloc and calloc */
diff --git a/include/string.h b/include/string.h
index 224bb8621..ea59d94ed 100644
--- a/include/string.h
+++ b/include/string.h
@@ -280,8 +280,8 @@ extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen)
# if defined __USE_XOPEN2K && !defined __USE_GNU
/* Fill BUF with a string describing the meaning of the `errno' code in
ERRNUM. */
-# ifdef __REDIRECT_NTH
-extern int __REDIRECT_NTH (strerror_r,
+# ifdef __REDIRECT
+extern int __REDIRECT (strerror_r,
(int __errnum, char *__buf, size_t __buflen),
__xpg_strerror_r) __nonnull ((2));
# else
@@ -290,8 +290,8 @@ extern int __REDIRECT_NTH (strerror_r,
# else
/* If a temporary buffer is required, at most BUFLEN bytes of BUF will be
used. */
-# ifdef __REDIRECT_NTH
-extern char * __REDIRECT_NTH (strerror_r,
+# ifdef __REDIRECT
+extern char * __REDIRECT (strerror_r,
(int __errnum, char *__buf, size_t __buflen),
__glibc_strerror_r) __nonnull ((2));
# else
diff --git a/include/sys/epoll.h b/include/sys/epoll.h
index cffddb58b..6c310bcff 100644
--- a/include/sys/epoll.h
+++ b/include/sys/epoll.h
@@ -70,7 +70,7 @@ struct epoll_event
{
uint32_t events; /* Epoll events */
epoll_data_t data; /* User data variable */
-} __attribute__ ((__packed__));
+};
__BEGIN_DECLS
diff --git a/include/sys/kd.h b/include/sys/kd.h
index e0d2e869c..acd705723 100644
--- a/include/sys/kd.h
+++ b/include/sys/kd.h
@@ -22,8 +22,14 @@
/* Make sure the <linux/types.h> header is not loaded. */
#ifndef _LINUX_TYPES_H
# define _LINUX_TYPES_H 1
+# define __undef_LINUX_TYPES_H
#endif
#include <linux/kd.h>
+#ifdef __undef_LINUX_TYPES_H
+# undef _LINUX_TYPES_H
+# undef __undef_LINUX_TYPES_H
+#endif
+
#endif /* sys/kd.h */
diff --git a/include/sys/mman.h b/include/sys/mman.h
index a0ac6f981..587dff60d 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management.
- Copyright (C) 1994-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994-2000, 2003, 2004 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
@@ -60,9 +60,9 @@ extern void *mmap (void *__addr, size_t __len, int __prot,
#else
# ifdef __REDIRECT
extern void * __REDIRECT (mmap,
- (void *__addr, size_t __len, int __prot,
- int __flags, int __fd, __off64_t __offset) __THROW,
- mmap64);
+ (void *__addr, size_t __len, int __prot,
+ int __flags, int __fd, __off64_t __offset),
+ mmap64);
# else
# define mmap mmap64
# endif
@@ -83,8 +83,11 @@ extern int mprotect (void *__addr, size_t __len, int __prot) __THROW;
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
- unpredictable before this is done. Flags are from the MS_* set. */
-extern int msync (void *__addr, size_t __len, int __flags) __THROW;
+ unpredictable before this is done. Flags are from the MS_* set.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int msync (void *__addr, size_t __len, int __flags);
#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
@@ -96,7 +99,7 @@ extern int madvise (void *__addr, size_t __len, int __advice) __THROW;
extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
#endif
-#if defined __ARCH_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
extern int mlock (__const void *__addr, size_t __len) __THROW;
@@ -126,7 +129,15 @@ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
The status is returned in a vector of bytes. The least significant
bit of each byte is 1 if the referenced page is in memory, otherwise
it is zero. */
-extern int mincore (void *__start, size_t __len, unsigned char *__vec);
+extern int mincore (void *__start, size_t __len, unsigned char *__vec)
+ __THROW;
+
+#if 0
+/* Remap arbitrary pages of a shared backing store within an existing
+ VMA. */
+extern int remap_file_pages (void *__start, size_t __size, int __prot,
+ size_t __pgoff, int __flags) __THROW;
+#endif
#endif
diff --git a/include/sys/msg.h b/include/sys/msg.h
index 9568baf89..1fd64b2ac 100644
--- a/include/sys/msg.h
+++ b/include/sys/msg.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1999,2000,2003 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
@@ -62,13 +62,19 @@ extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
/* Get messages queue. */
extern int msgget (key_t __key, int __msgflg) __THROW;
-/* Receive message from message queue. */
+/* Receive message from message queue.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int msgrcv (int __msqid, void *__msgp, size_t __msgsz,
- long int __msgtyp, int __msgflg) __THROW;
+ long int __msgtyp, int __msgflg);
+
+/* Send message to message queue.
-/* Send message to message queue. */
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int msgsnd (int __msqid, __const void *__msgp, size_t __msgsz,
- int __msgflg) __THROW;
+ int __msgflg);
__END_DECLS
diff --git a/include/sys/poll.h b/include/sys/poll.h
index bf1c9e203..89a27eab2 100644
--- a/include/sys/poll.h
+++ b/include/sys/poll.h
@@ -1,5 +1,5 @@
/* Compatibility definitions for System V `poll' interface.
- Copyright (C) 1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1994,96,97,98,99,2000,2001,2004 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
@@ -45,7 +45,7 @@ __BEGIN_DECLS
an event to occur; if TIMEOUT is -1, block until an event occurs.
Returns the number of file descriptors with events, zero if timed out,
or -1 for errors. */
-extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) __THROW;
+extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
__END_DECLS
diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h
index 797822b9f..5fcfffbbc 100644
--- a/include/sys/sendfile.h
+++ b/include/sys/sendfile.h
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- Copyright (C) 1998,99,01,2002 Free Software Foundation, Inc.
+ Copyright (C) 1998,99,01,2002,2004 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
@@ -32,20 +32,19 @@ __BEGIN_DECLS
case of error. */
#ifndef __USE_FILE_OFFSET64
extern ssize_t sendfile (int __out_fd, int __in_fd, off_t *__offset,
- size_t __count) __THROW;
+ size_t __count) __THROW __nonnull ((3));
#else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (sendfile,
- (int __out_fd, int __in_fd, __off64_t *__offset,
- size_t __count) __THROW,
- sendfile64);
+ (int __out_fd, int __in_fd, __off64_t *__offset,
+ size_t __count), sendfile64) __nonnull ((3));
# else
# define sendfile sendfile64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
- size_t __count) __THROW;
+ size_t __count) __THROW __nonnull ((3));
#endif
__END_DECLS
diff --git a/include/sys/socket.h b/include/sys/socket.h
index b57b63349..4ae1ea980 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -1,5 +1,5 @@
/* Declarations of socket constants, types, and functions.
- Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,1994-2001,2003 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
@@ -117,9 +117,11 @@ extern int getsockname (int __fd, __SOCKADDR_ARG __addr,
/* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
For connectionless socket types, just set the default address to send to
and the only address from which to accept transmissions.
- Return 0 on success, -1 for errors. */
-extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
- __THROW;
+ Return 0 on success, -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
/* Put the address of the peer connected to socket FD into *ADDR
(which is *LEN bytes long), and its actual length into *LEN. */
@@ -127,39 +129,54 @@ extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __len) __THROW;
-/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
-extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags)
- __THROW;
+/* Send N bytes of BUF to socket FD. Returns the number sent or -1.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags);
/* Read N bytes into BUF from socket FD.
- Returns the number read or -1 for errors. */
-extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags)
- __THROW;
+ Returns the number read or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags);
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
- ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
+ ADDR_LEN bytes long). Returns the number sent, or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
int __flags, __CONST_SOCKADDR_ARG __addr,
- socklen_t __addr_len) __THROW;
+ socklen_t __addr_len);
/* Read N bytes into BUF through socket FD.
If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
the sender, and store the actual size of the address in *ADDR_LEN.
- Returns the number of bytes read or -1 for errors. */
-extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
- __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
- __THROW;
+ Returns the number of bytes read or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
+ int __flags, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len);
/* Send a message described MESSAGE on socket FD.
- Returns the number of bytes sent, or -1 for errors. */
-extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, int __flags)
- __THROW;
+ Returns the number of bytes sent, or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t sendmsg (int __fd, __const struct msghdr *__message,
+ int __flags);
/* Receive a message as described by MESSAGE from socket FD.
- Returns the number of bytes read or -1 for errors. */
-extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags)
- __THROW;
+ Returns the number of bytes read or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
@@ -185,10 +202,12 @@ extern int listen (int __fd, int __n) __THROW;
When a connection arrives, open a new socket to communicate with it,
set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting
peer and *ADDR_LEN to the address's actual length, and return the
- new socket's descriptor, or -1 for errors. */
+ new socket's descriptor, or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int accept (int __fd, __SOCKADDR_ARG __addr,
- socklen_t *__restrict __addr_len)
- __THROW;
+ socklen_t *__restrict __addr_len);
/* Shut down all or part of the connection open on socket FD.
HOW determines what to shut down:
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 2b29e420f..1f758d30c 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-2002,2003,2004 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
@@ -27,10 +27,17 @@
#include <bits/types.h> /* For __mode_t and __dev_t. */
-#ifdef __USE_XOPEN
-# define __need_time_t
-# include <time.h> /* For time_t. */
+#if defined __USE_XOPEN || defined __USE_MISC
+# if defined __USE_XOPEN || defined __USE_XOPEN2K
+# define __need_time_t
+# endif
+# ifdef __USE_MISC
+# define __need_timespec
+# endif
+# include <time.h> /* For time_t resp. timespec. */
+#endif
+#if defined __USE_XOPEN || defined __USE_XOPEN2K
/* The Single Unix specification says that some more types are
available here. */
# ifndef __dev_t_defined
@@ -109,7 +116,7 @@ __BEGIN_DECLS
# ifdef __S_IFLNK
# define S_IFLNK __S_IFLNK
# endif
-# if (defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN2K) \
+# if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98) \
&& defined __S_IFSOCK
# define S_IFSOCK __S_IFSOCK
# endif
@@ -130,13 +137,13 @@ __BEGIN_DECLS
# define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
#endif
-#ifdef __USE_BSD
-# ifndef __S_IFLNK
-# define S_ISLNK(mode) 0
-# endif
-# ifdef __S_IFSOCK
-# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
-# endif
+#if defined __USE_BSD && !defined __S_IFLNK
+# define S_ISLNK(mode) 0
+#endif
+
+#if (defined __USE_BSD || defined __USE_UNIX98) \
+ && defined __S_IFSOCK
+# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
#endif
/* These are from POSIX.1b. If the objects are not implemented using separate
@@ -198,18 +205,18 @@ __BEGIN_DECLS
#ifndef __USE_FILE_OFFSET64
/* Get file attributes for FILE and put them in BUF. */
extern int stat (__const char *__restrict __file,
- struct stat *__restrict __buf) __THROW;
+ struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
/* Get file attributes for the file, device, pipe, or socket
that file descriptor FD is open on and put them in BUF. */
-extern int fstat (int __fd, struct stat *__buf) __THROW;
+extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
#else
# ifdef __REDIRECT
-extern int __REDIRECT (stat,
- (__const char *__restrict __file,
- struct stat *__restrict __buf) __THROW,
- stat64);
-extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
+extern int __REDIRECT (stat, (__const char *__restrict __file,
+ struct stat *__restrict __buf), stat64)
+ __nonnull ((1, 2));
+extern int __REDIRECT (fstat, (int __fd, struct stat *__buf), fstat64)
+ __nonnull ((2));
# else
# define stat stat64
# define fstat fstat64
@@ -217,8 +224,8 @@ extern int __REDIRECT (fstat, (int __fd, struct stat *__buf) __THROW, fstat64);
#endif
#ifdef __USE_LARGEFILE64
extern int stat64 (__const char *__restrict __file,
- struct stat64 *__restrict __buf) __THROW;
-extern int fstat64 (int __fd, struct stat64 *__buf) __THROW;
+ struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
+extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -226,27 +233,36 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW;
/* Get file attributes about FILE and put them in BUF.
If FILE is a symbolic link, do not follow it. */
extern int lstat (__const char *__restrict __file,
- struct stat *__restrict __buf) __THROW;
+ struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
# else
# ifdef __REDIRECT
extern int __REDIRECT (lstat,
- (__const char *__restrict __file,
- struct stat *__restrict __buf) __THROW,
- lstat64);
+ (__const char *__restrict __file,
+ struct stat *__restrict __buf), lstat64)
+ __nonnull ((1, 2));
# else
# define lstat lstat64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int lstat64 (__const char *__restrict __file,
- struct stat64 *__restrict __buf) __THROW;
+ struct stat64 *__restrict __buf)
+ __THROW __nonnull ((1, 2));
# endif
#endif
/* Set file access permissions for FILE to MODE.
- This takes an `int' MODE argument because that
- is what `mode_t's get widened to. */
-extern int chmod (__const char *__file, __mode_t __mode) __THROW;
+ If FILE is a symbolic link, this affects its target instead. */
+extern int chmod (__const char *__file, __mode_t __mode)
+ __THROW __nonnull ((1));
+
+#if 0 /* def __USE_BSD */
+/* Set file access permissions for FILE to MODE.
+ If FILE is a symbolic link, this affects the link itself
+ rather than its target. */
+extern int lchmod (__const char *__file, __mode_t __mode)
+ __THROW __nonnull ((1));
+#endif
/* Set file access permissions of the file FD is open on to MODE. */
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -265,18 +281,21 @@ extern __mode_t getumask (void) __THROW;
#endif
/* Create a new directory named PATH, with permission bits MODE. */
-extern int mkdir (__const char *__path, __mode_t __mode) __THROW;
+extern int mkdir (__const char *__path, __mode_t __mode)
+ __THROW __nonnull ((1));
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
#if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
- __THROW;
+ __THROW __nonnull ((1));
#endif
+
/* Create a new FIFO named PATH, with permission bits MODE. */
-extern int mkfifo (__const char *__path, __mode_t __mode) __THROW;
+extern int mkfifo (__const char *__path, __mode_t __mode)
+ __THROW __nonnull ((1));
__END_DECLS
diff --git a/include/sys/statvfs.h b/include/sys/statvfs.h
index f34f8d318..685dd2619 100644
--- a/include/sys/statvfs.h
+++ b/include/sys/statvfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2004 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
@@ -50,36 +50,40 @@ __BEGIN_DECLS
/* Return information about the filesystem on which FILE resides. */
#ifndef __USE_FILE_OFFSET64
extern int statvfs (__const char *__restrict __file,
- struct statvfs *__restrict __buf) __THROW;
+ struct statvfs *__restrict __buf)
+ __THROW __nonnull ((1, 2));
#else
# ifdef __REDIRECT
extern int __REDIRECT (statvfs,
- (__const char *__restrict __file,
- struct statvfs *__restrict __buf) __THROW,
- statvfs64);
+ (__const char *__restrict __file,
+ struct statvfs *__restrict __buf), statvfs64)
+ __nonnull ((1, 2));
# else
# define statvfs statvfs64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int statvfs64 (__const char *__restrict __file,
- struct statvfs64 *__restrict __buf) __THROW;
+ struct statvfs64 *__restrict __buf)
+ __THROW __nonnull ((1, 2));
#endif
/* Return information about the filesystem containing the file FILDES
refers to. */
#ifndef __USE_FILE_OFFSET64
-extern int fstatvfs (int __fildes, struct statvfs *__buf) __THROW;
+extern int fstatvfs (int __fildes, struct statvfs *__buf)
+ __THROW __nonnull ((2));
#else
# ifdef __REDIRECT
-extern int __REDIRECT (fstatvfs, (int __fildes, struct statvfs *__buf) __THROW,
- fstatvfs64);
+extern int __REDIRECT (fstatvfs, (int __fildes, struct statvfs *__buf),
+ fstatvfs64) __nonnull ((2));
# else
# define fstatvfs fstatvfs64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf) __THROW;
+extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
+ __THROW __nonnull ((2));
#endif
__END_DECLS
diff --git a/include/sys/syslog.h b/include/sys/syslog.h
index 940ee2dec..ace88a097 100644
--- a/include/sys/syslog.h
+++ b/include/sys/syslog.h
@@ -168,24 +168,37 @@ CODE facilitynames[] =
__BEGIN_DECLS
-/* Close desriptor used to write to system logger. */
-extern void closelog (void) __THROW;
+/* Close desriptor used to write to system logger.
-/* Open connection to system logger. */
-extern void openlog (__const char *__ident, int __option, int __facility)
- __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void closelog (void);
+
+/* Open connection to system logger.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void openlog (__const char *__ident, int __option, int __facility);
/* Set the log mask level. */
extern int setlogmask (int __mask) __THROW;
-/* Generate a log message using FMT string and option arguments. */
-extern void syslog (int __pri, __const char *__fmt, ...) __THROW
+/* Generate a log message using FMT string and option arguments.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void syslog (int __pri, __const char *__fmt, ...)
__attribute__ ((__format__(__printf__, 2, 3)));
#ifdef __USE_BSD
-/* Generate a log message using FMT and using arguments pointed to by AP. */
+/* Generate a log message using FMT and using arguments pointed to by AP.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
- __THROW __attribute__ ((__format__(__printf__, 2, 0)));
+ __attribute__ ((__format__(__printf__, 2, 0)));
#endif
__END_DECLS
diff --git a/include/sys/uio.h b/include/sys/uio.h
index 4b3138088..1b203f71c 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2003 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,20 +30,24 @@ __BEGIN_DECLS
/* Read data from file descriptor FD, and put the result in the
- buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
+ buffers described by IOVEC, which is a vector of COUNT `struct iovec's.
The buffers are filled in the order specified.
Operates just like `read' (see <unistd.h>) except that data are
- put in VECTOR instead of a contiguous buffer. */
-extern ssize_t readv (int __fd, __const struct iovec *__vector, int __count)
- __THROW;
+ put in IOVEC instead of a contiguous buffer.
-/* Write data pointed by the buffers described by VECTOR, which
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count);
+
+/* Write data pointed by the buffers described by IOVEC, which
is a vector of COUNT `struct iovec's, to file descriptor FD.
The data is written in the order specified.
Operates just like `write' (see <unistd.h>) except that the data
- are taken from VECTOR instead of a contiguous buffer. */
-extern ssize_t writev (int __fd, __const struct iovec *__vector, int __count)
- __THROW;
+ are taken from IOVEC instead of a contiguous buffer.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count);
__END_DECLS
diff --git a/include/sys/wait.h b/include/sys/wait.h
index 67fd0c17a..ec53808db 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -84,6 +84,9 @@ typedef union
# define WIFEXITED(status) __WIFEXITED(__WAIT_INT(status))
# define WIFSIGNALED(status) __WIFSIGNALED(__WAIT_INT(status))
# define WIFSTOPPED(status) __WIFSTOPPED(__WAIT_INT(status))
+# if 0 /* def __WIFCONTINUED */
+# define WIFCONTINUED(status) __WIFCONTINUED(__WAIT_INT(status))
+# endif
#endif /* <stdlib.h> not included. */
#ifdef __USE_BSD
diff --git a/include/termios.h b/include/termios.h
index 2c66457e2..9698b1fbd 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,96,97,98,99, 2003 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
@@ -80,8 +80,11 @@ extern void cfmakeraw (struct termios *__termios_p) __THROW;
/* Send zero bits on FD. */
extern int tcsendbreak (int __fd, int __duration) __THROW;
-/* Wait for pending output to be written on FD. */
-extern int tcdrain (int __fd) __THROW;
+/* Wait for pending output to be written on FD.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int tcdrain (int __fd);
/* Flush pending data on FD.
Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <bits/termios.h>. */
diff --git a/include/utime.h b/include/utime.h
index 068769649..dd5d26570 100644
--- a/include/utime.h
+++ b/include/utime.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2004 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,7 +29,7 @@ __BEGIN_DECLS
#include <bits/types.h>
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K
# define __need_time_t
# include <time.h>
#endif
@@ -44,7 +44,8 @@ struct utimbuf
/* Set the access and modification times of FILE to those given in
*FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
extern int utime (__const char *__file,
- __const struct utimbuf *__file_times) __THROW;
+ __const struct utimbuf *__file_times)
+ __THROW __nonnull ((1));
__END_DECLS
diff --git a/include/utmp.h b/include/utmp.h
index ce251c137..585aad12d 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -79,6 +79,19 @@ extern struct utmp *getutline (__const struct utmp *__line) __THROW;
/* Write out entry pointed to by UTMP_PTR into the utmp file. */
extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW;
+
+#if 0 /* def __USE_MISC */
+/* Reentrant versions of the file for handling utmp files. */
+extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW;
+
+extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer,
+ struct utmp **__result) __THROW;
+
+extern int getutline_r (__const struct utmp *__line,
+ struct utmp *__buffer, struct utmp **__result) __THROW;
+
+#endif /* Use misc. */
+
__END_DECLS
#endif /* utmp.h */
diff --git a/include/wordexp.h b/include/wordexp.h
index 0ce36ec73..1c40e6168 100644
--- a/include/wordexp.h
+++ b/include/wordexp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 1996-1999, 2001, 2003 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
@@ -61,7 +61,7 @@ enum
/* Do word expansion of WORDS into PWORDEXP. */
extern int wordexp (__const char *__restrict __words,
- wordexp_t *__restrict __pwordexp, int __flags) __THROW;
+ wordexp_t *__restrict __pwordexp, int __flags);
/* Free the storage allocated by a `wordexp' call. */
extern void wordfree (wordexp_t *__wordexp) __THROW;