Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-03-26 20:07:55 +0400
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-03-26 20:07:55 +0400
commit1ebc8da242a1e8dd7707f2bcc51c22d4e1e64990 (patch)
treecdad8b918a575fa56ab1e67de6c20a77c87d171b /newlib/libc/stdio64
parent74d17001b47a38074b96c2b6e4ab8df0f146ab44 (diff)
2013-03-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/stdio/local.h (_STDIO_WITH_THREAD_CANCELLATION_SUPPORT): New define. * libc/stdio/fclose.c: Use _STDIO_WITH_THREAD_CANCELLATION_SUPPORT. * libc/stdio/freopen.c: Likewise. * libc/stdio64/freopen64.c: Likewise.
Diffstat (limited to 'newlib/libc/stdio64')
-rw-r--r--newlib/libc/stdio64/freopen64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c
index db0e1ee0f..dfe36ea3d 100644
--- a/newlib/libc/stdio64/freopen64.c
+++ b/newlib/libc/stdio64/freopen64.c
@@ -102,7 +102,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
/* We can't use the _newlib_flockfile_XXX macros here due to the
interlocked locking with the sfp_lock. */
-#if !defined (__SINGLE_THREAD__) && defined (_POSIX_THREADS)
+#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
int __oldcancel;
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &__oldcancel);
#endif
@@ -111,7 +111,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
if ((flags = __sflags (ptr, mode, &oflags)) == 0)
{
_funlockfile (fp);
-#if !defined (__SINGLE_THREAD__) && defined (_POSIX_THREADS)
+#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
pthread_setcancelstate (__oldcancel, &__oldcancel);
#endif
_fclose_r (ptr, fp);