This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Help on file access with g++


Hi guys,

I am trying to write a piece of code to create a file that respects the
umask I defined.
But, it seems that ofstream override partially the umask.
I think I read in the documentation that the default mode was 0666 and
then it was or'ed with umask.
The default mask works fine with open(), but not with ofstream(), it
seems that ofstream behaves likes if it have a  default mask of 0664.

I checked the include "fstream.h", and effectively, the default values
are 0664. Is it standard ??? I think that all the others compilers have
a 0666 default value, am I wrong ?

David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]