On 10/16/13, Edscott Wilson <[email protected]> wrote:
> 2013/10/16 Ruben Van Boxem <[email protected]>
>
>> 2013/10/16 Edscott Wilson <[email protected]>
>>
>>>
>>> I appreciate all the responses. This is the result.
>>>
>>> 1. The option O_BINARY is not available in fcntl.h for gcc, So
>>> open("test.dbh", O_RDWR|O_BINARY) does not work.
>>>
>>
>> See MSDN for the flags you are looking for:
>> http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
>>
>>
>>
> The problem with that is I want to use mingw-64's gcc, and gcc does not
> define O_BINARY, and does not seem likely that it will in the future. Maybe
> the mingw port should include O_BINARY and O_TEXT.

gcc itself doesn't define O_BINARY, but fcntl.h from mingw[-w64]
projects *do* define it: make sure that you include fcntl.h.
If for some weird reason you are defining NO_OLDNAMES or something,
then use _O_BINARY with the leading underscore.

--
O.S.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to