bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] Re: CVS update [cvs1-11-x-branch]: /ccvs/src/


From: Derek Robert Price
Subject: Re: [Bug-gnulib] Re: CVS update [cvs1-11-x-branch]: /ccvs/src/
Date: Tue, 07 Sep 2004 09:22:19 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Haible wrote:

>Derek Robert Price wrote:
>
>>>In particular the Woe32 stdio in MSVCRT does not usually set errno upon
>>>failure. I.e. it implements the C89 spec, not the POSIX spec.
>>
>>Now, that could cause problems.  I'd have to implement the entire
>>STDIO implementation using write and handling my own buffers to work
>>around that.  S'pose I could probably snag most of the implementation
>>from glibc...
>
>
>It may be easier to just use the Woe32 API instead of errno:
>
>  #ifdef _WIN32
>    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
>                  NULL, GetLastError (), 0, buf, sizeof (buf), NULL));
>  #else
>    perror (...);
>  #endif


Ah, thanks.  I didn't know that existed.  I'm not usually much of a
Windows programmer.

Cheers,

Derek

- --
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBPbYJLD1OTBfyMaQRAvsgAKDadBHoSnlhoU4o6B81a0BbRTC5vACcCtU0
RPqme7pPzuqHGbyUEUlGKvk=
=5qu4
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]