[ECOS] fopen

Bob Koninckx bob.koninckx@mech.kuleuven.ac.be
Mon Nov 18 13:38:00 GMT 2002


process_mode in fopen.cxx treats open modifiers r+ and w+ identically
and decides on CYG_STREAM_READWRITE attributes. A little bit further,
cyg_stdio_open does not set the O_CREAT flag (it does this only for 
CYG_STREAM_WRITE attribute) 

As a consequence, 

fopen("r+", ...) fails if the requested file does not exists, as it

fopen("w+", ...) also fails but should have created the file 

Have I missed something ?


ir. Bob Koninckx
Katholieke Universiteit Leuven
Division Production Engineering,                   tel.  +32 16 322535
Machine Design and Automation                      fax.  +32 16 322987
Celestijnenlaan 300B                  bob.koninckx@mech.kuleuven.ac.be
B-3001 Leuven Belgium               http://www.mech.kuleuven.ac.be/pma

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list