[ros-diffs] [cfinck] 31871: Define O_BINARY to 0 if it is not defined (all hosts, which don't define it, don't need it). Update the .diff file as well.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Fri Jan 18 18:07:21 CET 2008


Author: cfinck
Date: Fri Jan 18 20:07:20 2008
New Revision: 31871

URL: http://svn.reactos.org/svn/reactos?rev=31871&view=rev
Log:
Define O_BINARY to 0 if it is not defined (all hosts, which don't define it, don't need it).
Update the .diff file as well.

Modified:
    trunk/reactos/tools/widl/widl_ros.diff
    trunk/reactos/tools/widl/widltypes.h

Modified: trunk/reactos/tools/widl/widl_ros.diff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl_ros.diff?rev=31871&r1=31870&r2=31871&view=diff
==============================================================================
--- trunk/reactos/tools/widl/widl_ros.diff (original)
+++ trunk/reactos/tools/widl/widl_ros.diff Fri Jan 18 20:07:20 2008
@@ -106,6 +106,19 @@
  #include <stdarg.h>
  #include "guiddef.h"
  #include "wine/rpcfc.h"
+@@ -31,8 +38,10 @@
+ typedef GUID UUID;
+ #endif
+ 
+-#define TRUE 1
+-#define FALSE 0
++// All hosts, which don't define O_BINARY, don't need it :-)
++#ifndef O_BINARY
++#define O_BINARY 0
++#endif
+ 
+ typedef struct _attr_t attr_t;
+ typedef struct _expr_t expr_t;
 Index: write_msft.c
 ===================================================================
 --- write_msft.c	(revision 31863)
@@ -123,3 +136,12 @@
  
  #include "widltypes.h"
  #include "typelib.h"
+@@ -2415,7 +2413,7 @@
+ 
+     retval = TYPE_E_IOERROR;
+ 
+-    fd = creat(typelib->typelib->filename, 0666);
++    fd = open(typelib->typelib->filename, O_CREAT | O_RDWR | O_BINARY, 0666);
+     if (fd == -1) return retval;
+ 
+     filepos = sizeof(MSFT_Header) + sizeof(MSFT_SegDir);

Modified: trunk/reactos/tools/widl/widltypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widltypes.h?rev=31871&r1=31870&r2=31871&view=diff
==============================================================================
--- trunk/reactos/tools/widl/widltypes.h (original)
+++ trunk/reactos/tools/widl/widltypes.h Fri Jan 18 20:07:20 2008
@@ -38,8 +38,10 @@
 typedef GUID UUID;
 #endif
 
-#define TRUE 1
-#define FALSE 0
+// All hosts, which don't define O_BINARY, don't need it :-)
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
 
 typedef struct _attr_t attr_t;
 typedef struct _expr_t expr_t;




More information about the Ros-diffs mailing list