+2003-04-19 Ulrich Drepper <drepper@redhat.com>
+
+ * catgets/nl_types.h: Remove __THROW marker from cancellation points.
+ * dirent/dirent.h: Likewise.
+ * dlfcn/dlfcn.h: Likewise.
+ * grp/grp.h: Likewise.
+ * iconv/iconv.h: Likewise.
+ * io/fcntl.h: Likewise.
+ * io/ftw.h: Likewise.
+ * libio/stdio.h: Likewise.
+ * misc/sys/mman.h: Likewise.
+ * misc/sys/select.h: Likewise.
+ * misc/sys/syslog.h: Likewise.
+ * misc/sys/uio.h: Likewise.
+ * posix/spawn.h: Likewise.
+ * posix/unistd.h: Likewise.
+ * posix/sys/wait.h: Likewise.
+ * pwd/pwd.h: Likewise.
+ * resolv/netdb.h: Likewise.
+ * rt/aio.h: Likewise.
+ * shadow/shadow.h: Likewise.
+ * signal/signal.h: Likewise.
+ * socket/sys/socket.h: Likewise.
+ * stdlib/stdlib.h: Likewise.
+ * streams/stropts.h: Likewise.
+ * string/string.h: Likewise.
+ * sysdeps/gnu/utmpx.h: Likewise.
+ * sysvipc/sys/msg.h: Likewise.
+ * termios/termios.h: Likewise.
+ * time/time.h: Likewise.
+ * wcsmbs/wchar.h: Likewise.
+ * iconv/gconv_cache.c: Include <not-cancel.h> and use non-cancelable
+ functions.
+ * misc/daemon.c: Likewise.
+ * sysdeps/generic/backtracesymsfd.c: Likewise.
+ * sysdeps/generic/check_fds.c: Likewise.
+ * sysdeps/unix/sysv/linux/gethostid.c: Likewise.
+ * sysdeps/unix/sysv/linux/not-cancel.h: New file.
+ * sysdeps/generic/not-cancel.h: New file.
+ * csu/Makefile (distribute): Add not-cancel.h.
+ * sysdeps/unix/sysv/linux/fatal-prepare.h: New file.
+ * sysdeps/unix/sysv/linux/Makefile: Define FATAL_PREPARE_INCLUDE
+ for assert.c and assert-perr.c to include <fatal-prepare.h>.
+ * sysdeps/unix/sysv/linux/Dist: Add fatal-prepare.h.
+
+ * sysdeps/posix/remove.c (remove): Rewrite. No need to restore
+ errno and unlink first.
+
+ * io/ftw.c (ftw_dir): In all places assume fchdir is available.
+
+2003-04-18 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Use
+ INTERNAL_SYSCALL instead of INLINE_SYSCALL.
+
2003-04-17 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/Makefile: Remove db2 directory handling.
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 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
/* 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);
/* Return translation with NUMBER in SET of CATALOG; if not found
return STRING. */
b$(start-installed-name) $(csu-dummies))
install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
distribute = initfini.c gmon-start.c start.c defs.awk munch.awk \
- abi-note.S init.c munch-tmpl.c
+ abi-note.S init.c munch-tmpl.c not-cancel.h
generated = version-info.h
before-compile = $(objpfx)version-info.h
-/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991-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
typedef struct __dirstream DIR;
/* Open a directory stream on NAME.
- Return a DIR stream on the directory, or NULL if it could not be opened. */
-extern DIR *opendir (__const char *__name) __THROW;
+ Return a DIR stream on the directory, or NULL if it could not be opened.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern DIR *opendir (__const char *__name);
/* Close the directory stream DIRP.
- Return 0 if successful, -1 if not. */
-extern int closedir (DIR *__dirp) __THROW;
+ Return 0 if successful, -1 if not.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int closedir (DIR *__dirp);
/* Read a directory entry from DIRP. Return a pointer to a `struct
dirent' describing the entry, or NULL for EOF or error. The
same DIR stream.
If the Large File Support API is selected we have to use the
- appropriate interface. */
+ appropriate interface.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern struct dirent *readdir (DIR *__dirp) __THROW;
+extern struct dirent *readdir (DIR *__dirp);
#else
# ifdef __REDIRECT
-extern struct dirent *__REDIRECT (readdir, (DIR *__dirp) __THROW, readdir64);
+extern struct dirent *__REDIRECT (readdir, (DIR *__dirp), readdir64);
# else
# define readdir readdir64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern struct dirent64 *readdir64 (DIR *__dirp) __THROW;
+extern struct dirent64 *readdir64 (DIR *__dirp);
#endif
#if defined __USE_POSIX || defined __USE_MISC
/* Reentrant version of `readdir'. Return in RESULT a pointer to the
- next entry. */
+ next entry.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int readdir_r (DIR *__restrict __dirp,
struct dirent *__restrict __entry,
- struct dirent **__restrict __result) __THROW;
+ struct dirent **__restrict __result);
# else
# ifdef __REDIRECT
extern int __REDIRECT (readdir_r,
(DIR *__restrict __dirp,
struct dirent *__restrict __entry,
- struct dirent **__restrict __result) __THROW,
+ struct dirent **__restrict __result),
readdir64_r);
# else
# define readdir_r readdir64_r
# ifdef __USE_LARGEFILE64
extern int readdir64_r (DIR *__restrict __dirp,
struct dirent64 *__restrict __entry,
- struct dirent64 **__restrict __result) __THROW;
+ struct dirent64 **__restrict __result);
# endif
#endif /* POSIX or misc */
__BEGIN_DECLS
/* Open the shared object FILE and map it in; return a handle that can be
- passed to `dlsym' to get symbol values from it. */
-extern void *dlopen (__const char *__file, int __mode) __THROW;
+ passed to `dlsym' to get symbol values from it.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void *dlopen (__const char *__file, int __mode);
/* Unmap and close a shared object opened by `dlopen'.
The handle cannot be used again after calling `dlclose'. */
-/* Copyright (C) 1991,92,95,96,97,98,99,2000,01 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-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
#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
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 */
/* 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. */
+ 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) __THROW;
+ __gid_t *__groups, int *__ngroups);
/* 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. */
/* Cache handling for iconv modules.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
02111-1307 USA. */
#include <dlfcn.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <gconv_int.h>
#include <iconvconfig.h>
+#include <not-cancel.h>
#include "../intl/hash-string.h"
return -1;
/* See whether the cache file exists. */
- fd = __open (GCONV_MODULES_CACHE, O_RDONLY);
+ fd = open_not_cancel (GCONV_MODULES_CACHE, O_RDONLY);
if (__builtin_expect (fd, 0) == -1)
/* Not available. */
return -1;
|| (size_t) st.st_size < sizeof (struct gconvcache_header))
{
close_and_exit:
- __close (fd);
+ close_not_cancel_no_status (fd);
return -1;
}
}
/* We don't need the file descriptor anymore. */
- __close (fd);
+ close_not_cancel_no_status (fd);
/* Check the consistency. */
header = (struct gconvcache_header *) gconv_cache;
-/* 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
/* 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
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
-/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,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
#endif /* XPG */
/* Do the file control operation described by CMD on FD.
- The remaining arguments are interpreted depending on CMD. */
-extern int fcntl (int __fd, int __cmd, ...) __THROW;
+ The remaining arguments are interpreted depending on CMD.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int fcntl (int __fd, int __cmd, ...);
/* Open FILE and return a new file descriptor for it, or -1 on error.
OFLAG determines the type of access used. If O_CREAT is on OFLAG,
- the third argument is taken as a `mode_t', the mode of the created file. */
+ the third argument is taken as a `mode_t', the mode of the created file.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int open (__const char *__file, int __oflag, ...) __THROW;
+extern int open (__const char *__file, int __oflag, ...);
#else
# ifdef __REDIRECT
-extern int __REDIRECT (open, (__const char *__file, int __oflag, ...) __THROW,
- open64);
+extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64);
# else
# define open open64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int open64 (__const char *__file, int __oflag, ...) __THROW;
+extern int open64 (__const char *__file, int __oflag, ...);
#endif
-/* Create and open FILE, with mode MODE.
- This takes an `int' MODE argument because that is
- what `mode_t' will be widened to. */
+/* Create and open FILE, with mode MODE. This takes an `int' MODE
+ argument because that is what `mode_t' will be widened to.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int creat (__const char *__file, __mode_t __mode) __THROW;
+extern int creat (__const char *__file, __mode_t __mode);
#else
# ifdef __REDIRECT
-extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode) __THROW,
+extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode),
creat64);
# else
# define creat creat64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int creat64 (__const char *__file, __mode_t __mode) __THROW;
+extern int creat64 (__const char *__file, __mode_t __mode);
#endif
#if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
{
if (__fchdir (dirfd (dir.stream)) < 0)
{
- if (errno == ENOSYS)
- {
- if (__chdir (data->dirbuf) < 0)
- result = -1;
- }
- else
- result = -1;
- }
-
- if (result != 0)
- {
int save_err = errno;
__closedir (dir.stream);
__set_errno (save_err);
data->actdir = data->maxdir - 1;
data->dirstreams[data->actdir] = NULL;
- return result;
+ return -1;
}
}
-/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1992,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
# endif
#endif
-/* Call a function on every element in a directory tree. */
+/* Call a function on every element in a directory tree.
+
+ 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)
- __THROW;
+extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors);
#else
# ifdef __REDIRECT
extern int __REDIRECT (ftw, (__const char *__dir, __ftw_func_t __func,
- int __descriptors) __THROW, ftw64);
+ int __descriptors), ftw64);
# else
# define ftw ftw64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int ftw64 (__const char *__dir, __ftw64_func_t __func,
- int __descriptors) __THROW;
+ int __descriptors);
#endif
#ifdef __USE_XOPEN_EXTENDED
/* Call a function on every element in a directory tree. FLAG allows
- to specify the behaviour more detailed. */
+ to specify the behaviour more detailed.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int nftw (__const char *__dir, __nftw_func_t __func, int __descriptors,
- int __flag) __THROW;
+ int __flag);
# else
# ifdef __REDIRECT
extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func,
- int __descriptors, int __flag) __THROW, nftw64);
+ int __descriptors, int __flag), nftw64);
# else
# define nftw nftw64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int nftw64 (__const char *__dir, __nftw64_func_t __func,
- int __descriptors, int __flag) __THROW;
+ int __descriptors, int __flag);
# endif
#endif
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991,1994-1999,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1991,1994-2002,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
__BEGIN_NAMESPACE_STD
-/* Create a temporary file and open it read/write. */
+/* Create a temporary file and open it read/write.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern FILE *tmpfile (void) __THROW;
+extern FILE *tmpfile (void);
#else
# ifdef __REDIRECT
-extern FILE *__REDIRECT (tmpfile, (void) __THROW, tmpfile64);
+extern FILE *__REDIRECT (tmpfile, (void), tmpfile64);
# else
# define tmpfile tmpfile64
# endif
#endif
+#ifdef __USE_LARGEFILE64
+extern FILE *tmpfile64 (void);
+#endif
+
/* Generate a temporary filename. */
extern char *tmpnam (char *__s) __THROW;
__END_NAMESPACE_STD
-#ifdef __USE_LARGEFILE64
-extern FILE *tmpfile64 (void) __THROW;
-#endif
-
#ifdef __USE_MISC
/* This is the reentrant variant of `tmpnam'. The only difference is
that it does not allow S to be NULL. */
__BEGIN_NAMESPACE_STD
-/* Close STREAM. */
-extern int fclose (FILE *__stream) __THROW;
-/* Flush STREAM, or all streams if STREAM is NULL. */
-extern int fflush (FILE *__stream) __THROW;
+/* Close STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fclose (FILE *__stream);
+/* Flush STREAM, or all streams if STREAM is NULL.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fflush (FILE *__stream);
__END_NAMESPACE_STD
#ifdef __USE_MISC
-/* Faster versions when locking is not required. */
-extern int fflush_unlocked (FILE *__stream) __THROW;
+/* Faster versions when locking is not required.
+
+ 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 fflush_unlocked (FILE *__stream);
#endif
#ifdef __USE_GNU
-/* Close all streams. */
-extern int fcloseall (void) __THROW;
+/* Close all streams.
+
+ 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 fcloseall (void);
#endif
__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
-/* Open a file and create a new stream for it. */
+/* Open a file and create a new stream for it.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern FILE *fopen (__const char *__restrict __filename,
- __const char *__restrict __modes) __THROW;
-/* Open a file, replacing an existing stream with it. */
+ __const char *__restrict __modes);
+/* Open a file, replacing an existing stream with it.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
#else
# ifdef __REDIRECT
extern FILE *__REDIRECT (fopen, (__const char *__restrict __filename,
- __const char *__restrict __modes) __THROW,
- fopen64);
+ __const char *__restrict __modes), fopen64);
extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename,
__const char *__restrict __modes,
- FILE *__restrict __stream) __THROW,
- freopen64);
+ FILE *__restrict __stream), freopen64);
# else
# define fopen fopen64
# define freopen freopen64
__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
extern FILE *fopen64 (__const char *__restrict __filename,
- __const char *__restrict __modes) __THROW;
+ __const char *__restrict __modes);
extern FILE *freopen64 (__const char *__restrict __filename,
__const char *__restrict __modes,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
#endif
#ifdef __USE_POSIX
__BEGIN_NAMESPACE_STD
-/* Write formatted output to STREAM. */
+/* Write formatted output to STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int fprintf (FILE *__restrict __stream,
- __const char *__restrict __format, ...) __THROW;
-/* Write formatted output to stdout. */
-extern int printf (__const char *__restrict __format, ...) __THROW;
+ __const char *__restrict __format, ...);
+/* Write formatted output to stdout.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int printf (__const char *__restrict __format, ...);
/* Write formatted output to S. */
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) __THROW;
-/* Write formatted output to S from argument list ARG. */
+/* Write formatted output to S from argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
- _G_va_list __arg) __THROW;
-/* Write formatted output to stdout from argument list ARG. */
-extern int vprintf (__const char *__restrict __format, _G_va_list __arg)
- __THROW;
+ _G_va_list __arg);
+/* Write formatted output to stdout from argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int vprintf (__const char *__restrict __format, _G_va_list __arg);
/* Write formatted output to S from argument list ARG. */
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
_G_va_list __arg) __THROW;
__const char *__restrict __fmt, ...)
__THROW __attribute__ ((__format__ (__printf__, 2, 3)));
-/* Write formatted output to a file descriptor. */
+/* Write formatted output to a file descriptor.
+
+ 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 vdprintf (int __fd, __const char *__restrict __fmt,
_G_va_list __arg)
- __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3)));
#endif
__BEGIN_NAMESPACE_STD
-/* Read formatted input from STREAM. */
+/* Read formatted input from STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int fscanf (FILE *__restrict __stream,
- __const char *__restrict __format, ...) __THROW;
-/* Read formatted input from stdin. */
-extern int scanf (__const char *__restrict __format, ...) __THROW;
+ __const char *__restrict __format, ...);
+/* Read formatted input from stdin.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int scanf (__const char *__restrict __format, ...);
/* Read formatted input from S. */
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) __THROW;
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
-/* Read formatted input from S into argument list ARG. */
+/* Read formatted input from S into argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
_G_va_list __arg)
- __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
+ __attribute__ ((__format__ (__scanf__, 2, 0)));
-/* Read formatted input from stdin into argument list ARG. */
+/* Read formatted input from stdin into argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vscanf (__const char *__restrict __format, _G_va_list __arg)
- __THROW __attribute__ ((__format__ (__scanf__, 1, 0)));
+ __attribute__ ((__format__ (__scanf__, 1, 0)));
/* Read formatted input from S into argument list ARG. */
extern int vsscanf (__const char *__restrict __s,
__BEGIN_NAMESPACE_STD
-/* Read a character from STREAM. */
-extern int fgetc (FILE *__stream) __THROW;
-extern int getc (FILE *__stream) __THROW;
+/* Read a character from STREAM.
+
+ These functions are possible cancellation points and therefore not
+ marked with __THROW. */
+extern int fgetc (FILE *__stream);
+extern int getc (FILE *__stream);
-/* Read a character from stdin. */
-extern int getchar (void) __THROW;
+/* Read a character from stdin.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int getchar (void);
__END_NAMESPACE_STD
/* The C standard explicitly says this is a macro, so we always do the
#define getc(_fp) _IO_getc (_fp)
#if defined __USE_POSIX || defined __USE_MISC
-/* These are defined in POSIX.1:1996. */
-extern int getc_unlocked (FILE *__stream) __THROW;
-extern int getchar_unlocked (void) __THROW;
+/* These are defined in POSIX.1:1996.
+
+ These functions are possible cancellation points and therefore not
+ marked with __THROW. */
+extern int getc_unlocked (FILE *__stream);
+extern int getchar_unlocked (void);
#endif /* Use POSIX or MISC. */
#ifdef __USE_MISC
-/* Faster version when locking is not necessary. */
-extern int fgetc_unlocked (FILE *__stream) __THROW;
+/* Faster version when locking is not necessary.
+
+ 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 fgetc_unlocked (FILE *__stream);
#endif /* Use MISC. */
__BEGIN_NAMESPACE_STD
-/* Write a character to STREAM. */
+/* Write a character to STREAM.
+
+ These functions are possible cancellation points and therefore not
+ marked with __THROW. */
extern int fputc (int __c, FILE *__stream) __THROW;
extern int putc (int __c, FILE *__stream) __THROW;
-/* Write a character to stdout. */
-extern int putchar (int __c) __THROW;
+/* Write a character to stdout.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int putchar (int __c);
__END_NAMESPACE_STD
/* The C standard explicitly says this can be a macro,
#define putc(_ch, _fp) _IO_putc (_ch, _fp)
#ifdef __USE_MISC
-/* Faster version when locking is not necessary. */
-extern int fputc_unlocked (int __c, FILE *__stream) __THROW;
+/* Faster version when locking is not necessary.
+
+ 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 fputc_unlocked (int __c, FILE *__stream);
#endif /* Use MISC. */
#if defined __USE_POSIX || defined __USE_MISC
-/* These are defined in POSIX.1:1996. */
-extern int putc_unlocked (int __c, FILE *__stream) __THROW;
-extern int putchar_unlocked (int __c) __THROW;
+/* These are defined in POSIX.1:1996.
+
+ These functions are possible cancellation points and therefore not
+ marked with __THROW. */
+extern int putc_unlocked (int __c, FILE *__stream);
+extern int putchar_unlocked (int __c);
#endif /* Use POSIX or MISC. */
-#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_SVID || defined __USE_MISC \
+ || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
/* Get a word (int) from STREAM. */
extern int getw (FILE *__stream) __THROW;
__BEGIN_NAMESPACE_STD
-/* Get a newline-terminated string of finite length from STREAM. */
-extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
- __THROW;
+/* Get a newline-terminated string of finite length from STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
/* Get a newline-terminated string from stdin, removing the newline.
- DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. */
-extern char *gets (char *__s) __THROW;
+ DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern char *gets (char *__s);
__END_NAMESPACE_STD
#ifdef __USE_GNU
-/* This function does the same as `fgets' but does not lock the stream. */
+/* This function does the same as `fgets' but does not lock the 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 char *fgets_unlocked (char *__restrict __s, int __n,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
#endif
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
NULL), pointing to *N characters of space. It is realloc'd as
necessary. Returns the number of characters read (not including the
- null terminator), or -1 on error or EOF. */
+ null terminator), or -1 on error or EOF.
+
+ 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 _IO_ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
extern _IO_ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
+
+/* Like `getdelim', but reads up to a newline.
-/* Like `getdelim', but reads up to a newline. */
+ 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 _IO_ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
#endif
__BEGIN_NAMESPACE_STD
-/* Write a string to STREAM. */
-extern int fputs (__const char *__restrict __s, FILE *__restrict __stream)
- __THROW;
+/* Write a string to STREAM.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
+
+/* Write a string, followed by a newline, to stdout.
-/* Write a string, followed by a newline, to stdout. */
-extern int puts (__const char *__s) __THROW;
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern int puts (__const char *__s);
-/* Push a character back onto the input buffer of STREAM. */
-extern int ungetc (int __c, FILE *__stream) __THROW;
+/* Push a character back onto the input buffer of STREAM.
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern int ungetc (int __c, FILE *__stream);
-/* Read chunks of generic data from STREAM. */
+
+/* Read chunks of generic data from STREAM.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
extern size_t fread (void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __stream) __THROW;
-/* Write chunks of generic data to STREAM. */
+ size_t __n, FILE *__restrict __stream);
+/* Write chunks of generic data to STREAM.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
- size_t __n, FILE *__restrict __s) __THROW;
+ size_t __n, FILE *__restrict __s);
__END_NAMESPACE_STD
#ifdef __USE_GNU
-/* This function does the same as `fputs' but does not lock the stream. */
+/* This function does the same as `fputs' but does not lock the 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 fputs_unlocked (__const char *__restrict __s,
- FILE *__restrict __stream) __THROW;
+ FILE *__restrict __stream);
#endif
#ifdef __USE_MISC
-/* Faster versions when locking is not necessary. */
+/* Faster versions when locking is not necessary.
+
+ 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 size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) __THROW;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
__BEGIN_NAMESPACE_STD
-/* Seek to a certain position on STREAM. */
-extern int fseek (FILE *__stream, long int __off, int __whence) __THROW;
-/* Return the current position of STREAM. */
-extern long int ftell (FILE *__stream) __THROW;
-/* Rewind to the beginning of STREAM. */
-extern void rewind (FILE *__stream) __THROW;
+/* Seek to a certain position on STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fseek (FILE *__stream, long int __off, int __whence);
+/* Return the current position of STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern long int ftell (FILE *__stream);
+/* Rewind to the beginning of STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void rewind (FILE *__stream);
__END_NAMESPACE_STD
/* The Single Unix Specification, Version 2, specifies an alternative,
#ifdef __USE_LARGEFILE
# ifndef __USE_FILE_OFFSET64
-/* Seek to a certain position on STREAM. */
-extern int fseeko (FILE *__stream, __off_t __off, int __whence) __THROW;
-/* Return the current position of STREAM. */
-extern __off_t ftello (FILE *__stream) __THROW;
+/* Seek to a certain position on STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fseeko (FILE *__stream, __off_t __off, int __whence);
+/* Return the current position of STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern __off_t ftello (FILE *__stream);
# else
# ifdef __REDIRECT
extern int __REDIRECT (fseeko,
- (FILE *__stream, __off64_t __off, int __whence) __THROW,
+ (FILE *__stream, __off64_t __off, int __whence),
fseeko64);
-extern __off64_t __REDIRECT (ftello, (FILE *__stream) __THROW, ftello64);
+extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64);
# else
# define fseeko fseeko64
# define ftello ftello64
__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
-/* Get STREAM's position. */
-extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos)
- __THROW;
-/* Set STREAM's position. */
-extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __THROW;
+/* Get STREAM's position.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
+/* Set STREAM's position.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
#else
# ifdef __REDIRECT
extern int __REDIRECT (fgetpos, (FILE *__restrict __stream,
- fpos_t *__restrict __pos) __THROW, fgetpos64);
+ fpos_t *__restrict __pos), fgetpos64);
extern int __REDIRECT (fsetpos,
- (FILE *__stream, __const fpos_t *__pos) __THROW,
- fsetpos64);
+ (FILE *__stream, __const fpos_t *__pos), fsetpos64);
# else
# define fgetpos fgetpos64
# define fsetpos fsetpos64
__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
-extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) __THROW;
-extern __off64_t ftello64 (FILE *__stream) __THROW;
-extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos)
- __THROW;
-extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) __THROW;
+extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
+extern __off64_t ftello64 (FILE *__stream);
+extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
+extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
#endif
__BEGIN_NAMESPACE_STD
__BEGIN_NAMESPACE_STD
-/* Print a message describing the meaning of the value of errno. */
-extern void perror (__const char *__s) __THROW;
+/* Print a message describing the meaning of the value of errno.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void perror (__const char *__s);
__END_NAMESPACE_STD
/* Provide the declarations for `sys_errlist' and `sys_nerr' if they
#if (defined __USE_POSIX2 || defined __USE_SVID || defined __USE_BSD || \
defined __USE_MISC)
-/* Create a new stream connected to a pipe running the given command. */
-extern FILE *popen (__const char *__command, __const char *__modes) __THROW;
+/* Create a new stream connected to a pipe running the given command.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern FILE *popen (__const char *__command, __const char *__modes);
+
+/* Close a stream opened by popen and return the status of its child.
-/* Close a stream opened by popen and return the status of its child. */
-extern int pclose (FILE *__stream) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int pclose (FILE *__stream);
#endif
static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <errno.h>
#include <fcntl.h>
#include <paths.h>
#include <unistd.h>
#include <sys/stat.h>
#include <device-nrs.h>
+#include <not-cancel.h>
int
daemon(nochdir, noclose)
if (!nochdir)
(void)__chdir("/");
- if (!noclose && (fd = __open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
+ if (!noclose
+ && (fd = open_not_cancel(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
struct stat64 st;
if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) == 0
if (fd > 2)
(void)__close (fd);
} else {
- (void)__close (fd);
+ close_not_cancel_no_status (fd);
return -1;
}
}
/* 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
/* `fd_set' type and related macros, and `select'/`pselect' declarations.
- Copyright (C) 1996,97,98,99,2000,01,02 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
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
__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)));
#endif
-/* 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
buffers described by VECTOR, 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 VECTOR instead of a contiguous buffer.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t readv (int __fd, __const struct iovec *__vector, int __count);
/* Write data pointed by the buffers described by VECTOR, 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 VECTOR 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 *__vector, int __count);
__END_DECLS
void (*__init_routine) (void)) __THROW;
-/* Functions for handling cancellation. */
+/* Functions for handling cancellation.
+
+ Note that these functions are explicitly not marked to not throw an
+ exception in C++ code. If cancellation is implemented by unwinding
+ this is necessary to have the compiler generate the unwind information. */
/* Set cancelability state of current thread to STATE, returning old
state in *OLDSTATE if OLDSTATE is not NULL. */
/* Test for pending cancellation for the current thread and terminate
the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
- cancelled.
-
- Note that this function is explicitly not marked to not throw an
- exception in C++ code. If cancellation is implemented by unwinding
- this is necessary to have the compiler generate the unwind information. */
+ cancelled. */
extern void pthread_testcancel (void);
/* Definitions for POSIX spawn interface.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 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
__BEGIN_DECLS
/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
- Before running the process perform the actions described in FILE-ACTIONS. */
+ Before running the process perform the actions described in FILE-ACTIONS.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
extern int posix_spawn (pid_t *__restrict __pid,
__const char *__restrict __path,
__const posix_spawn_file_actions_t *__restrict
__file_actions,
__const posix_spawnattr_t *__restrict __attrp,
char *__const argv[__restrict_arr],
- char *__const envp[__restrict_arr]) __THROW;
+ char *__const envp[__restrict_arr]);
+
+/* Similar to `posix_spawn' but search for FILE in the PATH.
-/* Similar to `posix_spawn' but search for FILE in the PATH. */
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
extern int posix_spawnp (pid_t *__pid, __const char *__file,
__const posix_spawn_file_actions_t *__file_actions,
__const posix_spawnattr_t *__attrp,
- char *__const argv[], char *__const envp[]) __THROW;
+ char *__const argv[], char *__const envp[]);
/* Initialize data structure with attributes for `spawn' to default values. */
-/* Copyright (C) 1991-1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1994,1996-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
/* 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'. */
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
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
extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW;
#endif
-/* Close the file descriptor FD. */
-extern int close (int __fd) __THROW;
+/* Close the file descriptor FD.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int close (int __fd);
/* Read NBYTES into BUF from FD. Return the
- number read, -1 for errors or 0 for EOF. */
-extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __THROW;
+ number read, -1 for errors or 0 for EOF.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t read (int __fd, void *__buf, size_t __nbytes);
+
+/* Write N bytes of BUF to FD. Return the number written, or -1.
-/* Write N bytes of BUF to FD. Return the number written, or -1. */
-extern ssize_t write (int __fd, __const void *__buf, size_t __n) __THROW;
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t write (int __fd, __const void *__buf, size_t __n);
#ifdef __USE_UNIX98
# ifndef __USE_FILE_OFFSET64
-extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
- __THROW;
+/* Read NBYTES into BUF from FD at the given position OFFSET without
+ changing the file pointer. Return the number read, -1 for errors
+ or 0 for EOF.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
+ __off_t __offset);
+
+/* Write N bytes of BUF to FD at the given position OFFSET without
+ changing the file pointer. Return the number written, or -1.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
- __off_t __offset) __THROW;
+ __off_t __offset);
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
- __off64_t __offset) __THROW,
+ __off64_t __offset),
pread64);
extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
- size_t __nbytes, __off64_t __offset)
- __THROW,
- pwrite64);
+ size_t __nbytes, __off64_t __offset),
+ pwrite64);
# else
# define pread pread64
# define pwrite pwrite64
changing the file pointer. Return the number read, -1 for errors
or 0 for EOF. */
extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
- __off64_t __offset) __THROW;
+ __off64_t __offset);
/* Write N bytes of BUF to FD at the given position OFFSET without
changing the file pointer. Return the number written, or -1. */
extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
- __off64_t __offset) __THROW;
+ __off64_t __offset);
# endif
#endif
If a signal handler does a `longjmp' or modifies the handling of the
SIGALRM signal while inside `sleep' call, the handling of the SIGALRM
signal afterwards is undefined. There is no return value to indicate
- error, but if `sleep' returns SECONDS, it probably didn't work. */
-extern unsigned int sleep (unsigned int __seconds) __THROW;
+ error, but if `sleep' returns SECONDS, it probably didn't work.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern unsigned int sleep (unsigned int __seconds);
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Set an alarm to go off (generating a SIGALRM signal) in VALUE
__THROW;
/* Sleep USECONDS microseconds, or until a signal arrives that is not blocked
- or ignored. */
-extern int usleep (__useconds_t __useconds) __THROW;
+ or ignored.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int usleep (__useconds_t __useconds);
#endif
/* Suspend the process until a signal arrives.
- This always returns -1 and sets `errno' to EINTR. */
-extern int pause (void) __THROW;
+ This always returns -1 and sets `errno' to EINTR.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int pause (void);
/* Change the owner and group of FILE. */
/* Return the pathname of the terminal FD is open on, or NULL on errors.
- The returned storage is good only until the next call to this function. */
-extern char *ttyname (int __fd) __THROW;
+ The returned storage is good only until the next call to this function.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern char *ttyname (int __fd);
/* Store at most BUFLEN characters of the pathname of the terminal FD is
- open on in BUF. Return 0 on success, otherwise an error number. */
-extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW;
+ open on in BUF. Return 0 on success, otherwise an error number.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern int ttyname_r (int __fd, char *__buf, size_t __buflen);
/* Return 1 if FD is a valid descriptor associated
with a terminal, zero if not. */
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW;
-/* Return the login name of the user. */
-extern char *getlogin (void) __THROW;
+/* Return the login name of the user.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern char *getlogin (void);
#if defined __USE_REENTRANT || defined __USE_UNIX98
/* Return at most NAME_LEN characters of the login name of the user in NAME.
If it cannot be determined or some other error occurred, return the error
- code. Otherwise return 0. */
-extern int getlogin_r (char *__name, size_t __name_len) __THROW;
+ code. Otherwise return 0.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern int getlogin_r (char *__name, size_t __name_len);
#endif
#ifdef __USE_BSD
#if defined __USE_BSD || defined __USE_XOPEN
-/* Make all changes done to FD actually appear on disk. */
-extern int fsync (int __fd) __THROW;
+/* Make all changes done to FD actually appear on disk.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int fsync (int __fd);
#endif /* Use BSD || X/Open. */
/* `lockf' is a simpler interface to the locking facilities of `fcntl'.
LEN is always relative to the current file position.
- The CMD argument is one of the following. */
+ The CMD argument is one of the following.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
# define F_ULOCK 0 /* Unlock a previously locked region. */
# define F_LOCK 1 /* Lock a region for exclusive use. */
# define F_TEST 3 /* Test a region for other processes locks. */
# ifndef __USE_FILE_OFFSET64
-extern int lockf (int __fd, int __cmd, __off_t __len) __THROW;
+extern int lockf (int __fd, int __cmd, __off_t __len);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW,
+extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
lockf64);
# else
# define lockf lockf64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW;
+extern int lockf64 (int __fd, int __cmd, __off64_t __len);
# endif
#endif /* Use misc and F_LOCK not already defined. */
-/* Copyright (C) 1991,92,95,96,97,98,99,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-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
#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
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 */
#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
-/* Copyright (C) 1996,97,98,99,2000,01,02 Free Software Foundation, Inc.
+ /* Copyright (C) 1996-2002, 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
};
/* Open host data base files and mark them as staying open even after
- a later search if STAY_OPEN is non-zero. */
-extern void sethostent (int __stay_open) __THROW;
+ a later search if STAY_OPEN is non-zero.
-/* Close host data base files and clear `stay open' flag. */
-extern void endhostent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void sethostent (int __stay_open);
+
+/* Close host data base files and clear `stay open' flag.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endhostent (void);
/* Get next entry from host data base file. Open data base if
- necessary. */
-extern struct hostent *gethostent (void) __THROW;
+ necessary.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct hostent *gethostent (void);
/* Return entry from host data base which address match ADDR with
- length LEN and type TYPE. */
+ length LEN and type TYPE.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
- int __type) __THROW;
+ int __type);
-/* Return entry from host data base for host with NAME. */
-extern struct hostent *gethostbyname (__const char *__name) __THROW;
+/* Return entry from host data base for host with NAME.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct hostent *gethostbyname (__const char *__name);
#ifdef __USE_MISC
/* Return entry from host data base for host with NAME. AF must be
set to the address type which is `AF_INET' for IPv4 or `AF_INET6'
- for IPv6. */
-extern struct hostent *gethostbyname2 (__const char *__name, int __af) __THROW;
+ for IPv6.
+
+ 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 hostent *gethostbyname2 (__const char *__name, int __af);
/* Reentrant versions of the functions above. The additional
arguments specify a buffer of BUFLEN starting at BUF. The last
argument is a pointer to a variable which gets the value which
would be stored in the global variable `herrno' by the
- non-reentrant functions. */
+ non-reentrant functions.
+
+ 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 gethostent_r (struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
int __type,
struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
extern int gethostbyname_r (__const char *__restrict __name,
struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
extern int gethostbyname2_r (__const char *__restrict __name, int __af,
struct hostent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct hostent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
#endif /* misc */
/* Open network data base files and mark them as staying open even
- after a later search if STAY_OPEN is non-zero. */
-extern void setnetent (int __stay_open) __THROW;
+ after a later search if STAY_OPEN is non-zero.
-/* Close network data base files and clear `stay open' flag. */
-extern void endnetent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void setnetent (int __stay_open);
+
+/* Close network data base files and clear `stay open' flag.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endnetent (void);
/* Get next entry from network data base file. Open data base if
- necessary. */
-extern struct netent *getnetent (void) __THROW;
+ necessary.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct netent *getnetent (void);
/* Return entry from network data base which address match NET and
- type TYPE. */
-extern struct netent *getnetbyaddr (uint32_t __net, int __type)
- __THROW;
+ type TYPE.
-/* Return entry from network data base for network with NAME. */
-extern struct netent *getnetbyname (__const char *__name) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct netent *getnetbyaddr (uint32_t __net, int __type);
+
+/* Return entry from network data base for network with NAME.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct netent *getnetbyname (__const char *__name);
#ifdef __USE_MISC
/* Reentrant versions of the functions above. The additional
arguments specify a buffer of BUFLEN starting at BUF. The last
argument is a pointer to a variable which gets the value which
would be stored in the global variable `herrno' by the
- non-reentrant functions. */
+ non-reentrant functions.
+
+ 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 getnetent_r (struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
extern int getnetbyaddr_r (uint32_t __net, int __type,
struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
extern int getnetbyname_r (__const char *__restrict __name,
struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,
- int *__restrict __h_errnop) __THROW;
+ int *__restrict __h_errnop);
#endif /* misc */
};
/* Open service data base files and mark them as staying open even
- after a later search if STAY_OPEN is non-zero. */
-extern void setservent (int __stay_open) __THROW;
+ after a later search if STAY_OPEN is non-zero.
-/* Close service data base files and clear `stay open' flag. */
-extern void endservent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void setservent (int __stay_open);
+
+/* Close service data base files and clear `stay open' flag.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endservent (void);
/* Get next entry from service data base file. Open data base if
- necessary. */
-extern struct servent *getservent (void) __THROW;
+ necessary.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct servent *getservent (void);
/* Return entry from network data base for network with NAME and
- protocol PROTO. */
+ protocol PROTO.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern struct servent *getservbyname (__const char *__name,
- __const char *__proto) __THROW;
+ __const char *__proto);
/* Return entry from service data base which matches port PORT and
- protocol PROTO. */
-extern struct servent *getservbyport (int __port, __const char *__proto)
- __THROW;
+ protocol PROTO.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct servent *getservbyport (int __port, __const char *__proto);
#ifdef __USE_MISC
/* Reentrant versions of the functions above. The additional
- arguments specify a buffer of BUFLEN starting at BUF. */
+ arguments specify a buffer of BUFLEN starting at BUF.
+
+ 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 getservent_r (struct servent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result) __THROW;
+ struct servent **__restrict __result);
extern int getservbyname_r (__const char *__restrict __name,
__const char *__restrict __proto,
struct servent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result) __THROW;
+ struct servent **__restrict __result);
extern int getservbyport_r (int __port, __const char *__restrict __proto,
struct servent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct servent **__restrict __result) __THROW;
+ struct servent **__restrict __result);
#endif /* misc */
};
/* Open protocol data base files and mark them as staying open even
- after a later search if STAY_OPEN is non-zero. */
-extern void setprotoent (int __stay_open) __THROW;
+ after a later search if STAY_OPEN is non-zero.
-/* Close protocol data base files and clear `stay open' flag. */
-extern void endprotoent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void setprotoent (int __stay_open);
+
+/* Close protocol data base files and clear `stay open' flag.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endprotoent (void);
/* Get next entry from protocol data base file. Open data base if
- necessary. */
-extern struct protoent *getprotoent (void) __THROW;
+ necessary.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct protoent *getprotoent (void);
-/* Return entry from protocol data base for network with NAME. */
-extern struct protoent *getprotobyname (__const char *__name) __THROW;
+/* Return entry from protocol data base for network with NAME.
-/* Return entry from protocol data base which number is PROTO. */
-extern struct protoent *getprotobynumber (int __proto) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct protoent *getprotobyname (__const char *__name);
+
+/* Return entry from protocol data base which number is PROTO.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct protoent *getprotobynumber (int __proto);
#ifdef __USE_MISC
/* Reentrant versions of the functions above. The additional
- arguments specify a buffer of BUFLEN starting at BUF. */
+ arguments specify a buffer of BUFLEN starting at BUF.
+
+ 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 getprotoent_r (struct protoent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result) __THROW;
+ struct protoent **__restrict __result);
extern int getprotobyname_r (__const char *__restrict __name,
struct protoent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result) __THROW;
+ struct protoent **__restrict __result);
extern int getprotobynumber_r (int __proto,
struct protoent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
- struct protoent **__restrict __result) __THROW;
-#endif /* misc */
+ struct protoent **__restrict __result);
+
+
+/* Establish network group NETGROUP for enumeration.
+ 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 setnetgrent (__const char *__netgroup);
-/* Establish network group NETGROUP for enumeration. */
-extern int setnetgrent (__const char *__netgroup) __THROW;
+/* Free all space allocated by previous `setnetgrent' call.
-/* Free all space allocated by previous `setnetgrent' call. */
-extern void endnetgrent (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 endnetgrent (void);
/* Get next member of netgroup established by last `setnetgrent' call
- and return pointers to elements in HOSTP, USERP, and DOMAINP. */
+ and return pointers to elements in HOSTP, USERP, and DOMAINP.
+
+ 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 getnetgrent (char **__restrict __hostp,
char **__restrict __userp,
- char **__restrict __domainp) __THROW;
+ char **__restrict __domainp);
-#ifdef __USE_MISC
-/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). */
+
+/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN).
+
+ 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 innetgr (__const char *__netgroup, __const char *__host,
- __const char *__user, __const char *domain) __THROW;
+ __const char *__user, __const char *domain);
+
+/* Reentrant version of `getnetgrent' where result is placed in BUFFER.
-/* Reentrant version of `getnetgrent' where result is placed in BUFFER. */
+ 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 getnetgrent_r (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp,
- char *__restrict __buffer, size_t __buflen) __THROW;
+ char *__restrict __buffer, size_t __buflen);
#endif /* misc */
executed as REMUSER. In *FD2P the descriptor to the socket for the
connection is returned. The caller must have the right to use a
reserved port. When the function returns *AHOST contains the
- official host name. */
+ official host 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 int rcmd (char **__restrict __ahost, unsigned short int __rport,
__const char *__restrict __locuser,
__const char *__restrict __remuser,
- __const char *__restrict __cmd, int *__restrict __fd2p)
- __THROW;
+ __const char *__restrict __cmd, int *__restrict __fd2p);
/* This is the equivalent function where the protocol can be selected
- and which therefore can be used for IPv6. */
+ and which therefore can be used for IPv6.
+
+ 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 rcmd_af (char **__restrict __ahost, unsigned short int __rport,
__const char *__restrict __locuser,
__const char *__restrict __remuser,
__const char *__restrict __cmd, int *__restrict __fd2p,
- sa_family_t __af) __THROW;
+ sa_family_t __af);
/* Call `rexecd' at port RPORT on remote machine *AHOST to execute
CMD. The process runs at the remote machine using the ID of user
NAME whose cleartext password is PASSWD. In *FD2P the descriptor
to the socket for the connection is returned. When the function
- returns *AHOST contains the official host name. */
+ returns *AHOST contains the official host 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 int rexec (char **__restrict __ahost, int __rport,
__const char *__restrict __name,
__const char *__restrict __pass,
- __const char *__restrict __cmd, int *__restrict __fd2p)
- __THROW;
+ __const char *__restrict __cmd, int *__restrict __fd2p);
/* This is the equivalent function where the protocol can be selected
- and which therefore can be used for IPv6. */
+ and which therefore can be used for IPv6.
+
+ 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 rexec_af (char **__restrict __ahost, int __rport,
__const char *__restrict __name,
__const char *__restrict __pass,
__const char *__restrict __cmd, int *__restrict __fd2p,
- sa_family_t __af) __THROW;
+ sa_family_t __af);
/* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER.
If SUSER is not zero the user tries to become superuser. Return 0 if
- it is possible. */
+ it is possible.
+
+ 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 ruserok (__const char *__rhost, int __suser,
- __const char *__remuser, __const char *__locuser) __THROW;
+ __const char *__remuser, __const char *__locuser);
/* This is the equivalent function where the protocol can be selected
- and which therefore can be used for IPv6. */
+ and which therefore can be used for IPv6.
+
+ 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 ruserok_af (__const char *__rhost, int __suser,
__const char *__remuser, __const char *__locuser,
- sa_family_t __af) __THROW;
+ sa_family_t __af);
/* Try to allocate reserved port, returning a descriptor for a socket opened
at this port or -1 if unsuccessful. The search for an available port
- will start at ALPORT and continues with lower numbers. */
-extern int rresvport (int *__alport) __THROW;
+ will start at ALPORT and continues with lower numbers.
+
+ 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 rresvport (int *__alport);
/* This is the equivalent function where the protocol can be selected
- and which therefore can be used for IPv6. */
-extern int rresvport_af (int *__alport, sa_family_t __af) __THROW;
+ and which therefore can be used for IPv6.
+
+ 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 rresvport_af (int *__alport, sa_family_t __af);
#endif
# define NI_DGRAM 16 /* Look up UDP service rather than TCP. */
/* Translate name of a service location and/or a service name to set of
- socket addresses. */
+ socket addresses.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int getaddrinfo (__const char *__restrict __name,
__const char *__restrict __service,
__const struct addrinfo *__restrict __req,
- struct addrinfo **__restrict __pai) __THROW;
+ struct addrinfo **__restrict __pai);
/* Free `addrinfo' structure AI including associated storage. */
extern void freeaddrinfo (struct addrinfo *__ai) __THROW;
/* Convert error return from getaddrinfo() to a string. */
extern __const char *gai_strerror (int __ecode) __THROW;
-/* Translate a socket address to a location and service name. */
+/* Translate a socket address to a location and service name.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int getnameinfo (__const struct sockaddr *__restrict __sa,
socklen_t __salen, char *__restrict __host,
socklen_t __hostlen, char *__restrict __serv,
- socklen_t __servlen, unsigned int __flags) __THROW;
+ socklen_t __servlen, unsigned int __flags);
+#endif /* POSIX */
-# ifdef __USE_GNU
+#ifdef __USE_GNU
/* Enqueue ENT requests from the LIST. If MODE is GAI_WAIT wait until all
requests are handled. If WAIT is GAI_NOWAIT return immediately after
- queueing the requests and signal completion according to SIG. */
+ queueing the requests and signal completion according to SIG.
+
+ 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 getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
- int __ent, struct sigevent *__restrict __sig)
- __THROW;
+ int __ent, struct sigevent *__restrict __sig);
/* Suspend execution of the thread until at least one of the ENT requests
in LIST is handled. If TIMEOUT is not a null pointer it specifies the
- longest time the function keeps waiting before returning with an error. */
+ longest time the function keeps waiting before returning with an error.
+
+ 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 gai_suspend (__const struct gaicb *__const __list[], int __ent,
- __const struct timespec *__timeout) __THROW;
+ __const struct timespec *__timeout);
/* Get the error status of the request REQ. */
extern int gai_error (struct gaicb *__req) __THROW;
/* Cancel the requests associated with GAICBP. */
extern int gai_cancel (struct gaicb *__gaicbp) __THROW;
-# endif /* GNU */
-#endif /* POSIX */
+#endif /* GNU */
__END_DECLS
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,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
extern int aio_cancel (int __fildes, struct aiocb *__aiocbp) __THROW;
/* Suspend calling thread until at least one of the asynchronous I/O
- operations referenced by LIST has completed. */
+ operations referenced by LIST has completed.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int aio_suspend (__const struct aiocb *__const __list[], int __nent,
- __const struct timespec *__restrict __timeout) __THROW;
+ __const struct timespec *__restrict __timeout);
/* Force all operations associated with file desriptor described by
`aio_fildes' member of AIOCBP. */
-/* 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
};
-/* 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;
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.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int __sigpause (int __sig_or_mask, int __is_sig);
#ifdef __USE_BSD
/* Set the mask of blocked signals to MASK,
#else
# ifdef __USE_XOPEN
# ifdef __GNUC__
-extern int sigpause (int __sig) __THROW __asm__ ("__xpg_sigpause");
+extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
# endif
/* Remove a signal from the signal mask and suspend the process. */
# define sigpause(sig) __sigpause ((sig), 1)
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);
/* Get and/or set the action for signal SIG. */
extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
extern int sigpending (sigset_t *__set) __THROW;
-/* Select any of pending signals from SET or wait for any to arrive. */
-extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
- __THROW;
+/* 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);
# 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);
/* Select any of pending signals from SET and place information in INFO.
- Wait the time 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;
+ __const struct timespec *__restrict __timeout);
/* Send signal SIG to the process PID. Associate data in VAL with the
signal. */
/* 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
/* 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. */
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
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:
-/* Copyright (C) 1991-99,2000,01,02 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002, 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
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique.
Returns a file descriptor open on the file for reading and writing,
- or -1 if it cannot create a uniquely-named file. */
+ or -1 if it cannot create a uniquely-named file.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
-extern int mkstemp (char *__template) __THROW;
+extern int mkstemp (char *__template);
# else
# ifdef __REDIRECT
-extern int __REDIRECT (mkstemp, (char *__template) __THROW, mkstemp64);
+extern int __REDIRECT (mkstemp, (char *__template), mkstemp64);
# else
# define mkstemp mkstemp64
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int mkstemp64 (char *__template) __THROW;
+extern int mkstemp64 (char *__template);
# endif
#endif
__BEGIN_NAMESPACE_STD
-/* Execute the given line as a shell command. */
-extern int system (__const char *__command) __THROW;
+/* Execute the given line as a shell command.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int system (__const char *__command);
__END_NAMESPACE_STD
-/* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2002, 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
/* Test whether FILDES is associated with a STREAM-based file. */
extern int isastream (int __fildes) __THROW;
-/* Receive next message from a STREAMS file. */
+/* Receive next message from a STREAMS file.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
struct strbuf *__restrict __dataptr,
- int *__restrict __flagsp) __THROW;
+ int *__restrict __flagsp);
/* Receive next message from a STREAMS file, with *FLAGSP allowing to
- control which message. */
+ control which message.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
struct strbuf *__restrict __dataptr,
- int *__restrict __bandp, int *__restrict __flagsp)
- __THROW;
+ int *__restrict __bandp, int *__restrict __flagsp);
/* Perform the I/O control operation specified by REQUEST on FD.
One argument may follow; its presence and type depend on REQUEST.
Return value depends on REQUEST. Usually -1 indicates error. */
extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
-/* Send a message on a STREAM. */
+/* Send a message on a STREAM.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int putmsg (int __fildes, __const struct strbuf *__ctlptr,
- __const struct strbuf *__dataptr, int __flags) __THROW;
+ __const struct strbuf *__dataptr, int __flags);
+
+/* Send a message on a STREAM to the BAND.
-/* Send a message on a STREAM to the BAND. */
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int putpmsg (int __fildes, __const struct strbuf *__ctlptr,
- __const struct strbuf *__dataptr, int __band, int __flags)
- __THROW;
+ __const struct strbuf *__dataptr, int __band, int __flags);
/* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
file system name space. */
-/* Copyright (C) 1991-1993, 1995-2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1995-2002, 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
__BEGIN_NAMESPACE_STD
-/* Return a string describing the meaning of the `errno' code in ERRNUM. */
-extern char *strerror (int __errnum) __THROW;
+/* Return a string describing the meaning of the `errno' code in ERRNUM.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern char *strerror (int __errnum);
__END_NAMESPACE_STD
#if defined __USE_XOPEN2K || defined __USE_MISC
/* Reentrant version of `strerror'. If a temporary buffer is required, at
- most BUFLEN bytes of BUF will be used. */
-extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW;
+ most BUFLEN bytes of BUF will be used.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern char *strerror_r (int __errnum, char *__buf, size_t __buflen);
#endif
/* We define this function always since `bzero' is sometimes needed when
/* Write formatted list with names for addresses in backtrace to a file.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
+#include <not-cancel.h>
#if __ELF_NATIVE_CLASS == 32
# define WORD_WIDTH 8
#else
-/* We assyme 64bits. */
+/* We assume 64bits. */
# define WORD_WIDTH 16
#endif
iov[2].iov_base = (void *) "]\n";
iov[2].iov_len = 2;
- __writev (fd, iov, 3);
+ /* We prefer to use the non-cancelable interface if it is available. */
+ writev_not_cancel_no_status (fd, iov, 3);
}
}
weak_alias (__backtrace_symbols_fd, backtrace_symbols_fd)
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 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
#endif
#include <device-nrs.h>
+#include <not-cancel.h>
/* Should other OSes (e.g., Hurd) have different versions which can
static void
check_one_fd (int fd, int mode)
{
+ /* Note that fcntl() with this parameter is not a cancellation point. */
if (__builtin_expect (__libc_fcntl (fd, F_GETFD), 0) == -1
&& errno == EBADF)
{
/* Something is wrong with this descriptor, it's probably not
opened. Open /dev/null so that the SUID program we are
about to start does not accidently use this descriptor. */
- int nullfd = __libc_open (_PATH_DEVNULL, mode);
+ int nullfd = open_not_cancel (_PATH_DEVNULL, mode);
/* We are very paranoid here. With all means we try to ensure
that we are actually opening the /dev/null device and nothing
else.
--- /dev/null
+/* Uncancelable versions of cancelable interfaces. Generic version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* By default we have none. Map the name to the normal functions. */
+#define open_not_cancel(name, flags, mode...) \
+ __libc_open (name, flags, ##mode)
+#define close_not_cancel_no_status(fd) \
+ (void) __close (fd)
+#define read_not_cancel(fd, buf, n) \
+ __read (fd, buf, n)
+#define write_not_cancel(fd, buf, n) \
+ __write (fd, buf, n)
+#define writev_not_cancel_no_status(fd, iov, n) \
+ (void) __writev (fd, iov, n)
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 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
__BEGIN_DECLS
-/* Open user accounting database. */
-extern void setutxent (void) __THROW;
+/* Open user accounting database.
-/* Close user accounting database. */
-extern void endutxent (void) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void setutxent (void);
-/* Get the next entry from the user accounting database. */
-extern struct utmpx *getutxent (void) __THROW;
+/* Close user accounting database.
-/* Get the user accounting database entry corresponding to ID. */
-extern struct utmpx *getutxid (__const struct utmpx *__id) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern void endutxent (void);
-/* Get the user accounting database entry corresponding to LINE. */
-extern struct utmpx *getutxline (__const struct utmpx *__line) __THROW;
+/* Get the next entry from the user accounting database.
-/* Write the entry UTMPX into the user accounting database. */
-extern struct utmpx *pututxline (__const struct utmpx *__utmpx) __THROW;
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct utmpx *getutxent (void);
+
+/* Get the user accounting database entry corresponding to ID.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct utmpx *getutxid (__const struct utmpx *__id);
+
+/* Get the user accounting database entry corresponding to LINE.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct utmpx *getutxline (__const struct utmpx *__line);
+
+/* Write the entry UTMPX into the user accounting database.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern struct utmpx *pututxline (__const struct utmpx *__utmpx);
#ifdef __USE_GNU
-/* Change name of the utmpx file to be examined. */
-extern int utmpxname (__const char *__file) __THROW;
+/* Change name of the utmpx file to be examined.
+
+ 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 utmpxname (__const char *__file);
+
+/* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
-/* Append entry UTMP to the wtmpx-like file WTMPX_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 void updwtmpx (__const char *__wtmpx_file,
- __const struct utmpx *__utmpx) __THROW;
+ __const struct utmpx *__utmpx);
-/* Copy the information in UTMPX to UTMP. */
+/* Copy the information in UTMPX to UTMP.
+
+ 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 getutmp (__const struct utmpx *__utmpx,
- struct utmp *__utmp) __THROW;
+ struct utmp *__utmp);
+
+/* Copy the information in UTMP to UTMPX.
-/* Copy the information in UTMP to UTMPX. */
+ 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 getutmpx (__const struct utmp *__utmp,
- struct utmpx *__utmpx) __THROW;
+ struct utmpx *__utmpx);
#endif
__END_DECLS
/* ANSI C `remove' function to delete a file or directory. POSIX.1 version.
- Copyright (C) 1995,96,97,2002 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,2002,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
remove (file)
const char *file;
{
- int save;
+ /* First try to unlink since this is more frequently the necessary action. */
+ if (__unlink (file) != 0
+ /* If it is indeed a directory... */
+ && (errno != EISDIR
+ /* ...try to remove it. */
+ || __rmdir (file) != 0))
+ /* Cannot remove the object for whatever reason. */
+ return -1;
- save = errno;
- if (__rmdir (file) == 0)
- return 0;
- else if (errno == ENOTDIR && __unlink (file) == 0)
- {
- __set_errno (save);
- return 0;
- }
-
- return -1;
+ return 0;
}
libc_hidden_def (remove)
dl-brk.c
dl-sbrk.c
exit-thread.S
+fatal-prepare.h
getdirentries.c
getdirentries64.c
ipc_priv.h
sysdep_routines += errno-loc
endif
+ifeq ($(subdir),assert)
+CFLAGS-assert.c += -DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>'
+CFLAGS-assert-perr.c += -DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>'
+endif
+
ifeq ($(subdir),malloc)
CFLAGS-malloc.c += -DMORECORE_CLEARS=2
endif
--- /dev/null
+/* Copyright (C) 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
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <pthread.h>
+
+/* We have to completely disable cancellation. assert() must not be a
+ cancellation point but the implementation uses write() etc. */
+#ifdef SHARED
+# include <pthread-functions.h>
+# define FATAL_PREPARE \
+ { \
+ int (*fp) (int, int *); \
+ fp = __libc_pthread_functions.ptr_pthread_setcancelstate; \
+ if (fp != NULL) \
+ fp (PTHREAD_CANCEL_DISABLE, NULL); \
+ }
+#else
+# pragma weak pthread_setcancelstate
+# define FATAL_PREPARE \
+ { \
+ if (pthread_setcancelstate != NULL) \
+ pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); \
+ }
+#endif
-/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998-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
#include <fcntl.h>
#include <unistd.h>
#include <netdb.h>
+#include <not-cancel.h>
#define HOSTIDFILE "/etc/hostid"
#define OLD_HOSTIDFILE "/etc/hostid"
}
/* Open file for writing. Everybody is allowed to read this file. */
- fd = __open64 (HOSTIDFILE, O_CREAT|O_WRONLY|O_TRUNC, 0644);
+ fd = open_not_cancel (HOSTIDFILE, O_CREAT|O_WRONLY|O_TRUNC, 0644);
if (fd < 0)
return -1;
- written = __write (fd, &id, sizeof (id));
+ written = write_not_cancel (fd, &id, sizeof (id));
- __close (fd);
+ close_not_cancel_no_status (fd);
return written != sizeof (id) ? -1 : 0;
}
int fd;
/* First try to get the ID from a former invocation of sethostid. */
- fd = __open64 (HOSTIDFILE, O_RDONLY);
+ fd = open_not_cancel (HOSTIDFILE, O_RDONLY|O_LARGEFILE);
if (fd < 0)
- fd = __open64 (OLD_HOSTIDFILE, O_RDONLY);
+ fd = open_not_cancel (OLD_HOSTIDFILE, O_RDONLY|O_LARGEFILE);
if (fd >= 0)
{
- ssize_t n = __read (fd, &id, sizeof (id));
+ ssize_t n = read_not_cancel (fd, &id, sizeof (id));
- __close (fd);
+ close_not_cancel_no_status (fd);
if (n == sizeof (id))
return id;
-/* Copyright (C) 1993,1994,1995,1997,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993-1995,1997,2000,2002, 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
while (len > 0)
{
- ssize_t count = INLINE_SYSCALL (write, 3, STDERR_FILENO, message, len);
- if (count > 0)
+ INTERNAL_SYSCALL_DECL (err);
+ ssize_t count = INTERNAL_SYSCALL (write, err, 3, STDERR_FILENO,
+ message, len);
+ if (! INTERNAL_SYSCALL_ERROR_P (count, err))
{
message += count;
len -= count;
}
- else if (count < 0 && errno != EINTR)
+ else if (INTERNAL_SYSCALL_ERRNO (count, err) != EINTR)
break;
}
--- /dev/null
+/* Uncancelable versions of cancelable interfaces. Linux version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+/* Uncancelable open. */
+#ifdef INLINE_SYSCALL
+# define open_not_cancel(name, flags, mode...) \
+ ({ int _mode = (0, ##mode); \
+ INLINE_SYSCALL (open, 3, name, flags, _mode); })
+#endif
+
+/* Uncancelable close. */
+#ifdef INLINE_SYSCALL
+# define close_not_cancel_no_status(fd) \
+ (void) ({ INTERNAL_SYSCALL_DECL (err); \
+ INTERNAL_SYSCALL (close, err, 1, fd); })
+#endif
+
+/* Uncancelable read. */
+#ifdef INLINE_SYSCALL
+# define read_not_cancel(fd, buf, n) \
+ INLINE_SYSCALL (read, 3, fd, buf, n)
+#endif
+
+/* Uncancelable write. */
+#ifdef INLINE_SYSCALL
+# define write_not_cancel(fd, buf, n) \
+ INLINE_SYSCALL (write, 3, fd, buf, n)
+#endif
+
+/* Uncancelable writev. */
+#ifdef INLINE_SYSCALL
+# define writev_not_cancel_no_status(fd, iov, n) \
+ (void) ({ INTERNAL_SYSCALL_DECL (err); \
+ INTERNAL_SYSCALL (writev, err, 3, fd, iov, n); })
+#endif
-/* 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
/* 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
-/* 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
/* 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>. */
-/* Copyright (C) 1991-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999,2000,2001,2002,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
# ifdef __USE_POSIX199309
-/* Pause execution for a number of nanoseconds. */
+/* Pause execution for a number of nanoseconds.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int nanosleep (__const struct timespec *__requested_time,
- struct timespec *__remaining) __THROW;
+ struct timespec *__remaining);
/* Get resolution of clock CLOCK_ID. */
__THROW;
# ifdef __USE_XOPEN2K
-/* High-resolution sleep with the specified clock. */
+/* High-resolution sleep with the specified clock.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
__const struct timespec *__req,
- struct timespec *__rem) __THROW;
+ struct timespec *__rem);
/* Return clock ID for CPU-time clock. */
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
/* Parse the given string as a date specification and return a value
representing the value. The templates from the file identified by
the environment variable DATEMSK are used. In case of an error
- `getdate_err' is set. */
-extern struct tm *getdate (__const char *__string) __THROW;
+ `getdate_err' is set.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern struct tm *getdate (__const char *__string);
# endif
# ifdef __USE_GNU
and the static buffer to return the result in, we provide a thread-safe
variant. The functionality is the same. The result is returned in
the buffer pointed to by RESBUFP and in case of an error the return
- value is != 0 with the same values as given above for `getdate_err'. */
+ value is != 0 with the same values as given above for `getdate_err'.
+
+ 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 getdate_r (__const char *__restrict __string,
- struct tm *__restrict __resbufp) __THROW;
+ struct tm *__restrict __resbufp);
# endif
__END_DECLS
-/* Copyright (C) 1995-99,2000,01,02 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 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
extern int fwide (__FILE *__fp, int __mode) __THROW;
-/* Write formatted output to STREAM. */
+/* Write formatted output to STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int fwprintf (__FILE *__restrict __stream,
__const wchar_t *__restrict __format, ...)
- __THROW /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
-/* Write formatted output to stdout. */
+ /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
+/* Write formatted output to stdout.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int wprintf (__const wchar_t *__restrict __format, ...)
- __THROW /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
+ /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
/* Write formatted output of at most N characters to S. */
extern int swprintf (wchar_t *__restrict __s, size_t __n,
__const wchar_t *__restrict __format, ...)
__THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
-/* Write formatted output to S from argument list ARG. */
+/* Write formatted output to S from argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vfwprintf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
- __THROW /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
-/* Write formatted output to stdout from argument list ARG. */
+ /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
+/* Write formatted output to stdout from argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vwprintf (__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
- __THROW /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
+ /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
/* Write formatted output of at most N character to S from argument
list ARG. */
extern int vswprintf (wchar_t *__restrict __s, size_t __n,
__THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
-/* Read formatted input from STREAM. */
+/* Read formatted input from STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int fwscanf (__FILE *__restrict __stream,
__const wchar_t *__restrict __format, ...)
- __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
-/* Read formatted input from stdin. */
+ /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+/* Read formatted input from stdin.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int wscanf (__const wchar_t *__restrict __format, ...)
- __THROW /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
+ /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
/* Read formatted input from S. */
extern int swscanf (__const wchar_t *__restrict __s,
__const wchar_t *__restrict __format, ...)
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
-/* Read formatted input from S into argument list ARG. */
+/* Read formatted input from S into argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vfwscanf (__FILE *__restrict __s,
__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
- __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
-/* Read formatted input from stdin into argument list ARG. */
+ /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+/* Read formatted input from stdin into argument list ARG.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
extern int vwscanf (__const wchar_t *__restrict __format,
__gnuc_va_list __arg)
- __THROW /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
+ /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
/* Read formatted input from S into argument list ARG. */
extern int vswscanf (__const wchar_t *__restrict __s,
__const wchar_t *__restrict __format,
__BEGIN_NAMESPACE_C99
-/* Read a character from STREAM. */
-extern wint_t fgetwc (__FILE *__stream) __THROW;
-extern wint_t getwc (__FILE *__stream) __THROW;
+/* Read a character from STREAM.
+
+ These functions are possible cancellation points and therefore not
+ marked with __THROW. */
+extern wint_t fgetwc (__FILE *__stream);
+extern wint_t getwc (__FILE *__stream);
-/* Read a character from stdin. */
-extern wint_t getwchar (void) __THROW;
+/* Read a character from stdin.
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern wint_t getwchar (void);
-/* Write a character to STREAM. */
-extern wint_t fputwc (wchar_t __wc, __FILE *__stream) __THROW;
-extern wint_t putwc (wchar_t __wc, __FILE *__stream) __THROW;
-/* Write a character to stdout. */
-extern wint_t putwchar (wchar_t __wc) __THROW;
+/* Write a character to STREAM.
+
+ These functions are possible cancellation points and therefore not
+ marked with __THROW. */
+extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
+extern wint_t putwc (wchar_t __wc, __FILE *__stream);
+
+/* Write a character to stdout.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern wint_t putwchar (wchar_t __wc);
/* Get a newline-terminated wide character string of finite length
- from STREAM. */
+ from STREAM.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n,
- __FILE *__restrict __stream) __THROW;
+ __FILE *__restrict __stream);
+
+/* Write a string to STREAM.
-/* Write a string to STREAM. */
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
extern int fputws (__const wchar_t *__restrict __ws,
- __FILE *__restrict __stream) __THROW;
+ __FILE *__restrict __stream);
+
+/* Push a character back onto the input buffer of STREAM.
-/* Push a character back onto the input buffer of STREAM. */
-extern wint_t ungetwc (wint_t __wc, __FILE *__stream) __THROW;
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
__END_NAMESPACE_C99
#ifdef __USE_GNU
/* These are defined to be equivalent to the `char' functions defined
- in POSIX.1:1996. */
-extern wint_t getwc_unlocked (__FILE *__stream) __THROW;
-extern wint_t getwchar_unlocked (void) __THROW;
+ in POSIX.1:1996.
-/* This is the wide character version of a GNU extension. */
-extern wint_t fgetwc_unlocked (__FILE *__stream) __THROW;
+ 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 wint_t getwc_unlocked (__FILE *__stream);
+extern wint_t getwchar_unlocked (void);
-/* Faster version when locking is not necessary. */
-extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream) __THROW;
+/* This is the wide character version of a GNU extension.
+
+ 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 wint_t fgetwc_unlocked (__FILE *__stream);
+
+/* Faster version when locking is not necessary.
+
+ 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 wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream);
/* These are defined to be equivalent to the `char' functions defined
- in POSIX.1:1996. */
-extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream) __THROW;
-extern wint_t putwchar_unlocked (wchar_t __wc) __THROW;
+ in POSIX.1:1996.
+ 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 wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
+extern wint_t putwchar_unlocked (wchar_t __wc);
-/* This function does the same as `fgetws' but does not lock the stream. */
+
+/* This function does the same as `fgetws' but does not lock the 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 wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n,
- __FILE *__restrict __stream) __THROW;
+ __FILE *__restrict __stream);
+
+/* This function does the same as `fputws' but does not lock the stream.
-/* This function does the same as `fputws' but does not lock the 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 fputws_unlocked (__const wchar_t *__restrict __ws,
- __FILE *__restrict __stream) __THROW;
+ __FILE *__restrict __stream);
#endif