summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-11-17 03:10:29 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-11-17 03:10:29 +0000
commit164a928b77f596b6617a4bbf43a2c06bc35a5602 (patch)
tree8d1f20c152e2eec919c58e3259a20cc038b5d7c4 /include/sys
parent8c325ee38bf779dc5d51e41281d3b8230c3af971 (diff)
downloaduClibc-alpine-164a928b77f596b6617a4bbf43a2c06bc35a5602.tar.bz2
uClibc-alpine-164a928b77f596b6617a4bbf43a2c06bc35a5602.tar.xz
Merge from trunk.
Diffstat (limited to 'include/sys')
-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/resource.h9
-rw-r--r--include/sys/select.h26
-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/statfs.h22
-rw-r--r--include/sys/statvfs.h24
-rw-r--r--include/sys/syslog.h31
-rw-r--r--include/sys/types.h10
-rw-r--r--include/sys/uio.h22
-rw-r--r--include/sys/wait.h28
16 files changed, 255 insertions, 135 deletions
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/resource.h b/include/sys/resource.h
index 3dd2da929..4f5dc9b84 100644
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,94,96,97,98,99,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992,94,1996-2000,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
@@ -53,8 +53,7 @@ extern int getrlimit (__rlimit_resource_t __resource,
#else
# ifdef __REDIRECT
extern int __REDIRECT (getrlimit, (__rlimit_resource_t __resource,
- struct rlimit *__rlimits) __THROW,
- getrlimit64);
+ struct rlimit *__rlimits), getrlimit64);
# else
# define getrlimit getrlimit64
# endif
@@ -73,8 +72,8 @@ extern int setrlimit (__rlimit_resource_t __resource,
#else
# ifdef __REDIRECT
extern int __REDIRECT (setrlimit, (__rlimit_resource_t __resource,
- __const struct rlimit *__rlimits) __THROW,
- setrlimit64);
+ __const struct rlimit *__rlimits),
+ setrlimit64);
# else
# define setrlimit setrlimit64
# endif
diff --git a/include/sys/select.h b/include/sys/select.h
index 8f03c73e9..2a408433e 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -1,5 +1,5 @@
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,97,98,99,2000,01,02,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
@@ -39,15 +39,25 @@ typedef __sigset_t sigset_t;
#endif
/* Get definition of timer specification structures. */
+#define __need_time_t
#define __need_timespec
#include <time.h>
#define __need_timeval
#include <bits/time.h>
+#ifndef __suseconds_t_defined
+typedef __suseconds_t suseconds_t;
+# define __suseconds_t_defined
+#endif
+
/* The fd_set member is required to be an array of longs. */
typedef long int __fd_mask;
+/* Some versions of <linux/posix_types.h> define these macros. */
+#undef __NFDBITS
+#undef __FDELT
+#undef __FDMASK
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
#define __NFDBITS (8 * sizeof (__fd_mask))
#define __FDELT(d) ((d) / __NFDBITS)
@@ -92,21 +102,27 @@ __BEGIN_DECLS
readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
(if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
after waiting the interval specified therein. Returns the number of ready
- descriptors, or -1 for errors. */
+ descriptors, or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
- struct timeval *__restrict __timeout) __THROW;
+ struct timeval *__restrict __timeout);
#ifdef __USE_XOPEN2K
/* Same as above only that the TIMEOUT value is given with higher
resolution and a sigmask which is been set temporarily. This version
- should be used. */
+ should be used.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
- const __sigset_t *__restrict __sigmask) __THROW;
+ const __sigset_t *__restrict __sigmask);
#endif
__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/statfs.h b/include/sys/statfs.h
index 969d9d0e5..2ac877245 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- 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.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,34 +29,38 @@ __BEGIN_DECLS
/* Return information about the filesystem on which FILE resides. */
#ifndef __USE_FILE_OFFSET64
-extern int statfs (__const char *__file, struct statfs *__buf) __THROW;
+extern int statfs (__const char *__file, struct statfs *__buf)
+ __THROW __nonnull ((1, 2));
#else
# ifdef __REDIRECT
extern int __REDIRECT (statfs,
- (__const char *__file, struct statfs *__buf) __THROW,
- statfs64);
+ (__const char *__file, struct statfs *__buf),
+ statfs64) __nonnull ((1, 2));
# else
# define statfs statfs64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int statfs64 (__const char *__file, struct statfs64 *__buf) __THROW;
+extern int statfs64 (__const char *__file, struct statfs64 *__buf)
+ __THROW __nonnull ((1, 2));
#endif
/* Return information about the filesystem containing the file FILDES
refers to. */
#ifndef __USE_FILE_OFFSET64
-extern int fstatfs (int __fildes, struct statfs *__buf) __THROW;
+extern int fstatfs (int __fildes, struct statfs *__buf)
+ __THROW __nonnull ((2));
#else
# ifdef __REDIRECT
-extern int __REDIRECT (fstatfs, (int __fildes, struct statfs *__buf) __THROW,
- fstatfs64);
+extern int __REDIRECT (fstatfs, (int __fildes, struct statfs *__buf),
+ fstatfs64) __nonnull ((2));
# else
# define fstatfs fstatfs64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __THROW;
+extern int fstatfs64 (int __fildes, struct statfs64 *__buf)
+ __THROW __nonnull ((2));
#endif
__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/types.h b/include/sys/types.h
index cd114876f..666681453 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994,1995,1996,1997,1998,1999,2000,2001,2002
+ 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
@@ -259,6 +260,13 @@ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */
typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */
#endif
+
+/* Now add the thread types. */
+#include <features.h>
+#if (defined __USE_POSIX199506 || defined __USE_UNIX98) && defined UCLIBC_HAS_THREADS
+# include <bits/pthreadtypes.h>
+#endif
+
__END_DECLS
#endif /* sys/types.h */
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 03ac5fe35..ec53808db 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-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
@@ -30,7 +30,7 @@ __BEGIN_DECLS
#include <signal.h>
#include <sys/resource.h>
-/* These macros could also be defined int <stdlib.h>. */
+/* These macros could also be defined in <stdlib.h>. */
#if !defined _STDLIB_H || !defined __USE_XOPEN
/* This will define the `W*' macros for the flag
bits to `waitpid', `wait3', and `wait4'. */
@@ -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
@@ -105,8 +108,11 @@ typedef enum
/* Wait for a child to die. When one does, put its status in *STAT_LOC
- and return its process ID. For errors, return (pid_t) -1. */
-extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW;
+ and return its process ID. For errors, return (pid_t) -1.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern __pid_t wait (__WAIT_STATUS __stat_loc);
#ifdef __USE_BSD
/* Special values for the PID argument to `waitpid' and `wait4'. */
@@ -125,8 +131,11 @@ extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW;
is not already dead, return (pid_t) 0. If successful,
return PID and store the dead child's status in STAT_LOC.
Return (pid_t) -1 for errors. If the WUNTRACED bit is
- set in OPTIONS, return status for stopped children; otherwise don't. */
-extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW;
+ set in OPTIONS, return status for stopped children; otherwise don't.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
#if defined __USE_SVID || defined __USE_XOPEN
# define __need_siginfo_t
@@ -138,9 +147,12 @@ extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options) __THROW;
If IDTYPE is P_ALL, match any process.
If the WNOHANG bit is set in OPTIONS, and that child
is not already dead, clear *INFOP and return 0. If successful, store
- exit code and status in *INFOP. */
+ exit code and status in *INFOP.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
- int __options) __THROW;
+ int __options);
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED