[ros-diffs] [cfinck] 32187: creat() is equivalent to open() with the flags O_CREAT | O_WRONLY | O_TRUNC. Use these flags and O_BINARY to replace the creat() call we previously had. Requested by Wine for patch acceptance
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Thu Feb 7 15:53:03 CET 2008
Author: cfinck
Date: Thu Feb 7 17:53:03 2008
New Revision: 32187
URL: http://svn.reactos.org/svn/reactos?rev=32187&view=rev
Log:
creat() is equivalent to open() with the flags O_CREAT | O_WRONLY | O_TRUNC.
Use these flags and O_BINARY to replace the creat() call we previously had.
Requested by Wine for patch acceptance
Modified:
trunk/reactos/tools/widl/widl_ros.diff
trunk/reactos/tools/widl/write_msft.c
Modified: trunk/reactos/tools/widl/widl_ros.diff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl_ros.diff?rev=32187&r1=32186&r2=32187&view=diff
==============================================================================
--- trunk/reactos/tools/widl/widl_ros.diff (original)
+++ trunk/reactos/tools/widl/widl_ros.diff Thu Feb 7 17:53:03 2008
@@ -140,7 +140,7 @@
retval = TYPE_E_IOERROR;
- fd = creat(typelib->typelib->filename, 0666);
-+ fd = open(typelib->typelib->filename, O_CREAT | O_RDWR | O_BINARY, 0666);
++ fd = open(typelib->typelib->filename, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0666);
if (fd == -1) return retval;
filepos = sizeof(MSFT_Header) + sizeof(MSFT_SegDir);
Modified: trunk/reactos/tools/widl/write_msft.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/write_msft.c?rev=32187&r1=32186&r2=32187&view=diff
==============================================================================
--- trunk/reactos/tools/widl/write_msft.c (original)
+++ trunk/reactos/tools/widl/write_msft.c Thu Feb 7 17:53:03 2008
@@ -2413,7 +2413,7 @@
retval = TYPE_E_IOERROR;
- fd = open(typelib->typelib->filename, O_CREAT | O_RDWR | O_BINARY, 0666);
+ fd = open(typelib->typelib->filename, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0666);
if (fd == -1) return retval;
filepos = sizeof(MSFT_Header) + sizeof(MSFT_SegDir);
More information about the Ros-diffs
mailing list