about summary refs log tree commit diff
path: root/libio/genops.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-08-17 09:35:36 -0700
committerRoland McGrath <roland@hack.frob.com>2012-08-17 09:35:36 -0700
commitb2e1c562728699642e98c528bed175929cceff4d (patch)
treecf4d64dc3600a1da1f4d32697ddf494c7d81d0d0 /libio/genops.c
parentc75ccd4c3a84993ea392f23f2cf75f7274e22cc1 (diff)
downloadglibc-b2e1c562728699642e98c528bed175929cceff4d.tar.gz
glibc-b2e1c562728699642e98c528bed175929cceff4d.tar.xz
glibc-b2e1c562728699642e98c528bed175929cceff4d.zip
Make libio compile without _IO_MTSAFE_IO.
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libio/genops.c b/libio/genops.c
index c8297ff128..0a81a5d101 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -952,6 +952,7 @@ _IO_unbuffer_write (void)
 	  /* Iff stream is un-orientated, it wasn't used. */
 	  && fp->_mode != 0)
 	{
+#ifdef _IO_MTSAFE_IO
 	  int cnt;
 #define MAXTRIES 2
 	  for (cnt = 0; cnt < MAXTRIES; ++cnt)
@@ -961,6 +962,7 @@ _IO_unbuffer_write (void)
 	      /* Give the other thread time to finish up its use of the
 		 stream.  */
 	      __sched_yield ();
+#endif
 
 	  if (! dealloc_buffers && !(fp->_flags & _IO_USER_BUF))
 	    {
@@ -974,8 +976,10 @@ _IO_unbuffer_write (void)
 
 	  _IO_SETBUF (fp, NULL, 0);
 
+#ifdef _IO_MTSAFE_IO
 	  if (cnt < MAXTRIES && fp->_lock != NULL)
 	    _IO_lock_unlock (*fp->_lock);
+#endif
 	}
 
       /* Make sure that never again the wide char functions can be