anchao commented on code in PR #8997:
URL: https://github.com/apache/nuttx/pull/8997#discussion_r1162485734


##########
arch/sim/src/sim/win/sim_hostfs.c:
##########
@@ -120,6 +120,11 @@ int host_open(const char *pathname, int flags, 
nuttx_mode_t mode)
       mapflags |= O_TRUNC;
     }
 
+  if (flags & NUTTX_O_BINARY)
+    {
+      mapflags |= O_BINARY;
+    }

Review Comment:
   This code actually runs on native windows(MSVC), edit binary file will needs 
support of this flag.
   
   
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/open-wopen?view=msvc-170
   
   
   
   _O_BINARY | Opens the file in binary (untranslated) mode. (SeeĀ fopenĀ for a 
description of binary mode.)
   -- | --
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to