aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-09-02 07:14:15 +0000
committerUlrich Drepper <drepper@redhat.com>2003-09-02 07:14:15 +0000
commitf1c30c98b9c9720f2a542df7ae0b9cde4c162e7a (patch)
tree316c77f8647401e15d064910b7f33b0d2c84050d /stdlib
parentUpdate. (diff)
downloadglibc-f1c30c98b9c9720f2a542df7ae0b9cde4c162e7a.tar.gz
glibc-f1c30c98b9c9720f2a542df7ae0b9cde4c162e7a.tar.bz2
glibc-f1c30c98b9c9720f2a542df7ae0b9cde4c162e7a.zip
(CFLAGS-oldtmpfile.c): Add -fexceptions.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/Makefile1
-rw-r--r--stdlib/fmtmsg.c16
-rw-r--r--stdlib/fmtmsg.h4
-rw-r--r--stdlib/stdlib.h4
4 files changed, 19 insertions, 6 deletions
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 7b4df2ea6f..21490703f7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -84,6 +84,7 @@ CFLAGS-msort.c = $(exceptions)
CFLAGS-qsort.c = $(exceptions)
CFLAGS-system.c = -fexceptions
CFLAGS-mkstemp.c = -fexceptions
+CFLAGS-fmtmsg.c = -fexceptions
include ../Makeconfig
diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c
index 37c641c7ef..2ab97b7d90 100644
--- a/stdlib/fmtmsg.c
+++ b/stdlib/fmtmsg.c
@@ -1,4 +1,4 @@
-/* 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.
@@ -108,7 +108,7 @@ fmtmsg (long int classification, const char *label, int severity,
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. */
@@ -137,6 +137,14 @@ fmtmsg (long int classification, const char *label, int severity,
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)
{
@@ -206,6 +214,10 @@ fmtmsg (long int classification, const char *label, int severity,
do_tag ? tag : "");
}
+#ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+#endif
+
return result;
}
diff --git a/stdlib/fmtmsg.h b/stdlib/fmtmsg.h
index cd9bdeaffd..53e3e53d89 100644
--- a/stdlib/fmtmsg.h
+++ b/stdlib/fmtmsg.h
@@ -1,5 +1,5 @@
/* 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
@@ -94,7 +94,7 @@ enum
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. */
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index a6f1e5e8a0..1349753b78 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -879,7 +879,7 @@ extern void setkey (__const char *__key) __THROW;
#ifdef __USE_XOPEN2K
/* Return a master pseudo-terminal handle. */
-extern int posix_openpt (int __oflag) __THROW;
+extern int posix_openpt (int __oflag);
#endif
#ifdef __USE_XOPEN
@@ -906,7 +906,7 @@ extern char *ptsname (int __fd) __THROW;
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