This is the mail archive of the
mailing list for the Cygwin project.
Re: Problem with stat
-----BEGIN PGP SIGNED MESSAGE-----
According to Erich Dollansky on 6/26/2007 4:00 AM:
>>> When I run this little C++ program:
>>> PRIVATE VOID StatLessdox (VOID)
>> This is NOT C++. Not without some obscure header included before the
> this is why I mentioned that it is C++.
If it were truly C++, you would have also showed the include files and
preprocessor macros that you used. If you want help on this issue,
provide a COMPILABLE example, and preferably one that is not so masked by
macros that it looks more like pascal than C++.
>> printf ("Mode: %lX\n", (unsigned long) Stat.st_mode);
Since the next revision of POSIX is introducing a new requirement for
mode_t to promote to int when passed through varargs (so that
open("foo",O_CREAT|O_RDWR,0666) will behave like programmers expect it to,
even though it is undefined in the current version of POSIX and SUSv3), it
is simpler to write:
printf ("Mode: %X\n", Stat.st_mode);
Don't work too hard, make some time for fun as well!
Eric Blake email@example.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html