Page 1 of 1

stdio patch

Posted: Thu Sep 29, 2005 1:01 am
by holiday
Could somebody implement this patch into stdio.c for me?

Code: Select all

--- stdio.c	Fri Sep 23 23:09:32 2005
+++ stdio-fopen-rbplus-fix.c	Sun Sep 25 08:09:52 2005
@@ -407,7 +407,7 @@
           break;
         case 'w':
           flag = _IOWRT;
-          iomode = (O_WRONLY | O_CREAT);
+          iomode = (O_WRONLY | O_CREAT | O_TRUNC);
           break;
         case 'a':
           flag = _IORW;
@@ -421,7 +421,7 @@
             continue;
           case '+':
             flag |= (_IOREAD | _IOWRT);
-            iomode |= (O_RDWR | O_CREAT | O_TRUNC);
+            iomode |= O_RDWR;
             continue;
           default:
             break;
--
Thanks