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?re... ============================================================================== --- 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... ============================================================================== --- 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);