CFLAGS-fcntl.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-poll.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-lockf.c = -fexceptions
+CFLAGS-statfs.c = -fexceptions
+CFLAGS-fstatfs.c = -fexceptions
+CFLAGS-statvfs.c = -fexceptions
+CFLAGS-fstatvfs.c = -fexceptions
CFLAGS-test-stat.c = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CFLAGS-test-lfs.c = -D_LARGEFILE64_SOURCE
-# Copyright (C) 1995,96,97,98,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
CFLAGS-rewind.c = $(exceptions)
CFLAGS-wfileops.c = $(exceptions)
CFLAGS-wgenops.c = $(exceptions)
+CFLAGS-oldiofopen.c = $(exceptions)
+CFLAGS-iofopen.c = $(exceptions)
+CFLAGS-iofopen64.c = $(exceptions)
+CFLAGS-oldtmpfile.c = $(exceptions)
# XXX Do we need filedoalloc and wfiledoalloc? Others?
CFLAGS-tst_putwc.c = -DOBJPFX=\"$(objpfx)\"
-/* Copyright (C) 1991, 1993, 1996-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996-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
/* Note that this relies on the Unix semantics that
a file is not really removed until it is closed. */
- (void) remove (buf);
+ (void) __unlink (buf);
if ((f = _IO_old_fdopen (fd, "w+b")) == NULL)
__close (fd);
-# Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998,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
include ../Rules
+CFLAGS-getpt.c = -fexceptions
+
ifeq (yes,$(build-static-nss))
otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
$(resolvobjdir)/libresolv.a $(common-objpfx)libc.a
CFLAGS-syslog.c = -fexceptions
CFLAGS-error.c = -fexceptions
CFLAGS-getpass.c = -fexceptions
+CFLAGS-mkstemp.c = -fexceptions
+CFLAGS-mkstemp64.c = -fexceptions
+CFLAGS-mntent_r.c = -fexceptions
+CFLAGS-mntent.c = -fexceptions
+CFLAGS-fstab.c = -fexceptions
+CFLAGS-getsysstats.c = -fexceptions
+CFLAGS-getusershell.c = -fexceptions
include ../Rules
__BEGIN_DECLS
-extern struct fstab *getfsent (void) __THROW;
-extern struct fstab *getfsspec (__const char *__name) __THROW;
-extern struct fstab *getfsfile (__const char *__name) __THROW;
-extern int setfsent (void) __THROW;
-extern void endfsent (void) __THROW;
+extern struct fstab *getfsent (void);
+extern struct fstab *getfsspec (__const char *__name);
+extern struct fstab *getfsfile (__const char *__name);
+extern int setfsent (void);
+extern void endfsent (void);
__END_DECLS
/* Utilities for reading/writing fstab, mtab, etc.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995-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
/* Prepare to begin reading and/or writing mount table entries from the
beginning of FILE. MODE is as for `fopen'. */
-extern FILE *setmntent (__const char *__file, __const char *__mode) __THROW;
+extern FILE *setmntent (__const char *__file, __const char *__mode);
/* Read one mount table entry from STREAM. Returns a pointer to storage
reused on the next call, or null for EOF or error (use feof/ferror to
check). */
-extern struct mntent *getmntent (FILE *__stream) __THROW;
+extern struct mntent *getmntent (FILE *__stream);
#ifdef __USE_MISC
/* Reentrant version of the above function. */
extern struct mntent *getmntent_r (FILE *__restrict __stream,
struct mntent *__restrict __result,
char *__restrict __buffer,
- int __bufsize) __THROW;
+ int __bufsize);
#endif
/* Write the mount table entry described by MNT to STREAM.
Return zero on success, nonzero on failure. */
extern int addmntent (FILE *__restrict __stream,
- __const struct mntent *__restrict __mnt) __THROW;
+ __const struct mntent *__restrict __mnt);
/* Close a stream opened with `setmntent'. */
-extern int endmntent (FILE *__stream) __THROW;
+extern int endmntent (FILE *__stream);
/* Search MNT->mnt_opts for an option matching OPT.
Returns the address of the substring, or null if none found. */
CFLAGS-waitid.c = -fexceptions
CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-getopt.c = -fexceptions
+CFLAGS-wordexp.c = -fexceptions
+CFLAGS-sysconf.c = -fexceptions
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
--none random --col --color --colour
#include <bits/confname.h>
/* Get file-specific configuration information about PATH. */
-extern long int pathconf (__const char *__path, int __name) __THROW;
+extern long int pathconf (__const char *__path, int __name);
/* Get file-specific configuration about descriptor FD. */
-extern long int fpathconf (int __fd, int __name) __THROW;
+extern long int fpathconf (int __fd, int __name);
/* Get the value of the system variable NAME. */
-extern long int sysconf (int __name) __THROW __attribute__ ((__const__));
+extern long int sysconf (int __name) __attribute__ ((__const__));
#ifdef __USE_POSIX2
/* Get the value of the string-valued system variable NAME. */
-/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 1996-1999, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Do word expansion of WORDS into PWORDEXP. */
extern int wordexp (__const char *__restrict __words,
- wordexp_t *__restrict __pwordexp, int __flags) __THROW;
+ wordexp_t *__restrict __pwordexp, int __flags);
/* Free the storage allocated by a `wordexp' call. */
extern void wordfree (wordexp_t *__wordexp) __THROW;
CFLAGS-qsort.c = $(exceptions)
CFLAGS-system.c = -fexceptions
CFLAGS-mkstemp.c = -fexceptions
+CFLAGS-fmtmsg.c = -fexceptions
include ../Makeconfig
-/* Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
int result = MM_OK;
struct severity_info *severity_rec;
- /* make sure everything is initialized. */
+ /* Make sure everything is initialized. */
__libc_once (once, init);
/* Start the real work. First check whether the input is ok. */
return MM_NOTOK;
+#ifdef __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
/* Now we can print. */
if (classification & MM_PRINT)
{
do_tag ? tag : "");
}
+#ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+#endif
+
return result;
}
/* Message display handling.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 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
and TAG to console or standard error. */
extern int fmtmsg (long int __classification, __const char *__label,
int __severity, __const char *__text,
- __const char *__action, __const char *__tag) __THROW;
+ __const char *__action, __const char *__tag);
#ifdef __USE_SVID
/* Add or remove severity level. */
#ifdef __USE_XOPEN2K
/* Return a master pseudo-terminal handle. */
-extern int posix_openpt (int __oflag) __THROW;
+extern int posix_openpt (int __oflag);
#endif
#ifdef __USE_XOPEN
extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW;
/* Open a master pseudo terminal and return its file descriptor. */
-extern int getpt (void) __THROW;
+extern int getpt (void);
#endif
#ifdef __USE_BSD
/* Open a stdio stream on an anonymous temporary file. Generic/POSIX version.
- Copyright (C) 1991,93,96,97,98,99,2000,2002 Free Software Foundation, Inc.
+ Copyright (C) 1991,93,1996-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
/* Note that this relies on the Unix semantics that
a file is not really removed until it is closed. */
- (void) remove (buf);
+ (void) __unlink (buf);
if ((f = __fdopen (fd, "w+b")) == NULL)
__close (fd);
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <alloca.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#endif
#include <wordexp.h>
+#include <bits/libc-lock.h>
#include <stdio-common/_itoa.h>
/* Undefine the following line for the production version. */
while ((result = __getpwuid_r (uid, &pwd, buffer, buflen, &tpwd)) != 0
&& errno == ERANGE)
- {
- buflen += 1000;
- buffer = __alloca (buflen);
- }
+ extend_alloca (buffer, buflen, buflen + 1000);
if (result == 0 && tpwd != NULL && pwd.pw_dir != NULL)
{
while ((result = __getpwnam_r (user, &pwd, buffer, buflen, &tpwd)) != 0
&& errno == ERANGE)
- {
- buflen += 1000;
- buffer = __alloca (buflen);
- }
+ extend_alloca (buffer, buflen, buflen + 1000);
if (result == 0 && tpwd != NULL && pwd.pw_dir)
*word = w_addstr (*word, word_length, max_length, pwd.pw_dir);
args[1] = "-nc";
/* Redirect output. */
- __dup2 (fildes[1], 1);
+ __dup2 (fildes[1], STDOUT_FILENO);
__close (fildes[1]);
/* Redirect stderr to /dev/null if we have to. */
fd = __open (_PATH_DEVNULL, O_WRONLY);
if (fd >= 0 && fd != 2)
{
- __dup2 (fd, 2);
+ __dup2 (fd, STDERR_FILENO);
__close (fd);
}
/* Be paranoid. Check that we actually opened the /dev/null
device. */
- if (__builtin_expect (__fxstat64 (_STAT_VER, 2, &st), 0) != 0
+ if (__builtin_expect (__fxstat64 (_STAT_VER, STDERR_FILENO, &st), 0) != 0
|| __builtin_expect (S_ISCHR (st.st_mode), 1) == 0
#if defined DEV_NULL_MAJOR && defined DEV_NULL_MINOR
|| st.st_rdev != makedev (DEV_NULL_MAJOR, DEV_NULL_MINOR)
}
if (pid == 0)
- exec_comm_child(comm, fildes, (flags & WRDE_SHOWERR), 0);
+ exec_comm_child (comm, fildes, flags & WRDE_SHOWERR, 0);
/* Parent */
if (pid == 0)
{
fildes[0] = fildes[1] = -1;
- exec_comm_child(comm, fildes, 0, 1);
+ exec_comm_child (comm, fildes, 0, 1);
}
if (__waitpid (pid, &status, 0) == pid && status != 0)
/* Go -- give script to the shell */
if (comm)
{
+#ifdef __libc_ptf_call
+ /* We do not want the exec_comm call to be cut short
+ by a thread cancellation since cleanup is very
+ ugly. Therefore disable cancellation for
+ now. */
+ // XXX Ideally we do want the thread being cancelable.
+ // XXX If demand is there we'll change it.
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate,
+ (PTHREAD_CANCEL_DISABLE, &state), 0);
+#endif
+
error = exec_comm (comm, word, word_length, max_length,
flags, pwordexp, ifs, ifs_white);
+
+#ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+#endif
+
free (comm);
}
/* Get system load averages. Linux (/proc/loadavg) version.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <locale.h>
#include <stdlib.h>
#include <unistd.h>
+#include <not-cancel.h>
/* Put the 1 minute, 5 minute and 15 minute load averages
into the first NELEM elements of LOADAVG.
{
int fd;
- fd = __open ("/proc/loadavg", O_RDONLY);
+ fd = open_not_cancel_2 ("/proc/loadavg", O_RDONLY);
if (fd < 0)
return -1;
else
ssize_t nread;
int i;
- nread = __read (fd, buf, sizeof buf - 1);
- __close (fd);
+ nread = read_not_cancel (fd, buf, sizeof buf - 1);
+ close_not_cancel_no_status (fd);
if (nread < 0)
return -1;
buf[nread - 1] = '\0';