Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
67088eb3
Commit
67088eb3
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 _set_doserrno.
parent
ad68c0bd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
4 deletions
+46
-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
+9
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
misc.c
dlls/msvcrt/tests/misc.c
+32
-0
stdlib.h
include/msvcrt/stdlib.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
67088eb3
...
@@ -1070,7 +1070,7 @@
...
@@ -1070,7 +1070,7 @@
@ cdecl _set_SSE2_enable(long) msvcrt._set_SSE2_enable
@ cdecl _set_SSE2_enable(long) msvcrt._set_SSE2_enable
@ stub _set_abort_behavior
@ stub _set_abort_behavior
@ stub _set_controlfp
@ stub _set_controlfp
@
stub
_set_doserrno
@
cdecl _set_doserrno(long) msvcrt.
_set_doserrno
@ cdecl _set_errno(long) msvcrt._set_errno
@ cdecl _set_errno(long) msvcrt._set_errno
@ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ stub _set_fmode
@ stub _set_fmode
...
...
dlls/msvcr80/msvcr80.spec
View file @
67088eb3
...
@@ -923,7 +923,7 @@
...
@@ -923,7 +923,7 @@
@ stub _set_abort_behavior
@ stub _set_abort_behavior
@ stub _set_amblksiz
@ stub _set_amblksiz
@ stub _set_controlfp
@ stub _set_controlfp
@
stub
_set_doserrno
@
cdecl _set_doserrno(long) msvcrt.
_set_doserrno
@ cdecl _set_errno(long) msvcrt._set_errno
@ cdecl _set_errno(long) msvcrt._set_errno
@ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ stub _set_fmode
@ stub _set_fmode
...
...
dlls/msvcr90/msvcr90.spec
View file @
67088eb3
...
@@ -909,7 +909,7 @@
...
@@ -909,7 +909,7 @@
@ stub _set_abort_behavior
@ stub _set_abort_behavior
@ stub _set_amblksiz
@ stub _set_amblksiz
@ stub _set_controlfp
@ stub _set_controlfp
@
stub
_set_doserrno
@
cdecl _set_doserrno(long) msvcrt.
_set_doserrno
@ cdecl _set_errno(long) msvcrt._set_errno
@ cdecl _set_errno(long) msvcrt._set_errno
@ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ cdecl _set_error_mode(long) msvcrt._set_error_mode
@ stub _set_fmode
@ stub _set_fmode
...
...
dlls/msvcrt/errno.c
View file @
67088eb3
...
@@ -237,6 +237,15 @@ int CDECL _set_errno(int value)
...
@@ -237,6 +237,15 @@ int CDECL _set_errno(int value)
}
}
/*********************************************************************
/*********************************************************************
* _set_doserrno (MSVCRT.@)
*/
int
CDECL
_set_doserrno
(
int
value
)
{
*
MSVCRT___doserrno
()
=
value
;
return
0
;
}
/*********************************************************************
* strerror (MSVCRT.@)
* strerror (MSVCRT.@)
*/
*/
char
*
CDECL
MSVCRT_strerror
(
int
err
)
char
*
CDECL
MSVCRT_strerror
(
int
err
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
67088eb3
...
@@ -848,7 +848,7 @@
...
@@ -848,7 +848,7 @@
@ stdcall -i386 _seh_longjmp_unwind(ptr)
@ stdcall -i386 _seh_longjmp_unwind(ptr)
@ cdecl _set_SSE2_enable(long) MSVCRT__set_SSE2_enable
@ cdecl _set_SSE2_enable(long) MSVCRT__set_SSE2_enable
# stub _set_controlfp
# stub _set_controlfp
# stub _set_doserrno
@ cdecl _set_doserrno(long)
@ cdecl _set_errno(long)
@ cdecl _set_errno(long)
@ cdecl _set_error_mode(long)
@ cdecl _set_error_mode(long)
# stub _set_fileinfo
# stub _set_fileinfo
...
...
dlls/msvcrt/tests/misc.c
View file @
67088eb3
...
@@ -28,6 +28,7 @@ static int (__cdecl *pI10_OUTPUT)(long double, int, int, void*);
...
@@ -28,6 +28,7 @@ static int (__cdecl *pI10_OUTPUT)(long double, int, int, void*);
static
int
(
__cdecl
*
pstrerror_s
)(
char
*
,
MSVCRT_size_t
,
int
);
static
int
(
__cdecl
*
pstrerror_s
)(
char
*
,
MSVCRT_size_t
,
int
);
static
int
(
__cdecl
*
p_get_doserrno
)(
int
*
);
static
int
(
__cdecl
*
p_get_doserrno
)(
int
*
);
static
int
(
__cdecl
*
p_get_errno
)(
int
*
);
static
int
(
__cdecl
*
p_get_errno
)(
int
*
);
static
int
(
__cdecl
*
p_set_doserrno
)(
int
);
static
int
(
__cdecl
*
p_set_errno
)(
int
);
static
int
(
__cdecl
*
p_set_errno
)(
int
);
static
void
init
(
void
)
static
void
init
(
void
)
...
@@ -40,6 +41,7 @@ static void init(void)
...
@@ -40,6 +41,7 @@ static void init(void)
pstrerror_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"strerror_s"
);
pstrerror_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"strerror_s"
);
p_get_doserrno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_get_doserrno"
);
p_get_doserrno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_get_doserrno"
);
p_get_errno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_get_errno"
);
p_get_errno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_get_errno"
);
p_set_doserrno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_set_doserrno"
);
p_set_errno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_set_errno"
);
p_set_errno
=
(
void
*
)
GetProcAddress
(
hmod
,
"_set_errno"
);
}
}
...
@@ -294,6 +296,35 @@ static void test__get_errno(void)
...
@@ -294,6 +296,35 @@ static void test__get_errno(void)
ok
(
out
==
EBADF
,
"Expected output variable to be EBADF, got %d
\n
"
,
out
);
ok
(
out
==
EBADF
,
"Expected output variable to be EBADF, got %d
\n
"
,
out
);
}
}
static
void
test__set_doserrno
(
void
)
{
int
ret
;
if
(
!
p_set_doserrno
)
{
win_skip
(
"_set_doserrno is not available
\n
"
);
return
;
}
_doserrno
=
ERROR_INVALID_CMM
;
ret
=
p_set_doserrno
(
ERROR_FILE_NOT_FOUND
);
ok
(
ret
==
0
,
"Expected _set_doserrno to return 0, got %d
\n
"
,
ret
);
ok
(
_doserrno
==
ERROR_FILE_NOT_FOUND
,
"Expected _doserrno to be ERROR_FILE_NOT_FOUND, got %d
\n
"
,
_doserrno
);
_doserrno
=
ERROR_INVALID_CMM
;
ret
=
p_set_doserrno
(
-
1
);
ok
(
ret
==
0
,
"Expected _set_doserrno to return 0, got %d
\n
"
,
ret
);
ok
(
_doserrno
==
-
1
,
"Expected _doserrno to be -1, got %d
\n
"
,
_doserrno
);
_doserrno
=
ERROR_INVALID_CMM
;
ret
=
p_set_doserrno
(
0xdeadbeef
);
ok
(
ret
==
0
,
"Expected _set_doserrno to return 0, got %d
\n
"
,
ret
);
ok
(
_doserrno
==
0xdeadbeef
,
"Expected _doserrno to be 0xdeadbeef, got %d
\n
"
,
_doserrno
);
}
static
void
test__set_errno
(
void
)
static
void
test__set_errno
(
void
)
{
{
int
ret
;
int
ret
;
...
@@ -330,5 +361,6 @@ START_TEST(misc)
...
@@ -330,5 +361,6 @@ START_TEST(misc)
test_strerror_s
();
test_strerror_s
();
test__get_doserrno
();
test__get_doserrno
();
test__get_errno
();
test__get_errno
();
test__set_doserrno
();
test__set_errno
();
test__set_errno
();
}
}
include/msvcrt/stdlib.h
View file @
67088eb3
...
@@ -130,6 +130,7 @@ extern int* __cdecl _errno(void);
...
@@ -130,6 +130,7 @@ extern int* __cdecl _errno(void);
errno_t
__cdecl
_get_doserrno
(
int
*
);
errno_t
__cdecl
_get_doserrno
(
int
*
);
errno_t
__cdecl
_get_errno
(
int
*
);
errno_t
__cdecl
_get_errno
(
int
*
);
errno_t
__cdecl
_set_doserrno
(
int
);
errno_t
__cdecl
_set_errno
(
int
);
errno_t
__cdecl
_set_errno
(
int
);
typedef
int
(
__cdecl
*
_onexit_t
)(
void
);
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