Author: akhaldi
Date: Mon May 12 12:52:40 2014
New Revision: 63252
URL:
http://svn.reactos.org/svn/reactos?rev=63252&view=rev
Log:
[CRT]
* Reduce difference to Wine. No code changes.
CORE-8080
Modified:
trunk/reactos/lib/sdk/crt/stdlib/errno.c
Modified: trunk/reactos/lib/sdk/crt/stdlib/errno.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/errno.c…
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/errno.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/errno.c [iso-8859-1] Mon May 12 12:52:40 2014
@@ -13,24 +13,36 @@
static _invalid_parameter_handler invalid_parameter_handler = NULL;
-/*
- * @implemented
+/*********************************************************************
+ * _errno (MSVCRT.@)
+ */
+int CDECL *_errno(void)
+{
+ return &(msvcrt_get_thread_data()->thread_errno);
+}
+
+/*********************************************************************
+ * __doserrno (MSVCRT.@)
*/
unsigned long* CDECL __doserrno(void)
{
return &(msvcrt_get_thread_data()->thread_doserrno);
}
-/*
- * @implemented
+/*********************************************************************
+ * _get_errno (MSVCRT.@)
*/
-int CDECL *_errno(void)
+errno_t CDECL _get_errno(int *pValue)
{
- return &(msvcrt_get_thread_data()->thread_errno);
+ if (!pValue)
+ return EINVAL;
+
+ *pValue = *_errno();
+ return 0;
}
-/*
- * @implemented
+/*********************************************************************
+ * _get_doserrno (MSVCRT.@)
*/
errno_t CDECL _get_doserrno(unsigned long *pValue)
{
@@ -41,33 +53,21 @@
return 0;
}
-/*
- * @implemented
+/*********************************************************************
+ * _set_errno (MSVCRT.@)
+ */
+int CDECL _set_errno(int error)
+{
+ *_errno() = error;
+ return 0;
+}
+
+/*********************************************************************
+ * _set_doserrno (MSVCRT.@)
*/
errno_t CDECL _set_doserrno(unsigned long error)
{
*__doserrno() = error;
- return 0;
-}
-
-/*
- * @implemented
- */
-errno_t CDECL _get_errno(int *pValue)
-{
- if (!pValue)
- return EINVAL;
-
- *pValue = *_errno();
- return 0;
-}
-
-/*
- * @implemented
- */
-int CDECL _set_errno(int error)
-{
- *_errno() = error;
return 0;
}
@@ -124,8 +124,8 @@
}
/******************************************************************************
-* _seterrormode (MSVCRT.@)
-*/
+ * _seterrormode (MSVCRT.@)
+ */
void CDECL _seterrormode(int mode)
{
SetErrorMode( mode );
@@ -134,8 +134,8 @@
/******************************************************************************
* _invalid_parameter (MSVCRT.@)
*/
-void CDECL _invalid_parameter(const wchar_t *expr, const wchar_t *func,
- const wchar_t *file, unsigned int line, uintptr_t
arg)
+void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func,
+ const wchar_t *file, unsigned int line, uintptr_t arg)
{
if (invalid_parameter_handler) invalid_parameter_handler( expr, func, file, line, arg
);
else
@@ -163,4 +163,3 @@
invalid_parameter_handler = handler;
return old;
}
-/* EOF */