guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fixes `setvbuf'


From: Ludovic Courtès
Subject: [PATCH] Fixes `setvbuf'
Date: Mon, 03 Apr 2006 09:59:31 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

Below is a patch that fixes `setvbuf'.

Thanks,
Ludovic.


2006-04-03  Ludovic Courtès  <address@hidden>

        * libguile/fports.c (scm_setvbuf): When CMODE is not `_IOLBF',
        really clear the `SCM_BUFLINE' bit instead of toggling it.


--- orig/libguile/fports.c
+++ mod/libguile/fports.c
@@ -155,7 +155,9 @@
     }
   else
     {
-      SCM_SET_CELL_WORD_0 (port, SCM_CELL_WORD_0 (port) ^ SCM_BUFLINE);
+      if (SCM_CELL_WORD_0 (port) & SCM_BUFLINE)
+       /* Clear the ``line-buffered'' bit.  */
+       SCM_SET_CELL_WORD_0 (port, SCM_CELL_WORD_0 (port) ^ SCM_BUFLINE);
     }
 
   if (SCM_UNBNDP (size))







reply via email to

[Prev in Thread] Current Thread [Next in Thread]