X-Spam-Check-By: sourceware.org Message-ID: <4680FE40.7010102@byu.net> Date: Tue, 26 Jun 2007 05:53:36 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, oceanare AT pacific DOT net DOT sg Subject: Re: Problem with stat References: <46808EA8 DOT 2030202 AT pacific DOT net DOT sg> <4680DD73 DOT 8090300 AT sh DOT cvut DOT cz> <4680E3A0 DOT 3020508 AT pacific DOT net DOT sg> In-Reply-To: <4680E3A0.3020508@pacific.net.sg> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Erich Dollansky on 6/26/2007 4:00 AM: >>> When I run this little C++ program: >>> >>> PRIVATE VOID StatLessdox (VOID) >>> BEGIN ... >> This is NOT C++. Not without some obscure header included before the >> source. >> > 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 ebb9 AT byu DOT net -----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 iD8DBQFGgP4884KuGfSFAYARAlqjAJ9Ba96xtGUMLKmq/20rQBtQDoimvACfdwQd O3jrm/+wJ+VA2edtnX4Fvww= =yWrH -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/