* cygerrno.h (__set_errno): Define as inline function here.

(set_errno): Always define as call to __set_errno.
	* debug.cc (__set_errno): Move to cygerrno.h.
This commit is contained in:
Corinna Vinschen 2005-05-04 11:00:22 +00:00
parent f3b0036304
commit 5d4750a996
3 changed files with 13 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2005-05-04 Corinna Vinschen <corinna@vinschen.de>
* cygerrno.h (__set_errno): Define as inline function here.
(set_errno): Always define as call to __set_errno.
* debug.cc (__set_errno): Move to cygerrno.h.
2005-05-03 Christopher Faylor <cgf@timesys.com>
* shared.cc (user_shared_initialize): Rework locking so that nothing is

View File

@ -23,12 +23,14 @@ int __stdcall geterrno_from_win_error (DWORD code, int deferrno) __attribute__ (
__seterrno_from_win_error (winerr); \
})
#ifndef DEBUGGING
#define set_errno(val) (errno = _impure_ptr->_errno = (val))
#else
int __stdcall __set_errno (const char *ln, int ln, int val) __attribute ((regparm(3)));
inline int
__set_errno (const char *fn, int ln, int val)
{
debug_printf ("%s:%d val %d", fn, ln, val);
return errno = _impure_ptr->_errno = (val);
}
#define set_errno(val) __set_errno (__PRETTY_FUNCTION__, __LINE__, (val))
#endif
#define get_errno() (errno)
extern "C" void __stdcall set_sig_errno (int e);

View File

@ -230,12 +230,4 @@ close_handle (const char *func, int ln, HANDLE h, const char *name, bool force)
#endif
return ret;
}
int __stdcall
__set_errno (const char *func, int ln, int val)
{
debug_printf ("%s:%d val %d", func, ln, val);
_impure_ptr->_errno = val;
return errno = val;
}
#endif /*DEBUGGING*/