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
1150c045
Commit
1150c045
authored
Jul 04, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr120: Add fegetenv implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6526ac19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
4 deletions
+46
-4
api-ms-win-crt-runtime-l1-1-0.spec
...win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+25
-0
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+1
-1
math.c
dlls/msvcrt/math.c
+11
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+6
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
View file @
1150c045
...
...
@@ -88,7 +88,7 @@
@ cdecl abort() ucrtbase.abort
@ cdecl exit(long) ucrtbase.exit
@ stub feclearexcept
@
stub
fegetenv
@
cdecl fegetenv(ptr) ucrtbase.
fegetenv
@ stub fegetexceptflag
@ stub fegetround
@ stub feholdexcept
...
...
dlls/msvcr120/msvcr120.spec
View file @
1150c045
...
...
@@ -2144,7 +2144,7 @@
@ stub fdimf
@ stub fdiml
@ stub feclearexcept
@
stub
fegetenv
@
cdecl fegetenv(ptr) MSVCRT_
fegetenv
@ stub fegetexceptflag
@ stub fegetround
@ stub feholdexcept
...
...
dlls/msvcr120/tests/msvcr120.c
View file @
1150c045
...
...
@@ -147,6 +147,12 @@ struct MSVCRT_lconv
wchar_t
*
_W_negative_sign
;
};
typedef
struct
{
unsigned
int
control
;
unsigned
int
status
;
}
fenv_t
;
static
char
*
(
CDECL
*
p_setlocale
)(
int
category
,
const
char
*
locale
);
static
struct
MSVCRT_lconv
*
(
CDECL
*
p_localeconv
)(
void
);
static
size_t
(
CDECL
*
p_wcstombs_s
)(
size_t
*
ret
,
char
*
dest
,
size_t
sz
,
const
wchar_t
*
src
,
size_t
max
);
...
...
@@ -162,6 +168,8 @@ static int (CDECL *p__finite)(double);
static
float
(
CDECL
*
p_wcstof
)(
const
wchar_t
*
,
wchar_t
**
);
static
double
(
CDECL
*
p_remainder
)(
double
,
double
);
static
int
*
(
CDECL
*
p_errno
)(
void
);
static
int
(
CDECL
*
p_fegetenv
)(
fenv_t
*
);
static
int
(
CDECL
*
p__clearfp
)(
void
);
/* make sure we use the correct errno */
#undef errno
...
...
@@ -207,6 +215,8 @@ static BOOL init(void)
p_wcstof
=
(
void
*
)
GetProcAddress
(
module
,
"wcstof"
);
p_remainder
=
(
void
*
)
GetProcAddress
(
module
,
"remainder"
);
p_errno
=
(
void
*
)
GetProcAddress
(
module
,
"_errno"
);
SET
(
p_fegetenv
,
"fegetenv"
);
SET
(
p__clearfp
,
"_clearfp"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
SET
(
p_critical_section_ctor
,
"??0critical_section@Concurrency@@QEAA@XZ"
);
...
...
@@ -686,6 +696,20 @@ static void test_critical_section(void)
call_func1
(
p_critical_section_dtor
,
&
cs
);
}
static
void
test_fegetenv
(
void
)
{
int
ret
;
fenv_t
env
;
p__clearfp
();
ret
=
p_fegetenv
(
&
env
);
ok
(
!
ret
,
"fegetenv returned %x
\n
"
,
ret
);
ok
(
env
.
control
==
(
_EM_INEXACT
|
_EM_UNDERFLOW
|
_EM_OVERFLOW
|
_EM_ZERODIVIDE
|
_EM_INVALID
),
"env.control = %x
\n
"
,
env
.
control
);
ok
(
!
env
.
status
,
"env.status = %x
\n
"
,
env
.
status
);
}
START_TEST
(
msvcr120
)
{
if
(
!
init
())
return
;
...
...
@@ -699,4 +723,5 @@ START_TEST(msvcr120)
test__strtof
();
test_remainder
();
test_critical_section
();
test_fegetenv
();
}
dlls/msvcr120_app/msvcr120_app.spec
View file @
1150c045
...
...
@@ -1810,7 +1810,7 @@
@ stub fdimf
@ stub fdiml
@ stub feclearexcept
@
stub
fegetenv
@
cdecl fegetenv(ptr) msvcr120.
fegetenv
@ stub fegetexceptflag
@ stub fegetround
@ stub feholdexcept
...
...
dlls/msvcrt/math.c
View file @
1150c045
...
...
@@ -1199,6 +1199,17 @@ int CDECL _controlfp_s(unsigned int *cur, unsigned int newval, unsigned int mask
}
/*********************************************************************
* fegetenv (MSVCR120.@)
*/
int
CDECL
MSVCRT_fegetenv
(
fenv_t
*
env
)
{
env
->
control
=
_controlfp
(
0
,
0
)
&
(
MSVCRT__EM_INEXACT
|
MSVCRT__EM_UNDERFLOW
|
MSVCRT__EM_OVERFLOW
|
MSVCRT__EM_ZERODIVIDE
|
MSVCRT__EM_INVALID
);
env
->
status
=
_statusfp
();
return
0
;
}
/*********************************************************************
* __fpe_flt_rounds (UCRTBASE.@)
*/
int
CDECL
__fpe_flt_rounds
(
void
)
...
...
dlls/msvcrt/msvcrt.h
View file @
1150c045
...
...
@@ -910,6 +910,12 @@ struct MSVCRT__stat64 {
#define MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000
#define MSVCRT__EM_AMBIGUOUS 0x80000000
typedef
struct
{
unsigned
int
control
;
unsigned
int
status
;
}
fenv_t
;
#define MSVCRT_CLOCKS_PER_SEC 1000
/* signals */
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
1150c045
...
...
@@ -2286,7 +2286,7 @@
@ stub fdimf
@ stub fdiml
@ stub feclearexcept
@
stub
fegetenv
@
cdecl fegetenv(ptr) MSVCRT_
fegetenv
@ stub fegetexceptflag
@ stub fegetround
@ stub feholdexcept
...
...
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