This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Help on file access with g++
- To: gcc-help at gcc dot gnu dot org
- Subject: Help on file access with g++
- From: David Berthelot <davidb at Magma-DA dot COM>
- Date: Fri, 09 Mar 2001 14:45:23 -0800
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