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
0b19a6f7
Commit
0b19a6f7
authored
Nov 28, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better support for div and ldiv in Winelib apps.
parent
ed36816b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
14 deletions
+29
-14
math.c
dlls/msvcrt/math.c
+4
-8
stdlib.h
include/msvcrt/stdlib.h
+25
-4
import.c
tools/winebuild/import.c
+0
-2
No files found.
dlls/msvcrt/math.c
View file @
0b19a6f7
...
@@ -737,12 +737,10 @@ char *_gcvt( double number, int ndigit, char *buff )
...
@@ -737,12 +737,10 @@ char *_gcvt( double number, int ndigit, char *buff )
* [i386] Windows binary compatible - returns the struct in eax/edx.
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/
*/
#ifdef __i386__
#ifdef __i386__
LONGLONG
MSVCRT_div
(
int
num
,
int
denom
)
unsigned
__int64
MSVCRT_div
(
int
num
,
int
denom
)
{
{
LONGLONG
retval
;
div_t
dt
=
div
(
num
,
denom
);
div_t
dt
=
div
(
num
,
denom
);
retval
=
((
LONGLONG
)
dt
.
rem
<<
32
)
|
dt
.
quot
;
return
((
unsigned
__int64
)
dt
.
rem
<<
32
)
|
(
unsigned
int
)
dt
.
quot
;
return
retval
;
}
}
#else
#else
/*********************************************************************
/*********************************************************************
...
@@ -769,12 +767,10 @@ MSVCRT_div_t MSVCRT_div(int num, int denom)
...
@@ -769,12 +767,10 @@ MSVCRT_div_t MSVCRT_div(int num, int denom)
* [i386] Windows binary compatible - returns the struct in eax/edx.
* [i386] Windows binary compatible - returns the struct in eax/edx.
*/
*/
#ifdef __i386__
#ifdef __i386__
ULONGLONG
MSVCRT_ldiv
(
long
num
,
long
denom
)
unsigned
__int64
MSVCRT_ldiv
(
long
num
,
long
denom
)
{
{
ULONGLONG
retval
;
ldiv_t
ldt
=
ldiv
(
num
,
denom
);
ldiv_t
ldt
=
ldiv
(
num
,
denom
);
retval
=
((
ULONGLONG
)
ldt
.
rem
<<
32
)
|
(
ULONG
)
ldt
.
quot
;
return
((
unsigned
__int64
)
ldt
.
rem
<<
32
)
|
(
unsigned
long
)
ldt
.
quot
;
return
retval
;
}
}
#else
#else
/*********************************************************************
/*********************************************************************
...
...
include/msvcrt/stdlib.h
View file @
0b19a6f7
...
@@ -170,10 +170,7 @@ double MSVCRT(atof)(const char*);
...
@@ -170,10 +170,7 @@ double MSVCRT(atof)(const char*);
int
MSVCRT
(
atoi
)(
const
char
*
);
int
MSVCRT
(
atoi
)(
const
char
*
);
long
MSVCRT
(
atol
)(
const
char
*
);
long
MSVCRT
(
atol
)(
const
char
*
);
void
*
MSVCRT
(
calloc
)(
MSVCRT
(
size_t
),
MSVCRT
(
size_t
));
void
*
MSVCRT
(
calloc
)(
MSVCRT
(
size_t
),
MSVCRT
(
size_t
));
#ifdef __i386__
#ifndef __i386__
__int64
MSVCRT
(
div
)(
int
,
int
);
unsigned
__int64
MSVCRT
(
ldiv
)(
long
,
long
);
#else
MSVCRT
(
div_t
)
MSVCRT
(
div
)(
int
,
int
);
MSVCRT
(
div_t
)
MSVCRT
(
div
)(
int
,
int
);
MSVCRT
(
ldiv_t
)
MSVCRT
(
ldiv
)(
long
,
long
);
MSVCRT
(
ldiv_t
)
MSVCRT
(
ldiv
)(
long
,
long
);
#endif
#endif
...
@@ -242,6 +239,30 @@ static inline _onexit_t onexit(_onexit_t func) { return _onexit(func); }
...
@@ -242,6 +239,30 @@ static inline _onexit_t onexit(_onexit_t func) { return _onexit(func); }
static
inline
int
putenv
(
const
char
*
str
)
{
return
_putenv
(
str
);
}
static
inline
int
putenv
(
const
char
*
str
)
{
return
_putenv
(
str
);
}
static
inline
void
swab
(
char
*
src
,
char
*
dst
,
int
len
)
{
_swab
(
src
,
dst
,
len
);
}
static
inline
void
swab
(
char
*
src
,
char
*
dst
,
int
len
)
{
_swab
(
src
,
dst
,
len
);
}
static
inline
char
*
ultoa
(
unsigned
long
value
,
char
*
str
,
int
radix
)
{
return
_ultoa
(
value
,
str
,
radix
);
}
static
inline
char
*
ultoa
(
unsigned
long
value
,
char
*
str
,
int
radix
)
{
return
_ultoa
(
value
,
str
,
radix
);
}
#ifdef __i386__
static
inline
div_t
__wine_msvcrt_div
(
int
num
,
int
denom
)
{
extern
unsigned
__int64
div
(
int
,
int
);
div_t
ret
;
unsigned
__int64
res
=
div
(
num
,
denom
);
ret
.
quot
=
(
int
)
res
;
ret
.
rem
=
(
int
)(
res
>>
32
);
return
ret
;
}
static
inline
ldiv_t
__wine_msvcrt_ldiv
(
long
num
,
long
denom
)
{
extern
unsigned
__int64
ldiv
(
long
,
long
);
ldiv_t
ret
;
unsigned
__int64
res
=
ldiv
(
num
,
denom
);
ret
.
quot
=
(
long
)
res
;
ret
.
rem
=
(
long
)(
res
>>
32
);
return
ret
;
}
#define div(num,denom) __wine_msvcrt_div(num,denom)
#define ldiv(num,denom) __wine_msvcrt_ldiv(num,denom)
#endif
#endif
/* USE_MSVCRT_PREFIX */
#endif
/* USE_MSVCRT_PREFIX */
#endif
/* __WINE_STDLIB_H */
#endif
/* __WINE_STDLIB_H */
tools/winebuild/import.c
View file @
0b19a6f7
...
@@ -80,14 +80,12 @@ static const char * const default_ignored_symbols[] =
...
@@ -80,14 +80,12 @@ static const char * const default_ignored_symbols[] =
"ceil"
,
"ceil"
,
"cos"
,
"cos"
,
"cosh"
,
"cosh"
,
"div"
,
"exp"
,
"exp"
,
"fabs"
,
"fabs"
,
"floor"
,
"floor"
,
"fmod"
,
"fmod"
,
"frexp"
,
"frexp"
,
"labs"
,
"labs"
,
"ldiv"
,
"log"
,
"log"
,
"log10"
,
"log10"
,
"memchr"
,
"memchr"
,
...
...
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