X-Spam-Check-By: sourceware.org
Message-ID: <4680FE40.7010102@byu.net>
Date: Tue, 26 Jun 2007 05:53:36 -0600
From: Eric Blake <ebb9@byu.net>
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@cygwin.com, oceanare@pacific.net.sg
Subject: Re: Problem with stat
References: <46808EA8.2030202@pacific.net.sg> <4680DD73.8090300@sh.cvut.cz> <4680E3A0.3020508@pacific.net.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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@byu.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/

