Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c3b127f5
Commit
c3b127f5
authored
Sep 28, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Sep 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement _get_doserrno.
parent
79ab7152
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
4 deletions
+45
-4
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
errno.c
dlls/msvcrt/errno.c
+12
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
misc.c
dlls/msvcrt/tests/misc.c
+28
-0
stdlib.h
include/msvcrt/stdlib.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
c3b127f5
...
...
@@ -677,7 +677,7 @@
@ cdecl _gcvt_s(ptr long double long) msvcrt._gcvt_s
@ stub _get_current_locale
@ stub _get_daylight
@
stub
_get_doserrno
@
cdecl _get_doserrno(ptr) msvcrt.
_get_doserrno
@ stub _get_dstbias
@ cdecl _get_errno(ptr) msvcrt._get_errno
@ stub _get_fmode
...
...
dlls/msvcr80/msvcr80.spec
View file @
c3b127f5
...
...
@@ -519,7 +519,7 @@
@ stub _get_amblksiz
@ stub _get_current_locale
@ stub _get_daylight
@
stub
_get_doserrno
@
cdecl _get_doserrno(ptr) msvcrt.
_get_doserrno
@ stub _get_dstbias
@ cdecl _get_errno(ptr) msvcrt._get_errno
@ stub _get_fmode
...
...
dlls/msvcr90/msvcr90.spec
View file @
c3b127f5
...
...
@@ -511,7 +511,7 @@
@ stub _get_amblksiz
@ stub _get_current_locale
@ stub _get_daylight
@
stub
_get_doserrno
@
cdecl _get_doserrno(ptr) msvcrt.
_get_doserrno
@ stub _get_dstbias
@ cdecl _get_errno(ptr) msvcrt._get_errno
@ stub _get_fmode
...
...
dlls/msvcrt/errno.c
View file @
c3b127f5
...
...
@@ -216,6 +216,18 @@ int CDECL _get_errno(int *pValue)
}
/*********************************************************************
* _get_doserrno (MSVCRT.@)
*/
int
CDECL
_get_doserrno
(
int
*
pValue
)
{
if
(
!
pValue
)
return
MSVCRT_EINVAL
;
*
pValue
=
*
MSVCRT___doserrno
();
return
0
;
}
/*********************************************************************
* strerror (MSVCRT.@)
*/
char
*
CDECL
MSVCRT_strerror
(
int
err
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
c3b127f5
...
...
@@ -462,7 +462,7 @@
@ varargs _fwscanf_s_l(ptr wstr ptr) MSVCRT__fwscanf_s_l
@ cdecl _gcvt(double long str)
@ cdecl _gcvt_s(ptr long double long)
# stub _get_doserrno
@ cdecl _get_doserrno(ptr)
# stub _get_environ
@ cdecl _get_errno(ptr)
# stub _get_fileinfo
...
...
dlls/msvcrt/tests/misc.c
View file @
c3b127f5
...
...
@@ -26,6 +26,7 @@ static int (__cdecl *prand_s)(unsigned int *);
static
int
(
__cdecl
*
pmemcpy_s
)(
void
*
,
MSVCRT_size_t
,
void
*
,
MSVCRT_size_t
);
static
int
(
__cdecl
*
pI10_OUTPUT
)(
long
double
,
int
,
int
,
void
*
);
static
int
(
__cdecl
*
pstrerror_s
)(
char
*
,
MSVCRT_size_t
,
int
);
static
int
(
__cdecl
*
p_get_doserrno
)(
int
*
);
static
int
(
__cdecl
*
p_get_errno
)(
int
*
);
static
void
init
(
void
)
...
...
@@ -36,6 +37,7 @@ static void init(void)
pmemcpy_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"memcpy_s"
);
pI10_OUTPUT
=
(
void
*
)
GetProcAddress
(
hmod
,
"$I10_OUTPUT"
);
pstrerror_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"strerror_s"
);
p_get_doserrno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_get_doserrno"
);
p_get_errno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_get_errno"
);
}
...
...
@@ -243,6 +245,31 @@ static void test_strerror_s(void)
ok
(
ret
==
0
,
"Expected strerror_s to return 0, got %d
\n
"
,
ret
);
}
static
void
test__get_doserrno
(
void
)
{
int
ret
,
out
;
if
(
!
p_get_doserrno
)
{
win_skip
(
"_get_doserrno is not available
\n
"
);
return
;
}
_doserrno
=
ERROR_INVALID_CMM
;
errno
=
EBADF
;
ret
=
p_get_doserrno
(
NULL
);
ok
(
ret
==
EINVAL
,
"Expected _get_doserrno to return EINVAL, got %d
\n
"
,
ret
);
ok
(
_doserrno
=
ERROR_INVALID_CMM
,
"Expected _doserrno to be ERROR_INVALID_CMM, got %d
\n
"
,
_doserrno
);
ok
(
errno
==
EBADF
,
"Expected errno to be EBADF, got %d
\n
"
,
errno
);
_doserrno
=
ERROR_INVALID_CMM
;
errno
=
EBADF
;
out
=
0xdeadbeef
;
ret
=
p_get_doserrno
(
&
out
);
ok
(
ret
==
0
,
"Expected _get_doserrno to return 0, got %d
\n
"
,
ret
);
ok
(
out
==
ERROR_INVALID_CMM
,
"Expected output variable to be ERROR_INVAID_CMM, got %d
\n
"
,
out
);
}
static
void
test__get_errno
(
void
)
{
int
ret
,
out
;
...
...
@@ -273,5 +300,6 @@ START_TEST(misc)
test_memcpy_s
();
test_I10_OUTPUT
();
test_strerror_s
();
test__get_doserrno
();
test__get_errno
();
}
include/msvcrt/stdlib.h
View file @
c3b127f5
...
...
@@ -128,6 +128,7 @@ extern int* __cdecl _errno(void);
* char** _sys_errlist;
*/
errno_t
__cdecl
_get_doserrno
(
int
*
);
errno_t
__cdecl
_get_errno
(
int
*
);
typedef
int
(
__cdecl
*
_onexit_t
)(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment