Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > How to get last...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4264 of 4370
Post > Topic >>

How to get last errno on Windows and Linux?

by Bill David <billdavidcn@[EMAIL PROTECTED] > Sep 9, 2008 at 05:56 AM

Subject: How to get last errno on Windows and Linux?

I am not sure if this is the right place that I can post my question.
But I am sure some of you know the answer.
I am trying to ****t my program to Linux, but finally find that
_get_errno can't be map to another Linux API.

I want to write the following inline function for Linux platform:
inline static error_t get_errno(int* pValue)						{return *pValue =
errno; }

But I am not sure if it's safe enough in multi-thread environment. Is
errno that is declared in errno.h is thread-safe or a Thread Local
Storage? If not, then, how is _get_errno implemented in Windows
errno.h?
 




 3 Posts in Topic:
How to get last errno on Windows and Linux?
Bill David <billdavidc  2008-09-09 05:56:14 
Re: How to get last errno on Windows and Linux?
Ben Bacarisse <ben.use  2008-09-10 01:32:30 
Re: How to get last errno on Windows and Linux?
Ulrich Eckhardt <dooms  2008-09-10 08:00:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 9:55:12 CST 2008.